feat(dm): standard forecast and orders in

This commit is contained in:
2025-04-23 15:19:34 -05:00
parent 3c9e627021
commit 28b050859a
9 changed files with 172 additions and 19 deletions

View File

@@ -1,3 +1,4 @@
import { lorealForecast } from "./mappings/loralForecast.js";
import { standardForecast } from "./mappings/standardForcast.js";
export const forecastIn = async (data: any, user: any) => {
@@ -12,7 +13,7 @@ export const forecastIn = async (data: any, user: any) => {
// what type of order are we dealing with?
if (data["fileType"] === "standard") {
//run the standard forecast in
const standard = await standardForecast(data["postPostForecast"], user);
const standard = await standardForecast(data["postForecast"], user);
success = standard.success ?? false;
message = standard.message ?? "Error posting standard forecast";
orderData = standard.data;
@@ -23,7 +24,11 @@ export const forecastIn = async (data: any, user: any) => {
}
if (data["fileType"] === "loreal") {
// orders in
//run the standard forecast in
const loreal = await lorealForecast(data["postForecast"], user);
success = loreal.success ?? false;
message = loreal.message ?? "Error posting standard forecast";
orderData = loreal.data;
}
if (data["fileType"] === "pg") {