Skip to content

Commit d9fa20e

Browse files
committed
Update create-order.mjs to correct product description format and adjust idorderfield handling
1 parent 64c8246 commit d9fa20e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

components/picqer/actions/create-order/create-order.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ export default {
226226
products: {
227227
type: "string[]",
228228
label: "Products",
229-
description: "List of objects of products to add to the order. **Format: [{\"idproduct\": 123, \"productcode\": 'ABC123', \"name\": 'Product Name', \"remarks\": 'Product remarks', \"price\": 100, \"idvatgroup\": 123}]}**",
229+
description: "List of objects of products to add to the order. **Format: [{\"idproduct\": 123, \"productcode\": \"ABC123\", \"name\": \"Product Name\", \"remarks\": \"Product remarks\", \"amount\": 100, \"idvatgroup\": 123}]**",
230230
optional: true,
231231
},
232232
},
@@ -267,7 +267,7 @@ export default {
267267
propData.options = field.values;
268268
}
269269

270-
props[field.idorderfield] = propData;
270+
props[`id${field.idorderfield}`] = propData;
271271
}
272272
}
273273
return props;
@@ -350,7 +350,7 @@ export default {
350350
key,
351351
value,
352352
]) => ({
353-
idorderfield: parseInt(key),
353+
idorderfield: parseInt(key.replace("id", "")),
354354
value: Array.isArray(value)
355355
? value.join(";")
356356
: value,

0 commit comments

Comments
 (0)