@zeniai/client-epic-state 5.1.97 → 5.1.99
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/invoicing/invoicingCommonPayload.d.ts +12 -0
- package/lib/entity/invoicing/invoicingCommonPayload.js +18 -0
- package/lib/entity/invoicing/invoicingTransaction/invoicingTransactionPayload.d.ts +1 -1
- package/lib/epic.d.ts +1 -5
- package/lib/epic.js +1 -5
- package/lib/esm/entity/invoicing/invoicingCommonPayload.js +16 -0
- package/lib/esm/epic.js +1 -5
- package/lib/esm/index.js +16 -18
- package/lib/esm/reducer.js +0 -3
- package/lib/esm/view/dashboard/dashboardEpic.js +0 -20
- package/lib/esm/view/dashboard/dashboardReducer.js +1 -13
- package/lib/esm/view/dashboard/dashboardSelector.js +2 -7
- package/lib/esm/view/invoicing/auditView/auditViewSelector.js +4 -0
- package/lib/esm/view/invoicing/couponView/couponViewSelector.js +18 -8
- package/lib/esm/view/invoicing/couponView/couponViewState.js +0 -9
- package/lib/esm/view/invoicing/createCreditNote/createCreditNoteFormConfig.js +1 -0
- package/lib/esm/view/invoicing/createCreditNote/createCreditNotePayload.js +4 -1
- package/lib/esm/view/invoicing/createCreditNote/createCreditNoteSelector.js +4 -2
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.js +7 -6
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogItemFormConfig.js +3 -19
- package/lib/esm/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.js +10 -5
- package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.js +6 -4
- package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/invoicingCustomerFormConfig.js +0 -17
- package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.js +5 -0
- package/lib/esm/view/invoicing/invoiceList/fetchInvoiceListPageEpic.js +2 -1
- package/lib/esm/view/invoicing/invoiceList/invoiceListReducer.js +18 -17
- package/lib/esm/view/invoicing/invoiceList/invoiceListSelector.js +12 -4
- package/lib/esm/view/invoicing/invoiceList/invoiceListState.js +13 -9
- package/lib/esm/view/invoicing/invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewSelector.js +5 -1
- package/lib/esm/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewSelector.js +2 -1
- package/lib/esm/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.js +26 -0
- package/lib/esm/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.js +9 -0
- package/lib/esm/view/invoicing/invoicingCreditNoteListView/invoicingCreditNoteListViewSelector.js +9 -3
- package/lib/esm/view/invoicing/invoicingCreditNoteListView/invoicingCreditNoteListViewState.js +0 -9
- package/lib/esm/view/invoicing/invoicingCustomerDetailView/fetchInvoicingCustomerDetailPageEpic.js +2 -2
- package/lib/esm/view/invoicing/invoicingCustomerDetailView/invoicingCustomerDetailViewSelector.js +1 -1
- package/lib/esm/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewSelector.js +9 -3
- package/lib/esm/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewState.js +0 -9
- package/lib/esm/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewSelector.js +8 -3
- package/lib/esm/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.js +1 -9
- package/lib/esm/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewSelector.js +11 -3
- package/lib/esm/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewState.js +0 -9
- package/lib/esm/view/invoicing/invoicingTabHelper.js +27 -0
- package/lib/esm/view/invoicing/invoicingTransactionListView/epics/fetchInvoicingTransactionListPageEpic.js +2 -1
- package/lib/esm/view/invoicing/invoicingTransactionListView/invoicingTransactionListViewReducer.js +5 -5
- package/lib/esm/view/invoicing/invoicingTransactionListView/invoicingTransactionListViewSelector.js +12 -4
- package/lib/esm/view/invoicing/invoicingTransactionListView/invoicingTransactionListViewState.js +11 -9
- package/lib/esm/view/invoicing/issueCreditNote/issueCreditNoteFormConfig.js +1 -8
- package/lib/esm/view/invoicing/issueCreditNote/issueCreditNotePayload.js +5 -1
- package/lib/esm/view/invoicing/issueCreditNote/issueCreditNoteSelector.js +5 -2
- package/lib/esm/view/invoicing/recordPayment/recordPaymentFormConfig.js +0 -26
- package/lib/esm/view/invoicing/recordPayment/recordPaymentSelector.js +26 -6
- package/lib/esm/view/invoicing/settingsView/settingsViewSelector.js +8 -1
- package/lib/esm/view/spendManagement/treasury/treasurySetUp/treasurySetupViewReducer.js +1 -67
- package/lib/index.d.ts +17 -20
- package/lib/index.js +41 -65
- package/lib/reducer.d.ts +0 -3
- package/lib/reducer.js +0 -3
- package/lib/view/dashboard/dashboardEpic.d.ts +1 -3
- package/lib/view/dashboard/dashboardEpic.js +0 -20
- package/lib/view/dashboard/dashboardReducer.d.ts +1 -1
- package/lib/view/dashboard/dashboardReducer.js +2 -14
- package/lib/view/dashboard/dashboardSelector.d.ts +0 -1
- package/lib/view/dashboard/dashboardSelector.js +2 -7
- package/lib/view/dashboard/dashboardState.d.ts +0 -1
- package/lib/view/invoicing/auditView/auditViewSelector.d.ts +4 -0
- package/lib/view/invoicing/auditView/auditViewSelector.js +4 -0
- package/lib/view/invoicing/couponView/couponViewSelector.d.ts +5 -1
- package/lib/view/invoicing/couponView/couponViewSelector.js +17 -7
- package/lib/view/invoicing/couponView/couponViewState.d.ts +0 -7
- package/lib/view/invoicing/couponView/couponViewState.js +1 -10
- package/lib/view/invoicing/createCreditNote/createCreditNoteFormConfig.js +1 -0
- package/lib/view/invoicing/createCreditNote/createCreditNotePayload.js +4 -1
- package/lib/view/invoicing/createCreditNote/createCreditNoteSelector.d.ts +3 -1
- package/lib/view/invoicing/createCreditNote/createCreditNoteSelector.js +4 -2
- package/lib/view/invoicing/createCreditNote/createCreditNoteState.d.ts +6 -0
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.d.ts +5 -5
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.js +6 -5
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogItemFormConfig.d.ts +3 -6
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogItemFormConfig.js +4 -20
- package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.d.ts +9 -7
- package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.js +10 -5
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.d.ts +4 -3
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.js +5 -3
- package/lib/view/invoicing/editInvoicingCustomerDetailView/invoicingCustomerFormConfig.d.ts +0 -8
- package/lib/view/invoicing/editInvoicingCustomerDetailView/invoicingCustomerFormConfig.js +1 -18
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.d.ts +5 -0
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.js +5 -0
- package/lib/view/invoicing/invoiceList/fetchInvoiceListPageEpic.js +2 -1
- package/lib/view/invoicing/invoiceList/invoiceListReducer.js +17 -16
- package/lib/view/invoicing/invoiceList/invoiceListSelector.d.ts +3 -1
- package/lib/view/invoicing/invoiceList/invoiceListSelector.js +11 -3
- package/lib/view/invoicing/invoiceList/invoiceListState.d.ts +13 -9
- package/lib/view/invoicing/invoiceList/invoiceListState.js +15 -10
- package/lib/view/invoicing/invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewSelector.d.ts +9 -1
- package/lib/view/invoicing/invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewSelector.js +5 -1
- package/lib/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewSelector.d.ts +3 -1
- package/lib/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewSelector.js +2 -1
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewPayload.d.ts +13 -0
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.d.ts +1 -1
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.js +26 -0
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.d.ts +19 -1
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.js +11 -1
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewState.d.ts +13 -0
- package/lib/view/invoicing/invoicingCreditNoteListView/invoicingCreditNoteListViewSelector.d.ts +8 -1
- package/lib/view/invoicing/invoicingCreditNoteListView/invoicingCreditNoteListViewSelector.js +8 -2
- package/lib/view/invoicing/invoicingCreditNoteListView/invoicingCreditNoteListViewState.d.ts +0 -7
- package/lib/view/invoicing/invoicingCreditNoteListView/invoicingCreditNoteListViewState.js +1 -10
- package/lib/view/invoicing/invoicingCustomerDetailView/fetchInvoicingCustomerDetailPageEpic.js +2 -2
- package/lib/view/invoicing/invoicingCustomerDetailView/invoicingCustomerDetailViewSelector.js +1 -1
- package/lib/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewSelector.d.ts +3 -1
- package/lib/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewSelector.js +8 -2
- package/lib/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewState.d.ts +0 -7
- package/lib/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewState.js +1 -10
- package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewReducer.d.ts +1 -1
- package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewSelector.d.ts +3 -1
- package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewSelector.js +7 -2
- package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.d.ts +2 -9
- package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.js +2 -10
- package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewSelector.d.ts +7 -1
- package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewSelector.js +10 -2
- package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewState.d.ts +0 -7
- package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewState.js +1 -10
- package/lib/view/invoicing/invoicingTabHelper.d.ts +27 -0
- package/lib/view/invoicing/invoicingTabHelper.js +30 -0
- package/lib/view/invoicing/invoicingTransactionListView/epics/fetchInvoicingTransactionListPageEpic.js +2 -1
- package/lib/view/invoicing/invoicingTransactionListView/invoicingTransactionListViewReducer.d.ts +1 -1
- package/lib/view/invoicing/invoicingTransactionListView/invoicingTransactionListViewReducer.js +4 -4
- package/lib/view/invoicing/invoicingTransactionListView/invoicingTransactionListViewSelector.d.ts +8 -0
- package/lib/view/invoicing/invoicingTransactionListView/invoicingTransactionListViewSelector.js +11 -3
- package/lib/view/invoicing/invoicingTransactionListView/invoicingTransactionListViewState.d.ts +10 -10
- package/lib/view/invoicing/invoicingTransactionListView/invoicingTransactionListViewState.js +13 -10
- package/lib/view/invoicing/issueCreditNote/issueCreditNoteFormConfig.d.ts +0 -2
- package/lib/view/invoicing/issueCreditNote/issueCreditNoteFormConfig.js +2 -9
- package/lib/view/invoicing/issueCreditNote/issueCreditNotePayload.d.ts +2 -2
- package/lib/view/invoicing/issueCreditNote/issueCreditNotePayload.js +5 -1
- package/lib/view/invoicing/issueCreditNote/issueCreditNoteSelector.d.ts +3 -1
- package/lib/view/invoicing/issueCreditNote/issueCreditNoteSelector.js +4 -1
- package/lib/view/invoicing/issueCreditNote/issueCreditNoteState.d.ts +6 -0
- package/lib/view/invoicing/recordPayment/recordPaymentFormConfig.d.ts +0 -6
- package/lib/view/invoicing/recordPayment/recordPaymentFormConfig.js +1 -27
- package/lib/view/invoicing/recordPayment/recordPaymentSelector.d.ts +3 -2
- package/lib/view/invoicing/recordPayment/recordPaymentSelector.js +26 -6
- package/lib/view/invoicing/settingsView/settingsViewSelector.d.ts +12 -1
- package/lib/view/invoicing/settingsView/settingsViewSelector.js +8 -1
- package/lib/view/spendManagement/treasury/treasurySetUp/treasurySetupViewReducer.d.ts +1 -1
- package/lib/view/spendManagement/treasury/treasurySetUp/treasurySetupViewReducer.js +2 -68
- package/lib/view/spendManagement/treasury/treasurySetUp/treasurySetupViewState.d.ts +0 -3
- package/package.json +1 -1
- package/lib/entity/invoicing/coupon/couponConstants.d.ts +0 -11
- package/lib/entity/invoicing/coupon/couponConstants.js +0 -29
- package/lib/esm/entity/invoicing/coupon/couponConstants.js +0 -26
- package/lib/esm/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoIntroClosedByOutsideClickEpic.js +0 -18
- package/lib/esm/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoRemindMeLaterClickedEpic.js +0 -18
- package/lib/esm/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryVideoViewedEpic.js +0 -18
- package/lib/esm/view/zeniAccountsPromoCard/zeniAccountsPromoCardEpic.js +0 -16
- package/lib/esm/view/zeniAccountsPromoCard/zeniAccountsPromoCardPayload.js +0 -1
- package/lib/esm/view/zeniAccountsPromoCard/zeniAccountsPromoCardReducer.js +0 -60
- package/lib/esm/view/zeniAccountsPromoCard/zeniAccountsPromoCardSelector.js +0 -12
- package/lib/esm/view/zeniAccountsPromoCard/zeniAccountsPromoCardState.js +0 -1
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoIntroClosedByOutsideClickEpic.d.ts +0 -8
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoIntroClosedByOutsideClickEpic.js +0 -22
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoRemindMeLaterClickedEpic.d.ts +0 -8
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoRemindMeLaterClickedEpic.js +0 -22
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryVideoViewedEpic.d.ts +0 -8
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryVideoViewedEpic.js +0 -22
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardEpic.d.ts +0 -13
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardEpic.js +0 -20
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardPayload.d.ts +0 -11
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardPayload.js +0 -2
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardReducer.d.ts +0 -7
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardReducer.js +0 -64
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardSelector.d.ts +0 -12
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardSelector.js +0 -15
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardState.d.ts +0 -9
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardState.js +0 -2
package/lib/reducer.d.ts
CHANGED
|
@@ -280,7 +280,6 @@ import { VendorGlobalReviewViewState } from './view/vendorReviewView/vendorGloba
|
|
|
280
280
|
import { VendorTabViewState } from './view/vendorTabView/vendorTabViewState';
|
|
281
281
|
import { VendorTypeListState } from './view/vendorTypeList/vendorTypeListState';
|
|
282
282
|
import { ZeniAccStatementListState } from './view/zeniAccStatementList/zeniAccStatementList';
|
|
283
|
-
import { ZeniAccountsPromoCardState } from './view/zeniAccountsPromoCard/zeniAccountsPromoCardState';
|
|
284
283
|
import { ZeniOAuthViewState } from './view/zeniOAuthView/zeniOAuthState';
|
|
285
284
|
type EntitiesState = {
|
|
286
285
|
accountGroupState: AccountGroupState;
|
|
@@ -567,7 +566,6 @@ type ViewsState = {
|
|
|
567
566
|
zeniAccountDetailState: DepositAccountDetailState;
|
|
568
567
|
zeniAccountListState: ZeniAccountListState;
|
|
569
568
|
zeniAccountSetupViewState: ZeniAccountSetupViewState;
|
|
570
|
-
zeniAccountsPromoCardState: ZeniAccountsPromoCardState;
|
|
571
569
|
zeniAccStatementListState: ZeniAccStatementListState;
|
|
572
570
|
zeniOAuthViewState: ZeniOAuthViewState;
|
|
573
571
|
};
|
|
@@ -780,7 +778,6 @@ declare const reducers: import("redux").Reducer<import("redux").CombinedState<{
|
|
|
780
778
|
zeniAccountListState: ZeniAccountListState;
|
|
781
779
|
zeniAccountSetupViewState: ZeniAccountSetupViewState;
|
|
782
780
|
zeniAccStatementListState: ZeniAccStatementListState;
|
|
783
|
-
zeniAccountsPromoCardState: ZeniAccountsPromoCardState;
|
|
784
781
|
zeniOAuthViewState: ZeniOAuthViewState;
|
|
785
782
|
accountGroupState: AccountGroupState;
|
|
786
783
|
accountReconState: AccountReconState;
|
package/lib/reducer.js
CHANGED
|
@@ -321,7 +321,6 @@ const vendorGlobalReviewViewReducer_1 = __importStar(require("./view/vendorRevie
|
|
|
321
321
|
const vendorTabViewReducer_1 = __importStar(require("./view/vendorTabView/vendorTabViewReducer"));
|
|
322
322
|
const vendorTypeListReducer_1 = __importStar(require("./view/vendorTypeList/vendorTypeListReducer"));
|
|
323
323
|
const zeniAccStatementListReducer_1 = __importStar(require("./view/zeniAccStatementList/zeniAccStatementListReducer"));
|
|
324
|
-
const zeniAccountsPromoCardReducer_1 = __importStar(require("./view/zeniAccountsPromoCard/zeniAccountsPromoCardReducer"));
|
|
325
324
|
const zeniOAuthReducer_1 = __importStar(require("./view/zeniOAuthView/zeniOAuthReducer"));
|
|
326
325
|
// Note: Please maintain strict alphabetical order
|
|
327
326
|
const initialEntitiesState = {
|
|
@@ -611,7 +610,6 @@ const initialViewsState = {
|
|
|
611
610
|
zeniAccountListState: zeniAccountListReducer_1.initialState,
|
|
612
611
|
zeniAccountSetupViewState: zeniAccountSetupViewReducer_1.initialState,
|
|
613
612
|
zeniAccStatementListState: zeniAccStatementListReducer_1.initialState,
|
|
614
|
-
zeniAccountsPromoCardState: zeniAccountsPromoCardReducer_1.initialState,
|
|
615
613
|
zeniOAuthViewState: zeniOAuthReducer_1.initialState,
|
|
616
614
|
};
|
|
617
615
|
exports.initialRootState = {
|
|
@@ -907,7 +905,6 @@ const viewReducers = {
|
|
|
907
905
|
zeniAccountListState: zeniAccountListReducer_1.default,
|
|
908
906
|
zeniAccountSetupViewState: zeniAccountSetupViewReducer_1.default,
|
|
909
907
|
zeniAccStatementListState: zeniAccStatementListReducer_1.default,
|
|
910
|
-
zeniAccountsPromoCardState: zeniAccountsPromoCardReducer_1.default,
|
|
911
908
|
zeniOAuthViewState: zeniOAuthReducer_1.default,
|
|
912
909
|
};
|
|
913
910
|
const reducers = (0, redux_1.combineReducers)({
|
|
@@ -18,10 +18,8 @@ import { fetchOpEx } from '../opEx/opExReducer';
|
|
|
18
18
|
import { fetchRewardsPlan } from '../referralView/referralReducer';
|
|
19
19
|
import { fetchReimbursementCard } from '../reimbursementCard/reimbursementCardReducer';
|
|
20
20
|
import { fetchRevenue } from '../revenue/revenueReducer';
|
|
21
|
-
import { fetchTreasuryFunds } from '../spendManagement/treasury/treasurySetUp/treasurySetupViewReducer';
|
|
22
21
|
import { fetchTasksCard } from '../tasksCard/tasksCardReducer';
|
|
23
22
|
import { fetchTopEx } from '../topEx/topExReducer';
|
|
24
|
-
import { fetchZeniAccountsPromoCard } from '../zeniAccountsPromoCard/zeniAccountsPromoCardReducer';
|
|
25
23
|
import { fetchDashboard } from './dashboardReducer';
|
|
26
|
-
export type ActionType = ReturnType<typeof fetchDashboard> | ReturnType<typeof fetchAllTenants> | ReturnType<typeof fetchCardBalance> | ReturnType<typeof fetchCashBalance> | ReturnType<typeof fetchOpEx> | ReturnType<typeof fetchRevenue> | ReturnType<typeof fetchNetBurnOrIncome> | ReturnType<typeof fetchNetBurnOrIncomeStoryCard> | ReturnType<typeof fetchTopEx> | ReturnType<typeof fetchCashPosition> | ReturnType<typeof fetchCashInCashOut> | ReturnType<typeof fetchInsightsCard> | ReturnType<typeof fetchCompanyPassportView> | ReturnType<typeof fetchTasksCard> | ReturnType<typeof fetchBillPayCard> | ReturnType<typeof fetchApAging> | ReturnType<typeof fetchArAging> | ReturnType<typeof fetchReimbursementCard> | ReturnType<typeof
|
|
24
|
+
export type ActionType = ReturnType<typeof fetchDashboard> | ReturnType<typeof fetchAllTenants> | ReturnType<typeof fetchCardBalance> | ReturnType<typeof fetchCashBalance> | ReturnType<typeof fetchOpEx> | ReturnType<typeof fetchRevenue> | ReturnType<typeof fetchNetBurnOrIncome> | ReturnType<typeof fetchNetBurnOrIncomeStoryCard> | ReturnType<typeof fetchTopEx> | ReturnType<typeof fetchCashPosition> | ReturnType<typeof fetchCashInCashOut> | ReturnType<typeof fetchInsightsCard> | ReturnType<typeof fetchCompanyPassportView> | ReturnType<typeof fetchTasksCard> | ReturnType<typeof fetchBillPayCard> | ReturnType<typeof fetchApAging> | ReturnType<typeof fetchArAging> | ReturnType<typeof fetchReimbursementCard> | ReturnType<typeof fetchRewardsPlan> | ReturnType<typeof fetchMonthEndCloseChecks> | ReturnType<typeof fetchDashboardLayout>;
|
|
27
25
|
export declare const fetchDashboardEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => import("rxjs").Observable<ActionType>;
|
|
@@ -28,10 +28,8 @@ const referralReducer_1 = require("../referralView/referralReducer");
|
|
|
28
28
|
const reimbursementCardReducer_1 = require("../reimbursementCard/reimbursementCardReducer");
|
|
29
29
|
const revenueReducer_1 = require("../revenue/revenueReducer");
|
|
30
30
|
const revenueSelector_1 = require("../revenue/revenueSelector");
|
|
31
|
-
const treasurySetupViewReducer_1 = require("../spendManagement/treasury/treasurySetUp/treasurySetupViewReducer");
|
|
32
31
|
const tasksCardReducer_1 = require("../tasksCard/tasksCardReducer");
|
|
33
32
|
const topExReducer_1 = require("../topEx/topExReducer");
|
|
34
|
-
const zeniAccountsPromoCardReducer_1 = require("../zeniAccountsPromoCard/zeniAccountsPromoCardReducer");
|
|
35
33
|
const dashboardReducer_1 = require("./dashboardReducer");
|
|
36
34
|
const fetchDashboardEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(dashboardReducer_1.fetchDashboard.match), (0, operators_1.switchMap)((action) => {
|
|
37
35
|
const { userId, companyId, fetchFullReport, cacheOverride, excludeResources, tenantId, } = action.payload;
|
|
@@ -69,9 +67,6 @@ const fetchDashboardEpic = (actions$, state$) => actions$.pipe((0, operators_1.f
|
|
|
69
67
|
if (excludeResources.includes('accounts_receivable_aging') === false) {
|
|
70
68
|
actions.push((0, arAgingReducer_1.fetchArAging)(arAgingDate));
|
|
71
69
|
}
|
|
72
|
-
if (excludeResources.includes('zeni_accounts_promo_card') === false) {
|
|
73
|
-
actions.push((0, zeniAccountsPromoCardReducer_1.fetchZeniAccountsPromoCard)());
|
|
74
|
-
}
|
|
75
70
|
if (!isInvestorBanker) {
|
|
76
71
|
actions.push((0, billPayCardReducer_1.fetchBillPayCard)());
|
|
77
72
|
}
|
|
@@ -88,9 +83,6 @@ const fetchDashboardEpic = (actions$, state$) => actions$.pipe((0, operators_1.f
|
|
|
88
83
|
refreshViewInBackground: false,
|
|
89
84
|
}));
|
|
90
85
|
}
|
|
91
|
-
if (excludeResources.includes('treasury_promo_card') === false) {
|
|
92
|
-
actions.push((0, treasurySetupViewReducer_1.fetchTreasuryFunds)());
|
|
93
|
-
}
|
|
94
86
|
return (0, rxjs_1.from)(actions);
|
|
95
87
|
}
|
|
96
88
|
else {
|
|
@@ -167,11 +159,6 @@ const fetchDashboardEpic = (actions$, state$) => actions$.pipe((0, operators_1.f
|
|
|
167
159
|
excludeResources.includes('accounts_receivable_aging') === false) {
|
|
168
160
|
fetchActions.push((0, arAgingReducer_1.fetchArAging)(arAgingDate));
|
|
169
161
|
}
|
|
170
|
-
if (state.zeniAccountsPromoCardState.fetchState !== 'In-Progress' &&
|
|
171
|
-
!state.zeniAccountsPromoCardState.hasValidState() &&
|
|
172
|
-
excludeResources.includes('zeni_accounts_promo_card') === false) {
|
|
173
|
-
fetchActions.push((0, zeniAccountsPromoCardReducer_1.fetchZeniAccountsPromoCard)());
|
|
174
|
-
}
|
|
175
162
|
if (state.billPayCardState.fetchState !== 'In-Progress' &&
|
|
176
163
|
!state.billPayCardState.hasValidState() &&
|
|
177
164
|
!isInvestorBanker) {
|
|
@@ -200,13 +187,6 @@ const fetchDashboardEpic = (actions$, state$) => actions$.pipe((0, operators_1.f
|
|
|
200
187
|
refreshViewInBackground: false,
|
|
201
188
|
}));
|
|
202
189
|
}
|
|
203
|
-
if (state.treasurySetupViewState.treasuryFundsDetails.fetchStatus
|
|
204
|
-
.fetchState !== 'In-Progress' &&
|
|
205
|
-
state.treasurySetupViewState.treasuryFundsDetails.fetchStatus
|
|
206
|
-
.fetchState !== 'Completed' &&
|
|
207
|
-
excludeResources.includes('treasury_promo_card') === false) {
|
|
208
|
-
fetchActions.push((0, treasurySetupViewReducer_1.fetchTreasuryFunds)());
|
|
209
|
-
}
|
|
210
190
|
return (0, rxjs_1.from)(fetchActions);
|
|
211
191
|
}
|
|
212
192
|
}));
|
|
@@ -7,6 +7,6 @@ export declare const fetchDashboard: import("@reduxjs/toolkit").ActionCreatorWit
|
|
|
7
7
|
fetchFullReport: any;
|
|
8
8
|
cacheOverride: any;
|
|
9
9
|
excludeResources: ("cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "operating_expenses_by_projects" | "revenue" | "revenue_by_classes" | "revenue_by_projects" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "net_burn_or_income_by_projects" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "balance_sheet_by_classes" | "balance_sheet_by_projects" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation" | "transfer_accounts" | "credit_card_transfer_accounts")[];
|
|
10
|
-
}, "dashboard/fetchDashboard", never, never>,
|
|
10
|
+
}, "dashboard/fetchDashboard", never, never>, clearDashboard: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"dashboard/clearDashboard">;
|
|
11
11
|
declare const _default: import("redux").Reducer<DashboardState>;
|
|
12
12
|
export default _default;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.clearDashboard = exports.
|
|
4
|
+
exports.clearDashboard = exports.fetchDashboard = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const rootActions_1 = require("../../rootActions");
|
|
7
7
|
const zeniDayJS_1 = require("../../zeniDayJS");
|
|
8
|
-
const treasurySetupViewReducer_1 = require("../spendManagement/treasury/treasurySetUp/treasurySetupViewReducer");
|
|
9
8
|
exports.initialState = {
|
|
10
|
-
isTreasuryVideoClosed: false,
|
|
11
9
|
lastFetchRequestTime: undefined,
|
|
12
10
|
};
|
|
13
11
|
const dashboard = (0, toolkit_1.createSlice)({
|
|
@@ -31,25 +29,15 @@ const dashboard = (0, toolkit_1.createSlice)({
|
|
|
31
29
|
};
|
|
32
30
|
},
|
|
33
31
|
},
|
|
34
|
-
updateTreasuryVideoClosed(draft) {
|
|
35
|
-
draft.isTreasuryVideoClosed = true;
|
|
36
|
-
},
|
|
37
32
|
clearDashboard(draft) {
|
|
38
33
|
Object.assign(draft, exports.initialState);
|
|
39
34
|
},
|
|
40
35
|
},
|
|
41
36
|
extraReducers: (builder) => {
|
|
42
|
-
builder
|
|
43
|
-
.addCase(treasurySetupViewReducer_1.updateTreasuryPromoRemindMeLaterClicked, (draft) => {
|
|
44
|
-
draft.isTreasuryVideoClosed = true;
|
|
45
|
-
})
|
|
46
|
-
.addCase(treasurySetupViewReducer_1.updateTreasuryPromoIntroClosedByOutsideClick, (draft) => {
|
|
47
|
-
draft.isTreasuryVideoClosed = true;
|
|
48
|
-
});
|
|
49
37
|
builder.addCase(rootActions_1.clearAll, (draft) => {
|
|
50
38
|
Object.assign(draft, exports.initialState);
|
|
51
39
|
});
|
|
52
40
|
},
|
|
53
41
|
});
|
|
54
|
-
_a = dashboard.actions, exports.fetchDashboard = _a.fetchDashboard, exports.
|
|
42
|
+
_a = dashboard.actions, exports.fetchDashboard = _a.fetchDashboard, exports.clearDashboard = _a.clearDashboard;
|
|
55
43
|
exports.default = dashboard.reducer;
|
|
@@ -6,7 +6,6 @@ import { CardType } from './dashboardState';
|
|
|
6
6
|
export interface DashboardReport extends SelectorReport {
|
|
7
7
|
cardsForDashboardUI: CardType[];
|
|
8
8
|
cardsOrdered: CardType[];
|
|
9
|
-
isTreasuryVideoClosed: boolean;
|
|
10
9
|
reportsInOrder: (SelectorReport | SelectorView)[];
|
|
11
10
|
tenantsOrdered: TenantsOrdered;
|
|
12
11
|
currentTenant?: Tenant;
|
|
@@ -25,7 +25,6 @@ const reimbursementCardSelector_1 = require("../reimbursementCard/reimbursementC
|
|
|
25
25
|
const revenueSelector_1 = require("../revenue/revenueSelector");
|
|
26
26
|
const tasksCardSelector_1 = require("../tasksCard/tasksCardSelector");
|
|
27
27
|
const topExSelector_1 = require("../topEx/topExSelector");
|
|
28
|
-
const zeniAccountsPromoCardSelector_1 = require("../zeniAccountsPromoCard/zeniAccountsPromoCardSelector");
|
|
29
28
|
const getNetBurnOrIncomeForLast4Periods = (state) => {
|
|
30
29
|
return (0, netBurnOrIncomeSelector_1.getNetBurnOrIncomeReport)(state.accountState, state.accountGroupState, state.sectionAccountsViewState, state.netBurnOrIncomeState, state.forecastState, state.forecastListState, (0, coaBalancesFilter_1.newBalancesFilter)(state.netBurnOrIncomeState.netBurnOrIncome.firstMonthOfFY, state.netBurnOrIncomeState.uiState.timeframe, 4, undefined, 'ascending_date', state.netBurnOrIncomeState.uiState.selectedAdditionalBalances));
|
|
31
30
|
};
|
|
@@ -42,10 +41,10 @@ const tenantSelector = (0, toolkit_1.createSelector)(tenantSelector_1.getTenants
|
|
|
42
41
|
tenantsOrdered,
|
|
43
42
|
currentTenant,
|
|
44
43
|
}));
|
|
45
|
-
exports.getDashboard = (0, toolkit_1.createSelector)(tenantSelector, cardBalanceSelector_1.getCardBalance, cashBalanceSelector_1.getCashBalance, getOperatingExpensesForLast5Periods, getRevenueForLast4Periods, topExSelector_1.getTop6Expenses, getNetBurnOrIncomeForLast4Periods, getNetBurnOrIncomeStoryCard, getCashPositionLast5Periods, getCashInCashOutLast4Periods, insightsCardSelector_1.getInsights, companyPassportViewSelector_1.getCompanyPassportView, tasksCardSelector_1.getTasksCardReport, billPayCardSelector_1.getBillPayCardReport, reimbursementCardSelector_1.getReimbursementCardReport, apAgingSelector, arAgingSelector,
|
|
44
|
+
exports.getDashboard = (0, toolkit_1.createSelector)(tenantSelector, cardBalanceSelector_1.getCardBalance, cashBalanceSelector_1.getCashBalance, getOperatingExpensesForLast5Periods, getRevenueForLast4Periods, topExSelector_1.getTop6Expenses, getNetBurnOrIncomeForLast4Periods, getNetBurnOrIncomeStoryCard, getCashPositionLast5Periods, getCashInCashOutLast4Periods, insightsCardSelector_1.getInsights, companyPassportViewSelector_1.getCompanyPassportView, tasksCardSelector_1.getTasksCardReport, billPayCardSelector_1.getBillPayCardReport, reimbursementCardSelector_1.getReimbursementCardReport, apAgingSelector, arAgingSelector, referralSelector_1.getRewardsPlanCard, dashboardLayoutSelector_1.getDashboardCardsOrdered, (state) => {
|
|
46
45
|
const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
|
|
47
46
|
return (0, monthEndCloseChecksViewSelector_1.getMonthEndCloseChecksViewByTenantId)(state, currentTenant.tenantId);
|
|
48
|
-
}, (state) => state.tenantState, (_state, additionalExcludedReports) => additionalExcludedReports, (
|
|
47
|
+
}, (state) => state.tenantState, (_state, additionalExcludedReports) => additionalExcludedReports, (tenants, cardBalance, cashBalance, opEx, revenue, topEx, netBurnOrIncome, netBurnOrIncomeStoryCard, cashPosition, cashInCashOut, insightsView, companyPassportView, tasksCard, billPayCard, reimbursementCard, apAgingReport, arAgingReport, rewardsPlanCard, cards, monthEndCloseChecksView, tenantState, additionalExcludedReports) => {
|
|
49
48
|
const isReimbursementFeatureEnabled = tenants.currentTenant.company?.featuresActivationInfo
|
|
50
49
|
.isReimbursementFeatureEnabled;
|
|
51
50
|
const isBillPayFeatureEnabled = tenants.currentTenant.company?.featuresActivationInfo
|
|
@@ -214,9 +213,6 @@ exports.getDashboard = (0, toolkit_1.createSelector)(tenantSelector, cardBalance
|
|
|
214
213
|
if (isReimbursementFeatureEnabled === true && isAdmin) {
|
|
215
214
|
reportsInOrder.push(reimbursementCard);
|
|
216
215
|
}
|
|
217
|
-
if (additionalExcludedReports.includes('zeni_accounts_promo_card') === false) {
|
|
218
|
-
reportsInOrder.push(zeniAccountsPromoCard);
|
|
219
|
-
}
|
|
220
216
|
if (additionalExcludedReports.includes('rewards_card') === false) {
|
|
221
217
|
reportsInOrder.push(rewardsPlanCard);
|
|
222
218
|
}
|
|
@@ -232,6 +228,5 @@ exports.getDashboard = (0, toolkit_1.createSelector)(tenantSelector, cardBalance
|
|
|
232
228
|
...tenants,
|
|
233
229
|
reportsInOrder,
|
|
234
230
|
cardsForDashboardUI: cardsCopy,
|
|
235
|
-
isTreasuryVideoClosed,
|
|
236
231
|
};
|
|
237
232
|
});
|
|
@@ -2,6 +2,5 @@ import { ReportID } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
|
2
2
|
import { ZeniDate } from '../../zeniDayJS';
|
|
3
3
|
export type CardType = ReportID | 'information_card' | 'zeni_promo_card' | 'expense_automation_card' | 'rewards_card';
|
|
4
4
|
export interface DashboardState {
|
|
5
|
-
isTreasuryVideoClosed: boolean;
|
|
6
5
|
lastFetchRequestTime?: ZeniDate;
|
|
7
6
|
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
2
|
+
import type { AuditLogEntityRouteOption, AuditLogListSortFieldOption } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
2
3
|
import { RootState } from '../../../reducer';
|
|
3
4
|
import { InvoicingAuditEntry } from './auditViewPayload';
|
|
4
5
|
import { InvoicingAuditFilters } from './auditViewState';
|
|
5
6
|
export interface InvoicingAuditView extends SelectorView {
|
|
7
|
+
/** Config-owned; folded in so the screen reads one selector. */
|
|
8
|
+
auditLogEntityRouteOptions: AuditLogEntityRouteOption[];
|
|
9
|
+
auditLogListSortFieldOptions: AuditLogListSortFieldOption[];
|
|
6
10
|
filters: InvoicingAuditFilters;
|
|
7
11
|
hasMore: boolean;
|
|
8
12
|
items: InvoicingAuditEntry[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getInvoicingAuditView = void 0;
|
|
4
|
+
const invoicingConfigViewSelector_1 = require("../invoicingConfigView/invoicingConfigViewSelector");
|
|
4
5
|
/**
|
|
5
6
|
* Single bundled view for the invoicing audit log — consumers read only this.
|
|
6
7
|
* Carries the log `items`, pagination (`nextCursor` + derived `hasMore`), the
|
|
@@ -8,7 +9,10 @@ exports.getInvoicingAuditView = void 0;
|
|
|
8
9
|
*/
|
|
9
10
|
const getInvoicingAuditView = (state) => {
|
|
10
11
|
const auditState = state.invoicingAuditViewState;
|
|
12
|
+
const { auditLogEntityRouteOptions, auditLogListSortFieldOptions } = (0, invoicingConfigViewSelector_1.getInvoicingConfigView)(state);
|
|
11
13
|
return {
|
|
14
|
+
auditLogEntityRouteOptions,
|
|
15
|
+
auditLogListSortFieldOptions,
|
|
12
16
|
filters: auditState.filters,
|
|
13
17
|
hasMore: auditState.nextCursor != null,
|
|
14
18
|
items: auditState.items,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FetchStateAndError } from '../../../commonStateTypes/common';
|
|
2
2
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
3
|
import { InvoicingCoupon } from '../../../entity/invoicing/coupon/couponState';
|
|
4
|
-
import { InvoicingListCounts } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
4
|
+
import { InvoicingDiscountLifecycleActionOption, InvoicingListCounts, InvoicingNamedOption } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
5
5
|
import { RootState } from '../../../reducer';
|
|
6
6
|
import { InvoicingListSort } from '../invoicingApiHelper';
|
|
7
7
|
import { InvoicingCouponColumnConfig, InvoicingCouponFilters, InvoicingCouponTabId } from './couponViewState';
|
|
@@ -17,8 +17,12 @@ export interface InvoicingCouponListView extends SelectorView {
|
|
|
17
17
|
count: InvoicingListCounts;
|
|
18
18
|
countsFetchState: FetchStateAndError;
|
|
19
19
|
coupons: InvoicingCoupon[];
|
|
20
|
+
/** Config-owned; folded in so the screen reads one selector. */
|
|
21
|
+
discountLifecycleActionOptions: InvoicingDiscountLifecycleActionOption[];
|
|
20
22
|
filters: InvoicingCouponFilters;
|
|
21
23
|
nextCursor: string | null;
|
|
24
|
+
/** Config status/type list; the page labels tabs and badges from it. */
|
|
25
|
+
statusOptions: InvoicingNamedOption[];
|
|
22
26
|
tabIds: InvoicingCouponTabId[];
|
|
23
27
|
sort?: InvoicingListSort;
|
|
24
28
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getInvoicingCouponListView = exports.getInvoicingCouponCounts = exports.getInvoicingCouponListFilters = exports.getInvoicingCouponListHasMore = exports.getInvoicingCouponListNextCursor = exports.getInvoicingCouponListFetchState = exports.getInvoicingCouponListItems = void 0;
|
|
4
4
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
5
|
+
const invoicingTabHelper_1 = require("../invoicingTabHelper");
|
|
5
6
|
const couponViewState_1 = require("./couponViewState");
|
|
6
7
|
const getInvoicingCouponListItems = (state) => state.invoicingCouponViewState.ids
|
|
7
8
|
.map((id) => state.invoicingCouponState.couponByID[id])
|
|
@@ -26,19 +27,22 @@ exports.getInvoicingCouponCounts = getInvoicingCouponCounts;
|
|
|
26
27
|
* array (and the wrapping view object) keep referential identity until the
|
|
27
28
|
* coupon entity slice or the list-view slice actually change.
|
|
28
29
|
*/
|
|
29
|
-
exports.getInvoicingCouponListView = (0, toolkit_1.createSelector)((state) => state.invoicingCouponState, (state) => state.invoicingCouponViewState, (couponState, listViewState) => {
|
|
30
|
+
exports.getInvoicingCouponListView = (0, toolkit_1.createSelector)((state) => state.invoicingCouponState, (state) => state.invoicingCouponViewState, (state) => state.invoicingConfigViewState.discountStatusOptions, (state) => state.invoicingConfigViewState.discountLifecycleActionOptions, (couponState, listViewState, statusOptions, discountLifecycleActionOptions) => {
|
|
30
31
|
const { activeTab } = listViewState;
|
|
31
32
|
const allCoupons = listViewState.ids
|
|
32
33
|
.map((id) => couponState.couponByID[id])
|
|
33
34
|
.filter((item) => item != null);
|
|
34
35
|
// The list API ignores `status`, so it returns every status; filter to the
|
|
35
|
-
// active tab client-side. 'all' shows everything
|
|
36
|
-
//
|
|
36
|
+
// active tab client-side. 'all' shows everything and 'inactive' is the
|
|
37
|
+
// FE-derived composite of every non-active status (undefined included);
|
|
38
|
+
// every other tab is a real backend status and matches exactly — without
|
|
39
|
+
// that, config-supplied tabs like `expired` and `archived` would each show
|
|
40
|
+
// the whole non-active set.
|
|
37
41
|
const coupons = activeTab === 'all'
|
|
38
42
|
? allCoupons
|
|
39
|
-
:
|
|
40
|
-
? coupon.status
|
|
41
|
-
: coupon.status
|
|
43
|
+
: activeTab === 'inactive'
|
|
44
|
+
? allCoupons.filter((coupon) => coupon.status !== 'active')
|
|
45
|
+
: allCoupons.filter((coupon) => coupon.status === activeTab);
|
|
42
46
|
return {
|
|
43
47
|
activeTab,
|
|
44
48
|
columns: couponViewState_1.INVOICING_COUPON_COLUMNS,
|
|
@@ -47,7 +51,13 @@ exports.getInvoicingCouponListView = (0, toolkit_1.createSelector)((state) => st
|
|
|
47
51
|
countsFetchState: listViewState.countsFetchState,
|
|
48
52
|
filters: listViewState.filters,
|
|
49
53
|
nextCursor: listViewState.nextCursor,
|
|
50
|
-
|
|
54
|
+
discountLifecycleActionOptions,
|
|
55
|
+
statusOptions,
|
|
56
|
+
tabIds: (0, invoicingTabHelper_1.invoicingTabIdsFromConfig)({
|
|
57
|
+
allTabIds: couponViewState_1.ALL_INVOICING_COUPON_TAB_IDS,
|
|
58
|
+
localTabIds: ['inactive'],
|
|
59
|
+
statusOptions,
|
|
60
|
+
}),
|
|
51
61
|
fetchState: listViewState.fetchState,
|
|
52
62
|
error: listViewState.error,
|
|
53
63
|
sort: listViewState.sort,
|
|
@@ -22,13 +22,6 @@ export declare const INVOICING_COUPON_COLUMNS: InvoicingCouponColumnConfig[];
|
|
|
22
22
|
export declare const ALL_INVOICING_COUPON_TAB_IDS: readonly ["all", "active", "inactive"];
|
|
23
23
|
export declare const toInvoicingCouponTabId: (v: string) => "active" | "inactive" | "all";
|
|
24
24
|
export type InvoicingCouponTabId = ReturnType<typeof toInvoicingCouponTabId>;
|
|
25
|
-
/**
|
|
26
|
-
* Ordered filter-tab id set owned by CES so the coupon/discount-list tabs live
|
|
27
|
-
* next to the model rather than being hardcoded in web-components. Tab labels
|
|
28
|
-
* and the per-tab count lookup stay in the view layer; this only carries the id
|
|
29
|
-
* set and display order.
|
|
30
|
-
*/
|
|
31
|
-
export declare const INVOICING_COUPON_TABS: InvoicingCouponTabId[];
|
|
32
25
|
export interface InvoicingCouponViewState extends FetchedState {
|
|
33
26
|
/** Selected status tab (CES-owned so it persists across page revisits). */
|
|
34
27
|
activeTab: InvoicingCouponTabId;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.toInvoicingCouponTabId = exports.ALL_INVOICING_COUPON_TAB_IDS = exports.INVOICING_COUPON_COLUMNS = exports.toInvoicingCouponSortKey = exports.ALL_INVOICING_COUPON_SORT_KEYS = void 0;
|
|
4
4
|
const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
|
|
5
5
|
exports.ALL_INVOICING_COUPON_SORT_KEYS = [
|
|
6
6
|
'coupon_id',
|
|
@@ -33,12 +33,3 @@ exports.ALL_INVOICING_COUPON_TAB_IDS = [
|
|
|
33
33
|
];
|
|
34
34
|
const toInvoicingCouponTabId = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_INVOICING_COUPON_TAB_IDS);
|
|
35
35
|
exports.toInvoicingCouponTabId = toInvoicingCouponTabId;
|
|
36
|
-
/**
|
|
37
|
-
* Ordered filter-tab id set owned by CES so the coupon/discount-list tabs live
|
|
38
|
-
* next to the model rather than being hardcoded in web-components. Tab labels
|
|
39
|
-
* and the per-tab count lookup stay in the view layer; this only carries the id
|
|
40
|
-
* set and display order.
|
|
41
|
-
*/
|
|
42
|
-
exports.INVOICING_COUPON_TABS = [
|
|
43
|
-
...exports.ALL_INVOICING_COUPON_TAB_IDS,
|
|
44
|
-
];
|
|
@@ -18,10 +18,13 @@ const localDataToCreateCreditNotePayload = (localData) => {
|
|
|
18
18
|
lineItem.unit_amount > 0);
|
|
19
19
|
const reasonCode = localData.reasonCode.trim();
|
|
20
20
|
const referenceInvoiceId = localData.referenceInvoiceId.trim();
|
|
21
|
+
// Optional-chained: a draft persisted before this field existed has no
|
|
22
|
+
// `type`, and the draft survives navigation.
|
|
23
|
+
const type = localData.type?.trim() ?? '';
|
|
21
24
|
return {
|
|
22
25
|
customer_id: localData.customerId,
|
|
23
26
|
line_items: lineItems,
|
|
24
|
-
type
|
|
27
|
+
...(type !== '' ? { type } : {}),
|
|
25
28
|
...(reasonCode !== '' ? { reason_code: reasonCode } : {}),
|
|
26
29
|
...(referenceInvoiceId !== ''
|
|
27
30
|
? { reference_invoice_id: referenceInvoiceId }
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
|
+
import { InvoicingNamedOption } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
3
4
|
import { RootState } from '../../../reducer';
|
|
4
5
|
import { CreateCreditNoteFormLocalData } from './createCreditNoteState';
|
|
5
6
|
export interface InvoicingCreateCreditNoteView extends SelectorView {
|
|
@@ -8,6 +9,7 @@ export interface InvoicingCreateCreditNoteView extends SelectorView {
|
|
|
8
9
|
export declare const getCreateCreditNoteView: (state: RootState) => InvoicingCreateCreditNoteView;
|
|
9
10
|
export interface CreateCreditNoteFormView extends SelectorView {
|
|
10
11
|
localData: CreateCreditNoteFormLocalData;
|
|
11
|
-
|
|
12
|
+
reasonCodeOptions: InvoicingNamedOption[];
|
|
13
|
+
typeOptions: InvoicingNamedOption[];
|
|
12
14
|
}
|
|
13
15
|
export declare const getCreateCreditNoteFormView: (state: RootState) => CreateCreditNoteFormView;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getCreateCreditNoteFormView = exports.getCreateCreditNoteView = void 0;
|
|
4
|
-
const
|
|
4
|
+
const invoicingConfigViewSelector_1 = require("../invoicingConfigView/invoicingConfigViewSelector");
|
|
5
5
|
const getCreateCreditNoteView = (state) => {
|
|
6
6
|
const { createdCreditNoteId, error, fetchState } = state.invoicingCreateCreditNoteState;
|
|
7
7
|
return {
|
|
@@ -14,9 +14,11 @@ const getCreateCreditNoteView = (state) => {
|
|
|
14
14
|
exports.getCreateCreditNoteView = getCreateCreditNoteView;
|
|
15
15
|
const getCreateCreditNoteFormView = (state) => {
|
|
16
16
|
const { draft, error, fetchState } = state.invoicingCreateCreditNoteState;
|
|
17
|
+
const { creditNoteReasonCodeOptions, creditNoteTypeOptions } = (0, invoicingConfigViewSelector_1.getInvoicingConfigView)(state);
|
|
17
18
|
return {
|
|
18
19
|
localData: draft,
|
|
19
|
-
|
|
20
|
+
reasonCodeOptions: creditNoteReasonCodeOptions,
|
|
21
|
+
typeOptions: creditNoteTypeOptions,
|
|
20
22
|
error,
|
|
21
23
|
fetchState,
|
|
22
24
|
version: 1.0,
|
|
@@ -11,6 +11,12 @@ export interface CreateCreditNoteFormLocalData {
|
|
|
11
11
|
lineItems: CreateCreditNoteLineItemDraft[];
|
|
12
12
|
reasonCode: string;
|
|
13
13
|
referenceInvoiceId: string;
|
|
14
|
+
/**
|
|
15
|
+
* Credit-note type code from `credit_note_type_options`. Empty until the user
|
|
16
|
+
* picks one; the payload then omits it and lets the backend default, rather
|
|
17
|
+
* than the client asserting `adjustment` for every credit note as it used to.
|
|
18
|
+
*/
|
|
19
|
+
type: string;
|
|
14
20
|
}
|
|
15
21
|
export interface CreateCreditNoteState extends FetchedState {
|
|
16
22
|
draft: CreateCreditNoteFormLocalData;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
|
-
import { InvoicingNamedOptionsByKey } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
3
|
+
import { InvoicingNamedOption, InvoicingNamedOptionsByKey } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
4
4
|
import { InvoicingPlan } from '../../../entity/invoicing/plan/planState';
|
|
5
5
|
import { RootState } from '../../../reducer';
|
|
6
6
|
import { InvoicingCatalogItemKind } from '../invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewState';
|
|
@@ -32,13 +32,13 @@ export interface InvoicingCatalogItemFormView extends SelectorView {
|
|
|
32
32
|
applicableItemOptions: ApplicableCatalogItemOption[];
|
|
33
33
|
localData: InvoicingCatalogItemFormLocalData;
|
|
34
34
|
mode: 'create' | 'edit';
|
|
35
|
-
|
|
35
|
+
periodUnitOptions: InvoicingNamedOption[];
|
|
36
36
|
pricingModelValues: readonly string[];
|
|
37
37
|
prorationValues: readonly string[];
|
|
38
38
|
tierTypeValues: readonly string[];
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
trialEndActionOptions: InvoicingNamedOption[];
|
|
40
|
+
trialUnitOptions: InvoicingNamedOption[];
|
|
41
|
+
typeOptions: InvoicingNamedOption[];
|
|
42
42
|
/**
|
|
43
43
|
* Backend tier-type choices per pricing model. Folded in here rather than left
|
|
44
44
|
* for the screen to pull off `getInvoicingConfigView` itself, so the form wires
|
|
@@ -54,19 +54,20 @@ const getInvoicingCatalogItemFormView = (state, id) => {
|
|
|
54
54
|
const applicableItemOptions = id != null
|
|
55
55
|
? allApplicableItemOptions.filter((option) => option.id !== id)
|
|
56
56
|
: allApplicableItemOptions;
|
|
57
|
+
const { billingPeriodUnitOptions, catalogItemTypeOptions, catalogTierTypeOptionsByPricingModel, catalogTrialEndActionOptions, catalogTrialUnitOptions, } = (0, invoicingConfigViewSelector_1.getInvoicingConfigView)(state);
|
|
57
58
|
return {
|
|
58
59
|
applicabilityValues: invoicingCatalogItemFormConfig_1.INVOICING_CATALOG_APPLICABILITY_VALUES,
|
|
59
60
|
applicableItemOptions,
|
|
60
61
|
localData,
|
|
61
62
|
mode: id != null ? 'edit' : 'create',
|
|
62
|
-
|
|
63
|
+
periodUnitOptions: billingPeriodUnitOptions,
|
|
63
64
|
pricingModelValues: invoicingCatalogItemFormConfig_1.INVOICING_CATALOG_PRICING_MODEL_VALUES,
|
|
64
65
|
prorationValues: invoicingCatalogItemFormConfig_1.INVOICING_CATALOG_PRORATION_VALUES,
|
|
65
66
|
tierTypeValues: invoicingCatalogItemFormConfig_1.INVOICING_CATALOG_TIER_TYPE_VALUES,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
catalogTierTypeOptionsByPricingModel
|
|
67
|
+
trialEndActionOptions: catalogTrialEndActionOptions,
|
|
68
|
+
trialUnitOptions: catalogTrialUnitOptions,
|
|
69
|
+
typeOptions: catalogItemTypeOptions,
|
|
70
|
+
catalogTierTypeOptionsByPricingModel,
|
|
70
71
|
kind,
|
|
71
72
|
plan,
|
|
72
73
|
savedItemId,
|
package/lib/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogItemFormConfig.d.ts
CHANGED
|
@@ -2,15 +2,12 @@ import { InvoicingPlan } from '../../../entity/invoicing/plan/planState';
|
|
|
2
2
|
import { InvoicingProduct } from '../../../entity/invoicing/product/productState';
|
|
3
3
|
import { InvoicingCatalogItemFormLocalData, InvoicingCatalogItemFormSubFamily, InvoicingCatalogItemFormTier } from './editInvoicingCatalogItemDetailViewState';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* Value sets the catalog item form still owns locally: the backend has no enum
|
|
6
|
+
* for pricing model, tier type, proration or applicability yet, so these stay
|
|
7
|
+
* here until it does. Everything else on this form comes from `/1.0/config`.
|
|
7
8
|
*/
|
|
8
|
-
export declare const INVOICING_CATALOG_TYPE_VALUES: readonly ["plan", "addon", "charge"];
|
|
9
|
-
export declare const INVOICING_CATALOG_PERIOD_UNIT_VALUES: readonly ["day", "week", "month", "year"];
|
|
10
9
|
export declare const INVOICING_CATALOG_PRICING_MODEL_VALUES: readonly ["flat_fee", "per_unit", "tiered", "volume", "stairstep"];
|
|
11
10
|
export declare const INVOICING_CATALOG_TIER_TYPE_VALUES: readonly ["per_unit", "flat_fee", "package"];
|
|
12
|
-
export declare const INVOICING_CATALOG_TRIAL_UNIT_VALUES: readonly ["day", "month"];
|
|
13
|
-
export declare const INVOICING_CATALOG_TRIAL_END_ACTION_VALUES: readonly ["site_default", "activate_subscription", "cancel_subscription"];
|
|
14
11
|
export declare const INVOICING_CATALOG_PRORATION_VALUES: readonly ["site_default", "partial_term", "full_term"];
|
|
15
12
|
export declare const INVOICING_CATALOG_APPLICABILITY_VALUES: readonly ["all", "restricted"];
|
|
16
13
|
export declare const isTieredCatalogPricingModel: (model: string) => boolean;
|
package/lib/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogItemFormConfig.js
CHANGED
|
@@ -1,21 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.entityToInvoicingCatalogItemFormLocalData = exports.initialInvoicingCatalogItemFormLocalData = exports.invoicingProductToCatalogItemFormSubFamily = exports.blankInvoicingCatalogSubFamily = exports.blankInvoicingCatalogTier = exports.isTieredCatalogPricingModel = exports.INVOICING_CATALOG_APPLICABILITY_VALUES = exports.INVOICING_CATALOG_PRORATION_VALUES = exports.
|
|
3
|
+
exports.entityToInvoicingCatalogItemFormLocalData = exports.initialInvoicingCatalogItemFormLocalData = exports.invoicingProductToCatalogItemFormSubFamily = exports.blankInvoicingCatalogSubFamily = exports.blankInvoicingCatalogTier = exports.isTieredCatalogPricingModel = exports.INVOICING_CATALOG_APPLICABILITY_VALUES = exports.INVOICING_CATALOG_PRORATION_VALUES = exports.INVOICING_CATALOG_TIER_TYPE_VALUES = exports.INVOICING_CATALOG_PRICING_MODEL_VALUES = void 0;
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* Value sets the catalog item form still owns locally: the backend has no enum
|
|
6
|
+
* for pricing model, tier type, proration or applicability yet, so these stay
|
|
7
|
+
* here until it does. Everything else on this form comes from `/1.0/config`.
|
|
7
8
|
*/
|
|
8
|
-
exports.INVOICING_CATALOG_TYPE_VALUES = [
|
|
9
|
-
'plan',
|
|
10
|
-
'addon',
|
|
11
|
-
'charge',
|
|
12
|
-
];
|
|
13
|
-
exports.INVOICING_CATALOG_PERIOD_UNIT_VALUES = [
|
|
14
|
-
'day',
|
|
15
|
-
'week',
|
|
16
|
-
'month',
|
|
17
|
-
'year',
|
|
18
|
-
];
|
|
19
9
|
exports.INVOICING_CATALOG_PRICING_MODEL_VALUES = [
|
|
20
10
|
'flat_fee',
|
|
21
11
|
'per_unit',
|
|
@@ -28,12 +18,6 @@ exports.INVOICING_CATALOG_TIER_TYPE_VALUES = [
|
|
|
28
18
|
'flat_fee',
|
|
29
19
|
'package',
|
|
30
20
|
];
|
|
31
|
-
exports.INVOICING_CATALOG_TRIAL_UNIT_VALUES = ['day', 'month'];
|
|
32
|
-
exports.INVOICING_CATALOG_TRIAL_END_ACTION_VALUES = [
|
|
33
|
-
'site_default',
|
|
34
|
-
'activate_subscription',
|
|
35
|
-
'cancel_subscription',
|
|
36
|
-
];
|
|
37
21
|
exports.INVOICING_CATALOG_PRORATION_VALUES = [
|
|
38
22
|
'site_default',
|
|
39
23
|
'partial_term',
|
package/lib/view/invoicing/editInvoicingCouponDetailView/editInvoicingCouponDetailViewSelector.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { ID } from '../../../commonStateTypes/common';
|
|
1
|
+
import { FetchState, ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
|
-
import { InvoicingCouponApplyOn, InvoicingCouponDurationType, InvoicingCouponPeriodUnit, InvoicingDiscountType } from '../../../entity/invoicing/coupon/couponPayload';
|
|
4
3
|
import { InvoicingCoupon } from '../../../entity/invoicing/coupon/couponState';
|
|
5
|
-
import { InvoicingFormOption } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
4
|
+
import { InvoicingDiscountLifecycleActionOption, InvoicingFormOption } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
6
5
|
import { RootState } from '../../../reducer';
|
|
7
6
|
import { InvoicingCouponFormLocalData } from './editInvoicingCouponDetailViewState';
|
|
8
7
|
export interface EditInvoicingCouponDetailView extends SelectorView {
|
|
8
|
+
/** Config-owned; folded in so the screen reads one selector. */
|
|
9
|
+
configFetchState: FetchState;
|
|
10
|
+
discountLifecycleActionOptions: InvoicingDiscountLifecycleActionOption[];
|
|
9
11
|
coupon?: InvoicingCoupon;
|
|
10
12
|
savedCouponId?: ID;
|
|
11
13
|
}
|
|
@@ -16,12 +18,12 @@ export interface EditInvoicingCouponDetailView extends SelectorView {
|
|
|
16
18
|
*/
|
|
17
19
|
export declare const getEditInvoicingCouponDetailViewState: (state: RootState, couponId?: ID) => EditInvoicingCouponDetailView;
|
|
18
20
|
export interface InvoicingCouponFormView extends EditInvoicingCouponDetailView {
|
|
19
|
-
applyOnOptions:
|
|
20
|
-
discountTypeOptions:
|
|
21
|
-
durationTypeOptions:
|
|
21
|
+
applyOnOptions: InvoicingFormOption[];
|
|
22
|
+
discountTypeOptions: InvoicingFormOption[];
|
|
23
|
+
durationTypeOptions: InvoicingFormOption[];
|
|
22
24
|
localData: InvoicingCouponFormLocalData;
|
|
23
25
|
mode: 'create' | 'edit';
|
|
24
|
-
periodUnitOptions:
|
|
26
|
+
periodUnitOptions: InvoicingFormOption[];
|
|
25
27
|
}
|
|
26
28
|
/**
|
|
27
29
|
* Bundled view for the discount form screen: the edit view (save state + the
|