@zeniai/client-epic-state 5.2.68 → 5.2.69-beta0MM
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/aiCfo/aiCfoState.d.ts +2 -2
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +2 -2
- package/lib/entity/chargeCardTransaction/chargeCardTransaction.d.ts +1 -1
- package/lib/entity/depositAccountTransaction/depositAccountTransaction.d.ts +1 -1
- package/lib/entity/invoicing/{product/productPayload.d.ts → invoicingCatalog/invoicingCatalogPayload.d.ts} +44 -6
- package/lib/entity/invoicing/{product/productPayload.js → invoicingCatalog/invoicingCatalogPayload.js} +50 -6
- package/lib/entity/invoicing/invoicingCatalog/invoicingCatalogReducer.d.ts +12 -0
- package/lib/entity/invoicing/{plan/planReducer.js → invoicingCatalog/invoicingCatalogReducer.js} +20 -21
- package/lib/entity/invoicing/{plan/planSelector.d.ts → invoicingCatalog/invoicingCatalogSelector.d.ts} +5 -6
- package/lib/entity/invoicing/{plan/planSelector.js → invoicingCatalog/invoicingCatalogSelector.js} +12 -12
- package/lib/entity/invoicing/{product/productState.d.ts → invoicingCatalog/invoicingCatalogState.d.ts} +42 -6
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +1 -0
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +1 -0
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +1 -0
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +4 -4
- package/lib/esm/entity/invoicing/{product/productPayload.js → invoicingCatalog/invoicingCatalogPayload.js} +46 -3
- package/lib/esm/entity/invoicing/{plan/planReducer.js → invoicingCatalog/invoicingCatalogReducer.js} +19 -20
- package/lib/esm/entity/invoicing/{plan/planSelector.js → invoicingCatalog/invoicingCatalogSelector.js} +8 -8
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +1 -0
- package/lib/esm/index.js +2 -4
- package/lib/esm/reducer.js +4 -7
- package/lib/esm/view/expenseAutomationView/selectors/actualMatchingViewSelector.js +19 -16
- package/lib/esm/view/invoicing/createInvoice/createInvoiceSelector.js +1 -1
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.js +5 -3
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/fetchInvoicingCatalogItemDetailEpic.js +2 -2
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/runInvoicingCatalogPlanActionEpic.js +2 -2
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/runInvoicingCatalogProductActionEpic.js +4 -4
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js +3 -7
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/seedInvoicingCatalogItemFormDraftEpic.js +2 -2
- package/lib/esm/view/invoicing/invoicingCatalogListView/epics/fetchInvoicingCatalogPlanListEpic.js +2 -2
- package/lib/esm/view/invoicing/invoicingCatalogListView/epics/fetchInvoicingCatalogProductListEpic.js +2 -2
- package/lib/esm/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewSelector.js +4 -4
- package/lib/index.d.ts +5 -8
- package/lib/index.js +9 -15
- package/lib/reducer.d.ts +1 -2
- package/lib/reducer.js +4 -7
- package/lib/rootStateTypes.d.ts +3 -5
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/selectorTypes/actualMatchingViewSelectorTypes.d.ts +2 -1
- package/lib/view/expenseAutomationView/selectors/actualMatchingViewSelector.js +19 -16
- package/lib/view/expenseAutomationView/types/actualMatchingViewState.d.ts +2 -3
- package/lib/view/invoicing/createInvoice/createInvoiceSelector.d.ts +2 -2
- package/lib/view/invoicing/createInvoice/createInvoiceSelector.js +2 -2
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.d.ts +8 -9
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.d.ts +2 -2
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.js +5 -3
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/fetchInvoicingCatalogItemDetailEpic.d.ts +2 -2
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/fetchInvoicingCatalogItemDetailEpic.js +2 -2
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogItemFormHelper.d.ts +3 -4
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/runInvoicingCatalogPlanActionEpic.d.ts +2 -2
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/runInvoicingCatalogPlanActionEpic.js +2 -2
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/runInvoicingCatalogProductActionEpic.d.ts +2 -3
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/runInvoicingCatalogProductActionEpic.js +4 -4
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.d.ts +2 -3
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js +3 -7
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/seedInvoicingCatalogItemFormDraftEpic.js +2 -2
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.d.ts +2 -2
- package/lib/view/invoicing/invoicingCatalogListView/epics/fetchInvoicingCatalogListPageEpic.d.ts +2 -2
- package/lib/view/invoicing/invoicingCatalogListView/epics/fetchInvoicingCatalogPlanListEpic.d.ts +2 -2
- package/lib/view/invoicing/invoicingCatalogListView/epics/fetchInvoicingCatalogPlanListEpic.js +2 -2
- package/lib/view/invoicing/invoicingCatalogListView/epics/fetchInvoicingCatalogProductListEpic.d.ts +2 -2
- package/lib/view/invoicing/invoicingCatalogListView/epics/fetchInvoicingCatalogProductListEpic.js +2 -2
- package/lib/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewPayload.d.ts +3 -3
- package/lib/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewSelector.d.ts +4 -5
- package/lib/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewSelector.js +4 -4
- package/lib/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewState.d.ts +1 -1
- package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewReducer.d.ts +1 -1
- package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.d.ts +1 -1
- package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewReducer.d.ts +1 -1
- package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewState.d.ts +1 -1
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListReducer.d.ts +5 -5
- package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/editBillView/editBillViewReducer.d.ts +2 -2
- package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewReducer.d.ts +2 -2
- package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.d.ts +5 -5
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +2 -2
- package/package.json +1 -1
- package/lib/entity/invoicing/plan/planPayload.d.ts +0 -40
- package/lib/entity/invoicing/plan/planPayload.js +0 -51
- package/lib/entity/invoicing/plan/planReducer.d.ts +0 -14
- package/lib/entity/invoicing/plan/planState.d.ts +0 -43
- package/lib/entity/invoicing/product/productReducer.d.ts +0 -9
- package/lib/entity/invoicing/product/productReducer.js +0 -50
- package/lib/entity/invoicing/product/productSelector.d.ts +0 -4
- package/lib/entity/invoicing/product/productSelector.js +0 -17
- package/lib/entity/invoicing/product/productState.js +0 -2
- package/lib/esm/entity/invoicing/plan/planPayload.js +0 -47
- package/lib/esm/entity/invoicing/product/productReducer.js +0 -43
- package/lib/esm/entity/invoicing/product/productSelector.js +0 -10
- package/lib/esm/entity/invoicing/product/productState.js +0 -1
- /package/lib/entity/invoicing/{plan/planState.js → invoicingCatalog/invoicingCatalogState.js} +0 -0
- /package/lib/esm/entity/invoicing/{plan/planState.js → invoicingCatalog/invoicingCatalogState.js} +0 -0
package/lib/index.js
CHANGED
|
@@ -84,9 +84,8 @@ exports.entityToInvoicingCustomerFormLocalData = exports.INVOICING_CUSTOMER_BILL
|
|
|
84
84
|
exports.runInvoicingSubscriptionAction = exports.runInvoicingDiscountAction = exports.runInvoicingCatalogProductAction = exports.runInvoicingCatalogPlanAction = exports.fetchInvoicingCatalogItemDetailPage = exports.shouldDefaultAdjustmentCreditNote = exports.isBackdatedInvoiceDate = exports.buildVoidInvoiceSubmitBody = exports.updateInvoicingInvoice = exports.runInvoicingInvoiceAction = exports.getInvoicingCouponFormView = exports.getEditInvoicingCouponDetailViewState = exports.initialInvoicingCouponFormLocalData = exports.entityToInvoicingCouponFormLocalData = exports.updateInvoicingCouponFormDraft = exports.submitInvoicingCouponForm = exports.saveInvoicingCoupon = exports.resetEditInvoicingCouponDetailView = exports.fetchInvoicingCouponDetailPage = exports.getSavedInvoicingCatalogItemKind = exports.getSavedInvoicingCatalogItemId = exports.getInvoicingCatalogItemFormView = exports.getInvoicingApplicableCatalogItemOptions = exports.isTieredCatalogPricingModel = exports.initialInvoicingCatalogItemFormLocalData = exports.invoicingProductToCatalogItemFormSubFamily = exports.entityToInvoicingCatalogItemFormLocalData = exports.blankInvoicingCatalogTier = exports.blankInvoicingCatalogSubFamily = exports.INVOICING_CATALOG_TIER_TYPE_VALUES = exports.INVOICING_CATALOG_PRORATION_VALUES = exports.INVOICING_CATALOG_PRICING_MODEL_VALUES = exports.INVOICING_CATALOG_APPLICABILITY_VALUES = exports.updateInvoicingCatalogItemFormDraft = exports.submitInvoicingCatalogItemForm = exports.resetEditInvoicingCatalogItemDetailView = exports.getInvoicingSubscriptionFormView = exports.getEditInvoicingSubscriptionDetailViewState = exports.toInvoicingSubscriptionQuantity = exports.invoicingSubscriptionTodayIso = exports.initialInvoicingSubscriptionFormLocalData = exports.entityToInvoicingSubscriptionFormLocalData = exports.INVOICING_SUBSCRIPTION_SHIPPING_ADDRESS_TYPE = exports.updateInvoicingSubscriptionFormDraft = exports.submitInvoicingSubscriptionForm = exports.resetEditInvoicingSubscriptionDetailView = exports.initializeInvoicingSubscriptionAddress = exports.fetchInvoicingSubscriptionFormPage = exports.getInvoicingCustomerFormView = exports.initialInvoicingCustomerFormLocalData = void 0;
|
|
85
85
|
exports.ALL_INVOICING_SUBSCRIPTION_SORT_KEYS = exports.updateInvoicingSubscriptionFilters = exports.setInvoicingSubscriptionActiveTab = exports.fetchInvoicingSubscriptionListPage = exports.fetchInvoicingSubscriptionList = exports.fetchInvoicingSubscriptionCounts = exports.updateInvoicingSubscriptions = exports.removeInvoicingSubscription = exports.resetPromotionalCreditAction = exports.submitAddPromotionalCredits = exports.getInvoicingSetupIntentFetchState = exports.getInvoicingSetupIntent = exports.getInvoicingSentPaymentLinkMagicUrl = exports.getInvoicingSentPaymentLinkEmail = exports.getInvoicingPlaidLinkToken = exports.getInvoicingPaymentMethodSaveState = exports.getInvoicingPaymentLinkSendState = exports.sendInvoicingPaymentLink = exports.saveInvoicingPaymentMethod = exports.resetInvoicingCustomerPaymentMethod = exports.fetchInvoicingPlaidLinkToken = exports.createInvoicingSetupIntent = exports.fetchInvoicingPaymentLinkEmailPreviewPage = exports.fetchInvoicingCustomerDetailPage = exports.fetchInvoicingCustomerDetail = exports.getInvoicingCustomerListView = exports.INVOICING_CUSTOMER_COLUMNS = exports.ALL_INVOICING_CUSTOMER_TAB_IDS = exports.ALL_INVOICING_CUSTOMER_SORT_KEYS = exports.updateInvoicingCustomerFilters = exports.setInvoicingCustomerActiveTab = exports.fetchInvoicingCustomerListPage = exports.fetchInvoicingCustomerList = exports.fetchInvoicingCustomerCounts = exports.updateInvoicingCustomers = exports.removeInvoicingCustomer = exports.INVOICING_LIST_PAGE_SIZE = exports.uploadInvoicingMigrationFiles = exports.startInvoicingMigration = exports.rollbackInvoicingMigration = exports.retryInvoicingMigration = exports.connectInvoicingChargebee = exports.getInvoicingDataImportView = exports.setInvoicingActiveMigrationSessionId = exports.fetchInvoicingMigrationSessions = exports.fetchInvoicingMigrationSession = exports.fetchInvoicingMigrationDiagnostics = exports.fetchInvoicingDataImportStatus = exports.runInvoicingPaymentAction = exports.runInvoicingDunningAction = void 0;
|
|
86
86
|
exports.getInvoicingCouponListView = exports.getInvoicingCouponListNextCursor = exports.getInvoicingCouponListItems = exports.getInvoicingCouponListHasMore = exports.getInvoicingCouponListFilters = exports.getInvoicingCouponListFetchState = exports.getInvoicingCouponCounts = exports.INVOICING_COUPON_COLUMNS = exports.ALL_INVOICING_COUPON_TAB_IDS = exports.ALL_INVOICING_COUPON_SORT_KEYS = exports.updateInvoicingCouponFilters = exports.setInvoicingCouponActiveTab = exports.fetchInvoicingCouponListPage = exports.fetchInvoicingCouponList = exports.fetchInvoicingCouponCounts = exports.updateInvoicingCoupons = exports.removeInvoicingCoupon = exports.getInvoicingCreditNoteDetail = exports.getInvoicingCreditNoteById = exports.fetchInvoicingCreditNoteDetail = exports.getInvoicingCreditNoteListView = exports.INVOICING_CREDIT_NOTE_COLUMNS = exports.ALL_INVOICING_CREDIT_NOTE_TAB_IDS = exports.ALL_INVOICING_CREDIT_NOTE_SORT_KEYS = exports.updateInvoicingCreditNoteFilters = exports.setInvoicingCreditNoteActiveTab = exports.fetchInvoicingCreditNoteListPage = exports.fetchInvoicingCreditNoteList = exports.fetchInvoicingCreditNoteCounts = exports.updateInvoicingCreditNotes = exports.removeInvoicingCreditNote = exports.getInvoicingTransactionDetail = exports.getInvoicingTransactionById = exports.fetchInvoicingTransactionDetail = exports.getInvoicingTransactionListView = exports.INVOICING_TRANSACTION_COLUMNS = exports.ALL_INVOICING_TRANSACTION_TAB_IDS = exports.ALL_INVOICING_TRANSACTION_SORT_KEYS = exports.updateInvoicingTransactionFilters = exports.setInvoicingTransactionActiveTab = exports.fetchInvoicingTransactionListPage = exports.fetchInvoicingTransactionList = exports.updateInvoicingTransactions = exports.removeInvoicingTransaction = exports.getInvoicingSubscriptionById = exports.fetchInvoicingSubscriptionDetailPage = exports.fetchInvoicingSubscriptionDetail = exports.getInvoicingSubscriptionListView = exports.INVOICING_SUBSCRIPTION_COLUMNS = exports.ALL_INVOICING_SUBSCRIPTION_TAB_IDS = void 0;
|
|
87
|
-
exports.updateInvoicingQboSettingsDraft = exports.updateInvoicingBrandingFormDraft = exports.submitInvoicingQboSettings = exports.submitInvoicingBrandingForm = exports.saveInvoicingSettings = exports.resetSaveInvoicingSettings = exports.resetInvoicingQboSettingsDraft = exports.resetInvoicingBrandingFormDraft = exports.fetchInvoicingSettings = exports.disconnectInvoicingStripe = exports.connectInvoicingStripe = exports.
|
|
88
|
-
exports.isAutoReversedAccrual = exports.getExpenseAutomationActualMatchingView = exports.getExpenseAutomationActualMatchingMatchView = exports.parseActualMatchingMatchId = exports.getCloseMatchAfterUndoMatchId = exports.getCloseMatchAfterUndo = exports.getCloseMatchAfterIgnoreMatchId = exports.getActualMatchingMatchModalConfirmStatus = exports.getActualMatchingReversalDate = exports.getActualMatchingAmount = exports.isPendingReviewRow = exports.isRenderableOneTimeAccrual = exports.isOneTimeAccrualRow = exports.isExistingTabRow = exports.isAiAccountantSchedule = exports.isAccruedScheduleRow = exports.getJEScheduleRowType = exports.getExpenseAutomationJEOneTimeAccrualDetailView = exports.getInvoicingOnboardingGateView = exports.getInvoicingConfigView = exports.updateInvoicingConfig = exports.resetInvoicingConfigActionStates = exports.fetchInvoicingConfig = exports.enableInvoicing = exports.acceptInvoicingTerms = exports.toInvoicingQboCustomerMatchingMode = exports.toInvoicingNamedOptionsByKey = exports.getInvoicingQboAccountMappingId = exports.INVOICING_QBO_CUSTOMER_MATCHING_MODES = exports.getInvoicingQboView = exports.invoicingAccountsForQboAccountTypes = exports.startInvoicingQboBackfill = exports.retryInvoicingQboSyncTask = exports.fetchInvoicingQboSyncHealth = exports.fetchInvoicingQboConnection = exports.fetchInvoicingAccountingPickers = exports.isStripeConnectedFromSettings = exports.initialInvoicingBrandingFormLocalData = exports.entityToInvoicingBrandingFormLocalData = exports.INVOICING_BUSINESS_ADDRESS_TYPE = exports.invoicingQboSettingsLocalDataToPayload = exports.initialInvoicingQboSettingsLocalData = exports.entityToInvoicingQboSettingsLocalData = exports.getInvoicingSettingsView = exports.getInvoicingSettingsHubView = exports.getInvoicingSettingsFetchState = exports.getInvoicingSettings =
|
|
89
|
-
exports.isPendingReviewAccrual = exports.isManuallyReversedAccrual = void 0;
|
|
87
|
+
exports.getInvoicingQboSettingsFormView = exports.getInvoicingBrandingFormView = exports.updateInvoicingSettings = exports.updateInvoicingQboSettingsDraft = exports.updateInvoicingBrandingFormDraft = exports.submitInvoicingQboSettings = exports.submitInvoicingBrandingForm = exports.saveInvoicingSettings = exports.resetSaveInvoicingSettings = exports.resetInvoicingQboSettingsDraft = exports.resetInvoicingBrandingFormDraft = exports.fetchInvoicingSettings = exports.disconnectInvoicingStripe = exports.connectInvoicingStripe = exports.getLowestInvoicingCatalogPricePointAmount = exports.getInvoicingCatalogItemById = exports.fetchInvoicingCatalogItemDetail = exports.getInvoicingCatalogListView = exports.INVOICING_PRODUCT_COLUMNS = exports.ALL_INVOICING_PRODUCT_SORT_KEYS = exports.updateInvoicingCatalogProductFilters = exports.updateInvoicingCatalogPlanFilters = exports.fetchInvoicingCatalogProductList = exports.fetchInvoicingCatalogPlanList = exports.fetchInvoicingCatalogListPage = exports.fetchInvoicingCatalogCounts = exports.updateInvoicingCatalogItems = exports.removeInvoicingCatalogItem = exports.mergeInvoicingCatalogPricePoint = exports.getInvoicingDunningEmailPreview = exports.getInvoicingDunningCaseDetail = exports.getInvoicingDunningCaseById = exports.invalidateInvoicingDunningEmailPreview = exports.fetchInvoicingDunningEmailPreviewPage = exports.fetchInvoicingDunningCaseDetailPage = exports.fetchInvoicingDunningCaseDetail = exports.clearInvoicingDunningCaseDetailView = exports.getInvoicingDunningCaseListView = exports.INVOICING_DUNNING_CASE_COLUMNS = exports.ALL_INVOICING_DUNNING_CASE_TAB_IDS = exports.ALL_INVOICING_DUNNING_CASE_SORT_KEYS = exports.updateInvoicingDunningCaseFilters = exports.setInvoicingDunningCaseActiveTab = exports.fetchInvoicingDunningCaseListPage = exports.fetchInvoicingDunningCaseList = exports.fetchInvoicingDunningCaseCounts = exports.updateInvoicingDunningCases = exports.removeInvoicingDunningCase = exports.fetchInvoicingCouponDetail = exports.getInvoicingCouponById = void 0;
|
|
88
|
+
exports.isPendingReviewAccrual = exports.isManuallyReversedAccrual = exports.isAutoReversedAccrual = exports.getExpenseAutomationActualMatchingView = exports.getExpenseAutomationActualMatchingMatchView = exports.parseActualMatchingMatchId = exports.getCloseMatchAfterUndoMatchId = exports.getCloseMatchAfterUndo = exports.getCloseMatchAfterIgnoreMatchId = exports.getActualMatchingMatchModalConfirmStatus = exports.getActualMatchingReversalDate = exports.getActualMatchingAmount = exports.isPendingReviewRow = exports.isRenderableOneTimeAccrual = exports.isOneTimeAccrualRow = exports.isExistingTabRow = exports.isAiAccountantSchedule = exports.isAccruedScheduleRow = exports.getJEScheduleRowType = exports.getExpenseAutomationJEOneTimeAccrualDetailView = exports.getInvoicingOnboardingGateView = exports.getInvoicingConfigView = exports.updateInvoicingConfig = exports.resetInvoicingConfigActionStates = exports.fetchInvoicingConfig = exports.enableInvoicing = exports.acceptInvoicingTerms = exports.toInvoicingQboCustomerMatchingMode = exports.toInvoicingNamedOptionsByKey = exports.getInvoicingQboAccountMappingId = exports.INVOICING_QBO_CUSTOMER_MATCHING_MODES = exports.getInvoicingQboView = exports.invoicingAccountsForQboAccountTypes = exports.startInvoicingQboBackfill = exports.retryInvoicingQboSyncTask = exports.fetchInvoicingQboSyncHealth = exports.fetchInvoicingQboConnection = exports.fetchInvoicingAccountingPickers = exports.isStripeConnectedFromSettings = exports.initialInvoicingBrandingFormLocalData = exports.entityToInvoicingBrandingFormLocalData = exports.INVOICING_BUSINESS_ADDRESS_TYPE = exports.invoicingQboSettingsLocalDataToPayload = exports.initialInvoicingQboSettingsLocalData = exports.entityToInvoicingQboSettingsLocalData = exports.getInvoicingSettingsView = exports.getInvoicingSettingsHubView = exports.getInvoicingSettingsFetchState = exports.getInvoicingSettings = void 0;
|
|
90
89
|
const allowedValue_1 = require("./commonStateTypes/allowedValue");
|
|
91
90
|
Object.defineProperty(exports, "isAllowedValueWithCode", { enumerable: true, get: function () { return allowedValue_1.isAllowedValueWithCode; } });
|
|
92
91
|
Object.defineProperty(exports, "isAllowedValueWithID", { enumerable: true, get: function () { return allowedValue_1.isAllowedValueWithID; } });
|
|
@@ -3151,13 +3150,10 @@ Object.defineProperty(exports, "getInvoicingDunningCaseById", { enumerable: true
|
|
|
3151
3150
|
Object.defineProperty(exports, "getInvoicingDunningCaseDetail", { enumerable: true, get: function () { return invoicingDunningCaseDetailViewSelector_1.getInvoicingDunningCaseDetail; } });
|
|
3152
3151
|
Object.defineProperty(exports, "getInvoicingDunningEmailPreview", { enumerable: true, get: function () { return invoicingDunningCaseDetailViewSelector_1.getInvoicingDunningEmailPreview; } });
|
|
3153
3152
|
// ── Invoicing: catalog (plans + products) ─────────────────────────────────────
|
|
3154
|
-
var
|
|
3155
|
-
Object.defineProperty(exports, "
|
|
3156
|
-
Object.defineProperty(exports, "
|
|
3157
|
-
Object.defineProperty(exports, "
|
|
3158
|
-
var productReducer_1 = require("./entity/invoicing/product/productReducer");
|
|
3159
|
-
Object.defineProperty(exports, "removeInvoicingProduct", { enumerable: true, get: function () { return productReducer_1.removeInvoicingProduct; } });
|
|
3160
|
-
Object.defineProperty(exports, "updateInvoicingProducts", { enumerable: true, get: function () { return productReducer_1.updateInvoicingProducts; } });
|
|
3153
|
+
var invoicingCatalogReducer_1 = require("./entity/invoicing/invoicingCatalog/invoicingCatalogReducer");
|
|
3154
|
+
Object.defineProperty(exports, "mergeInvoicingCatalogPricePoint", { enumerable: true, get: function () { return invoicingCatalogReducer_1.mergeInvoicingCatalogPricePoint; } });
|
|
3155
|
+
Object.defineProperty(exports, "removeInvoicingCatalogItem", { enumerable: true, get: function () { return invoicingCatalogReducer_1.removeInvoicingCatalogItem; } });
|
|
3156
|
+
Object.defineProperty(exports, "updateInvoicingCatalogItems", { enumerable: true, get: function () { return invoicingCatalogReducer_1.updateInvoicingCatalogItems; } });
|
|
3161
3157
|
var invoicingCatalogListViewReducer_1 = require("./view/invoicing/invoicingCatalogListView/invoicingCatalogListViewReducer");
|
|
3162
3158
|
Object.defineProperty(exports, "fetchInvoicingCatalogCounts", { enumerable: true, get: function () { return invoicingCatalogListViewReducer_1.fetchInvoicingCatalogCounts; } });
|
|
3163
3159
|
Object.defineProperty(exports, "fetchInvoicingCatalogListPage", { enumerable: true, get: function () { return invoicingCatalogListViewReducer_1.fetchInvoicingCatalogListPage; } });
|
|
@@ -3172,11 +3168,9 @@ var invoicingCatalogListViewSelector_1 = require("./view/invoicing/invoicingCata
|
|
|
3172
3168
|
Object.defineProperty(exports, "getInvoicingCatalogListView", { enumerable: true, get: function () { return invoicingCatalogListViewSelector_1.getInvoicingCatalogListView; } });
|
|
3173
3169
|
var editInvoicingCatalogItemDetailViewReducer_3 = require("./view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewReducer");
|
|
3174
3170
|
Object.defineProperty(exports, "fetchInvoicingCatalogItemDetail", { enumerable: true, get: function () { return editInvoicingCatalogItemDetailViewReducer_3.fetchInvoicingCatalogItemDetail; } });
|
|
3175
|
-
var
|
|
3176
|
-
Object.defineProperty(exports, "
|
|
3177
|
-
Object.defineProperty(exports, "
|
|
3178
|
-
var productSelector_1 = require("./entity/invoicing/product/productSelector");
|
|
3179
|
-
Object.defineProperty(exports, "getInvoicingProductById", { enumerable: true, get: function () { return productSelector_1.getInvoicingProductById; } });
|
|
3171
|
+
var invoicingCatalogSelector_1 = require("./entity/invoicing/invoicingCatalog/invoicingCatalogSelector");
|
|
3172
|
+
Object.defineProperty(exports, "getInvoicingCatalogItemById", { enumerable: true, get: function () { return invoicingCatalogSelector_1.getInvoicingCatalogItemById; } });
|
|
3173
|
+
Object.defineProperty(exports, "getLowestInvoicingCatalogPricePointAmount", { enumerable: true, get: function () { return invoicingCatalogSelector_1.getLowestInvoicingCatalogPricePointAmount; } });
|
|
3180
3174
|
// ── Invoicing: settings ───────────────────────────────────────────────────────
|
|
3181
3175
|
var settingsViewReducer_2 = require("./view/invoicing/settingsView/settingsViewReducer");
|
|
3182
3176
|
Object.defineProperty(exports, "connectInvoicingStripe", { enumerable: true, get: function () { return settingsViewReducer_2.connectInvoicingStripe; } });
|
package/lib/reducer.d.ts
CHANGED
|
@@ -240,8 +240,7 @@ declare const reducers: import("redux").Reducer<import("redux").CombinedState<{
|
|
|
240
240
|
invoicingCustomerState: import("./entity/invoicing/invoicingCustomer/invoicingCustomerState").InvoicingCustomerState;
|
|
241
241
|
invoicingDunningCaseState: import("./entity/invoicing/dunningCase/dunningCaseState").InvoicingDunningCaseState;
|
|
242
242
|
invoicingInvoiceState: import("./entity/invoicing/invoice/invoiceState").InvoiceState;
|
|
243
|
-
|
|
244
|
-
invoicingProductState: import("./entity/invoicing/product/productState").InvoicingProductState;
|
|
243
|
+
invoicingCatalogState: import("./entity/invoicing/invoicingCatalog/invoicingCatalogState").InvoicingCatalogState;
|
|
245
244
|
invoicingSubscriptionState: import("./entity/invoicing/invoicingSubscription/invoicingSubscriptionState").InvoicingSubscriptionState;
|
|
246
245
|
invoicingTransactionState: import("./entity/invoicing/invoicingTransaction/invoicingTransactionState").InvoicingTransactionState;
|
|
247
246
|
jeSchedulesState: import("./entity/jeSchedules/jeSchedulesState").JESchedulesState;
|
package/lib/reducer.js
CHANGED
|
@@ -41,6 +41,7 @@ const redux_1 = require("redux");
|
|
|
41
41
|
const accountReducer_1 = __importStar(require("./entity/account/accountReducer"));
|
|
42
42
|
const accountGroupReducer_1 = __importStar(require("./entity/accountGroup/accountGroupReducer"));
|
|
43
43
|
const accountReconReducer_1 = __importStar(require("./entity/accountRecon/accountReconReducer"));
|
|
44
|
+
const actualMatchingReducer_1 = __importStar(require("./entity/actualMatching/actualMatchingReducer"));
|
|
44
45
|
const addressReducer_1 = __importStar(require("./entity/address/addressReducer"));
|
|
45
46
|
const aiAccountantCustomerReducer_1 = __importStar(require("./entity/aiAccountantCustomer/aiAccountantCustomerReducer"));
|
|
46
47
|
const aiCfoReducer_1 = __importStar(require("./entity/aiCfo/aiCfoReducer"));
|
|
@@ -79,9 +80,7 @@ const invoiceReducer_1 = __importStar(require("./entity/invoicing/invoice/invoic
|
|
|
79
80
|
const invoicingCustomerReducer_1 = __importStar(require("./entity/invoicing/invoicingCustomer/invoicingCustomerReducer"));
|
|
80
81
|
const invoicingSubscriptionReducer_1 = __importStar(require("./entity/invoicing/invoicingSubscription/invoicingSubscriptionReducer"));
|
|
81
82
|
const invoicingTransactionReducer_1 = __importStar(require("./entity/invoicing/invoicingTransaction/invoicingTransactionReducer"));
|
|
82
|
-
const
|
|
83
|
-
const productReducer_1 = __importStar(require("./entity/invoicing/product/productReducer"));
|
|
84
|
-
const actualMatchingReducer_1 = __importStar(require("./entity/actualMatching/actualMatchingReducer"));
|
|
83
|
+
const invoicingCatalogReducer_1 = __importStar(require("./entity/invoicing/invoicingCatalog/invoicingCatalogReducer"));
|
|
85
84
|
const jeSchedulesReducer_1 = __importStar(require("./entity/jeSchedules/jeSchedulesReducer"));
|
|
86
85
|
const merchantReducer_1 = __importStar(require("./entity/merchant/merchantReducer"));
|
|
87
86
|
const monthEndCloseChecksReducer_1 = __importStar(require("./entity/monthEndCloseChecks/monthEndCloseChecksReducer"));
|
|
@@ -355,8 +354,7 @@ const initialEntitiesState = {
|
|
|
355
354
|
invoicingCustomerState: invoicingCustomerReducer_1.initialState,
|
|
356
355
|
invoicingDunningCaseState: dunningCaseReducer_1.initialState,
|
|
357
356
|
invoicingInvoiceState: invoiceReducer_1.initialState,
|
|
358
|
-
|
|
359
|
-
invoicingProductState: productReducer_1.initialState,
|
|
357
|
+
invoicingCatalogState: invoicingCatalogReducer_1.initialState,
|
|
360
358
|
invoicingSubscriptionState: invoicingSubscriptionReducer_1.initialState,
|
|
361
359
|
invoicingTransactionState: invoicingTransactionReducer_1.initialState,
|
|
362
360
|
jeSchedulesState: jeSchedulesReducer_1.initialState,
|
|
@@ -642,8 +640,7 @@ const entityReducers = {
|
|
|
642
640
|
invoicingCustomerState: invoicingCustomerReducer_1.default,
|
|
643
641
|
invoicingDunningCaseState: dunningCaseReducer_1.default,
|
|
644
642
|
invoicingInvoiceState: invoiceReducer_1.default,
|
|
645
|
-
|
|
646
|
-
invoicingProductState: productReducer_1.default,
|
|
643
|
+
invoicingCatalogState: invoicingCatalogReducer_1.default,
|
|
647
644
|
invoicingSubscriptionState: invoicingSubscriptionReducer_1.default,
|
|
648
645
|
invoicingTransactionState: invoicingTransactionReducer_1.default,
|
|
649
646
|
jeSchedulesState: jeSchedulesReducer_1.default,
|
package/lib/rootStateTypes.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AccountState } from './entity/account/accountState';
|
|
2
2
|
import { AccountGroupState } from './entity/accountGroup/accountGroupState';
|
|
3
3
|
import { AccountReconState } from './entity/accountRecon/accountReconState';
|
|
4
|
+
import { ActualMatchingState } from './entity/actualMatching/actualMatchingState';
|
|
4
5
|
import { AddressState } from './entity/address/addressState';
|
|
5
6
|
import { AiAccountantCustomerState } from './entity/aiAccountantCustomer/aiAccountantCustomerState';
|
|
6
7
|
import { AiCfoState } from './entity/aiCfo/aiCfoState';
|
|
@@ -39,9 +40,7 @@ import { InvoiceState as InvoicingInvoiceState } from './entity/invoicing/invoic
|
|
|
39
40
|
import { InvoicingCustomerState } from './entity/invoicing/invoicingCustomer/invoicingCustomerState';
|
|
40
41
|
import { InvoicingSubscriptionState } from './entity/invoicing/invoicingSubscription/invoicingSubscriptionState';
|
|
41
42
|
import { InvoicingTransactionState } from './entity/invoicing/invoicingTransaction/invoicingTransactionState';
|
|
42
|
-
import {
|
|
43
|
-
import { InvoicingProductState } from './entity/invoicing/product/productState';
|
|
44
|
-
import { ActualMatchingState } from './entity/actualMatching/actualMatchingState';
|
|
43
|
+
import { InvoicingCatalogState } from './entity/invoicing/invoicingCatalog/invoicingCatalogState';
|
|
45
44
|
import { JESchedulesState } from './entity/jeSchedules/jeSchedulesState';
|
|
46
45
|
import { MerchantState } from './entity/merchant/merchant';
|
|
47
46
|
import { MonthEndCloseChecksState } from './entity/monthEndCloseChecks/monthEndCloseChecksState';
|
|
@@ -306,13 +305,12 @@ export type EntitiesState = {
|
|
|
306
305
|
forecastState: ForecastState;
|
|
307
306
|
globalMerchantState: GlobalMerchantState;
|
|
308
307
|
insightState: InsightState;
|
|
308
|
+
invoicingCatalogState: InvoicingCatalogState;
|
|
309
309
|
invoicingCouponState: InvoicingCouponState;
|
|
310
310
|
invoicingCreditNoteState: InvoicingCreditNoteState;
|
|
311
311
|
invoicingCustomerState: InvoicingCustomerState;
|
|
312
312
|
invoicingDunningCaseState: InvoicingDunningCaseState;
|
|
313
313
|
invoicingInvoiceState: InvoicingInvoiceState;
|
|
314
|
-
invoicingPlanState: InvoicingPlanState;
|
|
315
|
-
invoicingProductState: InvoicingProductState;
|
|
316
314
|
invoicingSubscriptionState: InvoicingSubscriptionState;
|
|
317
315
|
invoicingTransactionState: InvoicingTransactionState;
|
|
318
316
|
jeSchedulesState: JESchedulesState;
|
|
@@ -16,9 +16,9 @@ export declare const clearExpenseAutomationJESchedulesView: import("@reduxjs/too
|
|
|
16
16
|
localData: NewOneTimeAccrualLocalData;
|
|
17
17
|
}, "expenseAutomationJESchedulesView/createOneTimeAccrual", never, never>, createOneTimeAccrualFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
18
18
|
status: ZeniAPIStatus;
|
|
19
|
-
}, "expenseAutomationJESchedulesView/createOneTimeAccrualFailure">, createOneTimeAccrualSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/createOneTimeAccrualSuccess">, ignoreOneTimeAccrual: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[accrualId: string, reason: "
|
|
19
|
+
}, "expenseAutomationJESchedulesView/createOneTimeAccrualFailure">, createOneTimeAccrualSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/createOneTimeAccrualSuccess">, ignoreOneTimeAccrual: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[accrualId: string, reason: "no_activity" | "paused" | "too_small" | "need_invoice" | "other_ignore", note?: string | undefined], {
|
|
20
20
|
accrualId: string;
|
|
21
|
-
reason: "
|
|
21
|
+
reason: "no_activity" | "paused" | "too_small" | "need_invoice" | "other_ignore";
|
|
22
22
|
note: string | undefined;
|
|
23
23
|
}, "expenseAutomationJESchedulesView/ignoreOneTimeAccrual", never, never>, oneTimeAccrualActionFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
24
24
|
accrualId: ID;
|
|
@@ -5,13 +5,14 @@ import { JEOneTimeAccrual } from '../../../entity/jeSchedules/jeSchedulesSelecto
|
|
|
5
5
|
import { ZeniDate } from '../../../zeniDayJS';
|
|
6
6
|
import { ActualMatchingTransactionSearchResult, ActualMatchingViewUIState, MatchAndReverseResult } from '../types/actualMatchingViewState';
|
|
7
7
|
export type ActualMatchingRowKind = 'auto_reversed' | 'pending_review' | 'manually_reversed';
|
|
8
|
+
export type ActualMatchingJournalEntryIds = Pick<JEOneTimeAccrual, 'reversalTransactionId' | 'reversalTransactionIntegrationId' | 'transactionId' | 'transactionIntegrationId'>;
|
|
8
9
|
export type ActualMatchingGroupedAccrual = {
|
|
9
10
|
accrualId: ID;
|
|
10
11
|
estimatedAmount?: Amount;
|
|
11
12
|
jeDebitAccountName?: string;
|
|
12
13
|
memo?: string;
|
|
13
14
|
serviceMonth?: string;
|
|
14
|
-
};
|
|
15
|
+
} & ActualMatchingJournalEntryIds;
|
|
15
16
|
export interface ActualMatchingRow extends JEOneTimeAccrual {
|
|
16
17
|
accruedAmount: Amount;
|
|
17
18
|
actualAmount: Amount;
|
|
@@ -20,8 +20,8 @@ exports.getCloseMatchAfterUndoMatchId = getCloseMatchAfterUndoMatchId;
|
|
|
20
20
|
exports.getCloseMatchAfterIgnoreMatchId = getCloseMatchAfterIgnoreMatchId;
|
|
21
21
|
exports.getActualMatchingMatchModalConfirmStatus = getActualMatchingMatchModalConfirmStatus;
|
|
22
22
|
exports.getExpenseAutomationActualMatchingView = getExpenseAutomationActualMatchingView;
|
|
23
|
-
const orderBy_1 = __importDefault(require("lodash/orderBy"));
|
|
24
23
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
24
|
+
const orderBy_1 = __importDefault(require("lodash/orderBy"));
|
|
25
25
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
26
26
|
const actualMatchingSelector_1 = require("../../../entity/actualMatching/actualMatchingSelector");
|
|
27
27
|
const jeScheduleHelper_1 = require("../../../entity/jeSchedules/jeScheduleHelper");
|
|
@@ -116,7 +116,11 @@ function collectGroupedMembers(members) {
|
|
|
116
116
|
estimatedAmount: member.estimatedAmount,
|
|
117
117
|
jeDebitAccountName: member.jeDebitAccountName,
|
|
118
118
|
memo: member.memo,
|
|
119
|
+
reversalTransactionId: member.reversalTransactionId,
|
|
120
|
+
reversalTransactionIntegrationId: member.reversalTransactionIntegrationId,
|
|
119
121
|
serviceMonth: member.serviceMonth,
|
|
122
|
+
transactionId: member.transactionId,
|
|
123
|
+
transactionIntegrationId: member.transactionIntegrationId,
|
|
120
124
|
}));
|
|
121
125
|
}
|
|
122
126
|
function collectLeftoverMembers(leftovers) {
|
|
@@ -334,18 +338,22 @@ function toActualMatchingMatchView(match) {
|
|
|
334
338
|
: match.leftovers.map(toMatchModalAccrual),
|
|
335
339
|
};
|
|
336
340
|
}
|
|
337
|
-
const EMPTY_ACTUAL_MATCHING_ROWS = [];
|
|
338
341
|
const matchViewSelectorById = new Map();
|
|
339
342
|
function getExpenseAutomationActualMatchingMatchView(state, matchId) {
|
|
340
343
|
let selector = matchViewSelectorById.get(matchId);
|
|
341
344
|
if (selector == null) {
|
|
342
345
|
selector = (0, toolkit_1.createSelector)([
|
|
343
|
-
(root) => root.expenseAutomationActualMatchingViewState
|
|
346
|
+
(root) => root.expenseAutomationActualMatchingViewState
|
|
347
|
+
.detailFetchStateByMatchId[matchId] ?? NOT_STARTED,
|
|
344
348
|
(root) => root.expenseAutomationActualMatchingViewState.ignoreStatusByMatchId[matchId] ?? NOT_STARTED,
|
|
345
|
-
(root) => root.expenseAutomationActualMatchingViewState
|
|
346
|
-
|
|
347
|
-
(root) => root.expenseAutomationActualMatchingViewState
|
|
348
|
-
|
|
349
|
+
(root) => root.expenseAutomationActualMatchingViewState
|
|
350
|
+
.lastMatchResultsByMatchId?.[matchId],
|
|
351
|
+
(root) => root.expenseAutomationActualMatchingViewState
|
|
352
|
+
.lastUndoResultsByMatchId?.[matchId],
|
|
353
|
+
(root) => root.expenseAutomationActualMatchingViewState
|
|
354
|
+
.detailRefreshStatusByMatchId[matchId] ?? NOT_STARTED,
|
|
355
|
+
(root) => root.expenseAutomationActualMatchingViewState
|
|
356
|
+
.undoReversalStatusByMatchId[matchId] ?? NOT_STARTED,
|
|
349
357
|
(root) => (0, actualMatchingSelector_1.getActualMatchingMatchById)(root.actualMatchingState, matchId),
|
|
350
358
|
], (detailFetchState, ignoreStatus, lastMatchResults, lastUndoResults, refreshStatus, undoReversalStatus, match) => ({
|
|
351
359
|
detailFetchState,
|
|
@@ -375,7 +383,8 @@ function getActualMatchingMatchModalConfirmStatus(state, matchId) {
|
|
|
375
383
|
if (matchId != null && matchId !== '') {
|
|
376
384
|
return (state.expenseAutomationActualMatchingViewState.confirmStatusByMatchId[matchId] ?? NOT_STARTED);
|
|
377
385
|
}
|
|
378
|
-
return state.expenseAutomationActualMatchingViewState.matchModal
|
|
386
|
+
return state.expenseAutomationActualMatchingViewState.matchModal
|
|
387
|
+
.confirmStatus;
|
|
379
388
|
}
|
|
380
389
|
function getExpenseAutomationActualMatchingView(state) {
|
|
381
390
|
const { expenseAutomationActualMatchingViewState } = state;
|
|
@@ -389,14 +398,8 @@ function getExpenseAutomationActualMatchingView(state) {
|
|
|
389
398
|
.filter((match) => match.members.length > 0)
|
|
390
399
|
.map(toActualMatchingRow);
|
|
391
400
|
const rows = allRows.filter((row) => matchesSearch(row, uiState.searchString));
|
|
392
|
-
const
|
|
393
|
-
const
|
|
394
|
-
const reversed = includeReversed
|
|
395
|
-
? sortActualMatchingRows(rows.filter((row) => isReversedMatchKind(row.kind)), uiState)
|
|
396
|
-
: EMPTY_ACTUAL_MATCHING_ROWS;
|
|
397
|
-
const pendingReview = includePendingReview
|
|
398
|
-
? sortActualMatchingRows(rows.filter((row) => row.kind === 'pending_review'), uiState)
|
|
399
|
-
: EMPTY_ACTUAL_MATCHING_ROWS;
|
|
401
|
+
const reversed = sortActualMatchingRows(rows.filter((row) => isReversedMatchKind(row.kind)), uiState);
|
|
402
|
+
const pendingReview = sortActualMatchingRows(rows.filter((row) => row.kind === 'pending_review'), uiState);
|
|
400
403
|
const kpiSummary = buildActualMatchingKpiSummary(allRows, getTenantDisplayCurrency(state)?.currencyCode);
|
|
401
404
|
const searchedAccruals = matchModal.accrualSearch.results
|
|
402
405
|
.map((key) => (0, jeSchedulesSelector_1.getJEOneTimeAccrualByKey)(key, state.jeSchedulesState))
|
|
@@ -21,9 +21,8 @@ export interface ActualMatchingViewUIState {
|
|
|
21
21
|
sortKey: ActualMatchingSortKey;
|
|
22
22
|
sortOrder: SortOrder;
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* stays on the unfiltered period.
|
|
24
|
+
* Unused by the list: Pending review and Reversed always render as separate
|
|
25
|
+
* tables. Kept so persisted UI state and older clients still hydrate.
|
|
27
26
|
*/
|
|
28
27
|
statusFilter: ActualMatchingStatusFilter;
|
|
29
28
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
3
|
import { Address } from '../../../entity/address/addressState';
|
|
4
|
+
import { InvoicingCatalogPricePoint } from '../../../entity/invoicing/invoicingCatalog/invoicingCatalogState';
|
|
4
5
|
import { InvoicingFieldHelpByCode, InvoicingSettingsPayload } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
5
|
-
import { InvoicingProduct } from '../../../entity/invoicing/product/productState';
|
|
6
6
|
import { RootState } from '../../../rootStateTypes';
|
|
7
7
|
import { InvoicingCreateInvoiceFormLocalData } from './createInvoiceState';
|
|
8
8
|
/**
|
|
@@ -38,7 +38,7 @@ export interface CreateInvoiceFormView extends SelectorView {
|
|
|
38
38
|
fieldHelp: InvoicingFieldHelpByCode;
|
|
39
39
|
localData: InvoicingCreateInvoiceFormLocalData;
|
|
40
40
|
planNames: InvoicingPlanNameOption[];
|
|
41
|
-
products:
|
|
41
|
+
products: InvoicingCatalogPricePoint[];
|
|
42
42
|
savedInvoiceId?: ID;
|
|
43
43
|
settings?: InvoicingSettingsPayload;
|
|
44
44
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getCreateInvoiceFormView = void 0;
|
|
4
4
|
const addressSelector_1 = require("../../../entity/address/addressSelector");
|
|
5
|
-
const
|
|
5
|
+
const invoicingCatalogSelector_1 = require("../../../entity/invoicing/invoicingCatalog/invoicingCatalogSelector");
|
|
6
6
|
const invoicingCatalogListViewSelector_1 = require("../invoicingCatalogListView/invoicingCatalogListViewSelector");
|
|
7
7
|
const invoicingConfigViewSelector_1 = require("../invoicingConfigView/invoicingConfigViewSelector");
|
|
8
8
|
const invoicingCustomerListViewSelector_1 = require("../invoicingCustomerListView/invoicingCustomerListViewSelector");
|
|
@@ -31,7 +31,7 @@ const hasPerUnitRate = (pricingModel) => pricingModel == null ||
|
|
|
31
31
|
* `undefined` when there is no safe per-unit rate to prefill.
|
|
32
32
|
*/
|
|
33
33
|
const planNamePrefillPrice = (pricePoint) => hasPerUnitRate(pricePoint.pricingModel)
|
|
34
|
-
? (0,
|
|
34
|
+
? (0, invoicingCatalogSelector_1.invoicingPricePointDisplayAmount)(pricePoint)?.amount
|
|
35
35
|
: undefined;
|
|
36
36
|
/**
|
|
37
37
|
* Display name for a customer option: company, else the full name, else the
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { AccountBase } from '../../../entity/account/accountState';
|
|
2
2
|
import { ClassBase } from '../../../entity/class/classState';
|
|
3
|
-
import {
|
|
4
|
-
import { InvoicingAccountingDetailPayload, InvoicingProductPayload } from '../../../entity/invoicing/product/productPayload';
|
|
3
|
+
import { InvoicingAccountingDetailPayload, InvoicingCatalogItemPayload, InvoicingCatalogPricePointPayload } from '../../../entity/invoicing/invoicingCatalog/invoicingCatalogPayload';
|
|
5
4
|
import { ZeniAPIResponse } from '../../../responsePayload';
|
|
6
5
|
import { InvoicingCatalogItemFormLocalData } from './editInvoicingCatalogItemDetailViewState';
|
|
7
|
-
export type SaveInvoicingCatalogItemResponse = ZeniAPIResponse<
|
|
6
|
+
export type SaveInvoicingCatalogItemResponse = ZeniAPIResponse<InvoicingCatalogItemPayload>;
|
|
8
7
|
/**
|
|
9
|
-
* The price-point half of a save body. `
|
|
8
|
+
* The price-point half of a save body. `InvoicingCatalogPricePointPayload` is the shape
|
|
10
9
|
* the service returns; a save differs in that a field is cleared by sending an
|
|
11
10
|
* explicit `null`, since an absent key reads as "leave it alone".
|
|
12
11
|
*/
|
|
13
|
-
export type InvoicingCatalogSubFamilySavePayload = Omit<Partial<
|
|
12
|
+
export type InvoicingCatalogSubFamilySavePayload = Omit<Partial<InvoicingCatalogPricePointPayload>, 'accounting_detail' | 'description' | 'invoice_notes'> & {
|
|
14
13
|
accounting_detail?: InvoicingAccountingDetailPayload | null;
|
|
15
14
|
description?: string | null;
|
|
16
15
|
invoice_notes?: string | null;
|
|
@@ -25,7 +24,7 @@ export type InvoicingCatalogSubFamilySavePayload = Omit<Partial<InvoicingProduct
|
|
|
25
24
|
* by its own request instead; see
|
|
26
25
|
* `localDataToCreateInvoicingCatalogProductPayloads`.
|
|
27
26
|
*/
|
|
28
|
-
export type InvoicingCatalogItemSavePayload = Omit<Partial<
|
|
27
|
+
export type InvoicingCatalogItemSavePayload = Omit<Partial<InvoicingCatalogItemPayload>, 'sub_families'> & {
|
|
29
28
|
sub_families?: InvoicingCatalogSubFamilySavePayload[];
|
|
30
29
|
};
|
|
31
30
|
/**
|
|
@@ -67,6 +66,6 @@ export declare const localDataToSaveInvoicingCatalogItemPayload: (localData: Inv
|
|
|
67
66
|
* price point that does not exist yet to clear.
|
|
68
67
|
*/
|
|
69
68
|
export declare const localDataToCreateInvoicingCatalogProductPayloads: (localData: InvoicingCatalogItemFormLocalData, itemId: string, lookup: InvoicingCatalogAccountingLookup) => InvoicingCatalogSubFamilySavePayload[];
|
|
70
|
-
export type RunInvoicingCatalogPlanActionResponse = ZeniAPIResponse<
|
|
71
|
-
export type RunInvoicingCatalogProductActionResponse = ZeniAPIResponse<
|
|
72
|
-
export type InvoicingCatalogItemDetailResponse = ZeniAPIResponse<
|
|
69
|
+
export type RunInvoicingCatalogPlanActionResponse = ZeniAPIResponse<InvoicingCatalogItemPayload>;
|
|
70
|
+
export type RunInvoicingCatalogProductActionResponse = ZeniAPIResponse<InvoicingCatalogPricePointPayload>;
|
|
71
|
+
export type InvoicingCatalogItemDetailResponse = ZeniAPIResponse<InvoicingCatalogItemPayload>;
|
|
@@ -2,8 +2,8 @@ import { NestedAccountHierarchyForReport } from '../../../commonStateTypes/accou
|
|
|
2
2
|
import { NestedClassHierarchyForReport } from '../../../commonStateTypes/classesView/nestedClassID';
|
|
3
3
|
import { FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
4
4
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
5
|
+
import { InvoicingCatalogItem } from '../../../entity/invoicing/invoicingCatalog/invoicingCatalogState';
|
|
5
6
|
import { InvoicingCatalogItemLifecycleAction, InvoicingCatalogLifecycleActionOption, InvoicingCatalogProductLifecycleAction, InvoicingFieldHelpByCode, InvoicingNamedOption, InvoicingNamedOptionsByKey } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
6
|
-
import { InvoicingPlan } from '../../../entity/invoicing/plan/planState';
|
|
7
7
|
import { RootState } from '../../../rootStateTypes';
|
|
8
8
|
import { InvoicingCatalogItemFormLocalData, InvoicingCatalogItemKind } from './editInvoicingCatalogItemDetailViewState';
|
|
9
9
|
export declare const getEditInvoicingCatalogItemDetailViewState: (state: RootState) => FetchStateAndError;
|
|
@@ -103,7 +103,7 @@ export interface InvoicingCatalogItemFormView extends SelectorView {
|
|
|
103
103
|
*/
|
|
104
104
|
catalogTierTypeOptionsByPricingModel?: InvoicingNamedOptionsByKey;
|
|
105
105
|
kind?: InvoicingCatalogItemKind;
|
|
106
|
-
plan?:
|
|
106
|
+
plan?: InvoicingCatalogItem;
|
|
107
107
|
savedItemId?: ID;
|
|
108
108
|
savedKind?: InvoicingCatalogItemKind;
|
|
109
109
|
}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getInvoicingCatalogItemFormView = exports.getInvoicingApplicableCatalogItemOptions = exports.getSavedInvoicingCatalogItemKind = exports.getSavedInvoicingCatalogItemId = exports.getEditInvoicingCatalogItemDetailViewState = void 0;
|
|
4
4
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
5
5
|
const reduceFetchState_1 = require("../../../commonStateTypes/reduceFetchState");
|
|
6
|
-
const
|
|
6
|
+
const invoicingCatalogSelector_1 = require("../../../entity/invoicing/invoicingCatalog/invoicingCatalogSelector");
|
|
7
7
|
const invoicingConfigViewSelector_1 = require("../invoicingConfigView/invoicingConfigViewSelector");
|
|
8
8
|
const invoicingFormDraft_1 = require("../invoicingFormDraft");
|
|
9
9
|
const invoicingQboViewSelector_1 = require("../invoicingQboView/invoicingQboViewSelector");
|
|
@@ -42,7 +42,7 @@ const buildApplicableCatalogItemOptions = (plans) => {
|
|
|
42
42
|
* Kept referentially stable across unrelated dispatches; the form view filters
|
|
43
43
|
* out the item being edited (see `getInvoicingCatalogItemFormView`).
|
|
44
44
|
*/
|
|
45
|
-
exports.getInvoicingApplicableCatalogItemOptions = (0, toolkit_1.createSelector)((state) => state.
|
|
45
|
+
exports.getInvoicingApplicableCatalogItemOptions = (0, toolkit_1.createSelector)((state) => state.invoicingCatalogState, (state) => state.invoicingCatalogListViewState, (catalogState, listViewState) => buildApplicableCatalogItemOptions((0, invoicingCatalogSelector_1.getInvoicingCatalogItemsByIds)(catalogState, [
|
|
46
46
|
...listViewState.planIds,
|
|
47
47
|
...listViewState.productIds,
|
|
48
48
|
])));
|
|
@@ -67,7 +67,9 @@ const getInvoicingCatalogIncomeAccountIds = (0, toolkit_1.createSelector)([
|
|
|
67
67
|
: invoicingQboViewSelector_1.NO_INVOICING_ACCOUNT_IDS);
|
|
68
68
|
const getInvoicingCatalogItemFormView = (state, id) => {
|
|
69
69
|
const { editDraftById, error, fetchState, newItemDraft, savedItemId, savedKind, } = state.editInvoicingCatalogItemDetailViewState;
|
|
70
|
-
const plan = id != null
|
|
70
|
+
const plan = id != null
|
|
71
|
+
? (0, invoicingCatalogSelector_1.getInvoicingCatalogItemById)(state.invoicingCatalogState, id)
|
|
72
|
+
: undefined;
|
|
71
73
|
const kind = plan != null ? 'plan' : undefined;
|
|
72
74
|
// No entity fallback: the draft is the one source of form values, seeded from
|
|
73
75
|
// the record by `seedInvoicingCatalogItemFormDraftEpic` when the detail load
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import {
|
|
3
|
+
import { updateInvoicingCatalogItems } from '../../../entity/invoicing/invoicingCatalog/invoicingCatalogReducer';
|
|
4
4
|
import { RootState } from '../../../rootStateTypes';
|
|
5
5
|
import { ZeniAPI } from '../../../zeniAPI';
|
|
6
6
|
import { fetchInvoicingCatalogItemDetail, updateInvoicingCatalogItemDetail, updateInvoicingCatalogItemDetailFailure } from './editInvoicingCatalogItemDetailViewReducer';
|
|
7
|
-
export type ActionType = ReturnType<typeof fetchInvoicingCatalogItemDetail> | ReturnType<typeof updateInvoicingCatalogItemDetail> | ReturnType<typeof updateInvoicingCatalogItemDetailFailure> | ReturnType<typeof
|
|
7
|
+
export type ActionType = ReturnType<typeof fetchInvoicingCatalogItemDetail> | ReturnType<typeof updateInvoicingCatalogItemDetail> | ReturnType<typeof updateInvoicingCatalogItemDetailFailure> | ReturnType<typeof updateInvoicingCatalogItems>;
|
|
8
8
|
export declare const fetchInvoicingCatalogItemDetailEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
package/lib/view/invoicing/editInvoicingCatalogItemDetailView/fetchInvoicingCatalogItemDetailEpic.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.fetchInvoicingCatalogItemDetailEpic = void 0;
|
|
4
4
|
const rxjs_1 = require("rxjs");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const
|
|
6
|
+
const invoicingCatalogReducer_1 = require("../../../entity/invoicing/invoicingCatalog/invoicingCatalogReducer");
|
|
7
7
|
const responsePayload_1 = require("../../../responsePayload");
|
|
8
8
|
const editInvoicingCatalogItemDetailViewReducer_1 = require("./editInvoicingCatalogItemDetailViewReducer");
|
|
9
9
|
const fetchInvoicingCatalogItemDetailEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(editInvoicingCatalogItemDetailViewReducer_1.fetchInvoicingCatalogItemDetail.match), (0, operators_1.switchMap)((action) => {
|
|
@@ -12,7 +12,7 @@ const fetchInvoicingCatalogItemDetailEpic = (actions$, _state$, zeniAPI) => acti
|
|
|
12
12
|
return zeniAPI.getJSON(apiUrl).pipe((0, operators_1.switchMap)((response) => {
|
|
13
13
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
14
14
|
return [
|
|
15
|
-
(0,
|
|
15
|
+
(0, invoicingCatalogReducer_1.updateInvoicingCatalogItems)([response.data], 'merge'),
|
|
16
16
|
(0, editInvoicingCatalogItemDetailViewReducer_1.updateInvoicingCatalogItemDetail)({ id: response.data.id, kind }),
|
|
17
17
|
];
|
|
18
18
|
}
|
package/lib/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogItemFormHelper.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { InvoicingCatalogPricingModel, InvoicingProduct } from '../../../entity/invoicing/product/productState';
|
|
1
|
+
import { InvoicingCatalogItem, InvoicingCatalogPricePoint, InvoicingCatalogPricingModel } from '../../../entity/invoicing/invoicingCatalog/invoicingCatalogState';
|
|
3
2
|
import { InvoicingCatalogItemFormLocalData, InvoicingCatalogItemFormSubFamily, InvoicingCatalogItemFormTier } from './editInvoicingCatalogItemDetailViewState';
|
|
4
3
|
/**
|
|
5
4
|
* Value sets the catalog item form still owns locally: the backend has no enum
|
|
@@ -13,9 +12,9 @@ export declare const INVOICING_CATALOG_APPLICABILITY_VALUES: readonly ["all", "r
|
|
|
13
12
|
export declare const isTieredCatalogPricingModel: (model: string) => boolean;
|
|
14
13
|
export declare const blankInvoicingCatalogTier: (startingUnit?: string) => InvoicingCatalogItemFormTier;
|
|
15
14
|
export declare const blankInvoicingCatalogSubFamily: () => InvoicingCatalogItemFormSubFamily;
|
|
16
|
-
export declare const invoicingProductToCatalogItemFormSubFamily: (product?:
|
|
15
|
+
export declare const invoicingProductToCatalogItemFormSubFamily: (product?: InvoicingCatalogPricePoint) => InvoicingCatalogItemFormSubFamily;
|
|
17
16
|
export declare const initialInvoicingCatalogItemFormLocalData: InvoicingCatalogItemFormLocalData;
|
|
18
17
|
/**
|
|
19
18
|
* Seed the form draft from a parent catalog item and its embedded Price points.
|
|
20
19
|
*/
|
|
21
|
-
export declare const entityToInvoicingCatalogItemFormLocalData: (item?:
|
|
20
|
+
export declare const entityToInvoicingCatalogItemFormLocalData: (item?: InvoicingCatalogItem) => InvoicingCatalogItemFormLocalData;
|
package/lib/view/invoicing/editInvoicingCatalogItemDetailView/runInvoicingCatalogPlanActionEpic.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import {
|
|
3
|
+
import { updateInvoicingCatalogItems } from '../../../entity/invoicing/invoicingCatalog/invoicingCatalogReducer';
|
|
4
4
|
import { RootState } from '../../../rootStateTypes';
|
|
5
5
|
import { ZeniAPI } from '../../../zeniAPI';
|
|
6
6
|
import { runInvoicingCatalogPlanAction, runInvoicingCatalogPlanActionFailure, runInvoicingCatalogPlanActionSuccess } from './editInvoicingCatalogItemDetailViewReducer';
|
|
7
|
-
export type ActionType = ReturnType<typeof runInvoicingCatalogPlanAction> | ReturnType<typeof runInvoicingCatalogPlanActionSuccess> | ReturnType<typeof runInvoicingCatalogPlanActionFailure> | ReturnType<typeof
|
|
7
|
+
export type ActionType = ReturnType<typeof runInvoicingCatalogPlanAction> | ReturnType<typeof runInvoicingCatalogPlanActionSuccess> | ReturnType<typeof runInvoicingCatalogPlanActionFailure> | ReturnType<typeof updateInvoicingCatalogItems>;
|
|
8
8
|
export declare const runInvoicingCatalogPlanActionEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
package/lib/view/invoicing/editInvoicingCatalogItemDetailView/runInvoicingCatalogPlanActionEpic.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.runInvoicingCatalogPlanActionEpic = void 0;
|
|
4
4
|
const rxjs_1 = require("rxjs");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const
|
|
6
|
+
const invoicingCatalogReducer_1 = require("../../../entity/invoicing/invoicingCatalog/invoicingCatalogReducer");
|
|
7
7
|
const responsePayload_1 = require("../../../responsePayload");
|
|
8
8
|
const editInvoicingCatalogItemDetailViewReducer_1 = require("./editInvoicingCatalogItemDetailViewReducer");
|
|
9
9
|
const runInvoicingCatalogPlanActionEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(editInvoicingCatalogItemDetailViewReducer_1.runInvoicingCatalogPlanAction.match), (0, operators_1.mergeMap)((action) => {
|
|
@@ -15,7 +15,7 @@ const runInvoicingCatalogPlanActionEpic = (actions$, _state$, zeniAPI) => action
|
|
|
15
15
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
16
16
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
17
17
|
return [
|
|
18
|
-
(0,
|
|
18
|
+
(0, invoicingCatalogReducer_1.updateInvoicingCatalogItems)([response.data], 'merge'),
|
|
19
19
|
(0, editInvoicingCatalogItemDetailViewReducer_1.runInvoicingCatalogPlanActionSuccess)({ id }),
|
|
20
20
|
];
|
|
21
21
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import {
|
|
4
|
-
import { updateInvoicingProducts } from '../../../entity/invoicing/product/productReducer';
|
|
3
|
+
import { mergeInvoicingCatalogPricePoint } from '../../../entity/invoicing/invoicingCatalog/invoicingCatalogReducer';
|
|
5
4
|
import { RootState } from '../../../rootStateTypes';
|
|
6
5
|
import { ZeniAPI } from '../../../zeniAPI';
|
|
7
6
|
import { runInvoicingCatalogProductAction, runInvoicingCatalogProductActionFailure, runInvoicingCatalogProductActionSuccess } from './editInvoicingCatalogItemDetailViewReducer';
|
|
8
|
-
export type ActionType = ReturnType<typeof runInvoicingCatalogProductAction> | ReturnType<typeof runInvoicingCatalogProductActionSuccess> | ReturnType<typeof runInvoicingCatalogProductActionFailure> | ReturnType<typeof
|
|
7
|
+
export type ActionType = ReturnType<typeof runInvoicingCatalogProductAction> | ReturnType<typeof runInvoicingCatalogProductActionSuccess> | ReturnType<typeof runInvoicingCatalogProductActionFailure> | ReturnType<typeof mergeInvoicingCatalogPricePoint>;
|
|
9
8
|
export declare const runInvoicingCatalogProductActionEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -3,8 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.runInvoicingCatalogProductActionEpic = void 0;
|
|
4
4
|
const rxjs_1 = require("rxjs");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const
|
|
7
|
-
const productReducer_1 = require("../../../entity/invoicing/product/productReducer");
|
|
6
|
+
const invoicingCatalogReducer_1 = require("../../../entity/invoicing/invoicingCatalog/invoicingCatalogReducer");
|
|
8
7
|
const responsePayload_1 = require("../../../responsePayload");
|
|
9
8
|
const editInvoicingCatalogItemDetailViewReducer_1 = require("./editInvoicingCatalogItemDetailViewReducer");
|
|
10
9
|
const runInvoicingCatalogProductActionEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(editInvoicingCatalogItemDetailViewReducer_1.runInvoicingCatalogProductAction.match), (0, operators_1.mergeMap)((action) => {
|
|
@@ -19,9 +18,10 @@ const runInvoicingCatalogProductActionEpic = (actions$, _state$, zeniAPI) => act
|
|
|
19
18
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
20
19
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
21
20
|
return [
|
|
22
|
-
(0, productReducer_1.updateInvoicingProducts)([response.data], 'merge'),
|
|
23
21
|
...(parentItemId != null
|
|
24
|
-
? [
|
|
22
|
+
? [
|
|
23
|
+
(0, invoicingCatalogReducer_1.mergeInvoicingCatalogPricePoint)(parentItemId, response.data),
|
|
24
|
+
]
|
|
25
25
|
: []),
|
|
26
26
|
(0, editInvoicingCatalogItemDetailViewReducer_1.runInvoicingCatalogProductActionSuccess)({ id: stateKey }),
|
|
27
27
|
];
|
package/lib/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import {
|
|
4
|
-
import { updateInvoicingProducts } from '../../../entity/invoicing/product/productReducer';
|
|
3
|
+
import { mergeInvoicingCatalogPricePoint, updateInvoicingCatalogItems } from '../../../entity/invoicing/invoicingCatalog/invoicingCatalogReducer';
|
|
5
4
|
import { openSnackbar } from '../../../entity/snackbar/snackbarReducer';
|
|
6
5
|
import { RootState } from '../../../rootStateTypes';
|
|
7
6
|
import { ZeniAPI } from '../../../zeniAPI';
|
|
8
7
|
import { addInvoicingCatalogItem } from '../invoicingCatalogListView/invoicingCatalogListViewReducer';
|
|
9
8
|
import { submitInvoicingCatalogItemForm, submitInvoicingCatalogItemFormFailure, submitInvoicingCatalogItemFormSuccess } from './editInvoicingCatalogItemDetailViewReducer';
|
|
10
|
-
export type ActionType = ReturnType<typeof submitInvoicingCatalogItemForm> | ReturnType<typeof submitInvoicingCatalogItemFormSuccess> | ReturnType<typeof submitInvoicingCatalogItemFormFailure> | ReturnType<typeof
|
|
9
|
+
export type ActionType = ReturnType<typeof submitInvoicingCatalogItemForm> | ReturnType<typeof submitInvoicingCatalogItemFormSuccess> | ReturnType<typeof submitInvoicingCatalogItemFormFailure> | ReturnType<typeof updateInvoicingCatalogItems> | ReturnType<typeof mergeInvoicingCatalogPricePoint> | ReturnType<typeof addInvoicingCatalogItem> | ReturnType<typeof openSnackbar>;
|
|
11
10
|
export declare const saveInvoicingCatalogItemEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
package/lib/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js
CHANGED
|
@@ -3,8 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.saveInvoicingCatalogItemEpic = void 0;
|
|
4
4
|
const rxjs_1 = require("rxjs");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const
|
|
7
|
-
const productReducer_1 = require("../../../entity/invoicing/product/productReducer");
|
|
6
|
+
const invoicingCatalogReducer_1 = require("../../../entity/invoicing/invoicingCatalog/invoicingCatalogReducer");
|
|
8
7
|
const snackbarApiError_1 = require("../../../entity/snackbar/snackbarApiError");
|
|
9
8
|
const snackbarReducer_1 = require("../../../entity/snackbar/snackbarReducer");
|
|
10
9
|
const responsePayload_1 = require("../../../responsePayload");
|
|
@@ -54,11 +53,8 @@ const saveInvoicingCatalogItemEpic = (actions$, state$, zeniAPI) => actions$.pip
|
|
|
54
53
|
}
|
|
55
54
|
const savedProducts = productResponses.flatMap((productResponse) => productResponse.data != null ? [productResponse.data] : []);
|
|
56
55
|
const resultActions = [
|
|
57
|
-
(0,
|
|
58
|
-
...
|
|
59
|
-
? [(0, productReducer_1.updateInvoicingProducts)(savedProducts, 'merge')]
|
|
60
|
-
: []),
|
|
61
|
-
...savedProducts.map((product) => (0, planReducer_1.mergeInvoicingPlanSubFamily)(savedItem.id, product)),
|
|
56
|
+
(0, invoicingCatalogReducer_1.updateInvoicingCatalogItems)([savedItem], 'merge'),
|
|
57
|
+
...savedProducts.map((product) => (0, invoicingCatalogReducer_1.mergeInvoicingCatalogPricePoint)(savedItem.id, product)),
|
|
62
58
|
(0, editInvoicingCatalogItemDetailViewReducer_1.submitInvoicingCatalogItemFormSuccess)({
|
|
63
59
|
itemId: savedItem.id,
|
|
64
60
|
kind: 'plan',
|