Compare commits

..

2 Commits

2 changed files with 11 additions and 4 deletions

View File

@@ -35,7 +35,7 @@
} }
}, },
"admConfig": { "admConfig": {
"build": 252, "build": 253,
"oldBuild": "backend-0.1.3.zip" "oldBuild": "backend-0.1.3.zip"
}, },
"devDependencies": { "devDependencies": {
@@ -92,4 +92,4 @@
"xlsx": "^0.18.5", "xlsx": "^0.18.5",
"zod": "^3.24.2" "zod": "^3.24.2"
} }
} }

View File

@@ -96,6 +96,7 @@ export const standardOrders = async (data: any, user: any) => {
return acc; return acc;
}, {}); }, {});
let postedOrders: any = [];
for (const [customerID, orders] of Object.entries(groupedByCustomer)) { for (const [customerID, orders] of Object.entries(groupedByCustomer)) {
// console.log(`Running for Customer ID: ${customerID}`); // console.log(`Running for Customer ID: ${customerID}`);
const newOrders: any = orders; const newOrders: any = orders;
@@ -138,13 +139,19 @@ export const standardOrders = async (data: any, user: any) => {
//console.log(updatedPredefinedObject); //console.log(updatedPredefinedObject);
// post the orders to the server // 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 { return {
success: true, success: true,
message: message:
"Standard Template was just processed successfully, please check AlplaProd 2.0 to confirm no errors. ", "Standard Template was just processed successfully, please check AlplaProd 2.0 to confirm no errors. ",
data: [], data: postedOrders,
}; };
}; };