fix(ti intergraion): chagnes to the special instructions
This commit is contained in:
@@ -49,7 +49,7 @@ const tiImport = async () => {
|
||||
|
||||
// parsing posting window
|
||||
const plantI = plantInfo!;
|
||||
const postTime = JSON.parse(plantI[0]?.tiPostTime!);
|
||||
//const postTime = JSON.parse(plantI[0]?.tiPostTime!);
|
||||
|
||||
// order notifications
|
||||
const { data: notificationSet, error: notificationSettingsErr } =
|
||||
@@ -149,6 +149,16 @@ const tiImport = async () => {
|
||||
);
|
||||
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>
|
||||
let itemGroups = "";
|
||||
|
||||
@@ -304,13 +314,12 @@ const tiImport = async () => {
|
||||
? 40
|
||||
: 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}`
|
||||
);
|
||||
if (otherSettings[0].specialInstructions.length != 0) {
|
||||
payload = payload.replaceAll("[specialInstructions]", specialInfo);
|
||||
}
|
||||
|
||||
// update the carrier info if any is needed.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user