x
This commit is contained in:
1 parent
46968782b6
commit
08045eabff
18 files changed
+943
-104
No files matched your search
@@ -151,6 +151,7 @@ async function createSingleProductTx(tx: any, payload: any, validateVariants: an
|
||||
option3: v.option3 || "",
|
||||
price: v.price != null ? Number(v.price) : 0,
|
||||
imageUrl: v.imageUrl || null,
|
||||
colorCode: v.colorCode || null,
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -715,6 +716,7 @@ export const productsRoute = new Elysia({ prefix: "/products" })
|
||||
option3: v.option3 || "",
|
||||
price: v.price || 0,
|
||||
imageUrl: v.imageUrl !== undefined ? (v.imageUrl || null) : undefined,
|
||||
colorCode: v.colorCode !== undefined ? (v.colorCode || null) : undefined,
|
||||
bomItems: v.bomItems ? {
|
||||
deleteMany: {},
|
||||
create: v.bomItems.map((b: any) => ({
|
||||
@@ -737,6 +739,7 @@ export const productsRoute = new Elysia({ prefix: "/products" })
|
||||
option3: v.option3 || "",
|
||||
price: v.price || 0,
|
||||
imageUrl: v.imageUrl || null,
|
||||
colorCode: v.colorCode || null,
|
||||
bomItems: v.bomItems && v.bomItems.length > 0 ? {
|
||||
create: v.bomItems.map((b: any) => ({
|
||||
rawMaterialId: b.rawMaterialId,
|
||||
|
||||
Reference in new issue
Block a user