refactor(ocp): finished the dashboard and move logs and labels to a tab style

This commit is contained in:
2025-03-27 21:06:25 -05:00
parent e3ba45ae13
commit 7b1c6e1361
9 changed files with 329 additions and 101 deletions

View File

@@ -1,15 +1,15 @@
import {LotType} from "@/types/lots";
import { LotType } from "@/types/lots";
import axios from "axios";
export const manualPrintLabels = async (lot: LotType, user: any) => {
//console.log(lot);
const labelUrl = `/ocp/manualPrintAndFollow`;
const labelUrl = `/api/ocp/manualprintandfollow`;
try {
const res = await axios.post(
labelUrl,
{line: lot.MachineLocation, printerName: lot.PrinterName},
{headers: {Authorization: `Basic ${user?.prod}`}}
{ line: lot.MachineLocation, printerName: lot.PrinterName },
{ headers: { Authorization: `Basic ${user?.prod}` } }
);
if (res.data.success) {
@@ -19,7 +19,7 @@ export const manualPrintLabels = async (lot: LotType, user: any) => {
};
} else {
return {
success: true,
success: false,
message: `Line ${lot.MachineDescription} encountered an error printing labels: ${res.data.message}`,
};
}