@nerdjs/sales-kit 1.0.2 → 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 +39 -70
- 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 -3169
- 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,70 @@
|
|
|
1
|
+
import { DeleteAction, GetAction, PostAction, PutAction } from "@nerdjs/nerd-network";
|
|
2
|
+
import { AnyAction } from "@reduxjs/toolkit";
|
|
3
|
+
import { QuoteAccessorial } from "../../entities/quoteAccessorial";
|
|
4
|
+
export declare const setSelectedQuoteAccessorialID: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[quoteAccessorialID?: number | undefined], {
|
|
5
|
+
quoteAccessorialID: number | undefined;
|
|
6
|
+
id: string;
|
|
7
|
+
createdAt: string;
|
|
8
|
+
}, "setSelectedQuoteAccessorialID", never, never>;
|
|
9
|
+
export declare const getQuoteAccessorialsByFilter: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[query: {
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
}], {
|
|
12
|
+
id: string;
|
|
13
|
+
createdAt: string;
|
|
14
|
+
request: GetAction;
|
|
15
|
+
}, "sales/quoteAccessorial/getQuoteAccessorialsByFilter", never, never>;
|
|
16
|
+
export declare const getQuoteAccessorialsByFilterSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[quoteAccessorials: QuoteAccessorial[]], {
|
|
17
|
+
quoteAccessorials: QuoteAccessorial[];
|
|
18
|
+
id: string;
|
|
19
|
+
createdAt: string;
|
|
20
|
+
}, "sales/quoteAccessorial/getQuoteAccessorialsByFilterSuccess", never, never>;
|
|
21
|
+
export declare const getQuoteAccessorialById: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[id: number], {
|
|
22
|
+
id: string;
|
|
23
|
+
createdAt: string;
|
|
24
|
+
request: GetAction;
|
|
25
|
+
}, "sales/quoteAccessorial/getById", never, never>;
|
|
26
|
+
export declare const getQuoteAccessorialByIdSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[quoteAccessorial?: QuoteAccessorial | undefined], {
|
|
27
|
+
quoteAccessorial: QuoteAccessorial | undefined;
|
|
28
|
+
id: string;
|
|
29
|
+
createdAt: string;
|
|
30
|
+
}, "sales/quoteAccessorial/getQuoteAccessorialByIdSuccess", never, never>;
|
|
31
|
+
export declare const deleteQuoteAccessorial: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[id: number, successAction?: AnyAction | undefined], {
|
|
32
|
+
id: string;
|
|
33
|
+
createdAt: string;
|
|
34
|
+
request: DeleteAction;
|
|
35
|
+
}, "sales/removeQuoteAccessorialById", never, never>;
|
|
36
|
+
export declare const deleteQuoteAccessorialSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[success: boolean], {
|
|
37
|
+
success: boolean;
|
|
38
|
+
id: string;
|
|
39
|
+
createdAt: string;
|
|
40
|
+
}, "sales/quoteAccessorials/deleteQuoteAccessorialSuccess", never, never>;
|
|
41
|
+
export declare const updateQuoteAccessorial: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[id: number, body: QuoteAccessorial], {
|
|
42
|
+
id: string;
|
|
43
|
+
createdAt: string;
|
|
44
|
+
request: PutAction;
|
|
45
|
+
}, "sales/quoteAccessorials/updateQuoteAccessorial", never, never>;
|
|
46
|
+
export declare const updateQuoteAccessorialSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[success: boolean], {
|
|
47
|
+
success: boolean;
|
|
48
|
+
id: string;
|
|
49
|
+
createdAt: string;
|
|
50
|
+
}, "sales/quoteAccessorials/updateQuoteAccessorialSuccess", never, never>;
|
|
51
|
+
export declare const createQuoteAccessorial: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[body: QuoteAccessorial], {
|
|
52
|
+
id: string;
|
|
53
|
+
createdAt: string;
|
|
54
|
+
request: PostAction;
|
|
55
|
+
}, "sales/quoteAccessorials/createQuoteAccessorial", never, never>;
|
|
56
|
+
export declare const createQuoteAccessorialSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[quoteAccessorial: QuoteAccessorial], {
|
|
57
|
+
quoteAccessorial: QuoteAccessorial;
|
|
58
|
+
id: string;
|
|
59
|
+
createdAt: string;
|
|
60
|
+
}, "sales/quoteAccessorials/createQuoteAccessorialSuccess", never, never>;
|
|
61
|
+
export declare const getQuoteAccessorialsSearchMetadata: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[], {
|
|
62
|
+
id: string;
|
|
63
|
+
createdAt: string;
|
|
64
|
+
request: GetAction;
|
|
65
|
+
}, "sales/getQuoteAccessorialsSearchMetadata", never, never>;
|
|
66
|
+
export declare const getQuoteAccessorialsSearchMetadataSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[quoteAccessorialsSearchMetadata: unknown], {
|
|
67
|
+
quoteAccessorialsSearchMetadata: unknown;
|
|
68
|
+
id: string;
|
|
69
|
+
createdAt: string;
|
|
70
|
+
}, "sales/getQuoteAccessorialsSearchMetadataSuccess", never, never>;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { DeleteAction, GetAction, PostAction, PutAction, } from "@nerdjs/nerd-network";
|
|
2
|
+
import { createAction, nanoid } from "@reduxjs/toolkit";
|
|
3
|
+
import { QuoteAccessorial } from "../../entities/quoteAccessorial";
|
|
4
|
+
export const setSelectedQuoteAccessorialID = createAction("setSelectedQuoteAccessorialID", function prepare(quoteAccessorialID) {
|
|
5
|
+
return {
|
|
6
|
+
payload: {
|
|
7
|
+
quoteAccessorialID,
|
|
8
|
+
id: nanoid(),
|
|
9
|
+
createdAt: new Date().toISOString(),
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
});
|
|
13
|
+
export const getQuoteAccessorialsByFilter = createAction("sales/quoteAccessorial/getQuoteAccessorialsByFilter", function prepare(query) {
|
|
14
|
+
const request = new GetAction(`/sales/quoteAccessorials`, query);
|
|
15
|
+
request.decodeResponse = (dispatch, json) => {
|
|
16
|
+
const quoteAccessorials = QuoteAccessorial.fromList(json);
|
|
17
|
+
dispatch(getQuoteAccessorialsByFilterSuccess(quoteAccessorials));
|
|
18
|
+
};
|
|
19
|
+
return {
|
|
20
|
+
payload: {
|
|
21
|
+
id: nanoid(),
|
|
22
|
+
createdAt: new Date().toISOString(),
|
|
23
|
+
request,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
});
|
|
27
|
+
export const getQuoteAccessorialsByFilterSuccess = createAction("sales/quoteAccessorial/getQuoteAccessorialsByFilterSuccess", function prepare(quoteAccessorials) {
|
|
28
|
+
return {
|
|
29
|
+
payload: {
|
|
30
|
+
quoteAccessorials,
|
|
31
|
+
id: nanoid(),
|
|
32
|
+
createdAt: new Date().toISOString(),
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
export const getQuoteAccessorialById = createAction("sales/quoteAccessorial/getById", function prepare(id) {
|
|
37
|
+
const request = new GetAction(`/sales/quoteAccessorials/${id}`);
|
|
38
|
+
request.decodeResponse = (dispatch, json) => {
|
|
39
|
+
const quoteAccessorial = new QuoteAccessorial(json);
|
|
40
|
+
dispatch(getQuoteAccessorialByIdSuccess(quoteAccessorial));
|
|
41
|
+
};
|
|
42
|
+
return {
|
|
43
|
+
payload: {
|
|
44
|
+
id: nanoid(),
|
|
45
|
+
createdAt: new Date().toISOString(),
|
|
46
|
+
request,
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
export const getQuoteAccessorialByIdSuccess = createAction("sales/quoteAccessorial/getQuoteAccessorialByIdSuccess", function prepare(quoteAccessorial) {
|
|
51
|
+
return {
|
|
52
|
+
payload: {
|
|
53
|
+
quoteAccessorial,
|
|
54
|
+
id: nanoid(),
|
|
55
|
+
createdAt: new Date().toISOString(),
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
export const deleteQuoteAccessorial = createAction("sales/removeQuoteAccessorialById", function prepare(id, successAction) {
|
|
60
|
+
const request = new DeleteAction(`/sales/quoteAccessorials/${id}`);
|
|
61
|
+
if (successAction)
|
|
62
|
+
request.decodeResponse = (dispatch) => {
|
|
63
|
+
dispatch(successAction);
|
|
64
|
+
};
|
|
65
|
+
return {
|
|
66
|
+
payload: {
|
|
67
|
+
id: nanoid(),
|
|
68
|
+
createdAt: new Date().toISOString(),
|
|
69
|
+
request,
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
});
|
|
73
|
+
export const deleteQuoteAccessorialSuccess = createAction("sales/quoteAccessorials/deleteQuoteAccessorialSuccess", function prepare(success) {
|
|
74
|
+
return {
|
|
75
|
+
payload: {
|
|
76
|
+
success,
|
|
77
|
+
id: nanoid(),
|
|
78
|
+
createdAt: new Date().toISOString(),
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
});
|
|
82
|
+
export const updateQuoteAccessorial = createAction("sales/quoteAccessorials/updateQuoteAccessorial", function prepare(id, body) {
|
|
83
|
+
const request = new PutAction(`/sales/quoteAccessorials/${id}`, body);
|
|
84
|
+
request.decodeResponse = (dispatch) => {
|
|
85
|
+
dispatch(updateQuoteAccessorialSuccess(true));
|
|
86
|
+
};
|
|
87
|
+
return {
|
|
88
|
+
payload: {
|
|
89
|
+
id: nanoid(),
|
|
90
|
+
createdAt: new Date().toISOString(),
|
|
91
|
+
request,
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
});
|
|
95
|
+
export const updateQuoteAccessorialSuccess = createAction("sales/quoteAccessorials/updateQuoteAccessorialSuccess", function prepare(success) {
|
|
96
|
+
return {
|
|
97
|
+
payload: {
|
|
98
|
+
success,
|
|
99
|
+
id: nanoid(),
|
|
100
|
+
createdAt: new Date().toISOString(),
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
});
|
|
104
|
+
export const createQuoteAccessorial = createAction("sales/quoteAccessorials/createQuoteAccessorial", function prepare(body) {
|
|
105
|
+
const request = new PostAction(`/sales/quoteAccessorials`, body);
|
|
106
|
+
request.decodeResponse = (dispatch, json) => {
|
|
107
|
+
const quoteAccessorial = new QuoteAccessorial(json);
|
|
108
|
+
dispatch(createQuoteAccessorialSuccess(quoteAccessorial));
|
|
109
|
+
};
|
|
110
|
+
return {
|
|
111
|
+
payload: {
|
|
112
|
+
id: nanoid(),
|
|
113
|
+
createdAt: new Date().toISOString(),
|
|
114
|
+
request,
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
});
|
|
118
|
+
export const createQuoteAccessorialSuccess = createAction("sales/quoteAccessorials/createQuoteAccessorialSuccess", function prepare(quoteAccessorial) {
|
|
119
|
+
return {
|
|
120
|
+
payload: {
|
|
121
|
+
quoteAccessorial,
|
|
122
|
+
id: nanoid(),
|
|
123
|
+
createdAt: new Date().toISOString(),
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
});
|
|
127
|
+
export const getQuoteAccessorialsSearchMetadata = createAction("sales/getQuoteAccessorialsSearchMetadata", function prepare() {
|
|
128
|
+
const request = new GetAction(`/sales/quoteAccessorials/searchMetadata`);
|
|
129
|
+
request.decodeResponse = (dispatch, json) => {
|
|
130
|
+
dispatch(getQuoteAccessorialsSearchMetadataSuccess(json));
|
|
131
|
+
};
|
|
132
|
+
return {
|
|
133
|
+
payload: {
|
|
134
|
+
id: nanoid(),
|
|
135
|
+
createdAt: new Date().toISOString(),
|
|
136
|
+
request,
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
});
|
|
140
|
+
export const getQuoteAccessorialsSearchMetadataSuccess = createAction("sales/getQuoteAccessorialsSearchMetadataSuccess", function prepare(quoteAccessorialsSearchMetadata) {
|
|
141
|
+
return {
|
|
142
|
+
payload: {
|
|
143
|
+
quoteAccessorialsSearchMetadata,
|
|
144
|
+
id: nanoid(),
|
|
145
|
+
createdAt: new Date().toISOString(),
|
|
146
|
+
},
|
|
147
|
+
};
|
|
148
|
+
});
|
|
149
|
+
//# sourceMappingURL=quoteAccessorialActions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quoteAccessorialActions.js","sourceRoot":"","sources":["../../../src/redux/quoteAccessorial/quoteAccessorialActions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,SAAS,EACT,UAAU,EACV,SAAS,GACV,MAAM,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AE;SACpC;KACF,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { createReducer } from "@reduxjs/toolkit";
|
|
2
|
+
import { getQuoteAccessorialByIdSuccess, getQuoteAccessorialsSearchMetadataSuccess, setSelectedQuoteAccessorialID, } from "./quoteAccessorialActions";
|
|
3
|
+
function initState() {
|
|
4
|
+
return {
|
|
5
|
+
quoteAccessorials: {},
|
|
6
|
+
searchMetadata: undefined,
|
|
7
|
+
selectedQuoteAccessorialID: undefined,
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export const quoteAccessorialReducer = createReducer(initState(), (builder) => {
|
|
11
|
+
builder.addCase(setSelectedQuoteAccessorialID, (state, action) => {
|
|
12
|
+
state.selectedQuoteAccessorialID = action.payload.quoteAccessorialID;
|
|
13
|
+
return state;
|
|
14
|
+
});
|
|
15
|
+
builder.addCase(getQuoteAccessorialsSearchMetadataSuccess, (state, action) => {
|
|
16
|
+
state.searchMetadata = action.payload.quoteAccessorialsSearchMetadata;
|
|
17
|
+
return state;
|
|
18
|
+
});
|
|
19
|
+
builder.addCase(getQuoteAccessorialByIdSuccess, (state, action) => {
|
|
20
|
+
const quoteAccessorial = action.payload.quoteAccessorial;
|
|
21
|
+
if (quoteAccessorial) {
|
|
22
|
+
const quoteAccessorials = { ...state.quoteAccessorials };
|
|
23
|
+
quoteAccessorials[quoteAccessorial.id] = quoteAccessorial;
|
|
24
|
+
state.quoteAccessorials = quoteAccessorials;
|
|
25
|
+
}
|
|
26
|
+
return state;
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=quoteAccessorialReducer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quoteAccessorialReducer.js","sourceRoot":"","sources":["../../../src/redux/quoteAccessorial/quoteAccessorialReducer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAA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ialState.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CustomerState } from "./customer";
|
|
2
|
+
import { LoadState } from "./load";
|
|
3
|
+
import { LoadAdjustmentState } from "./loadAdjustment";
|
|
4
|
+
import { LocationState } from "./location";
|
|
5
|
+
import { QuoteState } from "./quote";
|
|
6
|
+
import { QuoteAccessorialState } from "./quoteAccessorial";
|
|
7
|
+
import { ShipconState } from "./shipcon";
|
|
8
|
+
export interface SalesKitState {
|
|
9
|
+
quote: QuoteState;
|
|
10
|
+
loadState: LoadState;
|
|
11
|
+
shipconState: ShipconState;
|
|
12
|
+
customer: CustomerState;
|
|
13
|
+
location: LocationState;
|
|
14
|
+
loadAdjustmentState: LoadAdjustmentState;
|
|
15
|
+
quoteAccessorialState: QuoteAccessorialState;
|
|
16
|
+
}
|
|
17
|
+
export declare const salesKitReducer: import("redux").Reducer<import("redux").CombinedState<{
|
|
18
|
+
quote: QuoteState;
|
|
19
|
+
shipconState: ShipconState;
|
|
20
|
+
loadState: LoadState;
|
|
21
|
+
location: LocationState;
|
|
22
|
+
customer: CustomerState;
|
|
23
|
+
loadAdjustmentState: LoadAdjustmentState;
|
|
24
|
+
quoteAccessorialState: QuoteAccessorialState;
|
|
25
|
+
}>, import("redux").AnyAction>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { combineReducers } from "@reduxjs/toolkit";
|
|
2
|
+
import { customerReducer } from "./customer";
|
|
3
|
+
import { loadReducer } from "./load";
|
|
4
|
+
import { loadAdjustmentReducer } from "./loadAdjustment";
|
|
5
|
+
import { locationReducer } from "./location";
|
|
6
|
+
import { quoteReducer } from "./quote";
|
|
7
|
+
import { quoteAccessorialReducer, } from "./quoteAccessorial";
|
|
8
|
+
import { shipconReducer } from "./shipcon";
|
|
9
|
+
export const salesKitReducer = combineReducers({
|
|
10
|
+
quote: quoteReducer,
|
|
11
|
+
shipconState: shipconReducer,
|
|
12
|
+
loadState: loadReducer,
|
|
13
|
+
location: locationReducer,
|
|
14
|
+
customer: customerReducer,
|
|
15
|
+
loadAdjustmentState: loadAdjustmentReducer,
|
|
16
|
+
quoteAccessorialState: quoteAccessorialReducer,
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=salesKitReducer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"salesKitReducer.js","sourceRoot":"","sources":["../../src/redux/salesKitReducer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAiB,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAa,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAuB,MAAM,kBAAkB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAiB,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAc,MAAM,SAAS,CAAC;AACnD,OAAO,EACL,uBAAuB,GAExB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAgB,MAAM,WAAW,CAAC;AAYzD,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC;IAC7C,KAAK,EAAE,YAAY;IACnB,YAAY,EAAE,cAAc;IAC5B,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,eAAe;IACzB,QAAQ,EAAE,eAAe;IACzB,mBAAmB,EAAE,qBAAqB;IAC1C,qBAAqB,EAAE,uBAAuB;CAC/C,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/redux/shipcon/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { DeleteAction, GetAction, PostAction, PutAction } from "@nerdjs/nerd-network";
|
|
2
|
+
import { AnyAction } from "@reduxjs/toolkit";
|
|
3
|
+
import { Shipcon } from "../../entities/shipcon";
|
|
4
|
+
export declare const setSelectedShipconID: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[shipconID?: number | undefined], {
|
|
5
|
+
shipconID: number | undefined;
|
|
6
|
+
id: string;
|
|
7
|
+
createdAt: string;
|
|
8
|
+
}, "setSelectedShipconID", never, never>;
|
|
9
|
+
export declare const getShipcons: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[], {
|
|
10
|
+
id: string;
|
|
11
|
+
createdAt: string;
|
|
12
|
+
request: GetAction;
|
|
13
|
+
}, "sales/shipcon/getShipcons", never, never>;
|
|
14
|
+
export declare const getShipconsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[shipcons: Shipcon[]], {
|
|
15
|
+
shipcons: Shipcon[];
|
|
16
|
+
id: string;
|
|
17
|
+
createdAt: string;
|
|
18
|
+
}, "sales/shipcon/getShipconSuccess", never, never>;
|
|
19
|
+
export declare const getShipconsByFilter: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[query: {
|
|
20
|
+
[key: string]: unknown;
|
|
21
|
+
}], {
|
|
22
|
+
id: string;
|
|
23
|
+
createdAt: string;
|
|
24
|
+
request: GetAction;
|
|
25
|
+
}, "sales/shipcon/getShipconsByFilter", never, never>;
|
|
26
|
+
export declare const getShipconsByFilterSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[shipcons: Shipcon[]], {
|
|
27
|
+
shipcons: Shipcon[];
|
|
28
|
+
id: string;
|
|
29
|
+
createdAt: string;
|
|
30
|
+
}, "sales/shipcon/getShipconsByFilterSuccess", never, never>;
|
|
31
|
+
export declare const getShipconById: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[id: number], {
|
|
32
|
+
id: string;
|
|
33
|
+
createdAt: string;
|
|
34
|
+
request: GetAction;
|
|
35
|
+
}, "sales/shipcon/getById", never, never>;
|
|
36
|
+
export declare const getShipconByIdSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[shipcon?: Shipcon | undefined], {
|
|
37
|
+
shipcon: Shipcon | undefined;
|
|
38
|
+
id: string;
|
|
39
|
+
createdAt: string;
|
|
40
|
+
}, "sales/shipcon/getShipconByIdSuccess", never, never>;
|
|
41
|
+
export declare const deleteShipcon: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[id: number, successAction?: AnyAction | undefined], {
|
|
42
|
+
id: string;
|
|
43
|
+
createdAt: string;
|
|
44
|
+
request: DeleteAction;
|
|
45
|
+
}, "sales/removeShipconById", never, never>;
|
|
46
|
+
export declare const deleteShipconSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[success: boolean], {
|
|
47
|
+
success: boolean;
|
|
48
|
+
id: string;
|
|
49
|
+
createdAt: string;
|
|
50
|
+
}, "sales/shipcons/deleteShipconSuccess", never, never>;
|
|
51
|
+
export declare const updateShipcon: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[id: number, body: Shipcon], {
|
|
52
|
+
id: string;
|
|
53
|
+
createdAt: string;
|
|
54
|
+
request: PutAction;
|
|
55
|
+
}, "sales/shipcons/updateShipcon", never, never>;
|
|
56
|
+
export declare const updateShipconSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[success: boolean], {
|
|
57
|
+
success: boolean;
|
|
58
|
+
id: string;
|
|
59
|
+
createdAt: string;
|
|
60
|
+
}, "sales/shipcons/updateShipconSuccess", never, never>;
|
|
61
|
+
export declare const createShipcon: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[body: Shipcon], {
|
|
62
|
+
id: string;
|
|
63
|
+
createdAt: string;
|
|
64
|
+
request: PostAction;
|
|
65
|
+
}, "sales/shipcons/createShipcon", never, never>;
|
|
66
|
+
export declare const createShipconSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[shipcon: Shipcon], {
|
|
67
|
+
shipcon: Shipcon;
|
|
68
|
+
id: string;
|
|
69
|
+
createdAt: string;
|
|
70
|
+
}, "sales/shipcons/createShipconSuccess", never, never>;
|
|
71
|
+
export declare const getShipconsSearchMetadata: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[], {
|
|
72
|
+
id: string;
|
|
73
|
+
createdAt: string;
|
|
74
|
+
request: GetAction;
|
|
75
|
+
}, "sales/getShipconsSearchMetadata", never, never>;
|
|
76
|
+
export declare const getShipconsSearchMetadataSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[shipconsSearchMetadata: unknown], {
|
|
77
|
+
shipconsSearchMetadata: unknown;
|
|
78
|
+
id: string;
|
|
79
|
+
createdAt: string;
|
|
80
|
+
}, "sales/getShipconsSearchMetadataSuccess", never, never>;
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { DeleteAction, GetAction, PostAction, PutAction, } from "@nerdjs/nerd-network";
|
|
2
|
+
import { createAction, nanoid } from "@reduxjs/toolkit";
|
|
3
|
+
import { Shipcon } from "../../entities/shipcon";
|
|
4
|
+
export const setSelectedShipconID = createAction("setSelectedShipconID", function prepare(shipconID) {
|
|
5
|
+
return {
|
|
6
|
+
payload: {
|
|
7
|
+
shipconID,
|
|
8
|
+
id: nanoid(),
|
|
9
|
+
createdAt: new Date().toISOString(),
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
});
|
|
13
|
+
export const getShipcons = createAction("sales/shipcon/getShipcons", function prepare() {
|
|
14
|
+
const request = new GetAction(`/sales/shipcons`);
|
|
15
|
+
request.decodeResponse = (dispatch, json) => {
|
|
16
|
+
const shipcons = Shipcon.fromList(json);
|
|
17
|
+
dispatch(getShipconsSuccess(shipcons));
|
|
18
|
+
};
|
|
19
|
+
return {
|
|
20
|
+
payload: {
|
|
21
|
+
id: nanoid(),
|
|
22
|
+
createdAt: new Date().toISOString(),
|
|
23
|
+
request,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
});
|
|
27
|
+
export const getShipconsSuccess = createAction("sales/shipcon/getShipconSuccess", function prepare(shipcons) {
|
|
28
|
+
return {
|
|
29
|
+
payload: {
|
|
30
|
+
shipcons,
|
|
31
|
+
id: nanoid(),
|
|
32
|
+
createdAt: new Date().toISOString(),
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
export const getShipconsByFilter = createAction("sales/shipcon/getShipconsByFilter", function prepare(query) {
|
|
37
|
+
const request = new GetAction(`/sales/shipcons`, query);
|
|
38
|
+
request.decodeResponse = (dispatch, json) => {
|
|
39
|
+
const shipcons = Shipcon.fromList(json);
|
|
40
|
+
dispatch(getShipconsSuccess(shipcons));
|
|
41
|
+
};
|
|
42
|
+
return {
|
|
43
|
+
payload: {
|
|
44
|
+
id: nanoid(),
|
|
45
|
+
createdAt: new Date().toISOString(),
|
|
46
|
+
request,
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
export const getShipconsByFilterSuccess = createAction("sales/shipcon/getShipconsByFilterSuccess", function prepare(shipcons) {
|
|
51
|
+
return {
|
|
52
|
+
payload: {
|
|
53
|
+
shipcons,
|
|
54
|
+
id: nanoid(),
|
|
55
|
+
createdAt: new Date().toISOString(),
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
export const getShipconById = createAction("sales/shipcon/getById", function prepare(id) {
|
|
60
|
+
const request = new GetAction(`/sales/shipcons/${id}`);
|
|
61
|
+
request.decodeResponse = (dispatch, json) => {
|
|
62
|
+
const shipcon = new Shipcon(json);
|
|
63
|
+
dispatch(getShipconByIdSuccess(shipcon));
|
|
64
|
+
};
|
|
65
|
+
return {
|
|
66
|
+
payload: {
|
|
67
|
+
id: nanoid(),
|
|
68
|
+
createdAt: new Date().toISOString(),
|
|
69
|
+
request,
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
});
|
|
73
|
+
export const getShipconByIdSuccess = createAction("sales/shipcon/getShipconByIdSuccess", function prepare(shipcon) {
|
|
74
|
+
return {
|
|
75
|
+
payload: {
|
|
76
|
+
shipcon,
|
|
77
|
+
id: nanoid(),
|
|
78
|
+
createdAt: new Date().toISOString(),
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
});
|
|
82
|
+
export const deleteShipcon = createAction("sales/removeShipconById", function prepare(id, successAction) {
|
|
83
|
+
const request = new DeleteAction(`/sales/shipcons/${id}`);
|
|
84
|
+
if (successAction)
|
|
85
|
+
request.decodeResponse = (dispatch) => {
|
|
86
|
+
dispatch(successAction);
|
|
87
|
+
};
|
|
88
|
+
return {
|
|
89
|
+
payload: {
|
|
90
|
+
id: nanoid(),
|
|
91
|
+
createdAt: new Date().toISOString(),
|
|
92
|
+
request,
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
});
|
|
96
|
+
export const deleteShipconSuccess = createAction("sales/shipcons/deleteShipconSuccess", function prepare(success) {
|
|
97
|
+
return {
|
|
98
|
+
payload: {
|
|
99
|
+
success,
|
|
100
|
+
id: nanoid(),
|
|
101
|
+
createdAt: new Date().toISOString(),
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
});
|
|
105
|
+
export const updateShipcon = createAction("sales/shipcons/updateShipcon", function prepare(id, body) {
|
|
106
|
+
const request = new PutAction(`/sales/shipcons/${id}`, body);
|
|
107
|
+
request.decodeResponse = (dispatch) => {
|
|
108
|
+
dispatch(updateShipconSuccess(true));
|
|
109
|
+
};
|
|
110
|
+
return {
|
|
111
|
+
payload: {
|
|
112
|
+
id: nanoid(),
|
|
113
|
+
createdAt: new Date().toISOString(),
|
|
114
|
+
request,
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
});
|
|
118
|
+
export const updateShipconSuccess = createAction("sales/shipcons/updateShipconSuccess", function prepare(success) {
|
|
119
|
+
return {
|
|
120
|
+
payload: {
|
|
121
|
+
success,
|
|
122
|
+
id: nanoid(),
|
|
123
|
+
createdAt: new Date().toISOString(),
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
});
|
|
127
|
+
export const createShipcon = createAction("sales/shipcons/createShipcon", function prepare(body) {
|
|
128
|
+
const request = new PostAction(`/sales/shipcons`, body);
|
|
129
|
+
request.decodeResponse = (dispatch, json) => {
|
|
130
|
+
const shipcon = new Shipcon(json);
|
|
131
|
+
dispatch(createShipconSuccess(shipcon));
|
|
132
|
+
};
|
|
133
|
+
return {
|
|
134
|
+
payload: {
|
|
135
|
+
id: nanoid(),
|
|
136
|
+
createdAt: new Date().toISOString(),
|
|
137
|
+
request,
|
|
138
|
+
},
|
|
139
|
+
};
|
|
140
|
+
});
|
|
141
|
+
export const createShipconSuccess = createAction("sales/shipcons/createShipconSuccess", function prepare(shipcon) {
|
|
142
|
+
return {
|
|
143
|
+
payload: {
|
|
144
|
+
shipcon,
|
|
145
|
+
id: nanoid(),
|
|
146
|
+
createdAt: new Date().toISOString(),
|
|
147
|
+
},
|
|
148
|
+
};
|
|
149
|
+
});
|
|
150
|
+
export const getShipconsSearchMetadata = createAction("sales/getShipconsSearchMetadata", function prepare() {
|
|
151
|
+
const request = new GetAction(`/sales/shipcons/searchMetadata`);
|
|
152
|
+
request.decodeResponse = (dispatch, json) => {
|
|
153
|
+
dispatch(getShipconsSearchMetadataSuccess(json));
|
|
154
|
+
};
|
|
155
|
+
return {
|
|
156
|
+
payload: {
|
|
157
|
+
id: nanoid(),
|
|
158
|
+
createdAt: new Date().toISOString(),
|
|
159
|
+
request,
|
|
160
|
+
},
|
|
161
|
+
};
|
|
162
|
+
});
|
|
163
|
+
export const getShipconsSearchMetadataSuccess = createAction("sales/getShipconsSearchMetadataSuccess", function prepare(shipconsSearchMetadata) {
|
|
164
|
+
return {
|
|
165
|
+
payload: {
|
|
166
|
+
shipconsSearchMetadata,
|
|
167
|
+
id: nanoid(),
|
|
168
|
+
createdAt: new Date().toISOString(),
|
|
169
|
+
},
|
|
170
|
+
};
|
|
171
|
+
});
|
|
172
|
+
//# sourceMappingURL=shipconActions.js.map
|
|
@@ -0,0 +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,GAAG,YAAY,CAC9C,qCAAqC,EACrC,SAAS,OAAO,CAAC,OAAgB;IAC/B,OAAO;QACL,OAAO,EAAE;YACP,OAAO;YACP,EAAE,EAAE,MAAM,EAAE;YACZ,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SACpC;KACF,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAG,YAAY,CACnD,iCAAiC,EACjC,SAAS,OAAO;IACd,MAAM,OAAO,GAAG,IAAI,SAAS,CAAC,gCAAgC,CAAC,CAAC;IAEhE,OAAO,CAAC,cAAc,GAAG,CAAC,QAAkB,EAAE,IAAa,EAAE,EAAE;QAC7D,QAAQ,CAAC,gCAAgC,CAAC,IAAI,CAAC,CAAC,CAAC;IACnD,CAAC,CAAC;IAEF,OAAO;QACL,OAAO,EAAE;YACP,EAAE,EAAE,MAAM,EAAE;YACZ,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACnC,OAAO;SACR;KACF,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,gCAAgC,GAAG,YAAY,CAC1D,wCAAwC,EACxC,SAAS,OAAO,CAAC,sBAA+B;IAC9C,OAAO;QACL,OAAO,EAAE;YACP,sBAAsB;YACtB,EAAE,EAAE,MAAM,EAAE;YACZ,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SACpC;KACF,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { createReducer } from "@reduxjs/toolkit";
|
|
2
|
+
import { arrayToMap } from "../../helpers";
|
|
3
|
+
import { getShipconByIdSuccess, getShipconsSearchMetadataSuccess, getShipconsSuccess, setSelectedShipconID, } from "./shipconActions";
|
|
4
|
+
function initState() {
|
|
5
|
+
return {
|
|
6
|
+
shipcons: {},
|
|
7
|
+
searchMetadata: undefined,
|
|
8
|
+
selectedShipconID: undefined,
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export const shipconReducer = createReducer(initState(), (builder) => {
|
|
12
|
+
builder.addCase(setSelectedShipconID, (state, action) => {
|
|
13
|
+
state.selectedShipconID = action.payload.shipconID;
|
|
14
|
+
return state;
|
|
15
|
+
});
|
|
16
|
+
builder.addCase(getShipconsSuccess, (state, action) => {
|
|
17
|
+
const shipcons = action.payload.shipcons;
|
|
18
|
+
state.shipcons = arrayToMap(shipcons);
|
|
19
|
+
return state;
|
|
20
|
+
});
|
|
21
|
+
builder.addCase(getShipconsSearchMetadataSuccess, (state, action) => {
|
|
22
|
+
state.searchMetadata = action.payload.shipconsSearchMetadata;
|
|
23
|
+
return state;
|
|
24
|
+
});
|
|
25
|
+
builder.addCase(getShipconByIdSuccess, (state, action) => {
|
|
26
|
+
const shipcon = action.payload.shipcon;
|
|
27
|
+
if (shipcon) {
|
|
28
|
+
const shipcons = { ...state.shipcons };
|
|
29
|
+
shipcons[shipcon.id] = shipcon;
|
|
30
|
+
state.shipcons = shipcons;
|
|
31
|
+
}
|
|
32
|
+
return state;
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=shipconReducer.js.map
|