@zeniai/client-epic-state 5.2.41-beta6MM → 5.2.41-beta7MM
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/lib/entity/billPay/billTransaction/billTransactionReducer.d.ts +5 -1
- package/lib/entity/billPay/billTransaction/billTransactionReducer.js +17 -2
- package/lib/entity/invoicing/coupon/couponPayload.d.ts +8 -0
- package/lib/entity/invoicing/coupon/couponPayload.js +8 -0
- package/lib/entity/invoicing/coupon/couponState.d.ts +6 -0
- package/lib/entity/invoicing/dunningCase/dunningCaseTypes.d.ts +1 -1
- package/lib/entity/invoicing/plan/planSelector.d.ts +20 -0
- package/lib/entity/invoicing/plan/planSelector.js +42 -0
- package/lib/entity/invoicing/product/productPayload.d.ts +8 -1
- package/lib/entity/invoicing/product/productPayload.js +4 -1
- package/lib/entity/invoicing/product/productState.d.ts +16 -0
- package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +4 -1
- package/lib/entity/jeSchedules/jeSchedulesReducer.js +79 -5
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +1 -0
- package/lib/entity/task/taskState.d.ts +1 -1
- package/lib/epic.d.ts +4 -1
- package/lib/epic.js +10 -4
- package/lib/esm/entity/billPay/billTransaction/billTransactionReducer.js +16 -1
- package/lib/esm/entity/invoicing/coupon/couponPayload.js +8 -0
- package/lib/esm/entity/invoicing/plan/planSelector.js +39 -0
- package/lib/esm/entity/invoicing/product/productPayload.js +4 -1
- package/lib/esm/entity/jeSchedules/jeSchedulesReducer.js +78 -4
- package/lib/esm/entity/snackbar/snackbarTypes.js +1 -0
- package/lib/esm/epic.js +10 -4
- package/lib/esm/index.js +8 -7
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/actualMatching/ignoreActualMatchingSuggestionEpic.js +3 -2
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchFailedJePostingsEpic.js +39 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +14 -1
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +10 -13
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic.js +38 -17
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.js +17 -1
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +15 -4
- package/lib/esm/view/expenseAutomationView/reducers/actualMatchingViewReducer.js +6 -0
- package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +74 -1
- package/lib/esm/view/expenseAutomationView/reducers/reconciliationViewReducer.js +80 -53
- package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +10 -0
- package/lib/esm/view/expenseAutomationView/selectors/actualMatchingViewSelector.js +6 -2
- package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +49 -14
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +28 -11
- package/lib/esm/view/invoicing/createInvoice/createInvoiceSelector.js +28 -1
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.js +67 -35
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewReducer.js +22 -11
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.js +23 -4
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogItemFormHelper.js +1 -7
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js +19 -5
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/seedInvoicingCatalogItemFormDraftEpic.js +30 -7
- package/lib/esm/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewPayload.js +16 -1
- package/lib/esm/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewReducer.js +22 -11
- package/lib/esm/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.js +69 -6
- package/lib/esm/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewState.js +22 -0
- package/lib/esm/view/invoicing/editInvoicingCouponDetailView/fetchInvoicingCouponDetailPageEpic.js +22 -4
- package/lib/esm/view/invoicing/editInvoicingCouponDetailView/saveInvoicingCouponEpic.js +18 -4
- package/lib/esm/view/invoicing/editInvoicingCouponDetailView/seedInvoicingCouponFormDraftEpic.js +29 -6
- package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewReducer.js +28 -12
- package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.js +37 -2
- package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/initializeInvoicingCustomerAddressEpic.js +43 -17
- package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/saveInvoicingCustomerEpic.js +1 -1
- package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/seedInvoicingCustomerFormDraftEpic.js +29 -6
- package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewReducer.js +30 -14
- package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.js +143 -8
- package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/fetchInvoicingSubscriptionFormPageEpic.js +4 -1
- package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/initializeInvoicingSubscriptionAddressEpic.js +44 -18
- package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/saveInvoicingSubscriptionEpic.js +1 -1
- package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/seedInvoicingSubscriptionFormDraftEpic.js +29 -8
- package/lib/esm/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewSelector.js +12 -0
- package/lib/esm/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.js +6 -6
- package/lib/esm/view/invoicing/invoicingFormDraft.js +78 -0
- package/lib/esm/view/invoicing/invoicingQboView/invoicingQboViewSelector.js +57 -9
- package/lib/esm/view/recommendation/recommendationPayload.js +3 -1
- package/lib/esm/view/recommendation/recommendationReducer.js +27 -7
- package/lib/esm/view/recommendation/recommendationSelector.js +1 -0
- package/lib/esm/view/recommendation/submitRecommendationFeedbackEpic.js +20 -8
- package/lib/esm/view/spendManagement/billPay/billDetailView/billDetailViewReducer.js +87 -1
- package/lib/esm/view/spendManagement/billPay/billDetailView/billDetailViewSelector.js +1 -0
- package/lib/esm/view/spendManagement/billPay/billDetailView/billDetailViewState.js +4 -0
- package/lib/esm/view/spendManagement/billPay/billDetailView/epics/fetchBillRecommendationsEpic.js +97 -0
- package/lib/esm/view/spendManagement/billPay/billDetailView/epics/fetchRecommendationsForBill.js +85 -0
- package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewReducer.js +18 -1
- package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +3 -0
- package/lib/esm/view/spendManagement/billPay/editBillView/epics/applyBillRecommendationsToLocalStoreEpic.js +95 -0
- package/lib/index.d.ts +9 -8
- package/lib/index.js +54 -48
- package/lib/view/expenseAutomationView/epics/jeSchedule/actualMatching/ignoreActualMatchingSuggestionEpic.js +3 -2
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchFailedJePostingsEpic.d.ts +20 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchFailedJePostingsEpic.js +43 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +13 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +8 -11
- package/lib/view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic.js +38 -17
- package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.js +17 -1
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +15 -4
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +18 -0
- package/lib/view/expenseAutomationView/payload/transactionCategorizationPayload.d.ts +18 -7
- package/lib/view/expenseAutomationView/reducers/actualMatchingViewReducer.js +6 -0
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +10 -3
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +76 -3
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +80 -53
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +10 -0
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +3 -0
- package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +8 -4
- package/lib/view/expenseAutomationView/selectors/actualMatchingViewSelector.d.ts +1 -0
- package/lib/view/expenseAutomationView/selectors/actualMatchingViewSelector.js +7 -2
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +49 -14
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +27 -10
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +16 -0
- package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +8 -5
- package/lib/view/invoicing/createInvoice/createInvoiceSelector.d.ts +7 -2
- package/lib/view/invoicing/createInvoice/createInvoiceSelector.js +28 -1
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.d.ts +46 -5
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.js +69 -36
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewReducer.d.ts +3 -1
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewReducer.js +22 -11
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.d.ts +17 -0
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.js +22 -3
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewState.d.ts +2 -1
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogItemFormHelper.d.ts +2 -2
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogItemFormHelper.js +1 -7
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js +17 -3
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/seedInvoicingCatalogItemFormDraftEpic.d.ts +10 -6
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/seedInvoicingCatalogItemFormDraftEpic.js +29 -6
- package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewPayload.d.ts +5 -1
- package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewPayload.js +16 -1
- package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewReducer.d.ts +3 -1
- package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewReducer.js +22 -11
- package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.d.ts +46 -0
- package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.js +68 -5
- package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewState.d.ts +21 -1
- package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewState.js +24 -1
- package/lib/view/invoicing/editInvoicingCouponDetailView/fetchInvoicingCouponDetailPageEpic.d.ts +9 -5
- package/lib/view/invoicing/editInvoicingCouponDetailView/fetchInvoicingCouponDetailPageEpic.js +22 -4
- package/lib/view/invoicing/editInvoicingCouponDetailView/saveInvoicingCouponEpic.js +18 -4
- package/lib/view/invoicing/editInvoicingCouponDetailView/seedInvoicingCouponFormDraftEpic.d.ts +10 -6
- package/lib/view/invoicing/editInvoicingCouponDetailView/seedInvoicingCouponFormDraftEpic.js +28 -5
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewReducer.d.ts +5 -1
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewReducer.js +29 -13
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.d.ts +16 -7
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.js +37 -2
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewState.d.ts +8 -1
- package/lib/view/invoicing/editInvoicingCustomerDetailView/initializeInvoicingCustomerAddressEpic.d.ts +15 -10
- package/lib/view/invoicing/editInvoicingCustomerDetailView/initializeInvoicingCustomerAddressEpic.js +42 -16
- package/lib/view/invoicing/editInvoicingCustomerDetailView/saveInvoicingCustomerEpic.js +1 -1
- package/lib/view/invoicing/editInvoicingCustomerDetailView/seedInvoicingCustomerFormDraftEpic.d.ts +10 -6
- package/lib/view/invoicing/editInvoicingCustomerDetailView/seedInvoicingCustomerFormDraftEpic.js +28 -5
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewReducer.d.ts +5 -1
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewReducer.js +31 -15
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.d.ts +79 -12
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.js +145 -9
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewState.d.ts +8 -1
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/fetchInvoicingSubscriptionFormPageEpic.js +4 -1
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/initializeInvoicingSubscriptionAddressEpic.d.ts +15 -11
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/initializeInvoicingSubscriptionAddressEpic.js +42 -16
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/saveInvoicingSubscriptionEpic.js +1 -1
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/seedInvoicingSubscriptionFormDraftEpic.d.ts +10 -6
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/seedInvoicingSubscriptionFormDraftEpic.js +28 -7
- package/lib/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewSelector.d.ts +10 -0
- package/lib/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewSelector.js +12 -0
- package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewReducer.d.ts +1 -1
- package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.d.ts +2 -2
- package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.js +6 -6
- package/lib/view/invoicing/invoicingFormDraft.d.ts +63 -0
- package/lib/view/invoicing/invoicingFormDraft.js +86 -0
- package/lib/view/invoicing/invoicingQboView/invoicingQboViewSelector.d.ts +49 -0
- package/lib/view/invoicing/invoicingQboView/invoicingQboViewSelector.js +59 -10
- package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewReducer.d.ts +1 -1
- package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewState.d.ts +1 -1
- package/lib/view/recommendation/recommendationPayload.d.ts +1 -0
- package/lib/view/recommendation/recommendationPayload.js +5 -0
- package/lib/view/recommendation/recommendationReducer.d.ts +7 -1
- package/lib/view/recommendation/recommendationReducer.js +28 -8
- package/lib/view/recommendation/recommendationSelector.d.ts +2 -0
- package/lib/view/recommendation/recommendationSelector.js +3 -1
- package/lib/view/recommendation/recommendationState.d.ts +2 -1
- package/lib/view/recommendation/submitRecommendationFeedbackEpic.d.ts +2 -2
- package/lib/view/recommendation/submitRecommendationFeedbackEpic.js +18 -6
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewPayload.d.ts +19 -0
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewReducer.d.ts +10 -1
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewReducer.js +88 -2
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewSelector.d.ts +1 -0
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewSelector.js +1 -0
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewState.d.ts +7 -0
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewState.js +4 -0
- package/lib/view/spendManagement/billPay/billDetailView/epics/fetchBillRecommendationsEpic.d.ts +37 -0
- package/lib/view/spendManagement/billPay/billDetailView/epics/fetchBillRecommendationsEpic.js +104 -0
- package/lib/view/spendManagement/billPay/billDetailView/epics/fetchRecommendationsForBill.d.ts +24 -0
- package/lib/view/spendManagement/billPay/billDetailView/epics/fetchRecommendationsForBill.js +92 -0
- package/lib/view/spendManagement/billPay/editBillView/editBillViewReducer.d.ts +4 -1
- package/lib/view/spendManagement/billPay/editBillView/editBillViewReducer.js +19 -2
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +1 -0
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +3 -0
- package/lib/view/spendManagement/billPay/editBillView/epics/applyBillRecommendationsToLocalStoreEpic.d.ts +18 -0
- package/lib/view/spendManagement/billPay/editBillView/epics/applyBillRecommendationsToLocalStoreEpic.js +102 -0
- package/package.json +2 -2
|
@@ -7,14 +7,35 @@ const editInvoicingSubscriptionDetailViewReducer_1 = require("./editInvoicingSub
|
|
|
7
7
|
const invoicingSubscriptionDetailHelper_1 = require("./invoicingSubscriptionDetailHelper");
|
|
8
8
|
const invoicingSubscriptionFormConfig_1 = require("./invoicingSubscriptionFormConfig");
|
|
9
9
|
/**
|
|
10
|
-
* Seeds the edit draft from the record the
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
10
|
+
* Seeds the edit draft from the record, so the form has its values before it
|
|
11
|
+
* mounts. The reducer ignores a seed once the draft holds the record, which is
|
|
12
|
+
* what stops a background refetch from overwriting edits in progress.
|
|
13
|
+
*
|
|
14
|
+
* Opening the page counts as a trigger, not just the detail response: the page
|
|
15
|
+
* fetch is cache-guarded, so re-opening a form for a record already loaded this
|
|
16
|
+
* session issues no request at all — and a draft cleared in between (by a save
|
|
17
|
+
* or a cancel) would have nothing left to seed it.
|
|
14
18
|
*/
|
|
15
|
-
const seedInvoicingSubscriptionFormDraftEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(editInvoicingSubscriptionDetailViewReducer_1.updateInvoicingSubscriptionDetail.match
|
|
16
|
-
|
|
17
|
-
const
|
|
19
|
+
const seedInvoicingSubscriptionFormDraftEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)((action) => editInvoicingSubscriptionDetailViewReducer_1.updateInvoicingSubscriptionDetail.match(action) ||
|
|
20
|
+
editInvoicingSubscriptionDetailViewReducer_1.fetchInvoicingSubscriptionFormPage.match(action)), (0, operators_1.withLatestFrom)(state$), (0, operators_1.mergeMap)(([action, state]) => {
|
|
21
|
+
const id = editInvoicingSubscriptionDetailViewReducer_1.updateInvoicingSubscriptionDetail.match(action)
|
|
22
|
+
? action.payload.id
|
|
23
|
+
: action.payload.subscriptionId;
|
|
24
|
+
if (id == null) {
|
|
25
|
+
return rxjs_1.EMPTY;
|
|
26
|
+
}
|
|
27
|
+
// The entity alone does not say the whole record is loaded — the list
|
|
28
|
+
// endpoints merge their own list-shaped rows into the same store. Only a
|
|
29
|
+
// completed detail load does, which is also exactly when the page's
|
|
30
|
+
// cache-guarded fetch issues no request and this is the sole seed.
|
|
31
|
+
if (editInvoicingSubscriptionDetailViewReducer_1.fetchInvoicingSubscriptionFormPage.match(action) &&
|
|
32
|
+
state.editInvoicingSubscriptionDetailViewState.recordStateById[id]
|
|
33
|
+
?.fetchState !== 'Completed') {
|
|
34
|
+
return rxjs_1.EMPTY;
|
|
35
|
+
}
|
|
36
|
+
// Nothing to seed from on a cold open; the detail response triggers this
|
|
37
|
+
// again once it lands.
|
|
38
|
+
const subscription = id != null ? (0, invoicingSubscriptionDetailHelper_1.getInvoicingSubscriptionById)(state, id) : undefined;
|
|
18
39
|
if (subscription == null) {
|
|
19
40
|
return rxjs_1.EMPTY;
|
|
20
41
|
}
|
|
@@ -27,6 +27,16 @@ export interface InvoicingCatalogListView extends SelectorView {
|
|
|
27
27
|
*/
|
|
28
28
|
runningActionId?: ID;
|
|
29
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Flatten catalog items into the price rows the pickers render.
|
|
32
|
+
*
|
|
33
|
+
* The parent item's `applicableItems` / `itemApplicability` are carried onto
|
|
34
|
+
* every row it produces: applicability is a property of the catalog item, not
|
|
35
|
+
* of its price points, and a row that has lost it cannot be matched against the
|
|
36
|
+
* selected plan's allow-list (see `getInvoicingItemsAllowedForPlan`). Both are
|
|
37
|
+
* written after the spread so the item's own rule wins over any stale copy a
|
|
38
|
+
* price point payload may carry.
|
|
39
|
+
*/
|
|
30
40
|
export declare const getInvoicingCatalogPrices: (items: InvoicingPlan[]) => InvoicingProduct[];
|
|
31
41
|
/**
|
|
32
42
|
* Bundled read view for the single catalog page (plans + products tabs).
|
|
@@ -5,8 +5,20 @@ const toolkit_1 = require("@reduxjs/toolkit");
|
|
|
5
5
|
const planSelector_1 = require("../../../entity/invoicing/plan/planSelector");
|
|
6
6
|
const runningInvoicingActionId_1 = require("../runningInvoicingActionId");
|
|
7
7
|
const invoicingCatalogListViewState_1 = require("./invoicingCatalogListViewState");
|
|
8
|
+
/**
|
|
9
|
+
* Flatten catalog items into the price rows the pickers render.
|
|
10
|
+
*
|
|
11
|
+
* The parent item's `applicableItems` / `itemApplicability` are carried onto
|
|
12
|
+
* every row it produces: applicability is a property of the catalog item, not
|
|
13
|
+
* of its price points, and a row that has lost it cannot be matched against the
|
|
14
|
+
* selected plan's allow-list (see `getInvoicingItemsAllowedForPlan`). Both are
|
|
15
|
+
* written after the spread so the item's own rule wins over any stale copy a
|
|
16
|
+
* price point payload may carry.
|
|
17
|
+
*/
|
|
8
18
|
const getInvoicingCatalogPrices = (items) => items.flatMap((item) => (item.subFamilies ?? []).map((subFamily) => ({
|
|
9
19
|
...subFamily,
|
|
20
|
+
applicableItems: item.applicableItems,
|
|
21
|
+
itemApplicability: item.itemApplicability,
|
|
10
22
|
itemID: item.id,
|
|
11
23
|
itemType: item.type ?? item.itemType,
|
|
12
24
|
name: subFamily.name,
|
package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewReducer.d.ts
CHANGED
|
@@ -26,6 +26,6 @@ export declare const fetchInvoicingDunningCaseList: import("@reduxjs/toolkit").A
|
|
|
26
26
|
ids: ID[];
|
|
27
27
|
keepExistingListItems: boolean;
|
|
28
28
|
nextCursor: string | null;
|
|
29
|
-
}, "invoicingDunningCaseListView/updateInvoicingDunningCaseList">, updateInvoicingDunningCaseListFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "invoicingDunningCaseListView/updateInvoicingDunningCaseListFailure">, fetchInvoicingDunningCaseCounts: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"invoicingDunningCaseListView/fetchInvoicingDunningCaseCounts">, updateInvoicingDunningCaseCounts: import("@reduxjs/toolkit").ActionCreatorWithPayload<InvoicingListCounts, "invoicingDunningCaseListView/updateInvoicingDunningCaseCounts">, updateInvoicingDunningCaseCountsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "invoicingDunningCaseListView/updateInvoicingDunningCaseCountsFailure">, updateInvoicingDunningCaseFilters: import("@reduxjs/toolkit").ActionCreatorWithPayload<InvoicingDunningCaseFilters, "invoicingDunningCaseListView/updateInvoicingDunningCaseFilters">, setInvoicingDunningCaseActiveTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"
|
|
29
|
+
}, "invoicingDunningCaseListView/updateInvoicingDunningCaseList">, updateInvoicingDunningCaseListFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "invoicingDunningCaseListView/updateInvoicingDunningCaseListFailure">, fetchInvoicingDunningCaseCounts: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"invoicingDunningCaseListView/fetchInvoicingDunningCaseCounts">, updateInvoicingDunningCaseCounts: import("@reduxjs/toolkit").ActionCreatorWithPayload<InvoicingListCounts, "invoicingDunningCaseListView/updateInvoicingDunningCaseCounts">, updateInvoicingDunningCaseCountsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "invoicingDunningCaseListView/updateInvoicingDunningCaseCountsFailure">, updateInvoicingDunningCaseFilters: import("@reduxjs/toolkit").ActionCreatorWithPayload<InvoicingDunningCaseFilters, "invoicingDunningCaseListView/updateInvoicingDunningCaseFilters">, setInvoicingDunningCaseActiveTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"cancelled" | "scheduled" | "retrying" | "manual_review" | "resolved" | "paused" | "all", "invoicingDunningCaseListView/setInvoicingDunningCaseActiveTab">;
|
|
30
30
|
declare const _default: import("redux").Reducer<InvoicingDunningCaseListViewState>;
|
|
31
31
|
export default _default;
|
package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.d.ts
CHANGED
|
@@ -19,8 +19,8 @@ export interface InvoicingDunningCaseColumnConfig {
|
|
|
19
19
|
sortable: boolean;
|
|
20
20
|
}
|
|
21
21
|
export declare const INVOICING_DUNNING_CASE_COLUMNS: InvoicingDunningCaseColumnConfig[];
|
|
22
|
-
export declare const ALL_INVOICING_DUNNING_CASE_TAB_IDS: readonly ["all", "
|
|
23
|
-
export declare const toInvoicingDunningCaseTabId: (v: string) => "
|
|
22
|
+
export declare const ALL_INVOICING_DUNNING_CASE_TAB_IDS: readonly ["all", "retrying", "scheduled", "manual_review", "paused", "resolved", "cancelled"];
|
|
23
|
+
export declare const toInvoicingDunningCaseTabId: (v: string) => "cancelled" | "scheduled" | "retrying" | "manual_review" | "resolved" | "paused" | "all";
|
|
24
24
|
export type InvoicingDunningCaseTabId = ReturnType<typeof toInvoicingDunningCaseTabId>;
|
|
25
25
|
export interface InvoicingDunningCaseListViewState extends FetchedState {
|
|
26
26
|
/** Selected status tab (CES-owned so it persists across page revisits). */
|
package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.js
CHANGED
|
@@ -26,12 +26,12 @@ exports.INVOICING_DUNNING_CASE_COLUMNS = [
|
|
|
26
26
|
];
|
|
27
27
|
exports.ALL_INVOICING_DUNNING_CASE_TAB_IDS = [
|
|
28
28
|
'all',
|
|
29
|
-
'
|
|
30
|
-
'
|
|
31
|
-
'
|
|
32
|
-
'
|
|
33
|
-
'
|
|
34
|
-
'
|
|
29
|
+
'retrying',
|
|
30
|
+
'scheduled',
|
|
31
|
+
'manual_review',
|
|
32
|
+
'paused',
|
|
33
|
+
'resolved',
|
|
34
|
+
'cancelled',
|
|
35
35
|
];
|
|
36
36
|
const toInvoicingDunningCaseTabId = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_INVOICING_DUNNING_CASE_TAB_IDS);
|
|
37
37
|
exports.toInvoicingDunningCaseTabId = toInvoicingDunningCaseTabId;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { FetchState, ID } from '../../commonStateTypes/common';
|
|
2
|
+
/**
|
|
3
|
+
* A create/edit form's draft, plus where its values came from.
|
|
4
|
+
*
|
|
5
|
+
* The status is what lets an edit form tell "these are the record's values"
|
|
6
|
+
* from "these are whatever the form had at first render". It cannot be read off
|
|
7
|
+
* the presence of a draft, because the form writes drafts too: it pushes its
|
|
8
|
+
* whole state back on every change, so a change made before the record landed
|
|
9
|
+
* leaves a draft that looks seeded but holds nothing.
|
|
10
|
+
*
|
|
11
|
+
* `Not-Started` — not (or no longer) the loaded record's values: written by the
|
|
12
|
+
* form before the record landed, or just saved and awaiting the
|
|
13
|
+
* refetch that follows. A successful load replaces it.
|
|
14
|
+
* `Completed` — filled from the loaded record; the form may have edited it since.
|
|
15
|
+
* `Error` — the record's fetch failed, so the form starts blank and a
|
|
16
|
+
* later successful fetch is still allowed to seed it.
|
|
17
|
+
*/
|
|
18
|
+
export interface InvoicingFormDraft<TLocalData> {
|
|
19
|
+
fetchState: FetchState;
|
|
20
|
+
localData: TLocalData;
|
|
21
|
+
}
|
|
22
|
+
export type InvoicingFormDraftById<TLocalData> = Record<ID, InvoicingFormDraft<TLocalData>>;
|
|
23
|
+
/**
|
|
24
|
+
* The form's own write. Keeps the status: an edit on top of a seeded draft is
|
|
25
|
+
* still the record's draft, and an edit made before the record arrived must not
|
|
26
|
+
* pass for one.
|
|
27
|
+
*/
|
|
28
|
+
export declare function applyInvoicingFormDraftEdit<TLocalData>(draftById: InvoicingFormDraftById<TLocalData>, id: ID, localData: TLocalData): void;
|
|
29
|
+
/**
|
|
30
|
+
* Fill the draft from the loaded record, once. A second seed is ignored so a
|
|
31
|
+
* late refetch cannot overwrite edits in progress — but a draft the form wrote
|
|
32
|
+
* before the record landed is replaced, since it was never the record's.
|
|
33
|
+
*/
|
|
34
|
+
export declare function applyInvoicingFormDraftSeed<TLocalData>(draftById: InvoicingFormDraftById<TLocalData>, id: ID, localData: TLocalData): void;
|
|
35
|
+
/**
|
|
36
|
+
* Record that the fetch failed, so the form renders instead of waiting behind a
|
|
37
|
+
* skeleton that will never resolve.
|
|
38
|
+
*
|
|
39
|
+
* Mirrors the seed: a draft holding the record is left alone, since a
|
|
40
|
+
* background refetch failing is no reason to discard it, and anything else is
|
|
41
|
+
* marked failed. A draft the form wrote before the record landed keeps its
|
|
42
|
+
* values — there is no reason to throw away what the user typed — but stops
|
|
43
|
+
* counting as still loading, and a later successful fetch can still seed it.
|
|
44
|
+
*/
|
|
45
|
+
export declare function applyInvoicingFormDraftFailure<TLocalData>(draftById: InvoicingFormDraftById<TLocalData>, id: ID, blankLocalData: TLocalData): void;
|
|
46
|
+
/**
|
|
47
|
+
* The record behind this draft was just saved and is about to be refetched.
|
|
48
|
+
* Keep the values on screen — dropping them would blank the form for the round
|
|
49
|
+
* trip, and the form remounts on the response anyway — but stop counting them
|
|
50
|
+
* as the loaded record's, so that response is allowed to replace them.
|
|
51
|
+
*/
|
|
52
|
+
export declare function applyInvoicingFormDraftSaved<TLocalData>(draftById: InvoicingFormDraftById<TLocalData>, id: ID): void;
|
|
53
|
+
/** The draft's values, or the blank form when nothing is drafted yet. */
|
|
54
|
+
export declare function getInvoicingFormDraftLocalData<TLocalData>(draftById: InvoicingFormDraftById<TLocalData>, id: ID | undefined, blankLocalData: TLocalData): TLocalData;
|
|
55
|
+
/**
|
|
56
|
+
* Whether the form should still be showing its skeleton — the record has
|
|
57
|
+
* neither reached the draft nor failed trying.
|
|
58
|
+
*
|
|
59
|
+
* Settles once and stays settled, which is what keeps a later refetch from
|
|
60
|
+
* swapping a form the user is typing into back for a skeleton. Create mode
|
|
61
|
+
* (no id) has no record to wait for.
|
|
62
|
+
*/
|
|
63
|
+
export declare function isInvoicingFormDraftPending<TLocalData>(draftById: InvoicingFormDraftById<TLocalData>, id: ID | undefined): boolean;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.applyInvoicingFormDraftEdit = applyInvoicingFormDraftEdit;
|
|
4
|
+
exports.applyInvoicingFormDraftSeed = applyInvoicingFormDraftSeed;
|
|
5
|
+
exports.applyInvoicingFormDraftFailure = applyInvoicingFormDraftFailure;
|
|
6
|
+
exports.applyInvoicingFormDraftSaved = applyInvoicingFormDraftSaved;
|
|
7
|
+
exports.getInvoicingFormDraftLocalData = getInvoicingFormDraftLocalData;
|
|
8
|
+
exports.isInvoicingFormDraftPending = isInvoicingFormDraftPending;
|
|
9
|
+
/**
|
|
10
|
+
* The form's own write. Keeps the status: an edit on top of a seeded draft is
|
|
11
|
+
* still the record's draft, and an edit made before the record arrived must not
|
|
12
|
+
* pass for one.
|
|
13
|
+
*/
|
|
14
|
+
function applyInvoicingFormDraftEdit(draftById, id, localData) {
|
|
15
|
+
draftById[id] = {
|
|
16
|
+
fetchState: draftById[id]?.fetchState ?? 'Not-Started',
|
|
17
|
+
localData,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Fill the draft from the loaded record, once. A second seed is ignored so a
|
|
22
|
+
* late refetch cannot overwrite edits in progress — but a draft the form wrote
|
|
23
|
+
* before the record landed is replaced, since it was never the record's.
|
|
24
|
+
*/
|
|
25
|
+
function applyInvoicingFormDraftSeed(draftById, id, localData) {
|
|
26
|
+
if (draftById[id]?.fetchState === 'Completed') {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
draftById[id] = { fetchState: 'Completed', localData };
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Record that the fetch failed, so the form renders instead of waiting behind a
|
|
33
|
+
* skeleton that will never resolve.
|
|
34
|
+
*
|
|
35
|
+
* Mirrors the seed: a draft holding the record is left alone, since a
|
|
36
|
+
* background refetch failing is no reason to discard it, and anything else is
|
|
37
|
+
* marked failed. A draft the form wrote before the record landed keeps its
|
|
38
|
+
* values — there is no reason to throw away what the user typed — but stops
|
|
39
|
+
* counting as still loading, and a later successful fetch can still seed it.
|
|
40
|
+
*/
|
|
41
|
+
function applyInvoicingFormDraftFailure(draftById, id, blankLocalData) {
|
|
42
|
+
const existing = draftById[id];
|
|
43
|
+
if (existing == null) {
|
|
44
|
+
draftById[id] = { fetchState: 'Error', localData: blankLocalData };
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
if (existing.fetchState === 'Completed') {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
existing.fetchState = 'Error';
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The record behind this draft was just saved and is about to be refetched.
|
|
54
|
+
* Keep the values on screen — dropping them would blank the form for the round
|
|
55
|
+
* trip, and the form remounts on the response anyway — but stop counting them
|
|
56
|
+
* as the loaded record's, so that response is allowed to replace them.
|
|
57
|
+
*/
|
|
58
|
+
function applyInvoicingFormDraftSaved(draftById, id) {
|
|
59
|
+
const existing = draftById[id];
|
|
60
|
+
if (existing == null) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
existing.fetchState = 'Not-Started';
|
|
64
|
+
}
|
|
65
|
+
/** The draft's values, or the blank form when nothing is drafted yet. */
|
|
66
|
+
function getInvoicingFormDraftLocalData(draftById, id, blankLocalData) {
|
|
67
|
+
if (id == null) {
|
|
68
|
+
return blankLocalData;
|
|
69
|
+
}
|
|
70
|
+
return draftById[id]?.localData ?? blankLocalData;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Whether the form should still be showing its skeleton — the record has
|
|
74
|
+
* neither reached the draft nor failed trying.
|
|
75
|
+
*
|
|
76
|
+
* Settles once and stays settled, which is what keeps a later refetch from
|
|
77
|
+
* swapping a form the user is typing into back for a skeleton. Create mode
|
|
78
|
+
* (no id) has no record to wait for.
|
|
79
|
+
*/
|
|
80
|
+
function isInvoicingFormDraftPending(draftById, id) {
|
|
81
|
+
if (id == null) {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
const fetchState = draftById[id]?.fetchState;
|
|
85
|
+
return fetchState !== 'Completed' && fetchState !== 'Error';
|
|
86
|
+
}
|
|
@@ -3,6 +3,7 @@ import { NestedClassHierarchyForReport } from '../../../commonStateTypes/classes
|
|
|
3
3
|
import { FetchStateAndError } from '../../../commonStateTypes/common';
|
|
4
4
|
import { AccountBase } from '../../../entity/account/accountState';
|
|
5
5
|
import { ClassBase } from '../../../entity/class/classState';
|
|
6
|
+
import { InvoicingQboAccountMappingKindOption } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
6
7
|
import { RootState } from '../../../rootStateTypes';
|
|
7
8
|
import { InvoicingQboConnection, InvoicingQboSyncHealth } from './invoicingQboViewPayload';
|
|
8
9
|
export declare const INVOICING_ACCOUNT_LIST_KEY: "accountList";
|
|
@@ -60,6 +61,17 @@ export interface InvoicingQboView {
|
|
|
60
61
|
connection?: InvoicingQboConnection;
|
|
61
62
|
syncHealth?: InvoicingQboSyncHealth;
|
|
62
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* Accounts as the invoicing pickers need them, from the shared
|
|
66
|
+
* accounting-service list, so whatever another screen already loaded is reused.
|
|
67
|
+
* `qboId` is the submitted value because that is what the invoicing API stores;
|
|
68
|
+
* an account without one cannot be posted, so it is dropped rather than offered.
|
|
69
|
+
*
|
|
70
|
+
* Memoized on the two slices it reads: the pickers and the lists derived from
|
|
71
|
+
* them are handed straight to forms, and a fresh array on every store change
|
|
72
|
+
* re-seeds a form the user is editing.
|
|
73
|
+
*/
|
|
74
|
+
export declare const getInvoicingQboAccountOptions: (state: RootState) => InvoicingAccountingOption[];
|
|
63
75
|
/**
|
|
64
76
|
* The accounts valid for one QBO mapping kind, whose `accountTypes` is a
|
|
65
77
|
* comma-separated list of QuickBooks type names. An unrecognised list yields no
|
|
@@ -67,6 +79,43 @@ export interface InvoicingQboView {
|
|
|
67
79
|
* required would post a mapping QuickBooks rejects.
|
|
68
80
|
*/
|
|
69
81
|
export declare const invoicingAccountsForQboAccountTypes: (accounts: InvoicingAccountingOption[], accountTypes: string) => InvoicingAccountingOption[];
|
|
82
|
+
/**
|
|
83
|
+
* The account-mapping slot a catalog price point's income account shares with
|
|
84
|
+
* the settings page, and the one a discount's account shares with it.
|
|
85
|
+
*/
|
|
86
|
+
export declare const INVOICING_INCOME_ACCOUNT_MAPPING_SLOT = "default_income_account";
|
|
87
|
+
export declare const INVOICING_DISCOUNTS_ACCOUNT_MAPPING_SLOT = "discounts_account";
|
|
88
|
+
/**
|
|
89
|
+
* The account types a slot falls back to when the config carries no kind for
|
|
90
|
+
* it. QuickBooks posts a product, a price and a discount line to an income
|
|
91
|
+
* account; offering every account instead would let a save be rejected.
|
|
92
|
+
*/
|
|
93
|
+
export declare const INVOICING_DEFAULT_INCOME_ACCOUNT_TYPES = "Income";
|
|
94
|
+
/**
|
|
95
|
+
* The QuickBooks ids a mapping slot's picker may offer, from the account types
|
|
96
|
+
* the config gives that slot — so every picker filling the same slot offers the
|
|
97
|
+
* same accounts, and widening one stays a config change.
|
|
98
|
+
*
|
|
99
|
+
* Ids rather than a filtered tree: the pickers flatten the tree into options by
|
|
100
|
+
* walking each node's children, so dropping a parent that is not itself of the
|
|
101
|
+
* wanted type would drop its matching descendants with it.
|
|
102
|
+
*
|
|
103
|
+
* Matched on the slot rather than the code as written, since a config naming
|
|
104
|
+
* the kind `discounts_account_id` means the same slot. A slot the config does
|
|
105
|
+
* not carry falls back to `defaultAccountTypes` rather than to every account.
|
|
106
|
+
*/
|
|
107
|
+
export declare const invoicingQboAccountIdsForMappingSlot: (accounts: InvoicingAccountingOption[], accountMappingKindOptions: InvoicingQboAccountMappingKindOption[], mappingSlot: string, defaultAccountTypes: string) => string[];
|
|
108
|
+
/**
|
|
109
|
+
* Stable empties for a tenant with no QBO connection.
|
|
110
|
+
*
|
|
111
|
+
* `?? []` builds a fresh array per call, and the invoicing forms re-seed their
|
|
112
|
+
* fields whenever their option lists change identity — so a form open against a
|
|
113
|
+
* disconnected tenant would reset itself on every unrelated store change, until
|
|
114
|
+
* the first edit disarms the re-seed.
|
|
115
|
+
*/
|
|
116
|
+
export declare const NO_INVOICING_ACCOUNT_HIERARCHY: NestedAccountHierarchyForReport[];
|
|
117
|
+
export declare const NO_INVOICING_CLASS_HIERARCHY: NestedClassHierarchyForReport[];
|
|
118
|
+
export declare const NO_INVOICING_ACCOUNT_IDS: string[];
|
|
70
119
|
/**
|
|
71
120
|
* Single bundled view for the QBO integration settings screen — the
|
|
72
121
|
* connection, the account and class options, sync health, and the fetch/action
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getInvoicingQboView = exports.invoicingAccountsForQboAccountTypes = exports.getInvoicingCatalogAccountingLookup = exports.invoicingQboClassByQboId = exports.invoicingQboAccountByQboId = exports.getInvoicingQboConnectionFetchState = exports.isInvoicingAccountingPickerDataLoading = exports.isInvoicingQboConnected = exports.INVOICING_ACCOUNT_LIST_KEY = void 0;
|
|
3
|
+
exports.getInvoicingQboView = exports.NO_INVOICING_ACCOUNT_IDS = exports.NO_INVOICING_CLASS_HIERARCHY = exports.NO_INVOICING_ACCOUNT_HIERARCHY = exports.invoicingQboAccountIdsForMappingSlot = exports.INVOICING_DEFAULT_INCOME_ACCOUNT_TYPES = exports.INVOICING_DISCOUNTS_ACCOUNT_MAPPING_SLOT = exports.INVOICING_INCOME_ACCOUNT_MAPPING_SLOT = exports.invoicingAccountsForQboAccountTypes = exports.getInvoicingQboAccountOptions = exports.getInvoicingCatalogAccountingLookup = exports.invoicingQboClassByQboId = exports.invoicingQboAccountByQboId = exports.getInvoicingQboConnectionFetchState = exports.isInvoicingAccountingPickerDataLoading = exports.isInvoicingQboConnected = exports.INVOICING_ACCOUNT_LIST_KEY = void 0;
|
|
4
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
5
|
+
const invoicingCommonPayload_1 = require("../../../entity/invoicing/invoicingCommonPayload");
|
|
4
6
|
const accountListSelector_1 = require("../../accountList/accountListSelector");
|
|
5
7
|
const classListSelector_1 = require("../../classList/classListSelector");
|
|
6
8
|
// The shared bucket, fetched with the same arguments as the other consumers so
|
|
@@ -91,14 +93,20 @@ const getInvoicingCatalogAccountingLookup = (state) => ({
|
|
|
91
93
|
});
|
|
92
94
|
exports.getInvoicingCatalogAccountingLookup = getInvoicingCatalogAccountingLookup;
|
|
93
95
|
/**
|
|
94
|
-
* Accounts
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
96
|
+
* Accounts as the invoicing pickers need them, from the shared
|
|
97
|
+
* accounting-service list, so whatever another screen already loaded is reused.
|
|
98
|
+
* `qboId` is the submitted value because that is what the invoicing API stores;
|
|
99
|
+
* an account without one cannot be posted, so it is dropped rather than offered.
|
|
100
|
+
*
|
|
101
|
+
* Memoized on the two slices it reads: the pickers and the lists derived from
|
|
102
|
+
* them are handed straight to forms, and a fresh array on every store change
|
|
103
|
+
* re-seeds a form the user is editing.
|
|
99
104
|
*/
|
|
100
|
-
|
|
101
|
-
|
|
105
|
+
exports.getInvoicingQboAccountOptions = (0, toolkit_1.createSelector)([
|
|
106
|
+
(state) => state.accountState,
|
|
107
|
+
(state) => state.accountListState,
|
|
108
|
+
], (accountState, accountListState) => {
|
|
109
|
+
const { accounts } = (0, accountListSelector_1.getAccountList)(accountState, accountListState, exports.INVOICING_ACCOUNT_LIST_KEY);
|
|
102
110
|
return accounts.flatMap((account) => {
|
|
103
111
|
if (account.qboId == null || account.isDeleted === true) {
|
|
104
112
|
return [];
|
|
@@ -111,7 +119,7 @@ const invoicingAccountingOptions = (state) => {
|
|
|
111
119
|
},
|
|
112
120
|
];
|
|
113
121
|
});
|
|
114
|
-
};
|
|
122
|
+
});
|
|
115
123
|
/**
|
|
116
124
|
* Normalises an account-type name for comparison. The config's mapping kinds
|
|
117
125
|
* name QuickBooks types the way QuickBooks displays them ("Other Current
|
|
@@ -148,6 +156,47 @@ const invoicingAccountsForQboAccountTypes = (accounts, accountTypes) => {
|
|
|
148
156
|
wanted.has(normalizeAccountTypeName(account.accountType)));
|
|
149
157
|
};
|
|
150
158
|
exports.invoicingAccountsForQboAccountTypes = invoicingAccountsForQboAccountTypes;
|
|
159
|
+
/**
|
|
160
|
+
* The account-mapping slot a catalog price point's income account shares with
|
|
161
|
+
* the settings page, and the one a discount's account shares with it.
|
|
162
|
+
*/
|
|
163
|
+
exports.INVOICING_INCOME_ACCOUNT_MAPPING_SLOT = 'default_income_account';
|
|
164
|
+
exports.INVOICING_DISCOUNTS_ACCOUNT_MAPPING_SLOT = 'discounts_account';
|
|
165
|
+
/**
|
|
166
|
+
* The account types a slot falls back to when the config carries no kind for
|
|
167
|
+
* it. QuickBooks posts a product, a price and a discount line to an income
|
|
168
|
+
* account; offering every account instead would let a save be rejected.
|
|
169
|
+
*/
|
|
170
|
+
exports.INVOICING_DEFAULT_INCOME_ACCOUNT_TYPES = 'Income';
|
|
171
|
+
/**
|
|
172
|
+
* The QuickBooks ids a mapping slot's picker may offer, from the account types
|
|
173
|
+
* the config gives that slot — so every picker filling the same slot offers the
|
|
174
|
+
* same accounts, and widening one stays a config change.
|
|
175
|
+
*
|
|
176
|
+
* Ids rather than a filtered tree: the pickers flatten the tree into options by
|
|
177
|
+
* walking each node's children, so dropping a parent that is not itself of the
|
|
178
|
+
* wanted type would drop its matching descendants with it.
|
|
179
|
+
*
|
|
180
|
+
* Matched on the slot rather than the code as written, since a config naming
|
|
181
|
+
* the kind `discounts_account_id` means the same slot. A slot the config does
|
|
182
|
+
* not carry falls back to `defaultAccountTypes` rather than to every account.
|
|
183
|
+
*/
|
|
184
|
+
const invoicingQboAccountIdsForMappingSlot = (accounts, accountMappingKindOptions, mappingSlot, defaultAccountTypes) => {
|
|
185
|
+
const accountTypes = accountMappingKindOptions.find((kindOption) => (0, invoicingCommonPayload_1.toInvoicingQboAccountMappingSlot)(kindOption.code) === mappingSlot)?.accountTypes ?? defaultAccountTypes;
|
|
186
|
+
return (0, exports.invoicingAccountsForQboAccountTypes)(accounts, accountTypes).map((account) => account.id);
|
|
187
|
+
};
|
|
188
|
+
exports.invoicingQboAccountIdsForMappingSlot = invoicingQboAccountIdsForMappingSlot;
|
|
189
|
+
/**
|
|
190
|
+
* Stable empties for a tenant with no QBO connection.
|
|
191
|
+
*
|
|
192
|
+
* `?? []` builds a fresh array per call, and the invoicing forms re-seed their
|
|
193
|
+
* fields whenever their option lists change identity — so a form open against a
|
|
194
|
+
* disconnected tenant would reset itself on every unrelated store change, until
|
|
195
|
+
* the first edit disarms the re-seed.
|
|
196
|
+
*/
|
|
197
|
+
exports.NO_INVOICING_ACCOUNT_HIERARCHY = [];
|
|
198
|
+
exports.NO_INVOICING_CLASS_HIERARCHY = [];
|
|
199
|
+
exports.NO_INVOICING_ACCOUNT_IDS = [];
|
|
151
200
|
/** Classes as the invoicing pickers need them, from the shared class list. */
|
|
152
201
|
const invoicingAccountingClassOptions = (state) => {
|
|
153
202
|
const { classes } = (0, classListSelector_1.getClassList)(state.classState, state.classListState);
|
|
@@ -169,7 +218,7 @@ const getInvoicingQboView = (state) => {
|
|
|
169
218
|
const qboState = state.invoicingQboViewState;
|
|
170
219
|
const accountList = state.accountListState.byReportId[exports.INVOICING_ACCOUNT_LIST_KEY];
|
|
171
220
|
return {
|
|
172
|
-
accounts:
|
|
221
|
+
accounts: (0, exports.getInvoicingQboAccountOptions)(state),
|
|
173
222
|
accountsFetchState: {
|
|
174
223
|
fetchState: accountList.fetchState,
|
|
175
224
|
error: accountList.error,
|
package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewReducer.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export declare const fetchInvoicingSubscriptionList: import("@reduxjs/toolkit").
|
|
|
27
27
|
ids: ID[];
|
|
28
28
|
keepExistingListItems: boolean;
|
|
29
29
|
nextCursor: string | null;
|
|
30
|
-
}, "invoicingSubscriptionListView/updateInvoicingSubscriptionList">, updateInvoicingSubscriptionListFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "invoicingSubscriptionListView/updateInvoicingSubscriptionListFailure">, fetchInvoicingSubscriptionCounts: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"invoicingSubscriptionListView/fetchInvoicingSubscriptionCounts">, updateInvoicingSubscriptionCounts: import("@reduxjs/toolkit").ActionCreatorWithPayload<InvoicingListCounts, "invoicingSubscriptionListView/updateInvoicingSubscriptionCounts">, updateInvoicingSubscriptionCountsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "invoicingSubscriptionListView/updateInvoicingSubscriptionCountsFailure">, updateInvoicingSubscriptionFilters: import("@reduxjs/toolkit").ActionCreatorWithPayload<InvoicingSubscriptionFilters, "invoicingSubscriptionListView/updateInvoicingSubscriptionFilters">, setInvoicingSubscriptionActiveTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"active" | "cancelled" | "future" | "
|
|
30
|
+
}, "invoicingSubscriptionListView/updateInvoicingSubscriptionList">, updateInvoicingSubscriptionListFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "invoicingSubscriptionListView/updateInvoicingSubscriptionListFailure">, fetchInvoicingSubscriptionCounts: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"invoicingSubscriptionListView/fetchInvoicingSubscriptionCounts">, updateInvoicingSubscriptionCounts: import("@reduxjs/toolkit").ActionCreatorWithPayload<InvoicingListCounts, "invoicingSubscriptionListView/updateInvoicingSubscriptionCounts">, updateInvoicingSubscriptionCountsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "invoicingSubscriptionListView/updateInvoicingSubscriptionCountsFailure">, updateInvoicingSubscriptionFilters: import("@reduxjs/toolkit").ActionCreatorWithPayload<InvoicingSubscriptionFilters, "invoicingSubscriptionListView/updateInvoicingSubscriptionFilters">, setInvoicingSubscriptionActiveTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"active" | "cancelled" | "future" | "paused" | "in_trial" | "non_renewing" | "all", "invoicingSubscriptionListView/setInvoicingSubscriptionActiveTab">, addInvoicingSubscriptionToList: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
31
31
|
id: ID;
|
|
32
32
|
status?: InvoicingSubscriptionStatus;
|
|
33
33
|
}, "invoicingSubscriptionListView/addInvoicingSubscriptionToList">;
|
package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewState.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export interface InvoicingSubscriptionColumnConfig {
|
|
|
23
23
|
}
|
|
24
24
|
export declare const INVOICING_SUBSCRIPTION_COLUMNS: InvoicingSubscriptionColumnConfig[];
|
|
25
25
|
export declare const ALL_INVOICING_SUBSCRIPTION_TAB_IDS: readonly ["all", "active", "in_trial", "future", "non_renewing", "paused", "cancelled"];
|
|
26
|
-
export declare const toInvoicingSubscriptionTabId: (v: string) => "active" | "cancelled" | "future" | "
|
|
26
|
+
export declare const toInvoicingSubscriptionTabId: (v: string) => "active" | "cancelled" | "future" | "paused" | "in_trial" | "non_renewing" | "all";
|
|
27
27
|
export type InvoicingSubscriptionTabId = ReturnType<typeof toInvoicingSubscriptionTabId>;
|
|
28
28
|
export interface InvoicingSubscriptionListViewState extends FetchedState {
|
|
29
29
|
/** Selected status tab (CES-owned so it persists across page revisits). */
|
|
@@ -15,6 +15,7 @@ export type FetchRecommendationResponseWithCOT = ZeniAPIResponse<FetchRecommenda
|
|
|
15
15
|
export type RecommendationFeedbackDimension = 'vendor' | 'category' | 'class';
|
|
16
16
|
export type RecommendationFeedbackSource = 'primary' | 'alternate' | 'shadow' | 'qbo';
|
|
17
17
|
export type RecommendationFeedbackOutcome = 'accepted' | 'override_ranked' | 'override_outside' | 'retracted';
|
|
18
|
+
export declare const isPromptedRecommendationFeedback: (outcome: RecommendationFeedbackOutcome) => boolean;
|
|
18
19
|
export interface RecommendationFeedbackValue {
|
|
19
20
|
name: string;
|
|
20
21
|
id?: string | null;
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isPromptedRecommendationFeedback = void 0;
|
|
4
|
+
// Only an override opens the feedback popup. Silent accepts and retractions post
|
|
5
|
+
// in the background, so they must not drive the popup's loader or its toast.
|
|
6
|
+
const isPromptedRecommendationFeedback = (outcome) => outcome === 'override_outside' || outcome === 'override_ranked';
|
|
7
|
+
exports.isPromptedRecommendationFeedback = isPromptedRecommendationFeedback;
|
|
@@ -58,6 +58,12 @@ export declare const fetchEntityRecommendationsByTransactionId: import("@reduxjs
|
|
|
58
58
|
}, "recommendation/updateRecommendationForEntityFailure">, indicateReadyToInitializeRecommendation: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[entityIdOrName: string, entityType: EntityType], {
|
|
59
59
|
entityIdOrName: string;
|
|
60
60
|
entityType: EntityType;
|
|
61
|
-
}, "recommendation/indicateReadyToInitializeRecommendation", never, never>, submitRecommendationFeedback: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[args: SubmitRecommendationFeedbackPayload], SubmitRecommendationFeedbackPayload, "recommendation/submitRecommendationFeedback", never, never
|
|
61
|
+
}, "recommendation/indicateReadyToInitializeRecommendation", never, never>, submitRecommendationFeedback: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[args: SubmitRecommendationFeedbackPayload], SubmitRecommendationFeedbackPayload, "recommendation/submitRecommendationFeedback", never, never>, submitRecommendationFeedbackCompleted: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[args: {
|
|
62
|
+
succeeded: boolean;
|
|
63
|
+
error?: ZeniAPIStatus;
|
|
64
|
+
}], {
|
|
65
|
+
succeeded: boolean;
|
|
66
|
+
error?: ZeniAPIStatus;
|
|
67
|
+
}, "recommendation/submitRecommendationFeedbackCompleted", never, never>;
|
|
62
68
|
declare const _default: import("redux").Reducer<EntityRecommendationState>;
|
|
63
69
|
export default _default;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.submitRecommendationFeedback = exports.indicateReadyToInitializeRecommendation = exports.updateRecommendationForEntityFailure = exports.updateRecommendationForEntity = exports.fetchRecommendationByEntityId = exports.fetchRecommendationByEntityName = exports.fetchEntityRecommendationsForLineUpdate = exports.fetchEntityRecommendationsByTransactionId = exports.initialState = void 0;
|
|
4
|
+
exports.submitRecommendationFeedbackCompleted = exports.submitRecommendationFeedback = exports.indicateReadyToInitializeRecommendation = exports.updateRecommendationForEntityFailure = exports.updateRecommendationForEntity = exports.fetchRecommendationByEntityId = exports.fetchRecommendationByEntityName = exports.fetchEntityRecommendationsForLineUpdate = exports.fetchEntityRecommendationsByTransactionId = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const rootActions_1 = require("../../rootActions");
|
|
7
|
+
const recommendationPayload_1 = require("./recommendationPayload");
|
|
7
8
|
const recommendationState_1 = require("./recommendationState");
|
|
8
9
|
exports.initialState = {
|
|
10
|
+
feedbackSubmitState: { fetchState: 'Not-Started', error: undefined },
|
|
9
11
|
recommendationByEntity: {},
|
|
10
12
|
};
|
|
11
13
|
const recommendation = (0, toolkit_1.createSlice)({
|
|
@@ -135,13 +137,31 @@ const recommendation = (0, toolkit_1.createSlice)({
|
|
|
135
137
|
};
|
|
136
138
|
},
|
|
137
139
|
},
|
|
138
|
-
//
|
|
139
|
-
// override
|
|
140
|
-
//
|
|
141
|
-
//
|
|
140
|
+
// Human feedback on a recommendation (accept, ranked override or outside
|
|
141
|
+
// override). Handled by submitRecommendationFeedbackEpic, which POSTs to the
|
|
142
|
+
// accounting recommendation-feedback endpoint. The categorization itself
|
|
143
|
+
// never waits on this: only the feedback popup reads the submit state.
|
|
142
144
|
submitRecommendationFeedback: {
|
|
143
|
-
reducer() {
|
|
144
|
-
|
|
145
|
+
reducer(draft, action) {
|
|
146
|
+
if (!(0, recommendationPayload_1.isPromptedRecommendationFeedback)(action.payload.outcome)) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
draft.feedbackSubmitState = {
|
|
150
|
+
fetchState: 'In-Progress',
|
|
151
|
+
error: undefined,
|
|
152
|
+
};
|
|
153
|
+
},
|
|
154
|
+
prepare(args) {
|
|
155
|
+
return { payload: args };
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
submitRecommendationFeedbackCompleted: {
|
|
159
|
+
reducer(draft, action) {
|
|
160
|
+
const { succeeded, error } = action.payload;
|
|
161
|
+
draft.feedbackSubmitState = {
|
|
162
|
+
fetchState: succeeded ? 'Completed' : 'Error',
|
|
163
|
+
error,
|
|
164
|
+
};
|
|
145
165
|
},
|
|
146
166
|
prepare(args) {
|
|
147
167
|
return { payload: args };
|
|
@@ -154,7 +174,7 @@ const recommendation = (0, toolkit_1.createSlice)({
|
|
|
154
174
|
});
|
|
155
175
|
},
|
|
156
176
|
});
|
|
157
|
-
_a = recommendation.actions, exports.fetchEntityRecommendationsByTransactionId = _a.fetchEntityRecommendationsByTransactionId, exports.fetchEntityRecommendationsForLineUpdate = _a.fetchEntityRecommendationsForLineUpdate, exports.fetchRecommendationByEntityName = _a.fetchRecommendationByEntityName, exports.fetchRecommendationByEntityId = _a.fetchRecommendationByEntityId, exports.updateRecommendationForEntity = _a.updateRecommendationForEntity, exports.updateRecommendationForEntityFailure = _a.updateRecommendationForEntityFailure, exports.indicateReadyToInitializeRecommendation = _a.indicateReadyToInitializeRecommendation, exports.submitRecommendationFeedback = _a.submitRecommendationFeedback;
|
|
177
|
+
_a = recommendation.actions, exports.fetchEntityRecommendationsByTransactionId = _a.fetchEntityRecommendationsByTransactionId, exports.fetchEntityRecommendationsForLineUpdate = _a.fetchEntityRecommendationsForLineUpdate, exports.fetchRecommendationByEntityName = _a.fetchRecommendationByEntityName, exports.fetchRecommendationByEntityId = _a.fetchRecommendationByEntityId, exports.updateRecommendationForEntity = _a.updateRecommendationForEntity, exports.updateRecommendationForEntityFailure = _a.updateRecommendationForEntityFailure, exports.indicateReadyToInitializeRecommendation = _a.indicateReadyToInitializeRecommendation, exports.submitRecommendationFeedback = _a.submitRecommendationFeedback, exports.submitRecommendationFeedbackCompleted = _a.submitRecommendationFeedbackCompleted;
|
|
158
178
|
exports.default = recommendation.reducer;
|
|
159
179
|
const doUpdateRecommendationForEntity = (draft, entityId, entityType, payload) => {
|
|
160
180
|
const key = (0, recommendationState_1.getEntityRecommendationKey)(entityType, entityId);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FetchStateAndError } from '../../commonStateTypes/common';
|
|
1
2
|
import { Recommendation } from '../../commonStateTypes/recommendationBase';
|
|
2
3
|
import { SelectorView } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
4
|
import { EntityType } from '../../entity/genericEntity/entity';
|
|
@@ -8,3 +9,4 @@ export interface RecommendationByEntitySelectorView extends SelectorView {
|
|
|
8
9
|
recommendations?: Recommendation[];
|
|
9
10
|
}
|
|
10
11
|
export declare const getRecommendationsForEntity: (state: RootState, entityId: string, entityType: EntityType) => RecommendationByEntitySelectorView;
|
|
12
|
+
export declare const getRecommendationFeedbackSubmitState: (state: RootState) => FetchStateAndError;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getRecommendationsForEntity = void 0;
|
|
3
|
+
exports.getRecommendationFeedbackSubmitState = exports.getRecommendationsForEntity = void 0;
|
|
4
4
|
const recommendationState_1 = require("./recommendationState");
|
|
5
5
|
const getRecommendationsForEntity = (state, entityId, entityType) => {
|
|
6
6
|
const { entityRecommendationState } = state;
|
|
@@ -15,3 +15,5 @@ const getRecommendationsForEntity = (state, entityId, entityType) => {
|
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
17
|
exports.getRecommendationsForEntity = getRecommendationsForEntity;
|
|
18
|
+
const getRecommendationFeedbackSubmitState = (state) => state.entityRecommendationState.feedbackSubmitState;
|
|
19
|
+
exports.getRecommendationFeedbackSubmitState = getRecommendationFeedbackSubmitState;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FetchedState } from '../../commonStateTypes/common';
|
|
1
|
+
import { FetchStateAndError, FetchedState } from '../../commonStateTypes/common';
|
|
2
2
|
import { Recommendation } from '../../commonStateTypes/recommendationBase';
|
|
3
3
|
import { EntityType } from '../../entity/genericEntity/entity';
|
|
4
4
|
export declare const getEntityRecommendationKey: (entityType: EntityType, entityIdOrName: string) => `vendor_${string}` | `customer_${string}` | `merchant_${string}`;
|
|
@@ -8,5 +8,6 @@ export interface EntityRecommendationsStatus extends FetchedState {
|
|
|
8
8
|
}
|
|
9
9
|
export declare const initialEntityRecommendationState: EntityRecommendationsStatus;
|
|
10
10
|
export interface EntityRecommendationState {
|
|
11
|
+
feedbackSubmitState: FetchStateAndError;
|
|
11
12
|
recommendationByEntity: Record<EntityRecommendationKey, EntityRecommendationsStatus>;
|
|
12
13
|
}
|