From 360c0163f1d3135d9c1c3788ac53dc8e0757c441 Mon Sep 17 00:00:00 2001 From: Blake Matthes Date: Tue, 4 Nov 2025 20:16:59 -0600 Subject: [PATCH] fix(preprint): added the correct to string for the preprint stuff --- .gitea/ISSUE_TEMPLATE.md | 42 +++++++++---------- .../app/logistics/labeling/Preprint.bru | 12 +++--- .../logistics/controller/labeling/preprint.ts | 30 ++++++------- 3 files changed, 43 insertions(+), 41 deletions(-) diff --git a/.gitea/ISSUE_TEMPLATE.md b/.gitea/ISSUE_TEMPLATE.md index 31078a5..f63c45d 100644 --- a/.gitea/ISSUE_TEMPLATE.md +++ b/.gitea/ISSUE_TEMPLATE.md @@ -1,33 +1,33 @@ - --- - name: Bug Report - about: Report a bug to help us improve. - title: "[BUG] " - labels: ["bug", "needs-triage"] - --- +--- +name: Bug Report +about: Report a bug to help us improve. +title: "[BUG] " +labels: ["bug", "needs-triage"] +--- - ### Describe the bug +### Describe the bug - A clear and concise description of what the bug is. +A clear and concise description of what the bug is. - ### Steps to reproduce +### Steps to reproduce - 1. Go to '...' - 2. Click on '....' - 3. Scroll down to '....' - 4. See error +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error - ### Expected behavior +### Expected behavior - A clear and concise description of what you expected to happen. +A clear and concise description of what you expected to happen. - ### Screenshots +### Screenshots - If applicable, add screenshots to help explain your problem. +If applicable, add screenshots to help explain your problem. - ### Gitea Version +### Gitea Version - e.g., 1.25.0 +e.g., 1.25.0 - ### Additional context +### Additional context - Add any other context about the problem here. \ No newline at end of file +Add any other context about the problem here. \ No newline at end of file diff --git a/LogisticsSupportTool_API_DOCS/app/logistics/labeling/Preprint.bru b/LogisticsSupportTool_API_DOCS/app/logistics/labeling/Preprint.bru index 01411b1..6ce6ba0 100644 --- a/LogisticsSupportTool_API_DOCS/app/logistics/labeling/Preprint.bru +++ b/LogisticsSupportTool_API_DOCS/app/logistics/labeling/Preprint.bru @@ -13,12 +13,12 @@ post { body:json { { "scannerId": 999, - "lotNr": 3314, - "machineId": 22, // 457=22, 458=23 - "printerId": 22, // 457=22, 458=23 - "layoutId": 7, - "numberOfCopies": 0, - "qtyToPrint": 1 + "lotNr": 26656, + "machineId": 5, // 457=22, 458=23 + "printerId": 7, // 457=22, 458=23 + "layoutId": 22, + "numberOfCopies": 1, + "qtyToPrint":0 } } diff --git a/app/src/internal/logistics/controller/labeling/preprint.ts b/app/src/internal/logistics/controller/labeling/preprint.ts index f99d3bb..b6f211f 100644 --- a/app/src/internal/logistics/controller/labeling/preprint.ts +++ b/app/src/internal/logistics/controller/labeling/preprint.ts @@ -69,6 +69,8 @@ const addProdLabel = async ( if (prodLabelError) { log.error({ error: error }, "Error adding the label"); } + + return; }; export const preprintLabels = async (preprint: Preprint, username?: string) => { @@ -85,12 +87,12 @@ export const preprintLabels = async (preprint: Preprint, username?: string) => { "POST", "/public/v1.0/Warehousing/GenerateAndPrintLabel", { - scannerId: preprint.scannerId, - lotNr: preprint.lotNr, - machineId: preprint.machineId, // 457=22, 458=23 - printerId: preprint.printerId, // 457=22, 458=23 - layoutId: preprint.layoutId, - numberOfCopies: preprint.numberOfCopies, + scannerId: preprint.scannerId.toString(), + lotNr: preprint.lotNr.toString(), + machineId: preprint.machineId.toString(), + printerId: preprint.printerId.toString(), + layoutId: preprint.layoutId.toString(), + numberOfCopies: preprint.numberOfCopies.toString(), }, ); if (labels?.data.Result === 1) { @@ -116,7 +118,7 @@ export const preprintLabels = async (preprint: Preprint, username?: string) => { } labelsPrinted.push(parseInt(labels?.data.SSCC.slice(10, -1))); // add the label to our label db for tracking purposes - addProdLabel( + await addProdLabel( preprint, parseInt(labels?.data.SSCC.slice(10, -1)), username || "lst", @@ -141,12 +143,12 @@ export const preprintLabels = async (preprint: Preprint, username?: string) => { "POST", "/public/v1.0/Warehousing/GenerateAndPrintLabel", { - scannerId: preprint.scannerId, - lotNr: preprint.lotNr, - machineId: preprint.machineId, // 457=22, 458=23 - printerId: preprint.printerId, // 457=22, 458=23 - layoutId: preprint.layoutId, - numberOfCopies: preprint.numberOfCopies, + scannerId: preprint.scannerId.toString(), + lotNr: preprint.lotNr.toString(), + machineId: preprint.machineId.toString(), + printerId: preprint.printerId.toString(), + layoutId: preprint.layoutId.toString(), + numberOfCopies: preprint.numberOfCopies.toString(), }, ); @@ -173,7 +175,7 @@ export const preprintLabels = async (preprint: Preprint, username?: string) => { } labelsPrinted.push(parseInt(labels.data.SSCC.slice(10, -1))); - addProdLabel( + await addProdLabel( preprint, parseInt(labels?.data.SSCC.slice(10, -1)), username || "lst",