diff --git a/server/services/dataMart/route/getCurrentQuerys.ts b/server/services/dataMart/route/getCurrentQuerys.ts index 8e79f78..32bde28 100644 --- a/server/services/dataMart/route/getCurrentQuerys.ts +++ b/server/services/dataMart/route/getCurrentQuerys.ts @@ -86,6 +86,14 @@ const current: any = [ "Returns all Deliverys in selected date range IE: 1/1/2025 to 1/31/2025", criteria: "start,end", // uncomment this out once the improt process can be faster }, + { + name: "Fake Edi Update", + endpoint: "/api/datamart/fakeediupdate", + // description: "Returns all inventory, by default excludes running numebrs, also excludes inv locations.", + description: + "Returns all open orders to correct and resubmit, leaving blank will get everything putting an address only returns the specified address", + criteria: "address", // uncomment this out once the improt process can be faster + }, ]; app.openapi( diff --git a/server/services/logistics/logisticsService.ts b/server/services/logistics/logisticsService.ts index cae79a2..ceda05f 100644 --- a/server/services/logistics/logisticsService.ts +++ b/server/services/logistics/logisticsService.ts @@ -15,6 +15,7 @@ import postBulkOrders from "./route/dm/bulkOrdersIn.js"; import standardTemplate from "./route/dm/getStandardTemplate.js"; import standardForcasttemplate from "./route/dm/getStandardForecastTemplate.js"; import postForecast from "./route/dm/forecastIn.js"; +import outbound from "./route/getOutbound.js"; const app = new OpenAPIHono(); @@ -37,6 +38,8 @@ const routes = [ standardTemplate, postForecast, standardForcasttemplate, + // outbound deliveries + outbound, ] as const; // app.route("/server", modules); diff --git a/server/services/logistics/route/getOutbound.ts b/server/services/logistics/route/getOutbound.ts new file mode 100644 index 0000000..14785ab --- /dev/null +++ b/server/services/logistics/route/getOutbound.ts @@ -0,0 +1,45 @@ +import { createRoute, OpenAPIHono, z } from "@hono/zod-openapi"; +import { responses } from "../../../globalUtils/routeDefs/responses.js"; +import { tryCatch } from "../../../globalUtils/tryCatch.js"; +import { getCycleCountCheck } from "../controller/warehouse/cycleCountChecks/getCycleCountCheck.js"; +import { getPPOO } from "../controller/warehouse/ppoo/getPPOO.js"; + +const app = new OpenAPIHono(); + +// const Body = z +// .object({ +// age: z.number().optional().openapi({ example: 90 }), +// //email: z.string().optional().openapi({example: "s.smith@example.com"}), +// type: z.string().optional().openapi({ example: "fg" }), +// }) +// .openapi("User"); +app.openapi( + createRoute({ + tags: ["logistics"], + summary: "outbound delivery notes", + method: "post", + path: "/outbound", + // request: { + // body: { + // content: { + // "application/json": { schema: Body }, + // }, + // }, + // }, + // description: + // "Provided a running number and lot number you can consume material.", + responses: responses(), + }), + async (c: any) => { + //apiHit(c, { endpoint: "api/sqlProd/close" }); + + const body = await c.req.json(); + + return c.json({ + success: true, + message: "testing", + data: [], + }); + } +); +export default app;