set selected tags in edititem

This commit is contained in:
2025-04-16 01:55:40 +02:00
parent ae36903e73
commit d17c33f6ee
3 changed files with 50 additions and 13 deletions

View File

@@ -14,6 +14,11 @@ type Tag struct {
ShopItems []ShopItem `gorm:"many2many:item_tags;"`
}
type CheckedTag struct {
Tag
Checked string
}
func NewTag(ctx *gin.Context) (Tag, error) {
colors := []string{
"red",