feat: Add product routes and components to v2 in admin-next (#6958)
This commit is contained in:
1 parent
d333db0842
commit
07fb058d96
81 files changed
+597
-144
No files matched your search
@@ -45,7 +45,7 @@ export const createProductsWorkflow = createWorkflow(
|
||||
const inputProduct = data.input.products[i]
|
||||
return p.variants?.map((v, j) => ({
|
||||
...v,
|
||||
prices: inputProduct?.variants?.[j]?.prices,
|
||||
prices: inputProduct?.variants?.[j]?.prices ?? [],
|
||||
}))
|
||||
})
|
||||
.flat()
|
||||
@@ -54,7 +54,7 @@ export const createProductsWorkflow = createWorkflow(
|
||||
|
||||
const pricesToCreate = transform({ variantsWithAssociatedPrices }, (data) =>
|
||||
data.variantsWithAssociatedPrices.map((v) => ({
|
||||
prices: v.prices,
|
||||
prices: v.prices ?? [],
|
||||
}))
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user