feat(ocp): completly moved ocp to lst
This commit is contained in:
@@ -3,7 +3,6 @@ import { settings } from "../../../../../database/schema/settings.js";
|
||||
import { tryCatch } from "../../../../globalUtils/tryCatch.js";
|
||||
import { createLog } from "../../../logger/logger.js";
|
||||
import { getLots } from "../lots/lots.js";
|
||||
import { getMac } from "../specialProcesses/utils/getMachineId.js";
|
||||
import { billingCheck } from "../specialProcesses/billingCheck/billingCheck.js";
|
||||
import { isMainMatStaged } from "../materials/mainMaterial.js";
|
||||
import { firstLotLabel } from "../specialProcesses/lotChangeLabel/lotCHangeLabel.js";
|
||||
@@ -12,9 +11,11 @@ import { createLabel } from "./createLabel.js";
|
||||
import { bookInLabel } from "./bookIn.js";
|
||||
import { delieryInhouse } from "../specialProcesses/inhouse/inhouseDelivery.js";
|
||||
import { dualPrintingProcess } from "../specialProcesses/dualPrinting/dualPrinting.js";
|
||||
import { getMac } from "../../utils/getMachineId.js";
|
||||
|
||||
interface Printer {
|
||||
name: string;
|
||||
humanReadableId: string;
|
||||
// Add any other expected properties
|
||||
}
|
||||
|
||||
@@ -72,7 +73,9 @@ export const labelingProcess = async ({
|
||||
if (printer) {
|
||||
// filter the lot based on the printerID
|
||||
// console.log(printer);
|
||||
filteredLot = lots.data.filter((l: any) => l.printerID === printer);
|
||||
filteredLot = lots.data.filter(
|
||||
(l: any) => l.printerID === parseInt(printer?.humanReadableId)
|
||||
);
|
||||
if (filteredLot.length === 0) {
|
||||
// console.log(`There is not a lot assigned to ${printer.name}`);
|
||||
createLog(
|
||||
|
||||
Reference in New Issue
Block a user