@nerdjs/sales-kit 2.0.44 → 2.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/dist/entities/cargoConsolidation/cargoConsolidation.d.ts +120 -0
  2. package/dist/entities/cargoConsolidation/cargoConsolidation.js +268 -0
  3. package/dist/entities/cargoConsolidation/cargoConsolidation.js.map +1 -0
  4. package/dist/entities/cargoConsolidation/helper.d.ts +5 -0
  5. package/dist/entities/cargoConsolidation/helper.js +16 -0
  6. package/dist/entities/cargoConsolidation/helper.js.map +1 -0
  7. package/dist/entities/cargoConsolidation/index.d.ts +2 -0
  8. package/dist/entities/cargoConsolidation/index.js +3 -0
  9. package/dist/entities/cargoConsolidation/index.js.map +1 -0
  10. package/dist/entities/dispatch/dispatch.d.ts +48 -0
  11. package/dist/entities/dispatch/dispatch.js +113 -0
  12. package/dist/entities/dispatch/dispatch.js.map +1 -0
  13. package/dist/entities/dispatch/helper.d.ts +5 -0
  14. package/dist/entities/dispatch/helper.js +16 -0
  15. package/dist/entities/dispatch/helper.js.map +1 -0
  16. package/dist/entities/dispatch/index.d.ts +2 -0
  17. package/dist/entities/dispatch/index.js +3 -0
  18. package/dist/entities/dispatch/index.js.map +1 -0
  19. package/dist/entities/ediTransaction/ediTransaction.d.ts +22 -0
  20. package/dist/entities/ediTransaction/ediTransaction.js +62 -0
  21. package/dist/entities/ediTransaction/ediTransaction.js.map +1 -0
  22. package/dist/entities/ediTransaction/helper.d.ts +5 -0
  23. package/dist/entities/ediTransaction/helper.js +16 -0
  24. package/dist/entities/ediTransaction/helper.js.map +1 -0
  25. package/dist/entities/ediTransaction/index.d.ts +2 -0
  26. package/dist/entities/ediTransaction/index.js +3 -0
  27. package/dist/entities/ediTransaction/index.js.map +1 -0
  28. package/dist/entities/index.d.ts +3 -0
  29. package/dist/entities/index.js +3 -0
  30. package/dist/entities/index.js.map +1 -1
  31. package/dist/entities/shipcon/shipcon.d.ts +34 -3
  32. package/dist/entities/shipcon/shipcon.js +22 -6
  33. package/dist/entities/shipcon/shipcon.js.map +1 -1
  34. package/dist/hooks/quote/result.js +24 -31
  35. package/dist/hooks/quote/result.js.map +1 -1
  36. package/dist/hooks/tender/form.js +2 -21
  37. package/dist/hooks/tender/form.js.map +1 -1
  38. package/dist/redux/api/salesApi.d.ts +1 -1
  39. package/dist/redux/api/salesApi.js +3 -0
  40. package/dist/redux/api/salesApi.js.map +1 -1
  41. package/dist/redux/appointmentIssue/appointmentIssueEndpoints.d.ts +10 -10
  42. package/dist/redux/appointmentIssueCategory/appointmentIssueCategoryEndpoints.d.ts +11 -11
  43. package/dist/redux/appointmentIssueSubcategory/appointmentIssueSubcategoryEndpoints.d.ts +10 -10
  44. package/dist/redux/appointmentNote/appointmentNoteEndpoints.d.ts +10 -10
  45. package/dist/redux/appointmentNoteType/appointmentNoteTypeEndpoints.d.ts +10 -10
  46. package/dist/redux/archerFile/archerFileEndpoints.d.ts +13 -13
  47. package/dist/redux/carrierName/carrierNameEndpoints.d.ts +10 -10
  48. package/dist/redux/commodityV1/commodityV1Endpoints.d.ts +11 -11
  49. package/dist/redux/contact/contactEndpoints.d.ts +10 -10
  50. package/dist/redux/customer/customerEndpoints.d.ts +16 -16
  51. package/dist/redux/customersAccessorial/customersAccessorialEndpoints.d.ts +9 -9
  52. package/dist/redux/dispatch/dispatchEndpoints.d.ts +36 -0
  53. package/dist/redux/dispatch/dispatchEndpoints.js +64 -0
  54. package/dist/redux/dispatch/dispatchEndpoints.js.map +1 -0
  55. package/dist/redux/dispatch/index.d.ts +2 -0
  56. package/dist/redux/dispatch/index.js +3 -0
  57. package/dist/redux/dispatch/index.js.map +1 -0
  58. package/dist/redux/driverName/driverNameEndpoints.d.ts +9 -9
  59. package/dist/redux/flag/flagEndpoints.d.ts +9 -9
  60. package/dist/redux/genericTender/genericTenderEndpoints.d.ts +10 -10
  61. package/dist/redux/holiday/holidayEndpoints.d.ts +10 -10
  62. package/dist/redux/index.d.ts +1 -0
  63. package/dist/redux/index.js +1 -0
  64. package/dist/redux/index.js.map +1 -1
  65. package/dist/redux/load/loadEndpoints.d.ts +11 -11
  66. package/dist/redux/loadAdjustment/loadAdjustmentEndpoints.d.ts +10 -10
  67. package/dist/redux/loadAdjustmentV1/loadAdjustmentV1Endpoints.d.ts +10 -10
  68. package/dist/redux/loadTender/loadTenderEndpoints.d.ts +12 -12
  69. package/dist/redux/loadV1/loadV1Endpoints.d.ts +76 -38
  70. package/dist/redux/loadV1/loadV1Endpoints.js +54 -1
  71. package/dist/redux/loadV1/loadV1Endpoints.js.map +1 -1
  72. package/dist/redux/location/locationEndpoints.d.ts +14 -14
  73. package/dist/redux/locationV1/locationV1Endpoints.d.ts +19 -19
  74. package/dist/redux/nmfcClass/nmfcClassEndpoints.d.ts +9 -9
  75. package/dist/redux/nodeName/nodeNameEndpoints.d.ts +10 -10
  76. package/dist/redux/notification/notificationEndpoints.d.ts +12 -12
  77. package/dist/redux/person/personEndpoints.d.ts +11 -11
  78. package/dist/redux/personName/personNameEndpoints.d.ts +10 -10
  79. package/dist/redux/quote/quoteEndpoints.d.ts +22 -22
  80. package/dist/redux/quote/quoteHooks.d.ts +2 -2
  81. package/dist/redux/quoteAccessorial/quoteAccessorialEndpoints.d.ts +9 -9
  82. package/dist/redux/quoteAccessorialV1/quoteAccessorialV1Endpoints.d.ts +10 -10
  83. package/dist/redux/rateReview/rateReviewEndpoints.d.ts +10 -10
  84. package/dist/redux/shipcon/shipconEndpoints.d.ts +10 -10
  85. package/dist/redux/shipconV1/shipconV1Endpoints.d.ts +16 -16
  86. package/dist/redux/shipconV1/shipconV1Endpoints.js +4 -3
  87. package/dist/redux/shipconV1/shipconV1Endpoints.js.map +1 -1
  88. package/dist/redux/tender/tenderEndpoints.d.ts +9 -9
  89. package/dist/redux/trailerAvailability/customerEndpoints.d.ts +4 -4
  90. package/dist/redux/types.d.ts +2 -2
  91. package/dist/redux/unitV1/unitV1Endpoints.d.ts +9 -9
  92. package/dist/redux/userNoteV1/userNoteV1Endpoints.d.ts +10 -10
  93. package/package.json +1 -1
@@ -0,0 +1,22 @@
1
+ export default class EdiTransaction_Entity {
2
+ static requiredFields: never[];
3
+ constructor(ediTransactionJson: unknown);
4
+ id?: number;
5
+ load_id?: number;
6
+ ship_con_id?: number;
7
+ control_number?: string;
8
+ file_name?: string;
9
+ status?: string;
10
+ set?: number;
11
+ response_transaction_id?: number;
12
+ created_at?: string;
13
+ load_tender_id?: number;
14
+ person_id?: number;
15
+ functional_acknowledgement?: string;
16
+ rail_tender_id?: number;
17
+ ship_con_name?: string;
18
+ status_name?: string;
19
+ edi_transaction_id?: number;
20
+ response_status?: string;
21
+ resend_status?: boolean;
22
+ }
@@ -0,0 +1,62 @@
1
+ /**
2
+ * EdiTransaction_Entity type guard.
3
+ *
4
+ * @param {any} ediTransactionJson EdiTransaction object from API
5
+ * @returns {boolean} Return true if type is EdiTransaction_Entity
6
+ */
7
+ function validator(ediTransactionJson) {
8
+ if (typeof ediTransactionJson === "object" && ediTransactionJson != null) {
9
+ EdiTransaction_Entity.requiredFields.forEach((element) => {
10
+ if (!Object.keys(ediTransactionJson).includes(element))
11
+ throw new Error(`Field ${element} is null or undefined`);
12
+ });
13
+ }
14
+ return true;
15
+ }
16
+ export default class EdiTransaction_Entity {
17
+ static requiredFields = [];
18
+ constructor(ediTransactionJson) {
19
+ if (validator(ediTransactionJson)) {
20
+ this.id = ediTransactionJson.id;
21
+ this.load_id = ediTransactionJson.load_id;
22
+ this.ship_con_id = ediTransactionJson.ship_con_id;
23
+ this.control_number = ediTransactionJson.control_number;
24
+ this.file_name = ediTransactionJson.file_name;
25
+ this.status = ediTransactionJson.status;
26
+ this.set = ediTransactionJson.set;
27
+ this.response_transaction_id = ediTransactionJson.response_transaction_id;
28
+ this.created_at = ediTransactionJson.created_at;
29
+ this.load_tender_id = ediTransactionJson.load_tender_id;
30
+ this.person_id = ediTransactionJson.person_id;
31
+ this.functional_acknowledgement =
32
+ ediTransactionJson.functional_acknowledgement;
33
+ this.rail_tender_id = ediTransactionJson.rail_tender_id;
34
+ this.ship_con_name = ediTransactionJson.ship_con_name;
35
+ this.status_name = ediTransactionJson.status_name;
36
+ this.edi_transaction_id = ediTransactionJson.edi_transaction_id;
37
+ this.response_status = ediTransactionJson.response_status;
38
+ this.resend_status = ediTransactionJson.resend_status;
39
+ }
40
+ else
41
+ throw new Error(`Failed to create new instance of ${EdiTransaction_Entity.name}`);
42
+ }
43
+ id;
44
+ load_id;
45
+ ship_con_id;
46
+ control_number;
47
+ file_name;
48
+ status;
49
+ set;
50
+ response_transaction_id;
51
+ created_at;
52
+ load_tender_id;
53
+ person_id;
54
+ functional_acknowledgement;
55
+ rail_tender_id;
56
+ ship_con_name;
57
+ status_name;
58
+ edi_transaction_id;
59
+ response_status;
60
+ resend_status;
61
+ }
62
+ //# sourceMappingURL=ediTransaction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ediTransaction.js","sourceRoot":"","sources":["../../../src/entities/ediTransaction/ediTransaction.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,SAAS,SAAS,CAChB,kBAA2B;IAE3B,IAAI,OAAO,kBAAkB,KAAK,QAAQ,IAAI,kBAAkB,IAAI,IAAI,EAAE;QACxE,qBAAqB,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YACvD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC;gBACpD,MAAM,IAAI,KAAK,CAAC,SAAS,OAAO,uBAAuB,CAAC,CAAC;QAC7D,CAAC,CAAC,CAAC;KACJ;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,CAAC,OAAO,OAAO,qBAAqB;IACxC,MAAM,CAAC,cAAc,GAAG,EAAE,CAAC;IAE3B,YAAY,kBAA2B;QACrC,IAAI,SAAS,CAAC,kBAAkB,CAAC,EAAE;YACjC,IAAI,CAAC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AG,CAAU;IACb,uBAAuB,CAAU;IACjC,UAAU,CAAU;IACpB,cAAc,CAAU;IACxB,SAAS,CAAU;IACnB,0BAA0B,CAAU;IACpC,cAAc,CAAU;IACxB,aAAa,CAAU;IACvB,WAAW,CAAU;IACrB,kBAAkB,CAAU;IAC5B,eAAe,CAAU;IACzB,aAAa,CAAW"}
@@ -0,0 +1,5 @@
1
+ import EdiTransaction_Entity from "./ediTransaction";
2
+ export default class EdiTransaction extends EdiTransaction_Entity {
3
+ static fromList(ediTransactionsJSON: unknown): Array<EdiTransaction>;
4
+ toJson(): string;
5
+ }
@@ -0,0 +1,16 @@
1
+ import EdiTransaction_Entity from "./ediTransaction";
2
+ export default class EdiTransaction extends EdiTransaction_Entity {
3
+ static fromList(ediTransactionsJSON) {
4
+ const ediTransactions = [];
5
+ if (ediTransactionsJSON)
6
+ Array.isArray(ediTransactionsJSON) &&
7
+ ediTransactionsJSON.forEach((ediTransactionJSON) => {
8
+ ediTransactions.push(new EdiTransaction(ediTransactionJSON));
9
+ });
10
+ return ediTransactions;
11
+ }
12
+ toJson() {
13
+ return JSON.stringify(this);
14
+ }
15
+ }
16
+ //# sourceMappingURL=helper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../src/entities/ediTransaction/helper.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,MAAM,kBAAkB,CAAC;AACrD,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,qBAAqB;IAC/D,MAAM,CAAC,QAAQ,CAAC,mBAA4B;QAC1C,MAAM,eAAe,GAAqB,EAAE,CAAC;QAC7C,IAAI,mBAAmB;YACrB,KAAK,CAAC,OAAO,CAAC,mBAAmB,CAAC;gBAChC,mBAAmB,CAAC,OAAO,CAAC,CAAC,kBAAkB,EAAE,EAAE;oBACjD,eAAe,CAAC,IAAI,CAAC,IAAI,cAAc,CAAC,kBAAkB,CAAC,CAAC,CAAC;gBAC/D,CAAC,CAAC,CAAC;QACP,OAAO,eAAe,CAAC;IACzB,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export { default as EdiTransaction } from "./helper";
2
+ export { default as EdiTransaction_Entity } from "./ediTransaction";
@@ -0,0 +1,3 @@
1
+ export { default as EdiTransaction } from "./helper";
2
+ export { default as EdiTransaction_Entity } from "./ediTransaction";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/ediTransaction/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -51,3 +51,6 @@ export * from "./quoteRateRecord";
51
51
  export * from "./loadChange";
52
52
  export * from "./genericTender";
53
53
  export * from "./customerCredit";
54
+ export * from "./dispatch";
55
+ export * from "./cargoConsolidation";
56
+ export * from "./ediTransaction";
@@ -51,4 +51,7 @@ export * from "./quoteRateRecord";
51
51
  export * from "./loadChange";
52
52
  export * from "./genericTender";
53
53
  export * from "./customerCredit";
54
+ export * from "./dispatch";
55
+ export * from "./cargoConsolidation";
56
+ export * from "./ediTransaction";
54
57
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAA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cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC"}
@@ -1,6 +1,5 @@
1
- import { Address_Entity } from "../location";
2
1
  export default class Shipcon_Entity {
3
- static requiredFields: string[];
2
+ static requiredFields: never[];
4
3
  constructor(shipconJson: unknown);
5
4
  id: number;
6
5
  quoteID?: number;
@@ -25,5 +24,37 @@ export default class Shipcon_Entity {
25
24
  tripOrder?: number;
26
25
  confirmationNumber?: string;
27
26
  hasEta?: boolean;
28
- address?: Address_Entity;
27
+ address?: {
28
+ id?: number;
29
+ name?: string;
30
+ email?: string;
31
+ addressableType?: string;
32
+ addressableID?: number;
33
+ description?: string;
34
+ line1?: string;
35
+ line2?: string;
36
+ city?: string;
37
+ state?: string;
38
+ zip?: string;
39
+ country?: string;
40
+ latitude?: number;
41
+ longitude?: number;
42
+ createdAt?: string;
43
+ updatedAt?: string;
44
+ partialMatch?: boolean;
45
+ timezone?: string;
46
+ verified?: boolean;
47
+ placeID?: string;
48
+ formattedAddress?: string;
49
+ altPlaceID?: string;
50
+ };
51
+ finalDestination?: string;
52
+ pallets?: number;
53
+ weight?: number;
54
+ pieces?: number;
55
+ dropStop?: boolean;
56
+ standbyAppointment?: boolean;
57
+ quoteCity?: string;
58
+ quoteState?: string;
59
+ quoteZip?: number;
29
60
  }
@@ -8,13 +8,13 @@ function validator(shipconJson) {
8
8
  if (typeof shipconJson === "object" && shipconJson != null) {
9
9
  Shipcon_Entity.requiredFields.forEach((element) => {
10
10
  if (!Object.keys(shipconJson).includes(element))
11
- console.log("Field ${element} is null or undefined");
11
+ console.error(`Field ${element} is null or undefined`);
12
12
  });
13
13
  }
14
14
  return true;
15
15
  }
16
16
  export default class Shipcon_Entity {
17
- static requiredFields = ["eta", "address"];
17
+ static requiredFields = [];
18
18
  constructor(shipconJson) {
19
19
  if (validator(shipconJson)) {
20
20
  this.id = shipconJson.id;
@@ -40,11 +40,19 @@ export default class Shipcon_Entity {
40
40
  this.tripOrder = shipconJson.tripOrder;
41
41
  this.confirmationNumber = shipconJson.confirmationNumber;
42
42
  this.hasEta = shipconJson.hasEta;
43
- // this.eta = shipconJson.eta;
44
- // this.address = shipconJson.address;
43
+ this.address = shipconJson.address;
44
+ this.finalDestination = shipconJson.finalDestination;
45
+ this.pallets = shipconJson.pallets;
46
+ this.weight = shipconJson.weight;
47
+ this.pieces = shipconJson.pieces;
48
+ this.dropStop = shipconJson.dropStop;
49
+ this.standbyAppointment = shipconJson.standbyAppointment;
50
+ this.quoteCity = shipconJson.quoteCity;
51
+ this.quoteZip = shipconJson.quoteZip;
52
+ this.state = shipconJson.state;
45
53
  }
46
54
  else {
47
- throw new Error("Failed to create new instance of ${ Shipcon_Entity.name }: ${e}");
55
+ throw new Error(`Failed to create new instance of ${Shipcon_Entity.name}`);
48
56
  }
49
57
  }
50
58
  id;
@@ -70,7 +78,15 @@ export default class Shipcon_Entity {
70
78
  tripOrder;
71
79
  confirmationNumber;
72
80
  hasEta;
73
- // eta: <NotFound>;
74
81
  address;
82
+ finalDestination;
83
+ pallets;
84
+ weight;
85
+ pieces;
86
+ dropStop;
87
+ standbyAppointment;
88
+ quoteCity;
89
+ quoteState;
90
+ quoteZip;
75
91
  }
76
92
  //# sourceMappingURL=shipcon.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"shipcon.js","sourceRoot":"","sources":["../../../src/entities/shipcon/shipcon.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,SAAS,SAAS,CAAC,WAAoB;IACrC,IAAI,OAAO,WAAW,KAAK,QAAQ,IAAI,WAAW,IAAI,IAAI,EAAE;QAC1D,cAAc,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAChD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC;gBAC7C,O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IAClB,MAAM,CAAU;IAChB,eAAe,CAAU;IACzB,UAAU,CAAU;IACpB,UAAU,CAAU;IACpB,SAAS,CAAU;IACnB,kBAAkB,CAAU;IAC5B,MAAM,CAAW;IACjB,OAAO,CAuBL;IACF,gBAAgB,CAAU;IAC1B,OAAO,CAAU;IACjB,MAAM,CAAU;IAChB,MAAM,CAAU;IAChB,QAAQ,CAAW;IACnB,kBAAkB,CAAW;IAC7B,SAAS,CAAU;IACnB,UAAU,CAAU;IACpB,QAAQ,CAAU"}
@@ -12,7 +12,6 @@ import { costBreakdownOpenSelector, formOpenSelector, marketCostOpenSelector, qu
12
12
  import { LTL_DOC, TL_DOC, serviceLevelColors, serviceLevelIcons, usdFormatter, } from "./constants";
13
13
  import { CalendarMonth, Check, Clear, ExpandMore, Warning, } from "@mui/icons-material";
14
14
  import { DateTime } from "luxon";
15
- import { showNotification } from "@nerdjs/nerd-ui";
16
15
  import { Link as RouterLink } from "react-router-dom";
17
16
  import { useHotkeys } from "react-hotkeys-hook";
18
17
  import { grey } from "@mui/material/colors";
@@ -51,7 +50,9 @@ export function QuoteResult(props) {
51
50
  flexDirection: "column",
52
51
  p: sm ? 0 : 2,
53
52
  gap: 2,
54
- }, children: [!customerPortal && (_jsxs(Paper, { sx: { p: 2, display: "flex", gap: 1 }, children: [_jsxs(Chip, { startDecorator: _jsx("i", { className: "fa-regular fa-map-location" }), variant: "outlined", color: "neutral", children: [response?.totalMiles, " ", t("miles")] }), _jsxs(Chip, { startDecorator: _jsx("i", { className: "fa-solid fa-timer" }), variant: "outlined", color: "neutral", children: [Math.round(response?.transitTime ?? 0), " ", t("hours")] })] })), expired && (_jsx(Alert, { color: "warning", variant: "soft", startDecorator: _jsx(Warning, {}), children: 'Quote is expired, click on "Run Quote" to create a new one.' })), body.loadId && (_jsxs(Alert, { color: "warning", variant: "soft", startDecorator: _jsx(Warning, {}), children: ['Quote has already been tendered, click on "Run Quote" to create a new one.', "\u00A0", openLoadLink ? (_jsx(Link, { component: RouterLink, to: openLoadLink, children: "Open Shipment" })) : null] })), _jsx(ServiceLevels, { customerPortal: customerPortal }), _jsx(CostBreakdown, {}), _jsx(MarketCost, {}), _jsx(Summary, { customerPortal: customerPortal, handleOnTenderLoadClick: handleOnTenderLoadClick }), customerPortal ? (_jsxs(Box, { textAlign: "center", sx: {
53
+ }, children: [!customerPortal && (_jsxs(Paper, { sx: { p: 2, display: "flex", gap: 1 }, children: [_jsxs(Chip, { startDecorator: _jsx("i", { className: "fa-regular fa-map-location" }), variant: "outlined", color: "neutral", children: [response?.totalMiles, " ", t("miles")] }), _jsxs(Chip, { startDecorator: _jsx("i", { className: "fa-solid fa-timer" }), variant: "outlined", color: "neutral", children: [Math.round(response?.transitTime ?? 0), " ", t("hours")] })] })), expired && (_jsx(Alert, { color: "warning", variant: "soft", startDecorator: _jsx(Warning, {}), children: customerPortal
54
+ ? 'Quote is expired, click on "Run Quote" to create a new one.'
55
+ : "Quote is expired" })), body.loadId && (_jsxs(Alert, { color: "warning", variant: "soft", startDecorator: _jsx(Warning, {}), children: ['Quote has already been tendered, click on "Run Quote" to create a new one.', "\u00A0", openLoadLink ? (_jsx(Link, { component: RouterLink, to: openLoadLink, children: "Open Shipment" })) : null] })), _jsx(ServiceLevels, { customerPortal: customerPortal }), _jsx(CostBreakdown, {}), _jsx(MarketCost, {}), _jsx(Summary, { customerPortal: customerPortal, handleOnTenderLoadClick: handleOnTenderLoadClick }), customerPortal ? (_jsxs(Box, { textAlign: "center", sx: {
55
56
  lineHeight: 0.6,
56
57
  }, children: [_jsx(MUITypography, { variant: "caption", display: "inline", children: _jsx(Box, { className: "fa-duotone fa-circle-info pright", component: "i", sx: {
57
58
  color: (theme) => theme.palette.warning.main,
@@ -90,11 +91,12 @@ function Wrapper(props) {
90
91
  }, 60);
91
92
  }, [selectedDate, selectedServiceLevel, ref]);
92
93
  if (sm) {
93
- return (_jsxs(Dialog, { fullScreen: true, open: open ?? false, onClose: () => dispatch(setFormOpen({ formID: "result", isOpen: false })), children: [_jsxs(DialogTitle, { component: "div", children: [_jsxs(Typography, { level: "h4", sx: {
94
+ return (_jsxs(Dialog, { fullScreen: true, open: open ?? false, onClose: () => dispatch(setFormOpen({ formID: "result", isOpen: false })), children: [_jsxs(DialogTitle, { component: "div", children: [_jsx(Typography, { level: "h4", sx: {
95
+ display: "inline",
94
96
  fontWeight: 600,
95
97
  fontSize: shrink ? "22px !important" : "36px !important",
96
98
  transition: "font-size .3s ease-in-out",
97
- }, children: [t("Quote"), _jsxs(Typography, { display: "inline", level: "body-sm", children: ["#", response?.id] })] }), customerPortal ? null : (_jsxs(Box, { sx: { display: "flex", gap: 1 }, children: [_jsxs(JoyButton, { onClick: () => dispatch(setMarketCostOpen(true)), size: shrink ? "sm" : "md", variant: "outlined", children: [_jsx("i", { className: "fa-solid fa-money-bill-trend-up pright" }), t("Market")] }), _jsxs(JoyButton, { onClick: () => dispatch(setCostBreakdownOpen(true)), size: shrink ? "sm" : "md", variant: "outlined", children: [_jsx("i", { className: "fa-solid fa-filter-circle-dollar pright" }), t("Breakdown")] })] }))] }), _jsx(DialogContent, { children: props.children }), _jsx(DialogActions, { children: _jsx(Button, { fullWidth: true, variant: "soft", color: "neutral", onClick: () => dispatch(setFormOpen({ formID: "result", isOpen: false })), children: t("Close") }) })] }));
99
+ }, children: t("Quote") }), "\u00A0", _jsxs(Typography, { display: "inline", level: "body-sm", children: ["#", response?.id] }), customerPortal ? null : (_jsxs(Box, { sx: { display: "flex", gap: 1 }, children: [_jsxs(JoyButton, { onClick: () => dispatch(setMarketCostOpen(true)), size: shrink ? "sm" : "md", variant: "outlined", children: [_jsx("i", { className: "fa-solid fa-money-bill-trend-up pright" }), t("Market")] }), _jsxs(JoyButton, { onClick: () => dispatch(setCostBreakdownOpen(true)), size: shrink ? "sm" : "md", variant: "outlined", children: [_jsx("i", { className: "fa-solid fa-filter-circle-dollar pright" }), t("Breakdown")] })] }))] }), _jsx(DialogContent, { children: props.children }), _jsx(DialogActions, { children: _jsx(Button, { fullWidth: true, variant: "soft", color: "neutral", onClick: () => dispatch(setFormOpen({ formID: "result", isOpen: false })), children: t("Close") }) })] }));
98
100
  }
99
101
  else
100
102
  return (_jsxs(Box, { ref: ref, sx: {
@@ -173,7 +175,6 @@ function ServiceLevelsDetails({ quoteResponse, }) {
173
175
  }, children: _jsxs(Table, { sx: {
174
176
  "& td": { textAlign: "center" },
175
177
  }, size: "lg", children: [_jsx(TableHead, { children: _jsxs(TableRow, { sx: {
176
- "& th": { bgcolor: grey[50] },
177
178
  "& th:first-of-type": {
178
179
  borderTopLeftRadius: "10px!important",
179
180
  },
@@ -318,11 +319,12 @@ function Toolbar({ shrink = false, customerPortal, }) {
318
319
  display: "flex",
319
320
  justifyContent: "space-between",
320
321
  alignItems: "center",
321
- }, children: [_jsx(Box, { children: _jsxs(Typography, { level: "h4", sx: {
322
- fontWeight: 600,
323
- fontSize: shrink ? "22px !important" : "36px !important",
324
- transition: "font-size .3s ease-in-out",
325
- }, children: [t("Quote"), _jsxs(Typography, { display: "inline", level: "body-sm", children: ["#", response?.id] })] }) }), customerPortal ? null : (_jsxs(Box, { sx: { display: "flex", gap: 1 }, children: [_jsxs(JoyButton, { onClick: () => dispatch(setMarketCostOpen(true)), size: shrink ? "sm" : "md", variant: "outlined", children: [_jsx("i", { className: "fa-solid fa-money-bill-trend-up pright" }), t("Market")] }), _jsxs(JoyButton, { onClick: () => dispatch(setCostBreakdownOpen(true)), size: shrink ? "sm" : "md", variant: "outlined", children: [_jsx("i", { className: "fa-solid fa-filter-circle-dollar pright" }), t("Breakdown")] })] }))] }) }));
322
+ }, children: [_jsxs(Box, { children: [_jsx(Typography, { level: "h4", sx: {
323
+ display: "inline",
324
+ fontWeight: 600,
325
+ fontSize: shrink ? "22px !important" : "36px !important",
326
+ transition: "font-size .3s ease-in-out",
327
+ }, children: t("Quote") }), "\u00A0", _jsxs(Typography, { display: "inline", level: "body-sm", children: ["#", response?.id] })] }), customerPortal ? null : (_jsxs(Box, { sx: { display: "flex", gap: 1 }, children: [_jsxs(JoyButton, { onClick: () => dispatch(setMarketCostOpen(true)), size: shrink ? "sm" : "md", variant: "outlined", children: [_jsx("i", { className: "fa-solid fa-money-bill-trend-up pright" }), t("Market")] }), _jsxs(JoyButton, { onClick: () => dispatch(setCostBreakdownOpen(true)), size: shrink ? "sm" : "md", variant: "outlined", children: [_jsx("i", { className: "fa-solid fa-filter-circle-dollar pright" }), t("Breakdown")] })] }))] }) }));
326
328
  }
327
329
  const RenderDay = ({ date, pickersDayProps, serviceLevel, type, }) => {
328
330
  const response = useSelector(quoteResultSelector);
@@ -518,7 +520,7 @@ const MarketCost = () => {
518
520
  const handleClose = () => {
519
521
  dispatch(setMarketCostOpen(false));
520
522
  };
521
- return (_jsxs(Dialog, { open: open, onClose: handleClose, fullWidth: true, maxWidth: "md", children: [_jsxs(DialogTitle, { children: [_jsx("i", { className: "fa-solid fa-money-bill-trend-up pright" }), t("Market")] }), _jsx(DialogContent, { children: marketCosts ? (_jsxs(Grid, { container: true, spacing: 2, children: [_jsx(Grid, { item: true, xs: 6, children: _jsxs(Grid, { container: true, spacing: 0.5, children: [_jsx(Grid, { item: true, xs: 8, children: _jsxs(Typography, { display: "block", children: [_jsx("i", { className: "fa-solid fa-plus pright" }), " ", t("Linehaul Cost")] }) }), _jsx(Grid, { item: true, xs: 4, style: { textAlign: "right" }, children: _jsx(Chip, { variant: "soft", size: "sm", children: usdFormatter.format(marketCosts.linehaul_cost) }) }), _jsx(Grid, { item: true, xs: 8, children: _jsxs(Typography, { display: "block", children: [_jsx("i", { className: "fa-solid fa-plus pright" }), " ", t("Fuel Cost")] }) }), _jsx(Grid, { item: true, xs: 4, style: { textAlign: "right" }, children: _jsx(Chip, { variant: "soft", size: "sm", children: usdFormatter.format(marketCosts.fuel_cost) }) }), _jsx(Grid, { item: true, xs: 12, children: _jsx(Divider, {}) }), _jsx(Grid, { item: true, xs: 8, children: _jsxs(Typography, { display: "block", children: [_jsx("i", { className: "fa-solid fa-plus pright" }), t("TL Total Cost")] }) }), _jsx(Grid, { item: true, xs: 4, style: { textAlign: "right" }, children: _jsx(Chip, { variant: "soft", size: "sm", children: usdFormatter.format(marketCosts.truckload_total_cost) }) }), _jsx(Grid, { item: true, xs: 8, children: _jsxs(Typography, { display: "block", children: [_jsx("i", { className: "fa-solid fa-plus pright" }), t("LTL Pallet Percentage")] }) }), _jsx(Grid, { item: true, xs: 4, style: { textAlign: "right" }, children: _jsx(Chip, { variant: "soft", size: "sm", children: marketCosts.ltl_pallet_percentage }) }), _jsx(Grid, { item: true, xs: 8, children: _jsxs(Typography, { display: "block", children: [_jsx("i", { className: "fa-solid fa-plus pright" }), " ", t("Stop Off Fees")] }) }), _jsx(Grid, { item: true, xs: 4, style: { textAlign: "right" }, children: _jsx(Chip, { variant: "soft", size: "sm", children: usdFormatter.format(marketCosts.stop_fees) }) }), _jsx(Grid, { item: true, xs: 12, children: _jsx(Divider, {}) }), _jsx(Grid, { item: true, xs: 8, children: _jsxs(Typography, { display: "block", children: [_jsx("i", { className: "fa-solid fa-plus pright" }), t("Total Cost")] }) }), _jsx(Grid, { item: true, xs: 4, style: { textAlign: "right" }, children: _jsx(Chip, { variant: "soft", size: "sm", children: usdFormatter.format(marketCosts.total_cost) }) }), _jsx(Grid, { item: true, xs: 8, children: _jsxs(Typography, { display: "block", children: [_jsx("i", { className: "fa-solid fa-plus pright" }), " ", t("Margin")] }) }), _jsx(Grid, { item: true, xs: 4, style: { textAlign: "right" }, children: _jsx(Chip, { variant: "soft", size: "sm", children: usdFormatter.format(marketCosts.margin) }) }), _jsx(Grid, { item: true, xs: 12, children: _jsx(Divider, {}) }), _jsx(Grid, { item: true, xs: 8, children: _jsxs(Typography, { display: "block", children: [_jsx("i", { className: "fa-solid fa-plus pright" }), t("Total Cost With Margin")] }) }), _jsx(Grid, { item: true, xs: 4, style: { textAlign: "right" }, children: _jsx(Chip, { variant: "soft", size: "sm", children: usdFormatter.format(marketCosts.total_cost_with_margin) }) })] }) }), marketCosts.market_data ? (_jsx(Grid, { item: true, xs: 6, children: _jsxs(Grid, { container: true, spacing: 0.5, children: [_jsx(Grid, { item: true, xs: 8, children: _jsx(Typography, { display: "block", children: t("• Miles") }) }), _jsx(Grid, { item: true, xs: 4, style: { textAlign: "right" }, children: _jsx(Chip, { variant: "soft", size: "sm", children: marketCosts.otr_miles }) }), _jsx(Grid, { item: true, xs: 8, children: _jsx(Typography, { display: "block", children: t("• Fuel Rate per Mile") }) }), _jsx(Grid, { item: true, xs: 4, style: { textAlign: "right" }, children: _jsx(Chip, { variant: "soft", size: "sm", children: usdFormatter.format(marketCosts.market_data.fuel_rate) }) }), _jsx(Grid, { item: true, xs: 8, children: _jsx(Typography, { display: "block", children: t("• Line Haul Rate per Mile") }) }), _jsx(Grid, { item: true, xs: 4, style: { textAlign: "right" }, children: _jsx(Chip, { variant: "soft", size: "sm", children: usdFormatter.format(marketCosts.market_data.linehaul_rate) }) }), _jsx(Grid, { item: true, xs: 8, children: _jsx(Typography, { display: "block", children: t("• Line Haul Total") }) }), _jsx(Grid, { item: true, xs: 4, style: { textAlign: "right" }, children: _jsx(Chip, { variant: "soft", size: "sm", children: usdFormatter.format(marketCosts.market_data.linehaul_total) }) }), _jsx(Grid, { item: true, xs: 8, children: _jsx(Typography, { display: "block", children: t("• Market Type") }) }), _jsx(Grid, { item: true, xs: 4, style: { textAlign: "right" }, children: _jsx(Chip, { variant: "soft", size: "sm", children: marketCosts.market_data.market_type }) }), _jsx(Grid, { item: true, xs: 6, children: _jsx(Typography, { display: "block", children: t("• Market Lane") }) }), _jsx(Grid, { item: true, xs: 6, style: { textAlign: "right" }, children: _jsx(Chip, { variant: "soft", size: "sm", children: marketCosts.market_data.market_lane }) }), _jsx(Grid, { item: true, xs: 8, children: _jsx(Typography, { display: "block", children: t("• Market Days") }) }), _jsx(Grid, { item: true, xs: 4, style: { textAlign: "right" }, children: _jsx(Chip, { size: "sm", variant: "soft", children: marketCosts.market_data.market_days }) })] }) })) : ([])] })) : (_jsx(Box, { sx: {
523
+ return (_jsxs(Dialog, { open: open, onClose: handleClose, fullWidth: true, maxWidth: "md", children: [_jsxs(DialogTitle, { children: [_jsx("i", { className: "fa-solid fa-money-bill-trend-up pright" }), t("Market")] }), _jsx(DialogContent, { children: marketCosts ? (_jsxs(Grid, { container: true, spacing: 2, children: [_jsx(Grid, { item: true, xs: 6, children: _jsxs(Grid, { container: true, spacing: 0.5, children: [_jsx(Grid, { item: true, xs: 8, children: _jsxs(Typography, { display: "block", children: [_jsx("i", { className: "fa-solid fa-plus pright" }), " ", t("Linehaul Cost")] }) }), _jsx(Grid, { item: true, xs: 4, style: { textAlign: "right" }, children: _jsx(Chip, { variant: "soft", size: "sm", children: usdFormatter.format(marketCosts.linehaul_cost) }) }), _jsx(Grid, { item: true, xs: 8, children: _jsxs(Typography, { display: "block", children: [_jsx("i", { className: "fa-solid fa-plus pright" }), " ", t("Fuel Cost")] }) }), _jsx(Grid, { item: true, xs: 4, style: { textAlign: "right" }, children: _jsx(Chip, { variant: "soft", size: "sm", children: usdFormatter.format(marketCosts.fuel_cost) }) }), _jsx(Grid, { item: true, xs: 12, children: _jsx(Divider, {}) }), _jsx(Grid, { item: true, xs: 8, children: _jsxs(Typography, { display: "block", children: [_jsx("i", { className: "fa-solid fa-plus pright" }), t("TL Total Cost")] }) }), _jsx(Grid, { item: true, xs: 4, style: { textAlign: "right" }, children: _jsx(Chip, { variant: "soft", size: "sm", children: usdFormatter.format(marketCosts.truckload_total_cost) }) }), _jsx(Grid, { item: true, xs: 8, children: _jsxs(Typography, { display: "block", children: [_jsx("i", { className: "fa-solid fa-plus pright" }), t("LTL Pallet Percentage")] }) }), _jsx(Grid, { item: true, xs: 4, style: { textAlign: "right" }, children: _jsx(Chip, { variant: "soft", size: "sm", children: marketCosts.ltl_pallet_percentage }) }), _jsx(Grid, { item: true, xs: 8, children: _jsxs(Typography, { display: "block", children: [_jsx("i", { className: "fa-solid fa-plus pright" }), " ", t("Stop Off Fees")] }) }), _jsx(Grid, { item: true, xs: 4, style: { textAlign: "right" }, children: _jsx(Chip, { variant: "soft", size: "sm", children: usdFormatter.format(marketCosts.stop_fees) }) }), _jsx(Grid, { item: true, xs: 12, children: _jsx(Divider, {}) }), _jsx(Grid, { item: true, xs: 8, children: _jsxs(Typography, { display: "block", children: [_jsx("i", { className: "fa-solid fa-plus pright" }), t("Market Price")] }) }), _jsx(Grid, { item: true, xs: 4, style: { textAlign: "right" }, children: _jsx(Chip, { variant: "soft", size: "sm", children: usdFormatter.format(marketCosts.total_cost) }) }), _jsx(Grid, { item: true, xs: 8, children: _jsxs(Typography, { display: "block", children: [_jsx("i", { className: "fa-solid fa-plus pright" }), " ", t("Margin")] }) }), _jsx(Grid, { item: true, xs: 4, style: { textAlign: "right" }, children: _jsx(Chip, { variant: "soft", size: "sm", children: usdFormatter.format(marketCosts.margin) }) }), _jsx(Grid, { item: true, xs: 12, children: _jsx(Divider, {}) }), _jsx(Grid, { item: true, xs: 8, children: _jsxs(Typography, { display: "block", children: [_jsx("i", { className: "fa-solid fa-plus pright" }), t("Total Cost With Margin")] }) }), _jsx(Grid, { item: true, xs: 4, style: { textAlign: "right" }, children: _jsx(Chip, { variant: "soft", size: "sm", children: usdFormatter.format(marketCosts.total_cost_with_margin) }) })] }) }), marketCosts.market_data ? (_jsx(Grid, { item: true, xs: 6, children: _jsxs(Grid, { container: true, spacing: 0.5, children: [_jsx(Grid, { item: true, xs: 8, children: _jsx(Typography, { display: "block", children: t("• Miles") }) }), _jsx(Grid, { item: true, xs: 4, style: { textAlign: "right" }, children: _jsx(Chip, { variant: "soft", size: "sm", children: marketCosts.otr_miles }) }), _jsx(Grid, { item: true, xs: 8, children: _jsx(Typography, { display: "block", children: t("• Fuel Rate per Mile") }) }), _jsx(Grid, { item: true, xs: 4, style: { textAlign: "right" }, children: _jsx(Chip, { variant: "soft", size: "sm", children: usdFormatter.format(marketCosts.market_data.fuel_rate) }) }), _jsx(Grid, { item: true, xs: 8, children: _jsx(Typography, { display: "block", children: t("• Line Haul Rate per Mile") }) }), _jsx(Grid, { item: true, xs: 4, style: { textAlign: "right" }, children: _jsx(Chip, { variant: "soft", size: "sm", children: usdFormatter.format(marketCosts.market_data.linehaul_rate) }) }), _jsx(Grid, { item: true, xs: 8, children: _jsx(Typography, { display: "block", children: t("• Line Haul Total") }) }), _jsx(Grid, { item: true, xs: 4, style: { textAlign: "right" }, children: _jsx(Chip, { variant: "soft", size: "sm", children: usdFormatter.format(marketCosts.market_data.linehaul_total) }) }), _jsx(Grid, { item: true, xs: 8, children: _jsx(Typography, { display: "block", children: t("• Market Type") }) }), _jsx(Grid, { item: true, xs: 4, style: { textAlign: "right" }, children: _jsx(Chip, { variant: "soft", size: "sm", children: marketCosts.market_data.market_type }) }), _jsx(Grid, { item: true, xs: 6, children: _jsx(Typography, { display: "block", children: t("• Market Lane") }) }), _jsx(Grid, { item: true, xs: 6, style: { textAlign: "right" }, children: _jsx(Chip, { variant: "soft", size: "sm", children: marketCosts.market_data.market_lane }) }), _jsx(Grid, { item: true, xs: 8, children: _jsx(Typography, { display: "block", children: t("• Market Days") }) }), _jsx(Grid, { item: true, xs: 4, style: { textAlign: "right" }, children: _jsx(Chip, { size: "sm", variant: "soft", children: marketCosts.market_data.market_days }) })] }) })) : ([])] })) : (_jsx(Box, { sx: {
522
524
  display: "flex",
523
525
  alignItems: "center",
524
526
  justifyContent: "center",
@@ -558,7 +560,7 @@ const Summary = ({ handleOnTenderLoadClick, customerPortal, }) => {
558
560
  ? 'Quote has already been tendered, click on "Run Quote" to create a new one.'
559
561
  : !customerPortal && !body.customerId
560
562
  ? "No customer selected"
561
- : undefined, children: _jsx("span", { children: _jsx(Button, { disabled: expired || body.loadId
563
+ : undefined, children: _jsx("span", { children: _jsx(Button, { disabled: (expired && customerPortal) || body.loadId
562
564
  ? true
563
565
  : false || (!customerPortal && !body.customerId), sx: {
564
566
  color: "white",
@@ -577,25 +579,16 @@ const Summary = ({ handleOnTenderLoadClick, customerPortal, }) => {
577
579
  },
578
580
  }, onClick: () => {
579
581
  if (response && selectedServiceLevel) {
580
- if (!expired) {
581
- handleOnTenderLoadClick(response.id, customerPortal
582
- ? selectedServiceLevel.id
583
- : selectedServiceLevel.serviceLevel, customerCredit?.availableCredit &&
584
- customerCredit.availableCredit <
585
- selectedServiceLevel.totalRate
586
- ? customerCredit.availableCredit -
587
- selectedServiceLevel.totalRate
588
- : undefined);
589
- dispatch(restartQuote());
590
- dispatch(setQuoteResult(undefined));
591
- }
592
- else {
593
- dispatch(showNotification({
594
- autohide: false,
595
- title: 'Quote is expired, click on "Run Quote" to create a new one.',
596
- severity: "danger",
597
- }));
598
- }
582
+ handleOnTenderLoadClick(response.id, customerPortal
583
+ ? selectedServiceLevel.id
584
+ : selectedServiceLevel.serviceLevel, customerCredit?.availableCredit &&
585
+ customerCredit.availableCredit <
586
+ selectedServiceLevel.totalRate
587
+ ? customerCredit.availableCredit -
588
+ selectedServiceLevel.totalRate
589
+ : undefined);
590
+ dispatch(restartQuote());
591
+ dispatch(setQuoteResult(undefined));
599
592
  }
600
593
  }, children: customerPortal
601
594
  ? t("TENDER LOAD")