diff --git a/backend/dockdoorScanning/dockdoor.loadUnits.ts b/backend/dockdoorScanning/dockdoor.loadUnits.ts index 3a9247d..7973d02 100644 --- a/backend/dockdoorScanning/dockdoor.loadUnits.ts +++ b/backend/dockdoorScanning/dockdoor.loadUnits.ts @@ -27,6 +27,7 @@ const postScan = async (data: any) => { loadingUnit: data.loadingUnit.sscc ?? data.loadingUnit.runningNo, // can be running number or sscc depending on where it came from loadingUnitStatus: data.loadingUnitStatus, // TODO: add enums on the status of each load. message: data.message, // the response it gave when scanning + status: data.status ?? undefined, }) .returning()) as any; @@ -76,6 +77,7 @@ const loadUnit = async (data: Data) => { loadingUnitStatus: "notLoaded", message: "There are know current active loading orders please start one and try again.", + status: "error", }); return returnFunc({ success: true, @@ -86,7 +88,6 @@ const loadUnit = async (data: Data) => { "There are know current active loading orders please start one and try again.", data: [], notify: false, - room: `dockDoorLoading:${data.dockId}`, }); } // check if its a valids an sscc @@ -99,6 +100,7 @@ const loadUnit = async (data: Data) => { loadingUnitStatus: "noread", message: "Failed to load the unit to the truck, there was no pallet read.", + status: "error", }); return returnFunc({ @@ -110,7 +112,6 @@ const loadUnit = async (data: Data) => { "Failed to load the unit to the truck, there was no pallet read.", data: [], notify: false, - room: `dockDoorLoading:${data.dockId}`, }); } @@ -137,6 +138,7 @@ const loadUnit = async (data: Data) => { loadingUnit: unitToScan, loadingUnitStatus: "notLoaded", message: prod?.data.errors[0].message, + status: "error", }); return returnFunc({