@nerdjs/sales-kit 1.0.1 → 1.0.3
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.
- package/dist/entities/accessorial/accessorial.d.ts +12 -0
- package/dist/entities/accessorial/accessorial.js +41 -0
- package/dist/entities/accessorial/accessorial.js.map +1 -0
- package/dist/entities/accessorial/helper.d.ts +5 -0
- package/dist/entities/accessorial/helper.js +16 -0
- package/dist/entities/accessorial/helper.js.map +1 -0
- package/dist/entities/accessorial/index.d.ts +2 -0
- package/dist/entities/accessorial/index.js +3 -0
- package/dist/entities/accessorial/index.js.map +1 -0
- package/dist/entities/accessorials/accessorials.d.ts +7 -0
- package/dist/entities/accessorials/accessorials.js +29 -0
- package/dist/entities/accessorials/accessorials.js.map +1 -0
- package/dist/entities/accessorials/helper.d.ts +5 -0
- package/dist/entities/accessorials/helper.js +16 -0
- package/dist/entities/accessorials/helper.js.map +1 -0
- package/dist/entities/accessorials/index.d.ts +2 -0
- package/dist/entities/accessorials/index.js +3 -0
- package/dist/entities/accessorials/index.js.map +1 -0
- package/dist/{cjs/entities → entities}/customer/customer.d.ts +16 -16
- package/dist/entities/customer/customer.js +63 -0
- package/dist/entities/customer/customer.js.map +1 -0
- package/dist/{cjs/entities → entities}/customer/helper.d.ts +5 -5
- package/dist/entities/customer/helper.js +16 -0
- package/dist/entities/customer/helper.js.map +1 -0
- package/dist/{cjs/entities → entities}/customer/index.d.ts +1 -1
- package/dist/entities/customer/index.js +2 -0
- package/dist/entities/customer/index.js.map +1 -0
- package/dist/entities/holiday/helper.d.ts +5 -0
- package/dist/entities/holiday/helper.js +16 -0
- package/dist/entities/holiday/helper.js.map +1 -0
- package/dist/entities/holiday/holiday.d.ts +7 -0
- package/dist/entities/holiday/holiday.js +31 -0
- package/dist/entities/holiday/holiday.js.map +1 -0
- package/dist/entities/holiday/index.d.ts +2 -0
- package/dist/entities/holiday/index.js +3 -0
- package/dist/entities/holiday/index.js.map +1 -0
- package/dist/entities/index.d.ts +12 -0
- package/dist/entities/index.js +13 -0
- package/dist/entities/index.js.map +1 -0
- package/dist/entities/load/helper.d.ts +6 -0
- package/dist/entities/load/helper.js +28 -0
- package/dist/entities/load/helper.js.map +1 -0
- package/dist/entities/load/index.d.ts +2 -0
- package/dist/entities/load/index.js +3 -0
- package/dist/entities/load/index.js.map +1 -0
- package/dist/entities/load/load.d.ts +102 -0
- package/dist/entities/load/load.js +224 -0
- package/dist/entities/load/load.js.map +1 -0
- package/dist/entities/loadAdjustment/helper.d.ts +5 -0
- package/dist/entities/loadAdjustment/helper.js +16 -0
- package/dist/entities/loadAdjustment/helper.js.map +1 -0
- package/dist/entities/loadAdjustment/index.d.ts +2 -0
- package/dist/entities/loadAdjustment/index.js +3 -0
- package/dist/entities/loadAdjustment/index.js.map +1 -0
- package/dist/entities/loadAdjustment/loadAdjustment.d.ts +15 -0
- package/dist/entities/loadAdjustment/loadAdjustment.js +48 -0
- package/dist/entities/loadAdjustment/loadAdjustment.js.map +1 -0
- package/dist/{cjs/entities → entities}/location/helper.d.ts +5 -5
- package/dist/entities/location/helper.js +16 -0
- package/dist/entities/location/helper.js.map +1 -0
- package/dist/{cjs/entities → entities}/location/index.d.ts +2 -2
- package/dist/entities/location/index.js +3 -0
- package/dist/entities/location/index.js.map +1 -0
- package/dist/{cjs/entities → entities}/location/location.d.ts +33 -32
- package/dist/entities/location/location.js +47 -0
- package/dist/entities/location/location.js.map +1 -0
- package/dist/{cjs/entities → entities}/marketCosts/helper.d.ts +5 -5
- package/dist/entities/marketCosts/helper.js +16 -0
- package/dist/entities/marketCosts/helper.js.map +1 -0
- package/dist/{cjs/entities → entities}/marketCosts/index.d.ts +2 -2
- package/dist/entities/marketCosts/index.js +3 -0
- package/dist/entities/marketCosts/index.js.map +1 -0
- package/dist/{cjs/entities → entities}/marketCosts/marketCosts.d.ts +22 -22
- package/dist/entities/marketCosts/marketCosts.js +60 -0
- package/dist/entities/marketCosts/marketCosts.js.map +1 -0
- package/dist/{cjs/entities → entities}/quote/helper.d.ts +5 -5
- package/dist/entities/quote/helper.js +16 -0
- package/dist/entities/quote/helper.js.map +1 -0
- package/dist/{cjs/entities → entities}/quote/index.d.ts +2 -2
- package/dist/entities/quote/index.js +3 -0
- package/dist/entities/quote/index.js.map +1 -0
- package/dist/entities/quote/quote.d.ts +76 -0
- package/dist/entities/quote/quote.js +46 -0
- package/dist/entities/quote/quote.js.map +1 -0
- package/dist/entities/quoteAccessorial/helper.d.ts +5 -0
- package/dist/entities/quoteAccessorial/helper.js +16 -0
- package/dist/entities/quoteAccessorial/helper.js.map +1 -0
- package/dist/entities/quoteAccessorial/index.d.ts +2 -0
- package/dist/entities/quoteAccessorial/index.js +3 -0
- package/dist/entities/quoteAccessorial/index.js.map +1 -0
- package/dist/entities/quoteAccessorial/quoteAccessorial.d.ts +29 -0
- package/dist/entities/quoteAccessorial/quoteAccessorial.js +77 -0
- package/dist/entities/quoteAccessorial/quoteAccessorial.js.map +1 -0
- package/dist/entities/quoteResponse/helper.d.ts +5 -0
- package/dist/entities/quoteResponse/helper.js +16 -0
- package/dist/entities/quoteResponse/helper.js.map +1 -0
- package/dist/entities/quoteResponse/index.d.ts +2 -0
- package/dist/entities/quoteResponse/index.js +3 -0
- package/dist/entities/quoteResponse/index.js.map +1 -0
- package/dist/entities/quoteResponse/quoteResponse.d.ts +72 -0
- package/dist/entities/quoteResponse/quoteResponse.js +67 -0
- package/dist/entities/quoteResponse/quoteResponse.js.map +1 -0
- package/dist/entities/shipcon/helper.d.ts +6 -0
- package/dist/entities/shipcon/helper.js +20 -0
- package/dist/entities/shipcon/helper.js.map +1 -0
- package/dist/entities/shipcon/index.d.ts +2 -0
- package/dist/entities/shipcon/index.js +3 -0
- package/dist/entities/shipcon/index.js.map +1 -0
- package/dist/entities/shipcon/shipcon.d.ts +27 -0
- package/dist/entities/shipcon/shipcon.js +74 -0
- package/dist/entities/shipcon/shipcon.js.map +1 -0
- package/dist/helpers.d.ts +18 -0
- package/dist/helpers.js +29 -0
- package/dist/helpers.js.map +1 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.js +3 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/locationsForm/index.d.ts +1 -0
- package/dist/hooks/locationsForm/index.js +2 -0
- package/dist/hooks/locationsForm/index.js.map +1 -0
- package/dist/hooks/locationsForm/locationsForm.d.ts +2 -0
- package/dist/hooks/locationsForm/locationsForm.js +35 -0
- package/dist/hooks/locationsForm/locationsForm.js.map +1 -0
- package/dist/hooks/quote/constants.d.ts +187 -0
- package/dist/hooks/quote/constants.js +137 -0
- package/dist/hooks/quote/constants.js.map +1 -0
- package/dist/hooks/quote/form.d.ts +7 -0
- package/dist/hooks/quote/form.js +203 -0
- package/dist/hooks/quote/form.js.map +1 -0
- package/dist/hooks/quote/helpers.d.ts +39 -0
- package/dist/hooks/quote/helpers.js +366 -0
- package/dist/hooks/quote/helpers.js.map +1 -0
- package/dist/hooks/quote/index.d.ts +5 -0
- package/dist/hooks/quote/index.js +6 -0
- package/dist/hooks/quote/index.js.map +1 -0
- package/dist/hooks/quote/result.d.ts +7 -0
- package/dist/hooks/quote/result.js +196 -0
- package/dist/hooks/quote/result.js.map +1 -0
- package/dist/hooks/quote/template.d.ts +7 -0
- package/dist/hooks/quote/template.js +113 -0
- package/dist/hooks/quote/template.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/redux/appState.d.ts +4 -0
- package/dist/redux/appState.js +2 -0
- package/dist/redux/appState.js.map +1 -0
- package/dist/redux/customer/customerActions.d.ts +97 -0
- package/dist/redux/customer/customerActions.js +210 -0
- package/dist/redux/customer/customerActions.js.map +1 -0
- package/dist/redux/customer/customerReducer.d.ts +2 -0
- package/dist/redux/customer/customerReducer.js +42 -0
- package/dist/redux/customer/customerReducer.js.map +1 -0
- package/dist/redux/customer/customerSelector.d.ts +27 -0
- package/dist/redux/customer/customerSelector.js +38 -0
- package/dist/redux/customer/customerSelector.js.map +1 -0
- package/dist/redux/customer/customerState.d.ts +11 -0
- package/dist/redux/customer/customerState.js +2 -0
- package/dist/redux/customer/customerState.js.map +1 -0
- package/dist/redux/customer/index.d.ts +4 -0
- package/dist/redux/customer/index.js +5 -0
- package/dist/redux/customer/index.js.map +1 -0
- package/dist/redux/index.d.ts +8 -0
- package/dist/redux/index.js +9 -0
- package/dist/redux/index.js.map +1 -0
- package/dist/redux/load/index.d.ts +4 -0
- package/dist/redux/load/index.js +5 -0
- package/dist/redux/load/index.js.map +1 -0
- package/dist/redux/load/loadActions.d.ts +80 -0
- package/dist/redux/load/loadActions.js +172 -0
- package/dist/redux/load/loadActions.js.map +1 -0
- package/dist/redux/load/loadReducer.d.ts +2 -0
- package/dist/redux/load/loadReducer.js +35 -0
- package/dist/redux/load/loadReducer.js.map +1 -0
- package/dist/redux/load/loadSelector.d.ts +27 -0
- package/dist/redux/load/loadSelector.js +19 -0
- package/dist/redux/load/loadSelector.js.map +1 -0
- package/dist/redux/load/loadState.d.ts +8 -0
- package/dist/redux/load/loadState.js +2 -0
- package/dist/redux/load/loadState.js.map +1 -0
- package/dist/redux/loadAdjustment/index.d.ts +4 -0
- package/dist/redux/loadAdjustment/index.js +5 -0
- package/dist/redux/loadAdjustment/index.js.map +1 -0
- package/dist/redux/loadAdjustment/loadAdjustmentActions.d.ts +80 -0
- package/dist/redux/loadAdjustment/loadAdjustmentActions.js +172 -0
- package/dist/redux/loadAdjustment/loadAdjustmentActions.js.map +1 -0
- package/dist/redux/loadAdjustment/loadAdjustmentReducer.d.ts +2 -0
- package/dist/redux/loadAdjustment/loadAdjustmentReducer.js +35 -0
- package/dist/redux/loadAdjustment/loadAdjustmentReducer.js.map +1 -0
- package/dist/redux/loadAdjustment/loadAdjustmentSelector.d.ts +15 -0
- package/dist/redux/loadAdjustment/loadAdjustmentSelector.js +12 -0
- package/dist/redux/loadAdjustment/loadAdjustmentSelector.js.map +1 -0
- package/dist/redux/loadAdjustment/loadAdjustmentState.d.ts +8 -0
- package/dist/redux/loadAdjustment/loadAdjustmentState.js +2 -0
- package/dist/redux/loadAdjustment/loadAdjustmentState.js.map +1 -0
- package/dist/redux/location/index.d.ts +4 -0
- package/dist/redux/location/index.js +5 -0
- package/dist/redux/location/index.js.map +1 -0
- package/dist/redux/location/locationActions.d.ts +101 -0
- package/dist/redux/location/locationActions.js +218 -0
- package/dist/redux/location/locationActions.js.map +1 -0
- package/dist/redux/location/locationReducer.d.ts +2 -0
- package/dist/redux/location/locationReducer.js +54 -0
- package/dist/redux/location/locationReducer.js.map +1 -0
- package/dist/redux/location/locationSelector.d.ts +53 -0
- package/dist/redux/location/locationSelector.js +32 -0
- package/dist/redux/location/locationSelector.js.map +1 -0
- package/dist/redux/location/locationState.d.ts +15 -0
- package/dist/redux/location/locationState.js +2 -0
- package/dist/redux/location/locationState.js.map +1 -0
- package/dist/{cjs/redux → redux}/quote/index.d.ts +5 -4
- package/dist/redux/quote/index.js +6 -0
- package/dist/redux/quote/index.js.map +1 -0
- package/dist/redux/quote/quoteAction.d.ts +177 -0
- package/dist/redux/quote/quoteAction.js +351 -0
- package/dist/redux/quote/quoteAction.js.map +1 -0
- package/dist/redux/quote/quoteMiddleware.d.ts +2 -0
- package/dist/redux/quote/quoteMiddleware.js +31 -0
- package/dist/redux/quote/quoteMiddleware.js.map +1 -0
- package/dist/redux/quote/quoteReducer.d.ts +27 -0
- package/dist/redux/quote/quoteReducer.js +207 -0
- package/dist/redux/quote/quoteReducer.js.map +1 -0
- package/dist/redux/quote/quoteSelector.d.ts +199 -0
- package/dist/redux/quote/quoteSelector.js +141 -0
- package/dist/redux/quote/quoteSelector.js.map +1 -0
- package/dist/redux/quote/quoteState.d.ts +9 -0
- package/dist/redux/quote/quoteState.js +2 -0
- package/dist/redux/quote/quoteState.js.map +1 -0
- package/dist/redux/quoteAccessorial/index.d.ts +3 -0
- package/dist/redux/quoteAccessorial/index.js +4 -0
- package/dist/redux/quoteAccessorial/index.js.map +1 -0
- package/dist/redux/quoteAccessorial/quoteAccessorialActions.d.ts +70 -0
- package/dist/redux/quoteAccessorial/quoteAccessorialActions.js +149 -0
- package/dist/redux/quoteAccessorial/quoteAccessorialActions.js.map +1 -0
- package/dist/redux/quoteAccessorial/quoteAccessorialReducer.d.ts +2 -0
- package/dist/redux/quoteAccessorial/quoteAccessorialReducer.js +29 -0
- package/dist/redux/quoteAccessorial/quoteAccessorialReducer.js.map +1 -0
- package/dist/redux/quoteAccessorial/quoteAccessorialState.d.ts +8 -0
- package/dist/redux/quoteAccessorial/quoteAccessorialState.js +2 -0
- package/dist/redux/quoteAccessorial/quoteAccessorialState.js.map +1 -0
- package/dist/redux/salesKitReducer.d.ts +25 -0
- package/dist/redux/salesKitReducer.js +18 -0
- package/dist/redux/salesKitReducer.js.map +1 -0
- package/dist/redux/shipcon/index.d.ts +4 -0
- package/dist/redux/shipcon/index.js +5 -0
- package/dist/redux/shipcon/index.js.map +1 -0
- package/dist/redux/shipcon/shipconActions.d.ts +80 -0
- package/dist/redux/shipcon/shipconActions.js +172 -0
- package/dist/redux/shipcon/shipconActions.js.map +1 -0
- package/dist/redux/shipcon/shipconReducer.d.ts +2 -0
- package/dist/redux/shipcon/shipconReducer.js +35 -0
- package/dist/redux/shipcon/shipconReducer.js.map +1 -0
- package/dist/redux/shipcon/shipconSelector.d.ts +22 -0
- package/dist/redux/shipcon/shipconSelector.js +19 -0
- package/dist/redux/shipcon/shipconSelector.js.map +1 -0
- package/dist/redux/shipcon/shipconState.d.ts +8 -0
- package/dist/redux/shipcon/shipconState.js +2 -0
- package/dist/redux/shipcon/shipconState.js.map +1 -0
- package/package.json +40 -71
- package/dist/cjs/components/calendar/calendar.d.ts +0 -5
- package/dist/cjs/components/calendar/day/day.d.ts +0 -8
- package/dist/cjs/components/calendar/day/index.d.ts +0 -1
- package/dist/cjs/components/calendar/day/typings.d.ts +0 -16
- package/dist/cjs/components/calendar/index.d.ts +0 -2
- package/dist/cjs/components/calendar/typings.d.ts +0 -27
- package/dist/cjs/components/customerFinder/customerFinder.d.ts +0 -11
- package/dist/cjs/components/customerFinder/index.d.ts +0 -2
- package/dist/cjs/components/customerFinder/optionTemplate.d.ts +0 -6
- package/dist/cjs/components/index.d.ts +0 -4
- package/dist/cjs/components/locationFinder/editLocation.d.ts +0 -15
- package/dist/cjs/components/locationFinder/index.d.ts +0 -1
- package/dist/cjs/components/locationFinder/locationByAddress.d.ts +0 -18
- package/dist/cjs/components/locationFinder/locationFinder.d.ts +0 -7
- package/dist/cjs/components/locationFinder/locationsFound.d.ts +0 -12
- package/dist/cjs/components/locationFinder/newLocationForm.d.ts +0 -20
- package/dist/cjs/components/locationFinder/optionTemplate.d.ts +0 -8
- package/dist/cjs/components/locationFinder/typings.d.ts +0 -23
- package/dist/cjs/components/salesQuote/components/aboutQuote/aboutQuote.d.ts +0 -5
- package/dist/cjs/components/salesQuote/components/aboutQuote/commodityDescription.d.ts +0 -16
- package/dist/cjs/components/salesQuote/components/aboutQuote/index.d.ts +0 -2
- package/dist/cjs/components/salesQuote/components/aboutQuote/quoteCheck.d.ts +0 -6
- package/dist/cjs/components/salesQuote/components/pallet/editPallet.d.ts +0 -11
- package/dist/cjs/components/salesQuote/components/pallet/palletChecker.d.ts +0 -15
- package/dist/cjs/components/salesQuote/components/pallet/palletCount.d.ts +0 -13
- package/dist/cjs/components/salesQuote/components/quoteCalendar/quoteCalendar.d.ts +0 -24
- package/dist/cjs/components/salesQuote/components/quoteResultAccordion/costBreakdown.d.ts +0 -14
- package/dist/cjs/components/salesQuote/components/quoteResultAccordion/marketCosts.d.ts +0 -7
- package/dist/cjs/components/salesQuote/components/quoteResultAccordion/quoteResultAccessorials.d.ts +0 -13
- package/dist/cjs/components/salesQuote/components/quoteResultAccordion/quoteResultAccordion.d.ts +0 -17
- package/dist/cjs/components/salesQuote/components/quoteSelect.d.ts +0 -4
- package/dist/cjs/components/salesQuote/components/quoteSummary/quoteSummary.d.ts +0 -4
- package/dist/cjs/components/salesQuote/components/quoteSummary/quoteSummaryBody.d.ts +0 -12
- package/dist/cjs/components/salesQuote/components/quoteSummary/quoteSummaryHeader.d.ts +0 -10
- package/dist/cjs/components/salesQuote/components/quoteSummary/typings.d.ts +0 -47
- package/dist/cjs/components/salesQuote/index.d.ts +0 -4
- package/dist/cjs/components/salesQuote/salesQuote.d.ts +0 -17
- package/dist/cjs/components/salesQuote/typings.d.ts +0 -156
- package/dist/cjs/components/shared/bootstrapDialogTitle/bootstrapDialogTitle.d.ts +0 -11
- package/dist/cjs/components/shared/bootstrapDialogTitle/index.d.ts +0 -1
- package/dist/cjs/components/shared/index.d.ts +0 -2
- package/dist/cjs/components/shared/loading/index.d.ts +0 -1
- package/dist/cjs/components/shared/loading/loading.d.ts +0 -6
- package/dist/cjs/components/stop/index.d.ts +0 -2
- package/dist/cjs/components/stop/menuAccessorials.d.ts +0 -27
- package/dist/cjs/components/stop/stop.d.ts +0 -4
- package/dist/cjs/components/stop/stopDetail.d.ts +0 -5
- package/dist/cjs/components/stop/stopDetailHeader.d.ts +0 -6
- package/dist/cjs/entities/index.d.ts +0 -4
- package/dist/cjs/entities/quote/quote.d.ts +0 -80
- package/dist/cjs/index.d.ts +0 -4
- package/dist/cjs/index.js +0 -3170
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/redux/calendar/calendarSlice.d.ts +0 -12
- package/dist/cjs/redux/calendar/index.d.ts +0 -1
- package/dist/cjs/redux/index.d.ts +0 -3
- package/dist/cjs/redux/nerdSalesKitReducer.d.ts +0 -10
- package/dist/cjs/redux/quote/quoteAction.d.ts +0 -125
- package/dist/cjs/redux/quote/quoteReducer.d.ts +0 -28
- package/dist/cjs/redux/quote/quoteSelector.d.ts +0 -22
- package/dist/cjs/redux/quote/quoteState.d.ts +0 -124
- package/dist/cjs/utils/constants.d.ts +0 -5
- package/dist/cjs/utils/helpers.d.ts +0 -17
- package/dist/cjs/utils/index.d.ts +0 -2
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default class Accessorial_Entity {
|
|
2
|
+
static requiredFields: string[];
|
|
3
|
+
constructor(accessorialJson: unknown);
|
|
4
|
+
accessorialId: number;
|
|
5
|
+
costAmount: number;
|
|
6
|
+
customerId: number;
|
|
7
|
+
defaultContract: boolean;
|
|
8
|
+
loadType: string;
|
|
9
|
+
name: string;
|
|
10
|
+
quoteVisible: boolean;
|
|
11
|
+
unitType: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Accessorial_Entity type guard.
|
|
3
|
+
*
|
|
4
|
+
* @param {any} accessorialJson Accessorial object from API
|
|
5
|
+
* @returns {boolean} Return true if type is Accessorial_Entity
|
|
6
|
+
*/
|
|
7
|
+
function validator(accessorialJson) {
|
|
8
|
+
if (typeof accessorialJson === "object" && accessorialJson != null) {
|
|
9
|
+
Accessorial_Entity.requiredFields.forEach((element) => {
|
|
10
|
+
if (!Object.keys(accessorialJson).includes(element))
|
|
11
|
+
console.log(`Field ${element} is null or undefined`);
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
export default class Accessorial_Entity {
|
|
17
|
+
static requiredFields = ["id"];
|
|
18
|
+
constructor(accessorialJson) {
|
|
19
|
+
if (validator(accessorialJson)) {
|
|
20
|
+
this.accessorialId = accessorialJson.accessorialId;
|
|
21
|
+
this.costAmount = accessorialJson.costAmount;
|
|
22
|
+
this.customerId = accessorialJson.customerId;
|
|
23
|
+
this.defaultContract = accessorialJson.defaultContract;
|
|
24
|
+
this.loadType = accessorialJson.loadType;
|
|
25
|
+
this.name = accessorialJson.name;
|
|
26
|
+
this.quoteVisible = accessorialJson.quoteVisible;
|
|
27
|
+
this.unitType = accessorialJson.unitType;
|
|
28
|
+
}
|
|
29
|
+
else
|
|
30
|
+
throw new Error(`Failed to create new instance of ${Accessorial_Entity.name}`);
|
|
31
|
+
}
|
|
32
|
+
accessorialId;
|
|
33
|
+
costAmount;
|
|
34
|
+
customerId;
|
|
35
|
+
defaultContract;
|
|
36
|
+
loadType;
|
|
37
|
+
name;
|
|
38
|
+
quoteVisible;
|
|
39
|
+
unitType;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=accessorial.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accessorial.js","sourceRoot":"","sources":["../../../src/entities/accessorial/accessorial.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,SAAS,SAAS,CAChB,eAAwB;IAExB,IAAI,OAAO,eAAe,KAAK,QAAQ,IAAI,eAAe,IAAI,IAAI,EAAE;QAClE,kBAAkB,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YACpD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC;gBACjD,OAAO,CAAC,GAAG,CAAC,SAAS,OAAO,uBAAuB,CAAC,CAAC;QACzD,CAAC,CAAC,CAAC;KACJ;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,CAAC,OAAO,OAAO,kBAAkB;IACrC,MAAM,CAAC,cAAc,GAAG,CAAC,IAAI,CAAC,CAAC;IAE/B,YAAY,eAAwB;QAClC,IAAI,SAAS,CAAC,eAAe,CAAC,EAAE;YAC9B,IAAI,CAAC,aAAa,GAAG,eAAe,CAAC,aAAa,CAAC;YACnD,IAAI,CAAC,UAAU,GAAG,eAAe,CAAC,UAAU,CAAC;YAC7C,IAAI,CAAC,UAAU,GAAG,eAAe,CAAC,UAAU,CAAC;YAC7C,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC,eAAe,CAAC;YACvD,IAAI,CAAC,QAAQ,GAAG,eAAe,CAAC,QAAQ,CAAC;YACzC,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC;YACjC,IAAI,CAAC,YAAY,GAAG,eAAe,CAAC,YAAY,CAAC;YACjD,IAAI,CAAC,QAAQ,GAAG,eAAe,CAAC,QAAQ,CAAC;SAC1C;;YACC,MAAM,IAAI,KAAK,CACb,oCAAoC,kBAAkB,CAAC,IAAI,EAAE,CAC9D,CAAC;IACN,CAAC;IAED,aAAa,CAAS;IACtB,UAAU,CAAS;IACnB,UAAU,CAAS;IACnB,eAAe,CAAU;IACzB,QAAQ,CAAS;IACjB,IAAI,CAAS;IACb,YAAY,CAAU;IACtB,QAAQ,CAAS"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Accessorial_Entity from "./accessorial";
|
|
2
|
+
export default class Accessorial extends Accessorial_Entity {
|
|
3
|
+
static fromList(accessorialsJSON) {
|
|
4
|
+
const accessorials = [];
|
|
5
|
+
if (accessorialsJSON)
|
|
6
|
+
Array.isArray(accessorialsJSON) &&
|
|
7
|
+
accessorialsJSON.forEach((accessorialJSON) => {
|
|
8
|
+
accessorials.push(new Accessorial(accessorialJSON));
|
|
9
|
+
});
|
|
10
|
+
return accessorials;
|
|
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/accessorial/helper.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,eAAe,CAAC;AAC/C,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,kBAAkB;IACzD,MAAM,CAAC,QAAQ,CAAC,gBAAyB;QACvC,MAAM,YAAY,GAAkB,EAAE,CAAC;QACvC,IAAI,gBAAgB;YAClB,KAAK,CAAC,OAAO,CAAC,gBAAgB,CAAC;gBAC7B,gBAAgB,CAAC,OAAO,CAAC,CAAC,eAAe,EAAE,EAAE;oBAC3C,YAAY,CAAC,IAAI,CAAC,IAAI,WAAW,CAAC,eAAe,CAAC,CAAC,CAAC;gBACtD,CAAC,CAAC,CAAC;QACP,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/accessorial/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Accessorials_Entity type guard.
|
|
3
|
+
*
|
|
4
|
+
* @param {any} accessorialsJson Accessorials object from API
|
|
5
|
+
* @returns {boolean} Return true if type is Accessorials_Entity
|
|
6
|
+
*/
|
|
7
|
+
function validator(accessorialsJson) {
|
|
8
|
+
if (typeof accessorialsJson === "object" && accessorialsJson != null) {
|
|
9
|
+
Accessorials_Entity.requiredFields.forEach((element) => {
|
|
10
|
+
if (!Object.keys(accessorialsJson).includes(element))
|
|
11
|
+
console.log(`Field ${element} is null or undefined`);
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
export default class Accessorials_Entity {
|
|
17
|
+
static requiredFields = [];
|
|
18
|
+
constructor(accessorialsJson) {
|
|
19
|
+
if (validator(accessorialsJson)) {
|
|
20
|
+
this.ltlAccessorials = accessorialsJson.ltlAccessorials;
|
|
21
|
+
this.tlAccessorials = accessorialsJson.tlAccessorials;
|
|
22
|
+
}
|
|
23
|
+
else
|
|
24
|
+
throw new Error(`Failed to create new instance of ${Accessorials_Entity.name}`);
|
|
25
|
+
}
|
|
26
|
+
ltlAccessorials;
|
|
27
|
+
tlAccessorials;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=accessorials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accessorials.js","sourceRoot":"","sources":["../../../src/entities/accessorials/accessorials.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,SAAS,SAAS,CAChB,gBAAyB;IAEzB,IAAI,OAAO,gBAAgB,KAAK,QAAQ,IAAI,gBAAgB,IAAI,IAAI,EAAE;QACpE,mBAAmB,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YACrD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC;gBAClD,OAAO,CAAC,GAAG,CAAC,SAAS,OAAO,uBAAuB,CAAC,CAAC;QACzD,CAAC,CAAC,CAAC;KACJ;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,CAAC,OAAO,OAAO,mBAAmB;IACtC,MAAM,CAAC,cAAc,GAAG,EAAE,CAAC;IAE3B,YAAY,gBAAyB;QACnC,IAAI,SAAS,CAAC,gBAAgB,CAAC,EAAE;YAC/B,IAAI,CAAC,eAAe,GAAG,gBAAgB,CAAC,eAAe,CAAC;YACxD,IAAI,CAAC,cAAc,GAAG,gBAAgB,CAAC,cAAc,CAAC;SACvD;;YACC,MAAM,IAAI,KAAK,CACb,oCAAoC,mBAAmB,CAAC,IAAI,EAAE,CAC/D,CAAC;IACN,CAAC;IAED,eAAe,CAAuB;IACtC,cAAc,CAAuB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Accessorials_Entity from "./accessorials";
|
|
2
|
+
export default class Accessorials extends Accessorials_Entity {
|
|
3
|
+
static fromList(accessorialssJSON) {
|
|
4
|
+
const accessorialss = [];
|
|
5
|
+
if (accessorialssJSON)
|
|
6
|
+
Array.isArray(accessorialssJSON) &&
|
|
7
|
+
accessorialssJSON.forEach((accessorialsJSON) => {
|
|
8
|
+
accessorialss.push(new Accessorials(accessorialsJSON));
|
|
9
|
+
});
|
|
10
|
+
return accessorialss;
|
|
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/accessorials/helper.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,MAAM,gBAAgB,CAAC;AACjD,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,mBAAmB;IAC3D,MAAM,CAAC,QAAQ,CAAC,iBAA0B;QACxC,MAAM,aAAa,GAAmB,EAAE,CAAC;QACzC,IAAI,iBAAiB;YACnB,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC;gBAC9B,iBAAiB,CAAC,OAAO,CAAC,CAAC,gBAAgB,EAAE,EAAE;oBAC7C,aAAa,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,gBAAgB,CAAC,CAAC,CAAC;gBACzD,CAAC,CAAC,CAAC;QACP,OAAO,aAAa,CAAC;IACvB,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/accessorials/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export default class Customer_Entity {
|
|
2
|
-
static requiredFields: string[];
|
|
3
|
-
constructor(customerJson: unknown);
|
|
4
|
-
id: number;
|
|
5
|
-
name: string;
|
|
6
|
-
company_id: number;
|
|
7
|
-
credit_on_hold: boolean;
|
|
8
|
-
inactivity_hold: boolean;
|
|
9
|
-
credit_term_id: number;
|
|
10
|
-
line1: string;
|
|
11
|
-
city: string;
|
|
12
|
-
state: string;
|
|
13
|
-
zip: string;
|
|
14
|
-
is_active: boolean;
|
|
15
|
-
credit_term_name: string;
|
|
16
|
-
}
|
|
1
|
+
export default class Customer_Entity {
|
|
2
|
+
static requiredFields: string[];
|
|
3
|
+
constructor(customerJson: unknown);
|
|
4
|
+
id: number;
|
|
5
|
+
name: string;
|
|
6
|
+
company_id: number;
|
|
7
|
+
credit_on_hold: boolean;
|
|
8
|
+
inactivity_hold: boolean;
|
|
9
|
+
credit_term_id: number;
|
|
10
|
+
line1: string;
|
|
11
|
+
city: string;
|
|
12
|
+
state: string;
|
|
13
|
+
zip: string;
|
|
14
|
+
is_active: boolean;
|
|
15
|
+
credit_term_name: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Customer type guard.
|
|
3
|
+
*
|
|
4
|
+
* @param {any} customerJson Customer object from API
|
|
5
|
+
* @returns {boolean} Return true if type is Customer_Entity
|
|
6
|
+
*/
|
|
7
|
+
function isCustomer_Entity(customerJson) {
|
|
8
|
+
if (typeof customerJson === "object" && customerJson != null) {
|
|
9
|
+
Customer_Entity.requiredFields.forEach((element) => {
|
|
10
|
+
if (!Object.keys(customerJson).includes(element))
|
|
11
|
+
throw new Error(`Field ${element} is null or undefined`);
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
export default class Customer_Entity {
|
|
17
|
+
static requiredFields = [
|
|
18
|
+
"id",
|
|
19
|
+
"name",
|
|
20
|
+
"company_id",
|
|
21
|
+
"credit_on_hold",
|
|
22
|
+
"inactivity_hold",
|
|
23
|
+
"credit_term_id",
|
|
24
|
+
"line1",
|
|
25
|
+
"city",
|
|
26
|
+
"state",
|
|
27
|
+
"zip",
|
|
28
|
+
"is_active",
|
|
29
|
+
"credit_term_name",
|
|
30
|
+
];
|
|
31
|
+
constructor(customerJson) {
|
|
32
|
+
if (isCustomer_Entity(customerJson)) {
|
|
33
|
+
this.id = customerJson.id;
|
|
34
|
+
this.name = customerJson.name;
|
|
35
|
+
this.company_id = customerJson.company_id;
|
|
36
|
+
this.credit_on_hold = customerJson.credit_on_hold;
|
|
37
|
+
this.inactivity_hold = customerJson.inactivity_hold;
|
|
38
|
+
this.credit_term_id = customerJson.credit_term_id;
|
|
39
|
+
this.line1 = customerJson.line1;
|
|
40
|
+
this.city = customerJson.city;
|
|
41
|
+
this.state = customerJson.state;
|
|
42
|
+
this.zip = customerJson.zip;
|
|
43
|
+
this.is_active = customerJson.is_active;
|
|
44
|
+
this.credit_term_name = customerJson.credit_term_name;
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
throw new Error(`Failed to create new instance of ${Customer_Entity.name}`);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
id;
|
|
51
|
+
name;
|
|
52
|
+
company_id;
|
|
53
|
+
credit_on_hold;
|
|
54
|
+
inactivity_hold;
|
|
55
|
+
credit_term_id;
|
|
56
|
+
line1;
|
|
57
|
+
city;
|
|
58
|
+
state;
|
|
59
|
+
zip;
|
|
60
|
+
is_active;
|
|
61
|
+
credit_term_name;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=customer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customer.js","sourceRoot":"","sources":["../../../src/entities/customer/customer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,SAAS,iBAAiB,CACxB,YAAqB;IAErB,IAAI,OAAO,YAAY,KAAK,QAAQ,IAAI,YAAY,IAAI,IAAI,EAAE;QAC5D,eAAe,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YACjD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC;gBAC9C,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,eAAe;IAClC,MAAM,CAAC,cAAc,GAAG;QACtB,IAAI;QACJ,MAAM;QACN,YAAY;QACZ,gBAAgB;QAChB,iBAAiB;QACjB,gBAAgB;QAChB,OAAO;QACP,MAAM;QACN,OAAO;QACP,KAAK;QACL,WAAW;QACX,kBAAkB;KACnB,CAAC;IAEF,YAAY,YAAqB;QAC/B,IAAI,iBAAiB,CAAC,YAAY,CAAC,EAAE;YACnC,IAAI,CAAC,EAAE,GAAG,YAAY,CAAC,EAAE,CAAC;YAC1B,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC;YAC9B,IAAI,CAAC,UAAU,GAAG,YAAY,CAAC,UAAU,CAAC;YAC1C,IAAI,CAAC,cAAc,GAAG,YAAY,CAAC,cAAc,CAAC;YAClD,IAAI,CAAC,eAAe,GAAG,YAAY,CAAC,eAAe,CAAC;YACpD,IAAI,CAAC,cAAc,GAAG,YAAY,CAAC,cAAc,CAAC;YAClD,IAAI,CAAC,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC;YAChC,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC;YAC9B,IAAI,CAAC,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC;YAChC,IAAI,CAAC,GAAG,GAAG,YAAY,CAAC,GAAG,CAAC;YAC5B,IAAI,CAAC,SAAS,GAAG,YAAY,CAAC,SAAS,CAAC;YACxC,IAAI,CAAC,gBAAgB,GAAG,YAAY,CAAC,gBAAgB,CAAC;SACvD;aAAM;YACL,MAAM,IAAI,KAAK,CACb,oCAAoC,eAAe,CAAC,IAAI,EAAE,CAC3D,CAAC;SACH;IACH,CAAC;IAED,EAAE,CAAS;IACX,IAAI,CAAS;IACb,UAAU,CAAS;IACnB,cAAc,CAAU;IACxB,eAAe,CAAU;IACzB,cAAc,CAAS;IACvB,KAAK,CAAS;IACd,IAAI,CAAS;IACb,KAAK,CAAS;IACd,GAAG,CAAS;IACZ,SAAS,CAAU;IACnB,gBAAgB,CAAS"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Customer_Entity from "./customer";
|
|
2
|
-
export default class Customer extends Customer_Entity {
|
|
3
|
-
static fromList(customersJSON: unknown): Array<Customer>;
|
|
4
|
-
toJson(): string;
|
|
5
|
-
}
|
|
1
|
+
import Customer_Entity from "./customer";
|
|
2
|
+
export default class Customer extends Customer_Entity {
|
|
3
|
+
static fromList(customersJSON: unknown): Array<Customer>;
|
|
4
|
+
toJson(): string;
|
|
5
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Customer_Entity from "./customer";
|
|
2
|
+
export default class Customer extends Customer_Entity {
|
|
3
|
+
static fromList(customersJSON) {
|
|
4
|
+
const customers = [];
|
|
5
|
+
if (customersJSON)
|
|
6
|
+
Array.isArray(customersJSON) &&
|
|
7
|
+
customersJSON.forEach((userJSON) => {
|
|
8
|
+
customers.push(new Customer(userJSON));
|
|
9
|
+
});
|
|
10
|
+
return customers;
|
|
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/customer/helper.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,YAAY,CAAC;AAEzC,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,eAAe;IACnD,MAAM,CAAC,QAAQ,CAAC,aAAsB;QACpC,MAAM,SAAS,GAAe,EAAE,CAAC;QACjC,IAAI,aAAa;YACf,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC;gBAC1B,aAAa,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;oBACjC,SAAS,CAAC,IAAI,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACzC,CAAC,CAAC,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./customer";
|
|
1
|
+
export * from "./customer";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/customer/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Holiday_Entity from "./holiday";
|
|
2
|
+
export default class Holiday extends Holiday_Entity {
|
|
3
|
+
static fromList(holidaysJSON) {
|
|
4
|
+
const holidays = [];
|
|
5
|
+
if (holidaysJSON)
|
|
6
|
+
Array.isArray(holidaysJSON) &&
|
|
7
|
+
holidaysJSON.forEach((holidayJSON) => {
|
|
8
|
+
holidays.push(new Holiday(holidayJSON));
|
|
9
|
+
});
|
|
10
|
+
return holidays;
|
|
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/holiday/helper.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,WAAW,CAAC;AACvC,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,cAAc;IACjD,MAAM,CAAC,QAAQ,CAAC,YAAqB;QACnC,MAAM,QAAQ,GAAc,EAAE,CAAC;QAC/B,IAAI,YAAY;YACd,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC;gBACzB,YAAY,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,EAAE;oBACnC,QAAQ,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;gBAC1C,CAAC,CAAC,CAAC;QACP,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Holiday_Entity type guard.
|
|
3
|
+
*
|
|
4
|
+
* @param {any} holidayJson Holiday object from API
|
|
5
|
+
* @returns {boolean} Return true if type is Holiday_Entity
|
|
6
|
+
*/
|
|
7
|
+
function validator(holidayJson) {
|
|
8
|
+
if (typeof holidayJson === "object" && holidayJson != null) {
|
|
9
|
+
Holiday_Entity.requiredFields.forEach((element) => {
|
|
10
|
+
if (!Object.keys(holidayJson).includes(element))
|
|
11
|
+
console.log(`Field ${element} is null or undefined`);
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
export default class Holiday_Entity {
|
|
17
|
+
static requiredFields = ["id"];
|
|
18
|
+
constructor(holidayJson) {
|
|
19
|
+
if (validator(holidayJson)) {
|
|
20
|
+
this.id = holidayJson.id;
|
|
21
|
+
this.date = holidayJson.date;
|
|
22
|
+
this.name = holidayJson.name;
|
|
23
|
+
}
|
|
24
|
+
else
|
|
25
|
+
throw new Error(`Failed to create new instance of ${Holiday_Entity.name}`);
|
|
26
|
+
}
|
|
27
|
+
id;
|
|
28
|
+
date;
|
|
29
|
+
name;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=holiday.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"holiday.js","sourceRoot":"","sources":["../../../src/entities/holiday/holiday.ts"],"names":[],"mappings":"AAAA;;;;;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,OAAO,CAAC,GAAG,CAAC,SAAS,OAAO,uBAAuB,CAAC,CAAC;QACzD,CAAC,CAAC,CAAC;KACJ;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,CAAC,OAAO,OAAO,cAAc;IACjC,MAAM,CAAC,cAAc,GAAG,CAAC,IAAI,CAAC,CAAC;IAE/B,YAAY,WAAoB;QAC9B,IAAI,SAAS,CAAC,WAAW,CAAC,EAAE;YAC1B,IAAI,CAAC,EAAE,GAAG,WAAW,CAAC,EAAE,CAAC;YACzB,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC;YAC7B,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC;SAC9B;;YACC,MAAM,IAAI,KAAK,CACb,oCAAoC,cAAc,CAAC,IAAI,EAAE,CAC1D,CAAC;IACN,CAAC;IAED,EAAE,CAAS;IACX,IAAI,CAAS;IACb,IAAI,CAAS"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/holiday/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from "./accessorial";
|
|
2
|
+
export * from "./accessorials";
|
|
3
|
+
export * from "./customer";
|
|
4
|
+
export * from "./holiday";
|
|
5
|
+
export * from "./load";
|
|
6
|
+
export * from "./loadAdjustment";
|
|
7
|
+
export * from "./location";
|
|
8
|
+
export * from "./marketCosts";
|
|
9
|
+
export * from "./quote";
|
|
10
|
+
export * from "./quoteAccessorial";
|
|
11
|
+
export * from "./quoteResponse";
|
|
12
|
+
export * from "./shipcon";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from "./accessorial";
|
|
2
|
+
export * from "./accessorials";
|
|
3
|
+
export * from "./customer";
|
|
4
|
+
export * from "./holiday";
|
|
5
|
+
export * from "./load";
|
|
6
|
+
export * from "./loadAdjustment";
|
|
7
|
+
export * from "./location";
|
|
8
|
+
export * from "./marketCosts";
|
|
9
|
+
export * from "./quote";
|
|
10
|
+
export * from "./quoteAccessorial";
|
|
11
|
+
export * from "./quoteResponse";
|
|
12
|
+
export * from "./shipcon";
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import moment from "moment";
|
|
2
|
+
import Load_Entity from "./load";
|
|
3
|
+
export default class Load extends Load_Entity {
|
|
4
|
+
static fromList(loadsJSON) {
|
|
5
|
+
const loads = [];
|
|
6
|
+
if (loadsJSON)
|
|
7
|
+
Array.isArray(loadsJSON) &&
|
|
8
|
+
loadsJSON.forEach((loadJSON) => {
|
|
9
|
+
loads.push(new Load(loadJSON));
|
|
10
|
+
});
|
|
11
|
+
return loads;
|
|
12
|
+
}
|
|
13
|
+
toJson() {
|
|
14
|
+
return JSON.stringify(this);
|
|
15
|
+
}
|
|
16
|
+
appointmentDateAndTime() {
|
|
17
|
+
const date = moment(this.pickupDate).format("MM/DD");
|
|
18
|
+
const time = [];
|
|
19
|
+
if (this.pickupTimeFrom) {
|
|
20
|
+
time.push(moment(this.pickupTimeFrom).utc().format("HH:mm"));
|
|
21
|
+
}
|
|
22
|
+
if (this.pickupTimeTo && this.pickupTimeFrom != this.pickupTimeTo) {
|
|
23
|
+
time.push(moment(this.pickupTimeTo).utc().format("HH:mm"));
|
|
24
|
+
}
|
|
25
|
+
return `${date} ${time.join("-")}`;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../src/entities/load/helper.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,WAAW,MAAM,QAAQ,CAAC;AACjC,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,WAAW;IAC3C,MAAM,CAAC,QAAQ,CAAC,SAAkB;QAChC,MAAM,KAAK,GAAW,EAAE,CAAC;QACzB,IAAI,SAAS;YACX,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;gBACtB,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;oBAC7B,KAAK,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACjC,CAAC,CAAC,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAED,sBAAsB;QACpB,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACrD,MAAM,IAAI,GAAG,EAAE,CAAC;QAChB,IAAI,IAAI,CAAC,cAAc,EAAE;YACvB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;SAC9D;QACD,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,YAAY,EAAE;YACjE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;SAC5D;QAED,OAAO,GAAG,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;IACrC,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/load/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { Shipcon } from "../shipcon";
|
|
2
|
+
export default class Load_Entity {
|
|
3
|
+
static requiredFields: string[];
|
|
4
|
+
constructor(loadJson: unknown);
|
|
5
|
+
id: number;
|
|
6
|
+
quoteID?: number;
|
|
7
|
+
referenceNumber?: string;
|
|
8
|
+
enteredDate?: string;
|
|
9
|
+
releasedDate?: string;
|
|
10
|
+
receivedDate?: string;
|
|
11
|
+
invoiceDate?: string;
|
|
12
|
+
customerID?: number;
|
|
13
|
+
customer?: string;
|
|
14
|
+
customerType?: string;
|
|
15
|
+
serviceLevel?: string;
|
|
16
|
+
loadType?: string;
|
|
17
|
+
commodityDescription?: string;
|
|
18
|
+
reeferTemp?: number;
|
|
19
|
+
weight?: number;
|
|
20
|
+
feet?: number;
|
|
21
|
+
pallets?: number;
|
|
22
|
+
baserate?: number;
|
|
23
|
+
accessorials?: number;
|
|
24
|
+
totalRate?: number;
|
|
25
|
+
realCost?: number;
|
|
26
|
+
projectedCost?: number;
|
|
27
|
+
projectedMargin?: number;
|
|
28
|
+
margin?: number;
|
|
29
|
+
projectedMarginPercent?: number;
|
|
30
|
+
marginPercent?: number;
|
|
31
|
+
heading?: string;
|
|
32
|
+
fuelCost?: number;
|
|
33
|
+
bookedBy?: string;
|
|
34
|
+
bookedByID?: number;
|
|
35
|
+
cancelled?: boolean;
|
|
36
|
+
arrived?: boolean;
|
|
37
|
+
pending?: boolean;
|
|
38
|
+
active?: boolean;
|
|
39
|
+
status?: string;
|
|
40
|
+
miles?: number;
|
|
41
|
+
contractRateRecordID?: number;
|
|
42
|
+
truckOrderNotUsed?: boolean;
|
|
43
|
+
seal?: string;
|
|
44
|
+
notes?: string;
|
|
45
|
+
carrierPay?: number;
|
|
46
|
+
carrierComment?: string;
|
|
47
|
+
carrierNotes?: string;
|
|
48
|
+
referenceCode?: number;
|
|
49
|
+
resync?: boolean;
|
|
50
|
+
contractPriceFinalized?: boolean;
|
|
51
|
+
dispatched?: boolean;
|
|
52
|
+
doNotBreakSeal?: boolean;
|
|
53
|
+
personID?: number;
|
|
54
|
+
weekNumber?: number;
|
|
55
|
+
delWeekNumber?: number;
|
|
56
|
+
masterBol?: string;
|
|
57
|
+
dryvanOnly?: boolean;
|
|
58
|
+
zeroCostApproved?: boolean;
|
|
59
|
+
codLoad?: boolean;
|
|
60
|
+
hotTag?: boolean;
|
|
61
|
+
hotTagDescription?: string;
|
|
62
|
+
localMove?: boolean;
|
|
63
|
+
loadPreferredCarrierType?: string;
|
|
64
|
+
noSplit?: boolean;
|
|
65
|
+
pickupDate?: string;
|
|
66
|
+
pickupTimeFrom?: string;
|
|
67
|
+
pickupTimeTo?: string;
|
|
68
|
+
deliveryDate?: string;
|
|
69
|
+
deliveryTimeFrom?: string;
|
|
70
|
+
deliveryTimeTo?: string;
|
|
71
|
+
shipperStopNumber?: number;
|
|
72
|
+
shipperAreaID?: number;
|
|
73
|
+
shipperName?: string;
|
|
74
|
+
shipperAreaName?: string;
|
|
75
|
+
shipperCity?: string;
|
|
76
|
+
shipperState?: string;
|
|
77
|
+
shipperZipcode?: string;
|
|
78
|
+
consigneeAreaID?: number;
|
|
79
|
+
consigneeName?: string;
|
|
80
|
+
consigneeAreaName?: string;
|
|
81
|
+
consigneeCity?: string;
|
|
82
|
+
consigneeState?: string;
|
|
83
|
+
consigneeZipcode?: string;
|
|
84
|
+
consigneeStopNumber?: number;
|
|
85
|
+
assetUpdateID?: number;
|
|
86
|
+
lastLocLatitude?: number;
|
|
87
|
+
lastLocLongitude?: number;
|
|
88
|
+
lastLocTransactionTimeUTC?: string;
|
|
89
|
+
lastLocTransactionTimeLocal?: string;
|
|
90
|
+
lastLocCity?: string;
|
|
91
|
+
lastLocState?: string;
|
|
92
|
+
LTLReferenceID?: string;
|
|
93
|
+
cargoValue?: string;
|
|
94
|
+
shipperSCID?: number;
|
|
95
|
+
consigneeSCID?: number;
|
|
96
|
+
brokered?: boolean;
|
|
97
|
+
rateType?: string;
|
|
98
|
+
shipcons: Array<Shipcon>;
|
|
99
|
+
railAssetPrefix?: string;
|
|
100
|
+
railAssetCode?: string;
|
|
101
|
+
railAssetType?: string;
|
|
102
|
+
}
|