fix(ti): added some catches for the remark just being there and incorrect scac
This commit is contained in:
@@ -5,15 +5,15 @@ export const scacCheck = async (data: any) => {
|
|||||||
"info",
|
"info",
|
||||||
"ti",
|
"ti",
|
||||||
"notify",
|
"notify",
|
||||||
`Checking if ${data[0].addressAlias} has scac: ${
|
`Checking if ${data[0].addressAlias} has remark: ${data[0].remark}`
|
||||||
data[0].remark.split(",")[0] ? "there was one" : "no scac"
|
|
||||||
}`
|
|
||||||
);
|
);
|
||||||
|
|
||||||
const priceSheet = `
|
const priceSheet = `
|
||||||
<PriceSheets>
|
<PriceSheets>
|
||||||
<PriceSheet type="Carrier" isSelected="${
|
<PriceSheet type="Carrier" isSelected="${
|
||||||
data[0].remark.split(",")[0] ? "true" : "false"
|
data[0].remark.includes("SCAC") && data[0].remark.split(",")[0]
|
||||||
|
? "true"
|
||||||
|
: "false"
|
||||||
}">
|
}">
|
||||||
<ContractId/>
|
<ContractId/>
|
||||||
${
|
${
|
||||||
@@ -21,7 +21,7 @@ export const scacCheck = async (data: any) => {
|
|||||||
? `<SCAC>${data[0].remark
|
? `<SCAC>${data[0].remark
|
||||||
.split(",")[0]
|
.split(",")[0]
|
||||||
.split(":")[1]
|
.split(":")[1]
|
||||||
.toUpperCase()}</SCAC>`
|
?.toUpperCase()}</SCAC>`
|
||||||
: `<SCAC/>`
|
: `<SCAC/>`
|
||||||
}
|
}
|
||||||
<Mode/>
|
<Mode/>
|
||||||
|
|||||||
Reference in New Issue
Block a user