fix minor bug

main
saif 2025-02-19 09:15:23 +05:00
parent 344776f864
commit 68e825b1e1
2 changed files with 8 additions and 9 deletions

View File

@ -122,10 +122,15 @@ const emailUtils = require("./email-utils");
waitUntil: ["domcontentloaded"],
});
// generate json from excel mark it processed
const unprocessedFolderPath = path.join(
config[environment].temu_orders_path,
"unprocessed"
);
/*
* request order report
*/
try {
const orderRequestSelector = "div._3yOxLjm0._2pgGmJ7w.IoqjAtdZ.vbGE0cGC";
const element = await page.$(orderRequestSelector);
@ -224,14 +229,8 @@ const emailUtils = require("./email-utils");
// wait 60 seconds
await new Promise((resolve) => setTimeout(resolve, 30 * 1000));
// generate json from excel mark it processed
const unprocessedFolderPath = path.join(
config[environment].temu_orders_path,
"unprocessed"
);
} catch (e) {
emailUtils.notify( `Sync Temu Orders`, e.message );
emailUtils.notify(`Sync Temu Orders`, e.message);
}
// Function to read Excel files and convert to JSON

View File

@ -329,7 +329,7 @@ exports.getFirstDayToCurrentMonth = getFirstDayToCurrentMonth;
* write a function to convert UTC into pakistan standard time using luxon libraryy in 12 hour
*/
const getPakistanStandardTime = function( utcTime ){
return DateTime.fromISO( utcTime ).setZone('Asia/Karachi').toFormat('dd-MMM-yyyy HH:mm:ss a');
return DateTime.fromISO( utcTime ).setZone('Asia/Karachi').toFormat('dd-MMM-yyyy hh:mm:ss a');
}
exports.getPakistanStandardTime = getPakistanStandardTime;