@zeniai/client-epic-state 5.2.7-betaRD1 → 5.2.8
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 +22 -0
- package/lib/entity/invoicing/invoicingCommonPayload.js +51 -10
- package/lib/entity/jeSchedules/jeScheduleHelper.d.ts +0 -1
- package/lib/entity/jeSchedules/jeScheduleHelper.js +0 -7
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +1 -66
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +0 -135
- package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +2 -4
- package/lib/entity/jeSchedules/jeSchedulesReducer.js +2 -30
- package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +2 -11
- package/lib/entity/jeSchedules/jeSchedulesSelector.js +3 -38
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +1 -79
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -24
- package/lib/entity/jeSchedules/jeSchedulesTypes.js +1 -88
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +0 -3
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +0 -2
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -2
- package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +0 -2
- package/lib/epic.d.ts +1 -9
- package/lib/epic.js +0 -16
- package/lib/esm/entity/invoicing/invoicingCommonPayload.js +51 -10
- package/lib/esm/entity/jeSchedules/jeScheduleHelper.js +0 -6
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +1 -135
- package/lib/esm/entity/jeSchedules/jeSchedulesReducer.js +2 -30
- package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +2 -36
- package/lib/esm/entity/jeSchedules/jeSchedulesTypes.js +0 -78
- package/lib/esm/entity/snackbar/snackbarTypes.js +0 -3
- package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -2
- package/lib/esm/epic.js +0 -16
- package/lib/esm/index.js +8 -14
- package/lib/esm/view/accountList/accountListReducer.js +0 -1
- package/lib/esm/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +3 -6
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +5 -41
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.js +2 -14
- package/lib/esm/view/expenseAutomationView/payload/jeSchedulesPayload.js +0 -55
- package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +29 -306
- package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +22 -294
- package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +6 -5
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.js +2 -1
- package/lib/esm/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.js +2 -0
- package/lib/esm/view/invoicing/invoicingQboView/epics/fetchInvoicingAccountingPickersEpic.js +10 -5
- package/lib/esm/view/invoicing/invoicingQboView/invoicingQboViewSelector.js +27 -3
- package/lib/esm/view/invoicing/settingsView/settingsViewSelector.js +7 -3
- package/lib/esm/view/scheduleView/scheduleListView/epics/fetchAccruedScheduleListEpic.js +1 -1
- package/lib/esm/view/scheduleView/scheduleListView/epics/fetchDownloadSchedulesEpic.js +2 -7
- package/lib/esm/view/scheduleView/scheduleListView/scheduleListReducer.js +3 -5
- package/lib/index.d.ts +12 -17
- package/lib/index.js +47 -91
- package/lib/view/accountList/accountListReducer.js +0 -1
- package/lib/view/accountList/accountListState.d.ts +1 -1
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +3 -6
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.d.ts +2 -3
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +3 -39
- package/lib/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.js +2 -14
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +3 -72
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.js +1 -58
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +12 -91
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +29 -308
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +1 -1
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +7 -36
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.d.ts +0 -34
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +21 -302
- package/lib/view/expenseAutomationView/types/completedSubTab.d.ts +1 -1
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +8 -82
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +8 -8
- package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +1 -1
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.d.ts +5 -0
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.js +1 -0
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.d.ts +1 -0
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.js +2 -0
- package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingAccountingPickersEpic.js +10 -5
- package/lib/view/invoicing/invoicingQboView/invoicingQboViewSelector.d.ts +9 -1
- package/lib/view/invoicing/invoicingQboView/invoicingQboViewSelector.js +30 -4
- package/lib/view/invoicing/settingsView/settingsViewSelector.d.ts +11 -4
- package/lib/view/invoicing/settingsView/settingsViewSelector.js +7 -3
- package/lib/view/scheduleView/scheduleListView/epics/fetchAccruedScheduleListEpic.js +1 -1
- package/lib/view/scheduleView/scheduleListView/epics/fetchDownloadSchedulesEpic.js +2 -7
- package/lib/view/scheduleView/scheduleListView/scheduleListReducer.d.ts +2 -4
- package/lib/view/scheduleView/scheduleListView/scheduleListReducer.js +3 -5
- package/package.json +1 -1
- package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSection.d.ts +0 -0
- package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSection.js +0 -1
- package/lib/entity/invoicing/coupon/couponConstants.d.ts +0 -11
- package/lib/entity/invoicing/coupon/couponConstants.js +0 -29
- package/lib/esm/commonStateTypes/selectorTypes/pickAndMergeForecastSection.js +0 -1
- package/lib/esm/entity/invoicing/coupon/couponConstants.js +0 -26
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic.js +0 -45
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.js +0 -81
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +0 -25
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +0 -110
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +0 -79
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.js +0 -139
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/revertJeScheduleEpic.js +0 -106
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +0 -22
- package/lib/esm/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +0 -140
- package/lib/esm/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js +0 -1
- package/lib/esm/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +0 -106
- package/lib/esm/view/invoicing/invoicingQboView/epics/fetchInvoicingQboAccountsEpic.js +0 -25
- package/lib/esm/view/invoicing/invoicingQboView/epics/fetchInvoicingQboClassesEpic.js +0 -15
- 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/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic.d.ts +0 -20
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic.js +0 -49
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.d.ts +0 -8
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.js +0 -85
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.d.ts +0 -8
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +0 -29
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.d.ts +0 -45
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +0 -114
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.d.ts +0 -8
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +0 -83
- package/lib/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.d.ts +0 -12
- package/lib/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.js +0 -146
- package/lib/view/expenseAutomationView/epics/jeSchedule/revertJeScheduleEpic.d.ts +0 -64
- package/lib/view/expenseAutomationView/epics/jeSchedule/revertJeScheduleEpic.js +0 -110
- package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.d.ts +0 -6
- package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +0 -26
- package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.d.ts +0 -36
- package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +0 -145
- package/lib/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.d.ts +0 -42
- package/lib/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js +0 -2
- package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.d.ts +0 -21
- package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +0 -112
- package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingQboAccountsEpic.d.ts +0 -6
- package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingQboAccountsEpic.js +0 -29
- package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingQboClassesEpic.d.ts +0 -6
- package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingQboClassesEpic.js +0 -19
- 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
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getNewScheduleView = exports.getNewAccrualAccountsView = exports.getNewScheduleSearchTransactionsView = void 0;
|
|
4
|
-
const accountSelector_1 = require("../../../entity/account/accountSelector");
|
|
5
|
-
const transactionSelector_1 = require("../../../entity/transaction/transactionSelector");
|
|
6
|
-
const accountListSelector_1 = require("../../accountList/accountListSelector");
|
|
7
|
-
const classListSelector_1 = require("../../classList/classListSelector");
|
|
8
|
-
const scheduleDetailLocalDataHelper_1 = require("../../scheduleView/scheduleDetailView/scheduleDetailLocalDataHelper");
|
|
9
|
-
const scheduleDetailSelector_1 = require("../../scheduleView/scheduleDetailView/scheduleDetailSelector");
|
|
10
|
-
const scheduleListHelper_1 = require("../../scheduleView/scheduleListView/scheduleListHelper");
|
|
11
|
-
/**
|
|
12
|
-
* The Base Transaction search is shared across schedule types (one search
|
|
13
|
-
* box, not one per prepaid_expenses/fixed_assets) — split out from
|
|
14
|
-
* getNewScheduleView so a consumer can read it without supplying an
|
|
15
|
-
* otherwise-irrelevant scheduleType.
|
|
16
|
-
*/
|
|
17
|
-
const getNewScheduleSearchTransactionsView = (state) => {
|
|
18
|
-
const { searchTransactions } = state.expenseAutomationJESchedulesViewState.newSchedule;
|
|
19
|
-
const searchTransactionsResults = searchTransactions.searchResults
|
|
20
|
-
.map((key) => (0, transactionSelector_1.getScheduleTransactionById)(state.transactionState, key))
|
|
21
|
-
.filter((transaction) => transaction != null);
|
|
22
|
-
return {
|
|
23
|
-
searchTransactionsResults,
|
|
24
|
-
searchTransactionsFetchState: {
|
|
25
|
-
fetchState: searchTransactions.fetchState,
|
|
26
|
-
error: searchTransactions.error,
|
|
27
|
-
},
|
|
28
|
-
searchTransactionsString: searchTransactions.searchString,
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
exports.getNewScheduleSearchTransactionsView = getNewScheduleSearchTransactionsView;
|
|
32
|
-
const ACCRUED_EXPENSE_ACCOUNT_LABELS = ['accrued_expenses'];
|
|
33
|
-
/**
|
|
34
|
-
* Account + class options and request status shared by both accrual creation forms — the one-time
|
|
35
|
-
* accrual and the recurring accrued schedule.
|
|
36
|
-
*
|
|
37
|
-
* getAccountsTypesForScheduleDetails('accrued_expenses') deliberately includes
|
|
38
|
-
* other_current_liabilities, because the accrued liability accounts live there —
|
|
39
|
-
* so the debit list has to subtract them back out, and the credit list keeps only
|
|
40
|
-
* them. Mirrors getScheduleAccruedDetailView, which is the form this one is
|
|
41
|
-
* modelled on.
|
|
42
|
-
*/
|
|
43
|
-
const getNewAccrualAccountsView = (state) => {
|
|
44
|
-
const { accountState, accountListState, classState, classListState } = state;
|
|
45
|
-
const { newSchedule } = state.expenseAutomationJESchedulesViewState;
|
|
46
|
-
const accountType = (0, scheduleListHelper_1.getAccountsTypesForScheduleEpics)();
|
|
47
|
-
const accrualAccountIds = (0, accountSelector_1.getAccountIdsForTypes)(accountState, (0, scheduleDetailLocalDataHelper_1.getAccountsTypesForScheduleDetails)('accrued_expenses'));
|
|
48
|
-
const accruedCategoryIds = (0, accountSelector_1.getAccountIdsForLabels)(accountState, ACCRUED_EXPENSE_ACCOUNT_LABELS);
|
|
49
|
-
const allAccountList = (0, accountListSelector_1.getAccountList)(accountState, accountListState, accountType.accountListKey);
|
|
50
|
-
const nestedAccountHierarchy = (0, accountListSelector_1.getNestedAccountListHierarchy)(accountListState, accountType.accountListKey);
|
|
51
|
-
const debitAccounts = allAccountList.accounts.filter((account) => accrualAccountIds.includes(account.accountId) &&
|
|
52
|
-
!accruedCategoryIds.includes(account.accountId));
|
|
53
|
-
const creditAccounts = allAccountList.accounts.filter((account) => accruedCategoryIds.includes(account.accountId));
|
|
54
|
-
const allClassList = (0, classListSelector_1.getClassList)(classState, classListState);
|
|
55
|
-
return {
|
|
56
|
-
accountListNestedAccountHierarchy: (0, scheduleDetailSelector_1.filterNestedAccountHierarchyById)(nestedAccountHierarchy, debitAccounts.map((account) => account.accountId)),
|
|
57
|
-
accruedAccountListNestedAccountHierarchy: (0, scheduleDetailSelector_1.filterNestedAccountHierarchyById)(nestedAccountHierarchy, creditAccounts.map((account) => account.accountId)),
|
|
58
|
-
allAccountList: debitAccounts,
|
|
59
|
-
allAccruedExpenseList: creditAccounts,
|
|
60
|
-
allClassList: allClassList.classes,
|
|
61
|
-
classListNestedAccountHierarchy: (0, classListSelector_1.getNestedClassListHierarchy)(classListState),
|
|
62
|
-
createStatus: newSchedule.createOneTimeAccrualStatus,
|
|
63
|
-
// The recurring accrued schedule saves through the accrued detail epics that the Vendor tab
|
|
64
|
-
// already uses, so its status is that slice's updateStatus rather than anything new here.
|
|
65
|
-
accruedScheduleSaveStatus: state.scheduleAccruedDetailState.updateStatus,
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
exports.getNewAccrualAccountsView = getNewAccrualAccountsView;
|
|
69
|
-
const getNewScheduleView = (state, scheduleType) => {
|
|
70
|
-
const { accountState, accountListState, classState, classListState } = state;
|
|
71
|
-
const { newSchedule } = state.expenseAutomationJESchedulesViewState;
|
|
72
|
-
const searchTransactionsView = (0, exports.getNewScheduleSearchTransactionsView)(state);
|
|
73
|
-
const accountType = (0, scheduleListHelper_1.getAccountsTypesForScheduleEpics)();
|
|
74
|
-
const newScheduleAccountTypes = (0, scheduleDetailLocalDataHelper_1.getAccountsTypesForScheduleDetails)(scheduleType);
|
|
75
|
-
const newScheduleAccountIds = (0, accountSelector_1.getAccountIdsForTypes)(accountState, newScheduleAccountTypes);
|
|
76
|
-
const allAccountList = (0, accountListSelector_1.getAccountList)(accountState, accountListState, accountType.accountListKey);
|
|
77
|
-
const filteredAccounts = allAccountList.accounts.filter((account) => newScheduleAccountIds.includes(account.accountId));
|
|
78
|
-
const accountListNestedAccountHierarchy = (0, scheduleDetailSelector_1.filterNestedAccountHierarchyById)((0, accountListSelector_1.getNestedAccountListHierarchy)(accountListState, accountType.accountListKey), filteredAccounts.map((account) => account.accountId));
|
|
79
|
-
const allClassList = (0, classListSelector_1.getClassList)(classState, classListState);
|
|
80
|
-
const classListNestedAccountHierarchy = (0, classListSelector_1.getNestedClassListHierarchy)(classListState);
|
|
81
|
-
let allDepreciationAccountList;
|
|
82
|
-
let allDepreciationAccountListNestedAccountHierarchy;
|
|
83
|
-
if (scheduleType === 'fixed_assets') {
|
|
84
|
-
const depreciationCategoryIds = (0, accountSelector_1.getAccountIdsForTypes)(accountState, [
|
|
85
|
-
'fixed_assets',
|
|
86
|
-
'other_assets',
|
|
87
|
-
]);
|
|
88
|
-
const accountLabel = (0, scheduleListHelper_1.getAccountLabelForScheduleType)('fixed_assets');
|
|
89
|
-
const fixedAssetLabelAccountIds = accountLabel != null
|
|
90
|
-
? (0, accountListSelector_1.getAccountIdsForLabel)(accountListState, accountType.accountListKey, accountLabel)
|
|
91
|
-
: [];
|
|
92
|
-
allDepreciationAccountList = allAccountList.accounts.filter((account) => depreciationCategoryIds.includes(account.accountId) &&
|
|
93
|
-
!fixedAssetLabelAccountIds.includes(account.accountId));
|
|
94
|
-
allDepreciationAccountListNestedAccountHierarchy =
|
|
95
|
-
(0, scheduleDetailSelector_1.filterNestedAccountHierarchyById)((0, accountListSelector_1.getNestedAccountListHierarchy)(accountListState, accountType.accountListKey), allDepreciationAccountList.map((account) => account.accountId));
|
|
96
|
-
}
|
|
97
|
-
return {
|
|
98
|
-
scheduleType,
|
|
99
|
-
accountListNestedAccountHierarchy,
|
|
100
|
-
allAccountList: filteredAccounts,
|
|
101
|
-
allClassList: allClassList.classes,
|
|
102
|
-
allDepreciationAccountList,
|
|
103
|
-
allDepreciationAccountListNestedAccountHierarchy,
|
|
104
|
-
classListNestedAccountHierarchy,
|
|
105
|
-
newScheduleLocalData: newSchedule.newScheduleState[scheduleType],
|
|
106
|
-
saveStatus: newSchedule.saveStatus,
|
|
107
|
-
...searchTransactionsView,
|
|
108
|
-
fetchState: newSchedule.fetchState,
|
|
109
|
-
error: newSchedule.error,
|
|
110
|
-
};
|
|
111
|
-
};
|
|
112
|
-
exports.getNewScheduleView = getNewScheduleView;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { RootState } from '../../../../reducer';
|
|
4
|
-
import { ZeniAPI } from '../../../../zeniAPI';
|
|
5
|
-
import { InvoicingQboViewActionType } from './invoicingQboViewActionType';
|
|
6
|
-
export declare const fetchInvoicingQboAccountsEpic: (actions$: ActionsObservable<InvoicingQboViewActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<InvoicingQboViewActionType>;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fetchInvoicingQboAccountsEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const responsePayload_1 = require("../../../../responsePayload");
|
|
7
|
-
const invoicingQboViewPayload_1 = require("../invoicingQboViewPayload");
|
|
8
|
-
const invoicingQboViewReducer_1 = require("../invoicingQboViewReducer");
|
|
9
|
-
const fetchInvoicingQboAccountsEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(invoicingQboViewReducer_1.fetchInvoicingQboAccounts.match), (0, operators_1.mergeMap)((action) => {
|
|
10
|
-
const { accountTypes } = action.payload;
|
|
11
|
-
const apiUrl = `${zeniAPI.apiEndPoints.invoicingMicroServiceBaseUrl}/1.0/qbo/accounts?account_types=${encodeURIComponent(accountTypes)}`;
|
|
12
|
-
return zeniAPI.getJSON(apiUrl).pipe((0, operators_1.map)((response) => {
|
|
13
|
-
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
14
|
-
return (0, invoicingQboViewReducer_1.updateInvoicingQboAccounts)({
|
|
15
|
-
accountTypes,
|
|
16
|
-
accounts: (0, invoicingQboViewPayload_1.mapInvoicingQboAccountOptions)(response.data?.accounts ?? []),
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
return (0, invoicingQboViewReducer_1.updateInvoicingQboAccountsFailure)({
|
|
20
|
-
accountTypes,
|
|
21
|
-
status: response.status,
|
|
22
|
-
});
|
|
23
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, invoicingQboViewReducer_1.updateInvoicingQboAccountsFailure)({
|
|
24
|
-
accountTypes,
|
|
25
|
-
status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch QBO accounts REST API call errored out ' +
|
|
26
|
-
JSON.stringify(error)),
|
|
27
|
-
}))));
|
|
28
|
-
}));
|
|
29
|
-
exports.fetchInvoicingQboAccountsEpic = fetchInvoicingQboAccountsEpic;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { RootState } from '../../../../reducer';
|
|
4
|
-
import { ZeniAPI } from '../../../../zeniAPI';
|
|
5
|
-
import { InvoicingQboViewActionType } from './invoicingQboViewActionType';
|
|
6
|
-
export declare const fetchInvoicingQboClassesEpic: (actions$: ActionsObservable<InvoicingQboViewActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<InvoicingQboViewActionType>;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fetchInvoicingQboClassesEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const responsePayload_1 = require("../../../../responsePayload");
|
|
7
|
-
const invoicingQboViewPayload_1 = require("../invoicingQboViewPayload");
|
|
8
|
-
const invoicingQboViewReducer_1 = require("../invoicingQboViewReducer");
|
|
9
|
-
const fetchInvoicingQboClassesEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(invoicingQboViewReducer_1.fetchInvoicingQboClasses.match), (0, operators_1.switchMap)(() => {
|
|
10
|
-
const apiUrl = `${zeniAPI.apiEndPoints.invoicingMicroServiceBaseUrl}/1.0/qbo/classes`;
|
|
11
|
-
return zeniAPI.getJSON(apiUrl).pipe((0, operators_1.map)((response) => {
|
|
12
|
-
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
13
|
-
return (0, invoicingQboViewReducer_1.updateInvoicingQboClasses)((0, invoicingQboViewPayload_1.mapInvoicingQboAccountOptions)(response.data?.accounts ?? []));
|
|
14
|
-
}
|
|
15
|
-
return (0, invoicingQboViewReducer_1.updateInvoicingQboClassesFailure)(response.status);
|
|
16
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, invoicingQboViewReducer_1.updateInvoicingQboClassesFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch QBO classes REST API call errored out ' +
|
|
17
|
-
JSON.stringify(error))))));
|
|
18
|
-
}));
|
|
19
|
-
exports.fetchInvoicingQboClassesEpic = fetchInvoicingQboClassesEpic;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { updateTreasuryPromoIntroClosedByOutsideClickForLoggedInUser } from '../../../../../entity/tenant/tenantReducer';
|
|
4
|
-
import { RootState } from '../../../../../reducer';
|
|
5
|
-
import { ZeniAPI } from '../../../../../zeniAPI';
|
|
6
|
-
import { updateTreasuryPromoIntroClosedByOutsideClick, updateTreasuryPromoIntroClosedByOutsideClickFailure, updateTreasuryPromoIntroClosedByOutsideClickSuccess } from '../treasurySetupViewReducer';
|
|
7
|
-
export type ActionType = ReturnType<typeof updateTreasuryPromoIntroClosedByOutsideClick> | ReturnType<typeof updateTreasuryPromoIntroClosedByOutsideClickForLoggedInUser> | ReturnType<typeof updateTreasuryPromoIntroClosedByOutsideClickSuccess> | ReturnType<typeof updateTreasuryPromoIntroClosedByOutsideClickFailure>;
|
|
8
|
-
export declare const updateTreasuryPromoIntroClosedByOutsideClickEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateTreasuryPromoIntroClosedByOutsideClickEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const tenantReducer_1 = require("../../../../../entity/tenant/tenantReducer");
|
|
7
|
-
const responsePayload_1 = require("../../../../../responsePayload");
|
|
8
|
-
const treasurySetupViewReducer_1 = require("../treasurySetupViewReducer");
|
|
9
|
-
const updateTreasuryPromoIntroClosedByOutsideClickEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(treasurySetupViewReducer_1.updateTreasuryPromoIntroClosedByOutsideClick.match), (0, operators_1.switchMap)(() => {
|
|
10
|
-
return zeniAPI
|
|
11
|
-
.putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/user/self`, { is_treasury_promo_intro_closed_by_outside_click: true })
|
|
12
|
-
.pipe((0, operators_1.mergeMap)((response) => {
|
|
13
|
-
if ((0, responsePayload_1.isSuccessStatus)(response)) {
|
|
14
|
-
return (0, rxjs_1.of)((0, tenantReducer_1.updateTreasuryPromoIntroClosedByOutsideClickForLoggedInUser)(), (0, treasurySetupViewReducer_1.updateTreasuryPromoIntroClosedByOutsideClickSuccess)());
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
return (0, rxjs_1.of)((0, treasurySetupViewReducer_1.updateTreasuryPromoIntroClosedByOutsideClickFailure)(response.status));
|
|
18
|
-
}
|
|
19
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, treasurySetupViewReducer_1.updateTreasuryPromoIntroClosedByOutsideClickFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'Update treasury promo intro closed by outside click REST API call errored out' +
|
|
20
|
-
(error?.message ?? JSON.stringify(error)))))));
|
|
21
|
-
}));
|
|
22
|
-
exports.updateTreasuryPromoIntroClosedByOutsideClickEpic = updateTreasuryPromoIntroClosedByOutsideClickEpic;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { updateTreasuryPromoRemindMeLaterClickedForLoggedInUser } from '../../../../../entity/tenant/tenantReducer';
|
|
4
|
-
import { RootState } from '../../../../../reducer';
|
|
5
|
-
import { ZeniAPI } from '../../../../../zeniAPI';
|
|
6
|
-
import { updateTreasuryPromoRemindMeLaterClicked, updateTreasuryPromoRemindMeLaterClickedFailure, updateTreasuryPromoRemindMeLaterClickedSuccess } from '../treasurySetupViewReducer';
|
|
7
|
-
export type ActionType = ReturnType<typeof updateTreasuryPromoRemindMeLaterClicked> | ReturnType<typeof updateTreasuryPromoRemindMeLaterClickedForLoggedInUser> | ReturnType<typeof updateTreasuryPromoRemindMeLaterClickedSuccess> | ReturnType<typeof updateTreasuryPromoRemindMeLaterClickedFailure>;
|
|
8
|
-
export declare const updateTreasuryPromoRemindMeLaterClickedEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateTreasuryPromoRemindMeLaterClickedEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const tenantReducer_1 = require("../../../../../entity/tenant/tenantReducer");
|
|
7
|
-
const responsePayload_1 = require("../../../../../responsePayload");
|
|
8
|
-
const treasurySetupViewReducer_1 = require("../treasurySetupViewReducer");
|
|
9
|
-
const updateTreasuryPromoRemindMeLaterClickedEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(treasurySetupViewReducer_1.updateTreasuryPromoRemindMeLaterClicked.match), (0, operators_1.switchMap)(() => {
|
|
10
|
-
return zeniAPI
|
|
11
|
-
.putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/user/self`, { is_treasury_promo_video_remind_me_later_clicked: true })
|
|
12
|
-
.pipe((0, operators_1.mergeMap)((response) => {
|
|
13
|
-
if ((0, responsePayload_1.isSuccessStatus)(response)) {
|
|
14
|
-
return (0, rxjs_1.of)((0, tenantReducer_1.updateTreasuryPromoRemindMeLaterClickedForLoggedInUser)(), (0, treasurySetupViewReducer_1.updateTreasuryPromoRemindMeLaterClickedSuccess)());
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
return (0, rxjs_1.of)((0, treasurySetupViewReducer_1.updateTreasuryPromoRemindMeLaterClickedFailure)(response.status));
|
|
18
|
-
}
|
|
19
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, treasurySetupViewReducer_1.updateTreasuryPromoRemindMeLaterClickedFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'Update treasury promo remind me later REST API call errored out' +
|
|
20
|
-
(error?.message ?? JSON.stringify(error)))))));
|
|
21
|
-
}));
|
|
22
|
-
exports.updateTreasuryPromoRemindMeLaterClickedEpic = updateTreasuryPromoRemindMeLaterClickedEpic;
|
package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryVideoViewedEpic.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { updateTreasuryVideoViewedForLoggedInUser } from '../../../../../entity/tenant/tenantReducer';
|
|
4
|
-
import { RootState } from '../../../../../reducer';
|
|
5
|
-
import { ZeniAPI } from '../../../../../zeniAPI';
|
|
6
|
-
import { updateTreasuryVideoViewed, updateTreasuryVideoViewedFailure, updateTreasuryVideoViewedSuccess } from '../treasurySetupViewReducer';
|
|
7
|
-
export type ActionType = ReturnType<typeof updateTreasuryVideoViewed> | ReturnType<typeof updateTreasuryVideoViewedForLoggedInUser> | ReturnType<typeof updateTreasuryVideoViewedSuccess> | ReturnType<typeof updateTreasuryVideoViewedFailure>;
|
|
8
|
-
export declare const updateTreasuryVideoViewedEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryVideoViewedEpic.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateTreasuryVideoViewedEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const tenantReducer_1 = require("../../../../../entity/tenant/tenantReducer");
|
|
7
|
-
const responsePayload_1 = require("../../../../../responsePayload");
|
|
8
|
-
const treasurySetupViewReducer_1 = require("../treasurySetupViewReducer");
|
|
9
|
-
const updateTreasuryVideoViewedEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(treasurySetupViewReducer_1.updateTreasuryVideoViewed.match), (0, operators_1.switchMap)(() => {
|
|
10
|
-
return zeniAPI
|
|
11
|
-
.putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/user/self`, { is_treasury_promo_video_played: true })
|
|
12
|
-
.pipe((0, operators_1.mergeMap)((response) => {
|
|
13
|
-
if ((0, responsePayload_1.isSuccessStatus)(response)) {
|
|
14
|
-
return (0, rxjs_1.of)((0, tenantReducer_1.updateTreasuryVideoViewedForLoggedInUser)(), (0, treasurySetupViewReducer_1.updateTreasuryVideoViewedSuccess)());
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
return (0, rxjs_1.of)((0, treasurySetupViewReducer_1.updateTreasuryVideoViewedFailure)(response.status));
|
|
18
|
-
}
|
|
19
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, treasurySetupViewReducer_1.updateTreasuryVideoViewedFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'Update treasury video viewed REST API call errored out' +
|
|
20
|
-
(error?.message ?? JSON.stringify(error)))))));
|
|
21
|
-
}));
|
|
22
|
-
exports.updateTreasuryVideoViewedEpic = updateTreasuryVideoViewedEpic;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { updateAccounts } from '../../entity/account/accountReducer';
|
|
3
|
-
import { RootState } from '../../reducer';
|
|
4
|
-
import { ZeniAPI } from '../../zeniAPI';
|
|
5
|
-
import { fetchZeniAccountsPromoCard, updateZeniAccountsPromoCard, updateZeniAccountsPromoCardFailure } from './zeniAccountsPromoCardReducer';
|
|
6
|
-
export type ActionType = ReturnType<typeof fetchZeniAccountsPromoCard> | ReturnType<typeof updateZeniAccountsPromoCard> | ReturnType<typeof updateZeniAccountsPromoCardFailure> | ReturnType<typeof updateAccounts>;
|
|
7
|
-
export declare const fetchZeniAccountsPromoCardEpic: (actions$: ActionsObservable<ActionType>, _: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
|
|
8
|
-
payload: import("./zeniAccountsPromoCardPayload").ZeniAccountsPromoCardPayload;
|
|
9
|
-
type: "zeniAccountsPromoCard/updateZeniAccountsPromoCard";
|
|
10
|
-
} | {
|
|
11
|
-
payload: import("../../responsePayload").ZeniAPIStatus<Record<string, unknown>>;
|
|
12
|
-
type: "zeniAccountsPromoCard/updateZeniAccountsPromoCardFailure";
|
|
13
|
-
}>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fetchZeniAccountsPromoCardEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const responsePayload_1 = require("../../responsePayload");
|
|
7
|
-
const zeniAccountsPromoCardReducer_1 = require("./zeniAccountsPromoCardReducer");
|
|
8
|
-
const fetchZeniAccountsPromoCardEpic = (actions$, _, zeniAPI) => actions$.pipe((0, operators_1.filter)(zeniAccountsPromoCardReducer_1.fetchZeniAccountsPromoCard.match), (0, operators_1.switchMap)(() => zeniAPI
|
|
9
|
-
.getJSON(`${zeniAPI.apiEndPoints.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/promo-card`)
|
|
10
|
-
.pipe((0, operators_1.mergeMap)((response) => {
|
|
11
|
-
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
12
|
-
return (0, rxjs_1.of)((0, zeniAccountsPromoCardReducer_1.updateZeniAccountsPromoCard)(response.data) // eslint-disable-line @typescript-eslint/no-non-null-assertion
|
|
13
|
-
);
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
return (0, rxjs_1.of)((0, zeniAccountsPromoCardReducer_1.updateZeniAccountsPromoCardFailure)(response.status));
|
|
17
|
-
}
|
|
18
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, zeniAccountsPromoCardReducer_1.updateZeniAccountsPromoCardFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'Zeni Accounts Promo Card REST API call errored out' +
|
|
19
|
-
JSON.stringify(error))))))));
|
|
20
|
-
exports.fetchZeniAccountsPromoCardEpic = fetchZeniAccountsPromoCardEpic;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ID } from '../../commonStateTypes/common';
|
|
2
|
-
import { ZeniAPIResponse } from '../../responsePayload';
|
|
3
|
-
export interface ZeniAccountsPromoCardPayload {
|
|
4
|
-
is_show_deposit_accounts_promo_card: boolean;
|
|
5
|
-
max_apy: number;
|
|
6
|
-
max_cash_balance_available: number | null;
|
|
7
|
-
max_insured_amount: number;
|
|
8
|
-
max_possible_interest: number | null;
|
|
9
|
-
primary_deposit_account_id: ID | null;
|
|
10
|
-
}
|
|
11
|
-
export type ZeniAccountsPromoCardResponse = ZeniAPIResponse<ZeniAccountsPromoCardPayload>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ZeniAPIStatus } from '../../responsePayload';
|
|
2
|
-
import { ZeniAccountsPromoCardPayload } from './zeniAccountsPromoCardPayload';
|
|
3
|
-
import { ZeniAccountsPromoCardState } from './zeniAccountsPromoCardState';
|
|
4
|
-
export declare const initialState: ZeniAccountsPromoCardState;
|
|
5
|
-
export declare const fetchZeniAccountsPromoCard: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"zeniAccountsPromoCard/fetchZeniAccountsPromoCard">, updateZeniAccountsPromoCard: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAccountsPromoCardPayload, "zeniAccountsPromoCard/updateZeniAccountsPromoCard">, updateZeniAccountsPromoCardFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "zeniAccountsPromoCard/updateZeniAccountsPromoCardFailure">, clearZeniAccountsPromoCard: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"zeniAccountsPromoCard/clearZeniAccountsPromoCard">;
|
|
6
|
-
declare const _default: import("redux").Reducer<ZeniAccountsPromoCardState>;
|
|
7
|
-
export default _default;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var _a;
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.clearZeniAccountsPromoCard = exports.updateZeniAccountsPromoCardFailure = exports.updateZeniAccountsPromoCard = exports.fetchZeniAccountsPromoCard = exports.initialState = void 0;
|
|
5
|
-
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
-
const rootActions_1 = require("../../rootActions");
|
|
7
|
-
exports.initialState = {
|
|
8
|
-
fetchState: 'Not-Started',
|
|
9
|
-
error: undefined,
|
|
10
|
-
depositAccountId: undefined,
|
|
11
|
-
maxInsuredAmount: 0,
|
|
12
|
-
maxAnnualPercentageYield: 0,
|
|
13
|
-
maxPossibleInterest: 0,
|
|
14
|
-
maxCashBalanceAvailable: 0,
|
|
15
|
-
isShowDepositAccountsPromo: false,
|
|
16
|
-
hasValidState() {
|
|
17
|
-
return this.fetchState == 'Completed';
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
const zeniAccountsPromoCard = (0, toolkit_1.createSlice)({
|
|
21
|
-
name: 'zeniAccountsPromoCard',
|
|
22
|
-
initialState: exports.initialState,
|
|
23
|
-
reducers: {
|
|
24
|
-
fetchZeniAccountsPromoCard(draft) {
|
|
25
|
-
draft.fetchState = 'In-Progress';
|
|
26
|
-
draft.error = undefined;
|
|
27
|
-
},
|
|
28
|
-
updateZeniAccountsPromoCard(draft, action) {
|
|
29
|
-
draft.fetchState = 'Completed';
|
|
30
|
-
draft.error = undefined;
|
|
31
|
-
const promoPayload = action.payload;
|
|
32
|
-
draft.isShowDepositAccountsPromo =
|
|
33
|
-
promoPayload.is_show_deposit_accounts_promo_card;
|
|
34
|
-
draft.maxAnnualPercentageYield = promoPayload.max_apy;
|
|
35
|
-
draft.maxPossibleInterest =
|
|
36
|
-
promoPayload.max_possible_interest != null
|
|
37
|
-
? promoPayload.max_possible_interest
|
|
38
|
-
: undefined;
|
|
39
|
-
draft.maxCashBalanceAvailable =
|
|
40
|
-
promoPayload.max_cash_balance_available != null
|
|
41
|
-
? promoPayload.max_cash_balance_available
|
|
42
|
-
: undefined;
|
|
43
|
-
draft.maxInsuredAmount = promoPayload.max_insured_amount;
|
|
44
|
-
draft.depositAccountId =
|
|
45
|
-
promoPayload.primary_deposit_account_id != null
|
|
46
|
-
? promoPayload.primary_deposit_account_id
|
|
47
|
-
: undefined;
|
|
48
|
-
},
|
|
49
|
-
updateZeniAccountsPromoCardFailure(draft, action) {
|
|
50
|
-
draft.fetchState = 'Error';
|
|
51
|
-
draft.error = action.payload;
|
|
52
|
-
},
|
|
53
|
-
clearZeniAccountsPromoCard(draft) {
|
|
54
|
-
Object.assign(draft, exports.initialState);
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
extraReducers: (builder) => {
|
|
58
|
-
builder.addCase(rootActions_1.clearAll, (draft) => {
|
|
59
|
-
Object.assign(draft, exports.initialState);
|
|
60
|
-
});
|
|
61
|
-
},
|
|
62
|
-
});
|
|
63
|
-
_a = zeniAccountsPromoCard.actions, exports.fetchZeniAccountsPromoCard = _a.fetchZeniAccountsPromoCard, exports.updateZeniAccountsPromoCard = _a.updateZeniAccountsPromoCard, exports.updateZeniAccountsPromoCardFailure = _a.updateZeniAccountsPromoCardFailure, exports.clearZeniAccountsPromoCard = _a.clearZeniAccountsPromoCard;
|
|
64
|
-
exports.default = zeniAccountsPromoCard.reducer;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ID } from '../../commonStateTypes/common';
|
|
2
|
-
import { SelectorView } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
|
-
import { RootState } from '../../reducer';
|
|
4
|
-
export interface ZeniAccountsPromoCardReport extends SelectorView {
|
|
5
|
-
isShowDepositAccountsPromo: boolean;
|
|
6
|
-
maxAnnualPercentageYield: number;
|
|
7
|
-
maxInsuredAmount: number;
|
|
8
|
-
depositAccountId?: ID;
|
|
9
|
-
maxCashBalanceAvailable?: number;
|
|
10
|
-
maxPossibleInterest?: number;
|
|
11
|
-
}
|
|
12
|
-
export declare const getZeniAccountsPromoCard: (state: RootState) => ZeniAccountsPromoCardReport;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getZeniAccountsPromoCard = void 0;
|
|
4
|
-
const toolkit_1 = require("@reduxjs/toolkit");
|
|
5
|
-
exports.getZeniAccountsPromoCard = (0, toolkit_1.createSelector)((state) => state.zeniAccountsPromoCardState, (zeniAccountsPromoCardState) => ({
|
|
6
|
-
isShowDepositAccountsPromo: zeniAccountsPromoCardState.isShowDepositAccountsPromo,
|
|
7
|
-
maxAnnualPercentageYield: zeniAccountsPromoCardState.maxAnnualPercentageYield,
|
|
8
|
-
maxPossibleInterest: zeniAccountsPromoCardState.maxPossibleInterest,
|
|
9
|
-
maxCashBalanceAvailable: zeniAccountsPromoCardState.maxCashBalanceAvailable,
|
|
10
|
-
maxInsuredAmount: zeniAccountsPromoCardState.maxInsuredAmount,
|
|
11
|
-
depositAccountId: zeniAccountsPromoCardState.depositAccountId,
|
|
12
|
-
reportId: 'zeni_accounts_promo_card',
|
|
13
|
-
fetchState: zeniAccountsPromoCardState.fetchState,
|
|
14
|
-
error: zeniAccountsPromoCardState.error,
|
|
15
|
-
}));
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { FetchedState, ID } from '../../commonStateTypes/common';
|
|
2
|
-
export interface ZeniAccountsPromoCardState extends FetchedState {
|
|
3
|
-
isShowDepositAccountsPromo: boolean;
|
|
4
|
-
maxAnnualPercentageYield: number;
|
|
5
|
-
maxInsuredAmount: number;
|
|
6
|
-
depositAccountId?: ID;
|
|
7
|
-
maxCashBalanceAvailable?: number;
|
|
8
|
-
maxPossibleInterest?: number;
|
|
9
|
-
}
|