fix(ti intergraion): chagnes to the special instructions

This commit is contained in:
2025-04-02 21:25:30 -05:00
parent de0ee3a61c
commit a1f62a3e51

View File

@@ -49,7 +49,7 @@ const tiImport = async () => {
// parsing posting window // parsing posting window
const plantI = plantInfo!; const plantI = plantInfo!;
const postTime = JSON.parse(plantI[0]?.tiPostTime!); //const postTime = JSON.parse(plantI[0]?.tiPostTime!);
// order notifications // order notifications
const { data: notificationSet, error: notificationSettingsErr } = const { data: notificationSet, error: notificationSettingsErr } =
@@ -149,6 +149,16 @@ const tiImport = async () => {
); );
webHeader = webHeader.replaceAll("[requestUser]", requestUser); webHeader = webHeader.replaceAll("[requestUser]", requestUser);
// update the special instructions section
const otherSettings = plantI[0]?.otherSettings as {
specialInstructions: string;
active: boolean;
}[];
const specialInfo = otherSettings[0].specialInstructions.replaceAll(
"[header]",
records[0].Header
);
// this part will link into the <ItemGroups></ItemGroups> // this part will link into the <ItemGroups></ItemGroups>
let itemGroups = ""; let itemGroups = "";
@@ -304,14 +314,13 @@ const tiImport = async () => {
? 40 ? 40
: records[0].costCenter : records[0].costCenter
}` }`
)
// special instructions
.replaceAll(
"[specialInstructions]",
`This is a FTL load. The driver will need 2 adjustable load locks to secure the load. The driver will not be loaded without them. Please reference ALPLA pickup ${records[0].Header}`
); );
// special instructions
if (otherSettings[0].specialInstructions.length != 0) {
payload = payload.replaceAll("[specialInstructions]", specialInfo);
}
// update the carrier info if any is needed. // update the carrier info if any is needed.
// check the address has a real carrier on it and change to true and put the sacs code in // check the address has a real carrier on it and change to true and put the sacs code in