feat(dm): standard forecast and orders in
This commit is contained in:
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user