refactor(quality): more changes to the system to perfect it

This commit is contained in:
2025-11-20 15:08:29 -06:00
parent a30eebf5d3
commit 7b28f4e9ef
3 changed files with 13 additions and 6 deletions

View File

@@ -13,7 +13,12 @@ export const addNewPallet = async (data: any) => {
* Post new pallets
*/
const returnLabels = ["return to warehouse", "rework", "grind", "scrap"];
const returnLabels = [
"return to warehouse",
"send to rework",
"send to grind",
"send to scrap",
];
console.log(data, returnLabels.includes(data.palletStatusText));

View File

@@ -80,7 +80,7 @@ export const qualityCycle = async () => {
: lstQData[i].durationToMove,
// how long did it take warehouse to move the pallet back again
returnDurationToInspect:
lstQData[i].palletStatus === 7
lstQData[i].qualityDurationToInspect > 0
? differenceInMinutes(
new Date(Date.now()),
lstQData[i].upd_date,