change UI & fix bugs
This commit is contained in:
+5
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user