diff --git a/public/fallback-QolkMzBWFR5QA8HIRSZYL.js b/public/fallback-r3cKmAFAnZHJEFbUI0_Zy.js similarity index 100% rename from public/fallback-QolkMzBWFR5QA8HIRSZYL.js rename to public/fallback-r3cKmAFAnZHJEFbUI0_Zy.js diff --git a/src/features/inventory/ItemDetailDialog.tsx b/src/features/inventory/ItemDetailDialog.tsx index fd0fbcf..a450899 100644 --- a/src/features/inventory/ItemDetailDialog.tsx +++ b/src/features/inventory/ItemDetailDialog.tsx @@ -361,13 +361,17 @@ function ViewMode({ item, setMode, onDelete }: { item: any, setMode: (m: "EDIT") )} - {/* DYNAMIC SPECS LOOP - Render ALL of them, skip 'other' if empty */} + {/* DYNAMIC SPECS LOOP - Render ALL of them, skip 'other' if empty, skip 'displayBadges' */} {Object.entries(allSpecs) .filter(([k, v]: any) => { // Ẩn field "other" nếu trống if (k.toLowerCase() === 'other' && (!v || String(v).trim() === '')) { return false; } + // Ẩn displayBadges (internal config, không hiển thị) + if (k === 'displayBadges') { + return false; + } return true; }) .map(([k, v]: any) => ( @@ -833,22 +837,28 @@ function EditMode({ item, locations, onCancel, onClose }: { item: any, locations
{badge.key}
- {/* Icon Select (Dynamic) */} + {/* Icon Select (Dynamic with preview) */}
Icon
- +
+ {(() => { + const PreviewIcon = BADGE_ICONS_MAP[badge.icon] || BADGE_ICONS_MAP['tag']; + return ; + })()} + +
{/* Color Select (Dynamic) */} diff --git a/src/features/inventory/SmartAddForm.tsx b/src/features/inventory/SmartAddForm.tsx index 181458f..8db2090 100644 --- a/src/features/inventory/SmartAddForm.tsx +++ b/src/features/inventory/SmartAddForm.tsx @@ -838,19 +838,25 @@ export function SmartAddForm({ locations, onSuccess }: SmartAddFormProps) { {/* Icon Select */}
Icon
- +
+ {(() => { + const PreviewIcon = BADGE_ICONS_MAP[badge.icon] || BADGE_ICONS_MAP['tag']; + return ; + })()} + +
{/* Color Select */}