fix(scac check): changes to also ignore if user put in [

This commit is contained in:
2025-05-23 12:11:08 -05:00
parent c2da6cf4fd
commit 61dccf9dd0

View File

@@ -11,7 +11,9 @@ export const scacCheck = async (data: any) => {
const priceSheet = `
<PriceSheets>
<PriceSheet type="Carrier" isSelected="${
data[0].remark.includes("SCAC") && data[0].remark.split(",")[0]
data[0].remark.includes("SCAC") && // make sure we have the word scac
data[0].remark.split(",")[0] && // and its valid as well
!data[0].remark.includes("[") // if they funny and put [carrier] just ignore it.
? "true"
: "false"
}">