feat(loreal): vmi file can be sent over now

This commit is contained in:
2025-05-02 07:51:16 -05:00
parent 2921792c0a
commit a709be838f
3 changed files with 159 additions and 37 deletions

View File

@@ -1,3 +1,4 @@
import ForecastImport from "./ForecastImport";
import OrderImport from "./OrderImport";
import { useSettingStore } from "@/lib/store/useSettings";
@@ -20,6 +21,7 @@ export default function DMButtons() {
fileType={"energizer"}
name={"Energizer Truck List"}
/>
<ForecastImport fileType={"loreal"} name={"VMI Import"} />
</div>
)}
{plantToken[0]?.value === "usday1" && (
@@ -35,7 +37,9 @@ export default function DMButtons() {
</div>
)}
{plantToken[0]?.value === "usflo1" && (
<div className="flex flex-row gap-2"></div>
<div className="flex flex-row gap-2">
<ForecastImport fileType={"loreal"} name={"VMI Import"} />
</div>
)}
{plantToken[0]?.value === "usstp1" && (
<div className="flex flex-row gap-2"></div>

View File

@@ -21,7 +21,7 @@ export default function ForecastImport(props: any) {
formData.append("postForecast", e.target.files[0]);
formData.append("fileType", props.fileType); // extra field
// console.log(formData);
toast.success("Import started.");
try {
const response = await axios.post(
"/api/logistics/postforecastin",