Compare commits
2 Commits
07c0be0ea1
...
085dc64db9
| Author | SHA1 | Date | |
|---|---|---|---|
| 085dc64db9 | |||
| 3df1ceaaac |
@@ -35,7 +35,7 @@
|
||||
}
|
||||
},
|
||||
"admConfig": {
|
||||
"build": 252,
|
||||
"build": 253,
|
||||
"oldBuild": "backend-0.1.3.zip"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -92,4 +92,4 @@
|
||||
"xlsx": "^0.18.5",
|
||||
"zod": "^3.24.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -96,6 +96,7 @@ export const standardOrders = async (data: any, user: any) => {
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
let postedOrders: any = [];
|
||||
for (const [customerID, orders] of Object.entries(groupedByCustomer)) {
|
||||
// console.log(`Running for Customer ID: ${customerID}`);
|
||||
const newOrders: any = orders;
|
||||
@@ -138,13 +139,19 @@ export const standardOrders = async (data: any, user: any) => {
|
||||
//console.log(updatedPredefinedObject);
|
||||
|
||||
// post the orders to the server
|
||||
const posting = await postOrders(updatedPredefinedObject, user);
|
||||
const posting: any = await postOrders(updatedPredefinedObject, user);
|
||||
|
||||
postedOrders.push({
|
||||
customer: customerID,
|
||||
success: posting.success,
|
||||
message: posting.message,
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
success: true,
|
||||
message:
|
||||
"Standard Template was just processed successfully, please check AlplaProd 2.0 to confirm no errors. ",
|
||||
data: [],
|
||||
data: postedOrders,
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user