change UI & fix bugs

This commit is contained in:
2026-09-14 16:12:53 +03:30
parent 6944788b10
commit 2b7746be75
202 changed files with 1040 additions and 418 deletions
+5 -1
View File
@@ -38,6 +38,7 @@ function mapProduct(p: {
weightGrams?: number
weaveType?: string
colors?: string[]
colorImages?: Array<string | null>
tags?: string[]
isNew?: boolean
subtitle?: string
@@ -56,9 +57,11 @@ function mapProduct(p: {
weightGrams: p.weightGrams,
weaveType: p.weaveType,
colors: p.colors?.length ? p.colors : ['#6b7280'],
colorImages: p.colorImages,
tags: p.tags ?? [],
isNew: !!p.isNew,
imageUrl: p.imageUrl || p.imageUrls?.[0],
imageUrl: p.imageUrl || p.colorImages?.find(Boolean) || p.imageUrls?.[0],
imageUrls: p.imageUrls,
subtitle: p.subtitle,
rollMeters: p.rollMeters ?? 50,
companyId: p.companyId,
@@ -121,6 +124,7 @@ export const useCrmStore = defineStore('crm', () => {
weightGrams?: number
weaveType?: string
colors?: string[]
colorImages?: Array<string | null>
tags?: string[]
isNew?: boolean
subtitle?: string