feat(printer delay): printer delay option to grab the delay based off cycle time
This commit is contained in:
@@ -6,11 +6,13 @@ import { tryCatch } from "../../../globalUtils/tryCatch.js";
|
||||
import { getLots } from "../controller/lots/lots.js";
|
||||
import { getPrinters } from "../controller/printers/getPrinters.js";
|
||||
import { createLog } from "../../logger/logger.js";
|
||||
import { printerDelayByLot } from "./printerDelayByLot.js";
|
||||
|
||||
export const assignedPrinters = async () => {
|
||||
createLog("debug", "ocp", "ocp", "Lot assignment check");
|
||||
const { data: lot, error: lotError } = await tryCatch(getLots());
|
||||
const l: any = lot;
|
||||
|
||||
if (lotError) {
|
||||
return {
|
||||
success: false,
|
||||
@@ -41,6 +43,9 @@ export const assignedPrinters = async () => {
|
||||
data: [],
|
||||
};
|
||||
}
|
||||
|
||||
// update the printers if we have the setting checked
|
||||
printerDelayByLot(l.data);
|
||||
const { data: print, error: printerError } = await tryCatch(getPrinters());
|
||||
|
||||
if (printerError) {
|
||||
|
||||
Reference in New Issue
Block a user