Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2025-09-14 22:42:28 +08:00
parent 3211d331fa
commit 7acf6f5225
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
6 changed files with 395 additions and 9 deletions

View file

@ -72,6 +72,8 @@ func RenderGroupView(attrView *av.AttributeView, view, groupView *av.View, query
groupView.Table.Columns = view.Table.Columns
case av.LayoutTypeGallery:
groupView.Gallery.CardFields = view.Gallery.CardFields
case av.LayoutTypeKanban:
groupView.Kanban.Fields = view.Kanban.Fields
}
}
@ -102,6 +104,8 @@ func renderView(attrView *av.AttributeView, view *av.View, query string, depth *
ret = RenderAttributeViewTable(attrView, view, query, depth, cachedAttrViews)
case av.LayoutTypeGallery:
ret = RenderAttributeViewGallery(attrView, view, query, depth, cachedAttrViews)
case av.LayoutTypeKanban:
ret = RenderAttributeViewKanban(attrView, view, query, depth, cachedAttrViews)
}
return
}
@ -784,6 +788,16 @@ func removeMissingField(attrView *av.AttributeView, view *av.View, missingKeyID
}
}
if nil != view.Kanban {
for i, kanbanField := range view.Kanban.Fields {
if kanbanField.ID == missingKeyID {
view.Kanban.Fields = append(view.Kanban.Fields[:i], view.Kanban.Fields[i+1:]...)
changed = true
break
}
}
}
if changed {
av.SaveAttributeView(attrView)
}