fix(ti): added some catches for the remark just being there and incorrect scac

This commit is contained in:
2025-05-21 20:17:24 -05:00
parent cf8fd9dbb9
commit 32d011fc98

View File

@@ -5,15 +5,15 @@ export const scacCheck = async (data: any) => {
"info",
"ti",
"notify",
`Checking if ${data[0].addressAlias} has scac: ${
data[0].remark.split(",")[0] ? "there was one" : "no scac"
}`
`Checking if ${data[0].addressAlias} has remark: ${data[0].remark}`
);
const priceSheet = `
<PriceSheets>
<PriceSheet type="Carrier" isSelected="${
data[0].remark.split(",")[0] ? "true" : "false"
data[0].remark.includes("SCAC") && data[0].remark.split(",")[0]
? "true"
: "false"
}">
<ContractId/>
${
@@ -21,7 +21,7 @@ export const scacCheck = async (data: any) => {
? `<SCAC>${data[0].remark
.split(",")[0]
.split(":")[1]
.toUpperCase()}</SCAC>`
?.toUpperCase()}</SCAC>`
: `<SCAC/>`
}
<Mode/>