refactor(dm): mapped remainder of the forecast. will need to run backup test
Some checks failed
Build and Push LST Docker Image / docker (push) Failing after 40s

the test server wouldnt do the backup so waiting on this one
This commit is contained in:
2026-06-15 01:03:50 -05:00
parent ba09a77f29
commit 7dbc31c046
8 changed files with 723 additions and 58 deletions

View File

@@ -2,7 +2,10 @@ import { Router } from "express";
import multer from "multer";
import { requireAuth } from "../middleware/auth.middleware.js";
import { apiReturn } from "../utils/returnHelper.utils.js";
import { standardForecast } from "./logsitcs.dm.forecast.map.standard.js";
import { energizerForecast } from "./logistics.dm.forecast.map.energizer.js";
import { lorealForecast } from "./logistics.dm.forecast.map.loreal.js";
import { pNgForecast } from "./logistics.dm.forecast.map.pNg.js";
import { standardForecast } from "./logistics.dm.forecast.map.standard.js";
type ForecastResult = {
success?: boolean;
@@ -53,18 +56,15 @@ r.post("/", requireAuth, upload.single("file"), async (req, res) => {
break;
case "loreal":
`result = await lorealForecast(req.file, req.user);`;
result = { success: true, message: "standardForecast", data: [] };
result = await lorealForecast(req.file, req.user);
break;
case "pg":
`result = await pNgForecast(req.file, req.user);`;
result = { success: true, message: "standardForecast", data: [] };
result = await pNgForecast(req.file, req.user);
break;
case "energizer":
`result = await energizerForecast(req.file, req.user);`;
result = { success: true, message: "standardForecast", data: [] };
result = await energizerForecast(req.file, req.user);
break;
default: