@zeniai/client-epic-state 4.19.54 → 4.19.55
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/commonStateTypes/fileType.d.ts +1 -1
- package/lib/entity/chargeCardRepayment/chargeCardRepayment.d.ts +6 -1
- package/lib/entity/chargeCardRepayment/chargeCardRepayment.js +4 -1
- package/lib/entity/chargeCardRepayment/chargeCardRepaymentPayload.d.ts +8 -3
- package/lib/entity/chargeCardRepayment/chargeCardRepaymentPayload.js +5 -2
- package/lib/entity/chargeCardTransaction/chargeCardTransaction.d.ts +1 -2
- package/lib/entity/chargeCardTransaction/chargeCardTransactionPayload.d.ts +3 -1
- package/lib/entity/chargeCardTransaction/chargeCardTransactionPayload.js +26 -3
- package/lib/entity/chargeCardTransaction/chargeCardTransactionReducer.js +11 -7
- package/lib/epic.d.ts +3 -1
- package/lib/epic.js +3 -1
- package/lib/esm/entity/chargeCardRepayment/chargeCardRepayment.js +2 -0
- package/lib/esm/entity/chargeCardRepayment/chargeCardRepaymentPayload.js +6 -3
- package/lib/esm/entity/chargeCardTransaction/chargeCardTransactionPayload.js +25 -3
- package/lib/esm/entity/chargeCardTransaction/chargeCardTransactionReducer.js +11 -7
- package/lib/esm/epic.js +3 -1
- package/lib/esm/index.js +11 -5
- package/lib/esm/reducer.js +3 -0
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/uploadAccountStatementDocumentAIHelper.js +1 -1
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/uploadAccountStatementEpic.js +3 -1
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewReducer.js +10 -1
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +4 -2
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.js +5 -2
- package/lib/esm/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistory.js +32 -0
- package/lib/esm/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryDownloadSelector.js +22 -0
- package/lib/esm/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryHelpers.js +79 -0
- package/lib/esm/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryPayload.js +1 -0
- package/lib/esm/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryReducer.js +83 -0
- package/lib/esm/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistorySelector.js +104 -0
- package/lib/esm/view/spendManagement/chargeCards/chargeCardPaymentHistory/fetchChargeCardPaymentHistoryEpic.js +31 -0
- package/lib/esm/view/spendManagement/chargeCards/chargeCardPaymentHistory/fetchChargeCardPaymentPageEpic.js +31 -0
- package/lib/esm/view/spendManagement/chargeCards/chargeCardRepaymentDetail/chargeCardRepaymentDetailSelector.js +12 -6
- package/lib/esm/view/spendManagement/chargeCards/chargeCardRepaymentDetail/fetchChargeCardRepaymentDetailEpic.js +2 -2
- package/lib/esm/view/spendManagement/chargeCards/chargeCardRepaymentDetail/initiateChargeCardRepaymentEpic.js +5 -0
- package/lib/esm/view/spendManagement/chargeCards/chargeCardSetUp/epic/fetchChargeCardSetupViewEpic.js +1 -1
- package/lib/esm/view/spendManagement/commonSetup/setupViewSelector.js +15 -0
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewReducer.js +10 -1
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewSelector.js +4 -2
- package/lib/esm/view/spendManagement/spendManagementFilterHelpers.js +29 -2
- package/lib/esm/view/spendManagement/zeniAccounts/depositAccountList/fetchDepositAccountListEpic.js +5 -3
- package/lib/index.d.ts +12 -6
- package/lib/index.js +34 -13
- package/lib/reducer.d.ts +3 -0
- package/lib/reducer.js +3 -0
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
- package/lib/view/expenseAutomationView/epics/accountRecon/uploadAccountStatementDocumentAIHelper.js +1 -1
- package/lib/view/expenseAutomationView/epics/accountRecon/uploadAccountStatementEpic.js +3 -1
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewReducer.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewReducer.js +11 -2
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +4 -2
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelectorTypes.d.ts +2 -0
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewState.d.ts +1 -0
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.d.ts +1 -0
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.js +5 -2
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonState.d.ts +2 -0
- package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistory.d.ts +50 -0
- package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistory.js +35 -0
- package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryDownloadSelector.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryDownloadSelector.js +26 -0
- package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryHelpers.d.ts +7 -0
- package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryHelpers.js +87 -0
- package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryPayload.d.ts +13 -0
- package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryPayload.js +2 -0
- package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryReducer.d.ts +19 -0
- package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryReducer.js +87 -0
- package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistorySelector.d.ts +24 -0
- package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistorySelector.js +108 -0
- package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/fetchChargeCardPaymentHistoryEpic.d.ts +9 -0
- package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/fetchChargeCardPaymentHistoryEpic.js +35 -0
- package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/fetchChargeCardPaymentPageEpic.d.ts +7 -0
- package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/fetchChargeCardPaymentPageEpic.js +35 -0
- package/lib/view/spendManagement/chargeCards/chargeCardRepaymentDetail/chargeCardRepaymentDetailSelector.js +10 -4
- package/lib/view/spendManagement/chargeCards/chargeCardRepaymentDetail/fetchChargeCardRepaymentDetailEpic.js +2 -2
- package/lib/view/spendManagement/chargeCards/chargeCardRepaymentDetail/initiateChargeCardRepaymentEpic.d.ts +2 -1
- package/lib/view/spendManagement/chargeCards/chargeCardRepaymentDetail/initiateChargeCardRepaymentEpic.js +5 -0
- package/lib/view/spendManagement/chargeCards/chargeCardSetUp/epic/fetchChargeCardSetupViewEpic.js +1 -1
- package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +2 -1
- package/lib/view/spendManagement/commonSetup/setupViewSelector.js +17 -1
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewReducer.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewReducer.js +11 -2
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewSelector.js +4 -2
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewSelectorTypes.d.ts +2 -0
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewState.d.ts +1 -0
- package/lib/view/spendManagement/spendManagementFilterHelpers.d.ts +6 -4
- package/lib/view/spendManagement/spendManagementFilterHelpers.js +29 -2
- package/lib/view/spendManagement/zeniAccounts/depositAccountList/fetchDepositAccountListEpic.js +5 -3
- package/package.json +1 -1
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { reduceAllFetchState } from '../../../../commonStateTypes/reduceFetchState';
|
|
2
|
+
import { getChargeCardRepaymentByIds } from '../../../../entity/chargeCardRepayment/chargeCardRepaymentSelector';
|
|
3
|
+
import { getUsersByUserIds } from '../../../../entity/user/userSelector';
|
|
4
|
+
import { getAllFundingAccounts, mapDepositAccToFundingAccount, mapPaymentAccToFundingAccount, } from '../../commonSetup/setupViewSelector';
|
|
5
|
+
import { getDepositAccountByDepositAccountId } from '../../../../entity/depositAccount/depositAccountSelector';
|
|
6
|
+
import { getPaymentAccountByPaymentAccountId } from '../../../../entity/paymentAccount/paymentAccountSelector';
|
|
7
|
+
import { getAllDepositAccounts } from '../../zeniAccounts/depositAccountList/depositAccountListSelector';
|
|
8
|
+
import { getAllPaymentAccounts } from '../../zeniAccounts/paymentAccountList/paymentAccountListSelector';
|
|
9
|
+
import { applyPaymentHistoryFiltersSearchAndSort } from './chargeCardPaymentHistoryHelpers';
|
|
10
|
+
export const getChargeCardPaymentHistoryView = (state) => {
|
|
11
|
+
const { chargeCardPaymentHistoryState, chargeCardRepaymentState, userState, depositAccountState, paymentAccountState, depositAccountListState, paymentAccountListState, } = state;
|
|
12
|
+
const { creditAccountId, currencyCode, currencySymbol, filters, isAutoPayEnabled, repaymentHistoryIds, searchText, totalRepayments, uiState, fetchState, error, } = chargeCardPaymentHistoryState;
|
|
13
|
+
// Get the full repayment details from the entity state
|
|
14
|
+
const repaymentHistory = getChargeCardRepaymentByIds(chargeCardRepaymentState, repaymentHistoryIds);
|
|
15
|
+
const repaymentHistoryUserIds = Array.from(new Set(repaymentHistory.map((r) => r.paidById)));
|
|
16
|
+
// Get users first to enrich repayments
|
|
17
|
+
const repaymentHistoryUsers = getUsersByUserIds(userState, repaymentHistoryUserIds);
|
|
18
|
+
// Create a map of userId -> User for quick lookup
|
|
19
|
+
const userMap = new Map();
|
|
20
|
+
repaymentHistoryUsers.forEach((user) => {
|
|
21
|
+
userMap.set(user.userId, user);
|
|
22
|
+
});
|
|
23
|
+
// Enrich repayments with paidByUser details
|
|
24
|
+
let repaymentHistoryWithUsers = repaymentHistory.map((repayment) => ({
|
|
25
|
+
...repayment,
|
|
26
|
+
paidByUser: userMap.get(repayment.paidById),
|
|
27
|
+
}));
|
|
28
|
+
// Get deposit and payment accounts views (used for funding accounts and fetch state)
|
|
29
|
+
const depositAccountsView = getAllDepositAccounts(depositAccountState, depositAccountListState);
|
|
30
|
+
const paymentAccountsView = getAllPaymentAccounts(paymentAccountState, paymentAccountListState);
|
|
31
|
+
// Extract unique funding account IDs from unfiltered repayment history (for accountInfoMap used in filter/sort)
|
|
32
|
+
const repaymentHistoryFundingAccountIdsForMap = Array.from(new Set(repaymentHistory
|
|
33
|
+
.map((repayment) => repayment.paymentAccountId)
|
|
34
|
+
.filter((id) => id !== undefined && id !== null)));
|
|
35
|
+
let fundingAccountsForMap = [];
|
|
36
|
+
if (repaymentHistoryFundingAccountIdsForMap.length > 0) {
|
|
37
|
+
const hasDepositData = depositAccountsView.fetchState === 'Completed';
|
|
38
|
+
const hasPaymentData = paymentAccountsView.fetchState === 'Completed';
|
|
39
|
+
if (hasDepositData || hasPaymentData) {
|
|
40
|
+
const matchingDepositAccountsForMap = hasDepositData
|
|
41
|
+
? depositAccountsView.depositAccounts.filter((depositAccount) => repaymentHistoryFundingAccountIdsForMap.includes(depositAccount.id))
|
|
42
|
+
: [];
|
|
43
|
+
const matchingPaymentAccountsForMap = hasPaymentData
|
|
44
|
+
? paymentAccountsView.paymentAccounts.filter((paymentAccount) => repaymentHistoryFundingAccountIdsForMap.includes(paymentAccount.paymentAccountId))
|
|
45
|
+
: [];
|
|
46
|
+
fundingAccountsForMap = getAllFundingAccounts(matchingDepositAccountsForMap, matchingPaymentAccountsForMap, paymentAccountListState.paymentAccountBalanceFetchStatus, false);
|
|
47
|
+
// Fallback: look up repayment-referenced accounts directly from entity stores
|
|
48
|
+
// in case they're not in the list state (e.g. race condition, stale list)
|
|
49
|
+
const existingIds = new Set(fundingAccountsForMap.map((fa) => fa.id).filter(Boolean));
|
|
50
|
+
for (const accountId of repaymentHistoryFundingAccountIdsForMap) {
|
|
51
|
+
if (existingIds.has(accountId)) {
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
const depositAccount = getDepositAccountByDepositAccountId(depositAccountState, accountId);
|
|
55
|
+
if (depositAccount != null) {
|
|
56
|
+
fundingAccountsForMap.push(mapDepositAccToFundingAccount(depositAccount));
|
|
57
|
+
existingIds.add(accountId);
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
const paymentAccount = getPaymentAccountByPaymentAccountId(paymentAccountState, accountId);
|
|
61
|
+
if (paymentAccount != null) {
|
|
62
|
+
fundingAccountsForMap.push(mapPaymentAccToFundingAccount(paymentAccount, paymentAccountListState.paymentAccountBalanceFetchStatus));
|
|
63
|
+
existingIds.add(accountId);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
const accountInfoByAccountId = {};
|
|
69
|
+
fundingAccountsForMap.forEach((fa) => {
|
|
70
|
+
if (fa.id != null) {
|
|
71
|
+
accountInfoByAccountId[fa.id] = {
|
|
72
|
+
accountId: fa.id,
|
|
73
|
+
accountLogo: fa.logo,
|
|
74
|
+
accountType: fa.accType === 'depositAccount' ? 'depositAccount' : 'paymentAccount',
|
|
75
|
+
depositAccountLast4: fa.accountLast4,
|
|
76
|
+
depositAccountName: fa.label,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
repaymentHistoryWithUsers = applyPaymentHistoryFiltersSearchAndSort(repaymentHistoryWithUsers, filters, searchText, uiState, accountInfoByAccountId);
|
|
81
|
+
const reducedFetchState = reduceAllFetchState([
|
|
82
|
+
{ fetchState, error },
|
|
83
|
+
depositAccountsView,
|
|
84
|
+
paymentAccountsView,
|
|
85
|
+
...Object.values(paymentAccountListState.paymentAccountBalanceFetchStatus),
|
|
86
|
+
]);
|
|
87
|
+
return {
|
|
88
|
+
accountInfoByAccountId,
|
|
89
|
+
creditAccountId,
|
|
90
|
+
currencyCode,
|
|
91
|
+
currencySymbol,
|
|
92
|
+
filters,
|
|
93
|
+
isAutoPayEnabled,
|
|
94
|
+
repaymentHistory: repaymentHistoryWithUsers,
|
|
95
|
+
repaymentHistoryIds,
|
|
96
|
+
repaymentHistoryUsers,
|
|
97
|
+
searchText,
|
|
98
|
+
totalRepayments,
|
|
99
|
+
uiState,
|
|
100
|
+
fetchState: reducedFetchState.fetchState,
|
|
101
|
+
error: reducedFetchState.error,
|
|
102
|
+
version: 0,
|
|
103
|
+
};
|
|
104
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { of } from 'rxjs';
|
|
2
|
+
import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
|
|
3
|
+
import { updateChargeCardRepayments } from '../../../../entity/chargeCardRepayment/chargeCardRepaymentReducer';
|
|
4
|
+
import { updateAllUsers } from '../../../../entity/user/userReducer';
|
|
5
|
+
import { createZeniAPIStatus, isSuccessStatus, } from '../../../../responsePayload';
|
|
6
|
+
import { fetchChargeCardPaymentHistory, updateChargeCardPaymentHistory, updateChargeCardPaymentHistoryFailure, } from './chargeCardPaymentHistoryReducer';
|
|
7
|
+
export const fetchChargeCardPaymentHistoryEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchChargeCardPaymentHistory.match), switchMap(() => {
|
|
8
|
+
const queryParams = { include_history: true };
|
|
9
|
+
const queryString = encodeURIComponent(JSON.stringify(queryParams));
|
|
10
|
+
return zeniAPI
|
|
11
|
+
.getJSON(`${zeniAPI.apiEndPoints.cardMicroServiceBaseUrl}/1.0/cards/repayments?query=${queryString}`)
|
|
12
|
+
.pipe(mergeMap((response) => {
|
|
13
|
+
if (isSuccessStatus(response) && response.data != null) {
|
|
14
|
+
return of(
|
|
15
|
+
// Store repayments FIRST before marking as completed
|
|
16
|
+
updateChargeCardRepayments(response.data.repayment_history), updateAllUsers({
|
|
17
|
+
users: response.data.repayment_history
|
|
18
|
+
.map((repayment) => repayment.paid_by_user)
|
|
19
|
+
.filter((user) => user != null),
|
|
20
|
+
}),
|
|
21
|
+
// Mark as completed LAST, after all data is stored
|
|
22
|
+
updateChargeCardPaymentHistory(response.data));
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
return of(updateChargeCardPaymentHistoryFailure(response.status));
|
|
26
|
+
}
|
|
27
|
+
}), catchError((error) => {
|
|
28
|
+
return of(updateChargeCardPaymentHistoryFailure(createZeniAPIStatus('Unexpected Error', 'Fetch charge card payment history REST API call errored out' +
|
|
29
|
+
JSON.stringify(error))));
|
|
30
|
+
}));
|
|
31
|
+
}));
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { concat, from } from 'rxjs';
|
|
2
|
+
import { filter, mergeMap } from 'rxjs/operators';
|
|
3
|
+
import { fetchChargeCardRepaymentDetail } from '../chargeCardRepaymentDetail/chargeCardRepaymentDetailReducer';
|
|
4
|
+
import { fetchChargeCardPaymentHistory, fetchChargeCardPaymentPage, } from './chargeCardPaymentHistoryReducer';
|
|
5
|
+
export const fetchChargeCardPaymentPageEpic = (actions$, state$) => actions$.pipe(filter(fetchChargeCardPaymentPage.match), mergeMap((action) => {
|
|
6
|
+
const { cacheOverride } = action.payload;
|
|
7
|
+
const chargeCardPaymentPageActions = [];
|
|
8
|
+
const state = state$.value;
|
|
9
|
+
const chargeCardPaymentHistoryState = state.chargeCardPaymentHistoryState;
|
|
10
|
+
if (cacheOverride === true) {
|
|
11
|
+
chargeCardPaymentPageActions.push(fetchChargeCardPaymentHistory());
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
if (chargeCardPaymentHistoryState.fetchState !== 'Completed' &&
|
|
15
|
+
chargeCardPaymentHistoryState.fetchState !== 'In-Progress') {
|
|
16
|
+
chargeCardPaymentPageActions.push(fetchChargeCardPaymentHistory());
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
// Fetch repayment detail if deposit or payment accounts are not fetched
|
|
20
|
+
//These are needed to get the transfer from accounts for the repayment history
|
|
21
|
+
const depositAccountListState = state.depositAccountListState;
|
|
22
|
+
const paymentAccountListState = state.paymentAccountListState;
|
|
23
|
+
const needsRepaymentDetailFetch = (depositAccountListState.fetchState !== 'Completed' &&
|
|
24
|
+
depositAccountListState.fetchState !== 'In-Progress') ||
|
|
25
|
+
(paymentAccountListState.fetchState !== 'Completed' &&
|
|
26
|
+
paymentAccountListState.fetchState !== 'In-Progress');
|
|
27
|
+
if (needsRepaymentDetailFetch) {
|
|
28
|
+
chargeCardPaymentPageActions.push(fetchChargeCardRepaymentDetail());
|
|
29
|
+
}
|
|
30
|
+
return concat(from(chargeCardPaymentPageActions));
|
|
31
|
+
}));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { getAllFundingAccounts, } from '../../commonSetup/setupViewSelector';
|
|
1
|
+
import { reduceAnyCompletedFetchState } from '../../../../commonStateTypes/reduceFetchState';
|
|
2
|
+
import { getAllFundingAccounts, mapDepositAccountWithLimitToFundingAccount, } from '../../commonSetup/setupViewSelector';
|
|
3
3
|
import { getAllDepositAccounts } from '../../zeniAccounts/depositAccountList/depositAccountListSelector';
|
|
4
4
|
import { getAllPaymentAccounts } from '../../zeniAccounts/paymentAccountList/paymentAccountListSelector';
|
|
5
5
|
export const getChargeCardRepaymentDetail = (state) => {
|
|
@@ -8,11 +8,17 @@ export const getChargeCardRepaymentDetail = (state) => {
|
|
|
8
8
|
const depositAccountsView = getAllDepositAccounts(depositAccountState, depositAccountListState);
|
|
9
9
|
const paymentAccountsView = getAllPaymentAccounts(paymentAccountState, paymentAccountListState);
|
|
10
10
|
let transferFromAccounts = [];
|
|
11
|
-
if (
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
if (paymentAccountsView.fetchState === 'Completed') {
|
|
12
|
+
if (depositAccountsView.fetchState === 'Completed') {
|
|
13
|
+
transferFromAccounts = getAllFundingAccounts(depositAccountsView.depositAccounts, paymentAccountsView.paymentAccounts, paymentAccountListState.paymentAccountBalanceFetchStatus);
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
const depositFundingFromLimit = Object.values(depositAccountState.depositAccountLimitForChargeCardByID ?? {}).map(mapDepositAccountWithLimitToFundingAccount);
|
|
17
|
+
const paymentFundingAccounts = getAllFundingAccounts([], paymentAccountsView.paymentAccounts, paymentAccountListState.paymentAccountBalanceFetchStatus);
|
|
18
|
+
transferFromAccounts = [...depositFundingFromLimit, ...paymentFundingAccounts];
|
|
19
|
+
}
|
|
14
20
|
}
|
|
15
|
-
const reducedFetchState =
|
|
21
|
+
const reducedFetchState = reduceAnyCompletedFetchState([
|
|
16
22
|
depositAccountsView,
|
|
17
23
|
paymentAccountsView,
|
|
18
24
|
...Object.values(paymentAccountListState.paymentAccountBalanceFetchStatus),
|
|
@@ -7,8 +7,8 @@ export const fetchChargeCardRepaymentDetailEpic = (actions$, state$) => actions$
|
|
|
7
7
|
const fetchChargeCardRepaymentDetailActions = [];
|
|
8
8
|
const state = state$.value;
|
|
9
9
|
const depositAccounts = state.depositAccountListState;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
const willFetchDeposit = depositAccounts.fetchState !== 'In-Progress' && depositAccounts.fetchState !== 'Completed';
|
|
11
|
+
if (willFetchDeposit) {
|
|
12
12
|
fetchChargeCardRepaymentDetailActions.push(fetchDepositAccountList());
|
|
13
13
|
}
|
|
14
14
|
const paymentAccounts = state.paymentAccountListState;
|
|
@@ -9,6 +9,7 @@ import { getAllFundingAccounts } from '../../commonSetup/setupViewSelector';
|
|
|
9
9
|
import { accountTypeSubConfigCodeToAccType } from '../../helpers';
|
|
10
10
|
import { getAllDepositAccounts } from '../../zeniAccounts/depositAccountList/depositAccountListSelector';
|
|
11
11
|
import { getAllPaymentAccounts } from '../../zeniAccounts/paymentAccountList/paymentAccountListSelector';
|
|
12
|
+
import { addRepaymentToChargeCardPaymentHistory } from '../chargeCardPaymentHistory/chargeCardPaymentHistoryReducer';
|
|
12
13
|
import { updateCreditAccountRepaymentAmountAndDate } from '../chargeCardList/chargeCardListReducer';
|
|
13
14
|
import { initiateChargeCardRepayment, updateChargeCardRepaymentStatus, } from './chargeCardRepaymentDetailReducer';
|
|
14
15
|
export const initiateChargeCardRepaymentEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(initiateChargeCardRepayment.match), switchMap((action) => {
|
|
@@ -36,6 +37,10 @@ export const initiateChargeCardRepaymentEpic = (actions$, state$, zeniAPI) => ac
|
|
|
36
37
|
if (isSuccessResponse(response) && response.data != null) {
|
|
37
38
|
const actions = [
|
|
38
39
|
updateChargeCardRepayment(response.data.card_repayment),
|
|
40
|
+
addRepaymentToChargeCardPaymentHistory({
|
|
41
|
+
cardRepaymentId: response.data.card_repayment.card_repayment_id,
|
|
42
|
+
zeniCreditAccountId: response.data.card_repayment.zeni_credit_account_id,
|
|
43
|
+
}),
|
|
39
44
|
updateCreditAccountRepaymentAmountAndDate({
|
|
40
45
|
amount: toAmount(response.data.card_repayment.amount, response.data.card_repayment.currency_code, response.data.card_repayment.currency_symbol),
|
|
41
46
|
date: date(response.data.card_repayment.repayment_date),
|
|
@@ -48,7 +48,7 @@ export const fetchChargeCardSetupViewEpic = (actions$, state$, zeniAPI) => actio
|
|
|
48
48
|
updateDepositAccounts(response.data.deposit_accounts ?? []),
|
|
49
49
|
updateDepositAccountList({
|
|
50
50
|
data: response.data?.deposit_accounts ?? [],
|
|
51
|
-
updateType: '
|
|
51
|
+
updateType: 'merge',
|
|
52
52
|
}),
|
|
53
53
|
updateSetupViewLocalStoreData({
|
|
54
54
|
companyId: response.data.companies[0].company_id,
|
|
@@ -219,6 +219,21 @@ export const mapDepositAccToFundingAccount = (depositAcc) => ({
|
|
|
219
219
|
createTime: depositAcc.createTime,
|
|
220
220
|
accountLast4: depositAcc.accountLast4,
|
|
221
221
|
});
|
|
222
|
+
export const mapDepositAccountWithLimitToFundingAccount = (depositAcc) => ({
|
|
223
|
+
id: depositAcc.id,
|
|
224
|
+
accType: 'depositAccount',
|
|
225
|
+
label: depositAcc.accountName,
|
|
226
|
+
maskedAccountNumber: depositAcc.maskedAccountNumber,
|
|
227
|
+
accountBalance: depositAcc.accountBalance,
|
|
228
|
+
logo: undefined,
|
|
229
|
+
zeniAccountId: depositAcc.zeniAccountId,
|
|
230
|
+
balanceFetchStatus: {
|
|
231
|
+
fetchState: 'Completed',
|
|
232
|
+
error: undefined,
|
|
233
|
+
},
|
|
234
|
+
createTime: depositAcc.createTime,
|
|
235
|
+
accountLast4: depositAcc.maskedAccountNumber.match(/(\d{4})$/)?.[1] ?? undefined,
|
|
236
|
+
});
|
|
222
237
|
export const mapPaymentAccToFundingAccount = (paymentAcc, paymentAccountBalanceFetchStatus) => ({
|
|
223
238
|
id: paymentAcc.paymentAccountId,
|
|
224
239
|
accType: 'paymentAccount',
|
|
@@ -2,6 +2,7 @@ import { createSlice } from '@reduxjs/toolkit';
|
|
|
2
2
|
export const initialState = {
|
|
3
3
|
fetchState: 'Not-Started',
|
|
4
4
|
error: undefined,
|
|
5
|
+
listeningToPusherEvent: false,
|
|
5
6
|
approverListState: {
|
|
6
7
|
approverIds: [],
|
|
7
8
|
attributes: [],
|
|
@@ -176,6 +177,11 @@ const remiSetupApproverView = createSlice({
|
|
|
176
177
|
reducer(draft, action) {
|
|
177
178
|
const { approvalRuleIds } = action.payload;
|
|
178
179
|
if (draft.remiSetupApproverViewUpdateData != null) {
|
|
180
|
+
if (draft.remiSetupApproverViewUpdateData.type === 'approval_update' &&
|
|
181
|
+
draft.remiSetupApproverViewUpdateData.data
|
|
182
|
+
?.isApplicableOnPendingApprovalEntity === true) {
|
|
183
|
+
draft.listeningToPusherEvent = true;
|
|
184
|
+
}
|
|
179
185
|
draft.remiSetupApproverViewUpdateData.updateStatus = {
|
|
180
186
|
fetchState: 'Completed',
|
|
181
187
|
error: undefined,
|
|
@@ -236,6 +242,9 @@ const remiSetupApproverView = createSlice({
|
|
|
236
242
|
return { payload: { remiSetupApproverViewUpdateData } };
|
|
237
243
|
},
|
|
238
244
|
},
|
|
245
|
+
setListeningToPusherEvent(draft, action) {
|
|
246
|
+
draft.listeningToPusherEvent = action.payload;
|
|
247
|
+
},
|
|
239
248
|
clearRemiSetupApproverViewUpdateData(draft) {
|
|
240
249
|
if (draft.remiSetupApproverViewUpdateData != null) {
|
|
241
250
|
draft.remiSetupApproverViewUpdateData.data = undefined;
|
|
@@ -246,5 +255,5 @@ const remiSetupApproverView = createSlice({
|
|
|
246
255
|
},
|
|
247
256
|
},
|
|
248
257
|
});
|
|
249
|
-
export const { fetchRemiSetupApproverView, fetchRemiSetupApproverViewSuccess, fetchRemiSetupApproverViewFailure, fetchRemiApproversDetails, fetchRemiApproversList, fetchRemiApproversListSuccess, fetchRemiApproversListFailure, deleteRemiApprovalRule, deleteRemiApprovalRuleSuccess, deleteRemiApprovalRuleFailure, saveRemiSetupApproverViewUpdates, saveRemiSetupApproverViewUpdatesSuccess, saveRemiSetupApproverViewUpdatesFailure, initializeRemiSetupApproverViewUpdateData, saveRemiSetupApproverViewUpdateData, clearRemiSetupApproverViewUpdateData, clearRemiSetupApproverView, } = remiSetupApproverView.actions;
|
|
258
|
+
export const { fetchRemiSetupApproverView, fetchRemiSetupApproverViewSuccess, fetchRemiSetupApproverViewFailure, fetchRemiApproversDetails, fetchRemiApproversList, fetchRemiApproversListSuccess, fetchRemiApproversListFailure, deleteRemiApprovalRule, deleteRemiApprovalRuleSuccess, deleteRemiApprovalRuleFailure, saveRemiSetupApproverViewUpdates, saveRemiSetupApproverViewUpdatesSuccess, saveRemiSetupApproverViewUpdatesFailure, initializeRemiSetupApproverViewUpdateData, saveRemiSetupApproverViewUpdateData, setListeningToPusherEvent, clearRemiSetupApproverViewUpdateData, clearRemiSetupApproverView, } = remiSetupApproverView.actions;
|
|
250
259
|
export default remiSetupApproverView.reducer;
|
|
@@ -7,7 +7,7 @@ import { getUserByUserId } from '../../../../entity/user/userSelector';
|
|
|
7
7
|
import { getUserRoleByUserId } from '../../../../entity/userRole/userRoleSelector';
|
|
8
8
|
export const getRemiSetupApproverView = (state, filterAdmins = true) => {
|
|
9
9
|
const { remiSetupApproverViewState, approvalRuleState, userState } = state;
|
|
10
|
-
const { approvalRulesDeleteStatusById, approvalRuleIds, fetchState, error } = remiSetupApproverViewState;
|
|
10
|
+
const { approvalRulesDeleteStatusById, approvalRuleIds, fetchState, error, listeningToPusherEvent, } = remiSetupApproverViewState;
|
|
11
11
|
const deleteStateList = Object.values(approvalRulesDeleteStatusById);
|
|
12
12
|
const approvalRules = getApprovalRulesByIds(approvalRuleState, approvalRuleIds);
|
|
13
13
|
const allApprovalRules = approvalRules.map((approvalRule) => {
|
|
@@ -42,10 +42,11 @@ export const getRemiSetupApproverView = (state, filterAdmins = true) => {
|
|
|
42
42
|
approvalRulesStatus,
|
|
43
43
|
fetchState,
|
|
44
44
|
error,
|
|
45
|
+
listeningToPusherEvent,
|
|
45
46
|
};
|
|
46
47
|
};
|
|
47
48
|
export const getRemiSetupApproverUpdateDataView = createSelector((state) => state.remiSetupApproverViewState, (state) => state.approvalRuleState, (state) => state.classState, (state) => state.classListState, (state) => state.userState, (state) => state.userRoleState, (remiSetupApproverViewState, approvalRuleState, classState, classListState, userState, userRoleState) => {
|
|
48
|
-
const { approvalRuleIds, approverListState, remiSetupApproverViewUpdateData, fetchState, error, } = remiSetupApproverViewState;
|
|
49
|
+
const { approvalRuleIds, approverListState, remiSetupApproverViewUpdateData, fetchState, error, listeningToPusherEvent, } = remiSetupApproverViewState;
|
|
49
50
|
const { approverIds, attributes, fetchStatus } = approverListState;
|
|
50
51
|
const { fetchState: classListFetchState, error: classListFetchStateError, classIds, } = classListState;
|
|
51
52
|
const allApprovalRules = getApprovalRulesByIds(approvalRuleState, approvalRuleIds).map((approvalRule) => {
|
|
@@ -113,5 +114,6 @@ export const getRemiSetupApproverUpdateDataView = createSelector((state) => stat
|
|
|
113
114
|
]),
|
|
114
115
|
fetchState,
|
|
115
116
|
error,
|
|
117
|
+
listeningToPusherEvent,
|
|
116
118
|
};
|
|
117
119
|
});
|
|
@@ -66,10 +66,17 @@ const filterItemOnCategoriesWithMultipleValues = (categoryValue, currentFilter)
|
|
|
66
66
|
return true;
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
|
+
const getItemId = (item) => {
|
|
70
|
+
if ('cardRepaymentId' in item) {
|
|
71
|
+
return item.cardRepaymentId;
|
|
72
|
+
}
|
|
73
|
+
return item
|
|
74
|
+
.id;
|
|
75
|
+
};
|
|
69
76
|
const removeDuplicatesFromList = (list) => {
|
|
70
77
|
const foundIds = [];
|
|
71
78
|
return list.filter((item) => {
|
|
72
|
-
const itemId = item
|
|
79
|
+
const itemId = getItemId(item);
|
|
73
80
|
if (foundIds.indexOf(itemId) === -1) {
|
|
74
81
|
foundIds.push(itemId);
|
|
75
82
|
return true;
|
|
@@ -104,7 +111,9 @@ export const applyAdvancedFiltersOnList = (entity, allItems, filters, filteredIt
|
|
|
104
111
|
? getCategoryValueForBill(key, item)
|
|
105
112
|
: entity === 'reimbursement'
|
|
106
113
|
? getCategoryValueForReimbursement(key, item)
|
|
107
|
-
:
|
|
114
|
+
: entity === 'task_management'
|
|
115
|
+
? getCategoryValueForTaskList(key, item)
|
|
116
|
+
: getCategoryValueForPaymentHistory(key, item);
|
|
108
117
|
if (categoryValue == null) {
|
|
109
118
|
if (currentFilter.matchingOperator === 'not-equal') {
|
|
110
119
|
return true;
|
|
@@ -124,6 +133,7 @@ export const applyAdvancedFiltersOnList = (entity, allItems, filters, filteredIt
|
|
|
124
133
|
'dueDate',
|
|
125
134
|
'creationDate',
|
|
126
135
|
'receiptDate',
|
|
136
|
+
'repaymentDate',
|
|
127
137
|
]);
|
|
128
138
|
}
|
|
129
139
|
});
|
|
@@ -224,6 +234,23 @@ const getCategoryValueForReimbursement = (key, reimbursement) => {
|
|
|
224
234
|
return undefined;
|
|
225
235
|
}
|
|
226
236
|
};
|
|
237
|
+
const getCategoryValueForPaymentHistory = (key, repayment) => {
|
|
238
|
+
switch (key) {
|
|
239
|
+
case 'repaymentDate':
|
|
240
|
+
return repayment.repaymentDate;
|
|
241
|
+
case 'sourceAccount': {
|
|
242
|
+
return repayment.paymentAccountId;
|
|
243
|
+
}
|
|
244
|
+
case 'status':
|
|
245
|
+
return repayment.status;
|
|
246
|
+
case 'initiatedBy':
|
|
247
|
+
return repayment.repaymentType === 'scheduled'
|
|
248
|
+
? 'autopay'
|
|
249
|
+
: repayment.paidById;
|
|
250
|
+
default:
|
|
251
|
+
return undefined;
|
|
252
|
+
}
|
|
253
|
+
};
|
|
227
254
|
export const isBillListDownloadable = (state, currentTimePeriod) => {
|
|
228
255
|
const { billListState, billTransactionState, entityApprovalStatusState, userState, } = state;
|
|
229
256
|
const keys = ALL_BILL_TABS.filter((tab) => tab !== 'draft').map((tab) => getBillListKey(currentTimePeriod, tab));
|
package/lib/esm/view/spendManagement/zeniAccounts/depositAccountList/fetchDepositAccountListEpic.js
CHANGED
|
@@ -8,11 +8,13 @@ export const fetchDepositAccountListEpic = (actions$, _state$, zeniAPI) => actio
|
|
|
8
8
|
return zeniAPI
|
|
9
9
|
.getJSON(`${zeniAPI.apiEndPoints.bankingMicroServiceBaseUrl}/1.0/deposit-accounts?query=${encodeURIComponent(`{"is_include_deposit_accounts_summary":true}`)}`)
|
|
10
10
|
.pipe(mergeMap((response) => {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
const isSuccess = isSuccessResponse(response);
|
|
12
|
+
if (isSuccess) {
|
|
13
|
+
const depositAccounts = response.data?.deposit_accounts ?? [];
|
|
14
|
+
return of(updateDepositAccounts(depositAccounts), updateZeniAccountsSummary({
|
|
13
15
|
summaryPayload: response.data?.all_deposit_accounts_summary,
|
|
14
16
|
}), updateDepositAccountList({
|
|
15
|
-
data:
|
|
17
|
+
data: depositAccounts,
|
|
16
18
|
updateType: 'replace',
|
|
17
19
|
}));
|
|
18
20
|
}
|
package/lib/index.d.ts
CHANGED
|
@@ -58,8 +58,9 @@ import { RecurringBillConfig, RecurringBillDetail, RecurringBillFrequency, Recur
|
|
|
58
58
|
import { CardPayment } from './entity/cardPayment/cardPaymentState';
|
|
59
59
|
import { CardActivationOrPinUpdateEventCodeType, CardAddressType, CardCodeType, CardStatusCodeType, ChargeCard, ChargeCardRecommendation, ChargeCardType, CreditCardCodeType, CreditLimitFrequency, CreditLimitFrequencyCodeType, DebitCardCodeType, ShippingAddressType, toCardAddressType, toCardType, toCreditLimitFrequencyCodeType, toShippingAddressType } from './entity/chargeCard/chargeCard';
|
|
60
60
|
import { getChargeCardById } from './entity/chargeCard/chargeCardSelector';
|
|
61
|
+
import { ChargeCardRepayment, ChargeCardRepaymentStatusCodeType } from './entity/chargeCardRepayment/chargeCardRepayment';
|
|
61
62
|
import { ChargeCardTransaction, ChargeCardTransactionStatus, ChargeCardTransactionStatusCode, ChargeCardTransactionTypeCode } from './entity/chargeCardTransaction/chargeCardTransaction';
|
|
62
|
-
import { TransactionReceiptsPayload } from './entity/chargeCardTransaction/chargeCardTransactionPayload';
|
|
63
|
+
import { TransactionReceiptsPayload, attachmentFilePathToAttachment } from './entity/chargeCardTransaction/chargeCardTransactionPayload';
|
|
63
64
|
import { updateChargeCardTransactionAttachments } from './entity/chargeCardTransaction/chargeCardTransactionReducer';
|
|
64
65
|
import { getControllersName, getFirstControllerEmail, getFirstControllerId } from './entity/company/companyHelper';
|
|
65
66
|
import { CompanyWithSchema, ControllerUserDetails, getCompanyByCompanyId, getCompanyInfoForAllCockpitCompaniesInState, getControllersForCompany } from './entity/company/companySelector';
|
|
@@ -393,7 +394,7 @@ import { getInternationalSubConfigCodeKey } from './view/spendManagement/billPay
|
|
|
393
394
|
import { AccountTypeSubConfigCodeKeyType, BILL_NEW_PAYMENT_METHODS, BillPayConfig, BillPaymentConfigCodeType, BillPaymentSubConfigCodeType, InternationalSubConfigCodeType, LOCAL_CURRENCY_INTERNATIONAL_METHOD_SUBTEXT, NEW_INTERNATIONAL_METHOD_SUBTEXT, SWIFT_OUR_INTERNATIONAL_METHOD_SUBTEXT, VendorCurrency } from './view/spendManagement/billPay/billPayConfig/billPayConfigState';
|
|
394
395
|
import { clearBillPayReview, fetchDuplicateBill } from './view/spendManagement/billPay/billPayReview/billPayReviewReducer';
|
|
395
396
|
import { BillPayReviewSelectorView, DuplicateBillsSelectorView, getReviewPageBillDetail } from './view/spendManagement/billPay/billPayReview/billPayReviewSelector';
|
|
396
|
-
import { clearBillPaySetupApproverView, clearBillPaySetupApproverViewUpdateData, deleteBillPayApprovalRule, fetchBillPayApproversDetails, fetchBillPayApproversList, fetchBillPaySetupApproverView, initializeBillPaySetupApproverViewUpdateData, saveBillPaySetupApproverViewUpdateData, saveBillPaySetupApproverViewUpdates } from './view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewReducer';
|
|
397
|
+
import { clearBillPaySetupApproverView, clearBillPaySetupApproverViewUpdateData, deleteBillPayApprovalRule, fetchBillPayApproversDetails, fetchBillPayApproversList, fetchBillPaySetupApproverView, initializeBillPaySetupApproverViewUpdateData, saveBillPaySetupApproverViewUpdateData, saveBillPaySetupApproverViewUpdates, setListeningToPusherEvent as setBillsSetupApproverViewListeningToPusherEvent } from './view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewReducer';
|
|
397
398
|
import { getBillPaySetupApproverUpdateDataView, getBillPaySetupApproverView } from './view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector';
|
|
398
399
|
import { ApprovalRuleWithUser as BillPayApprovalRuleWithUser, BillPaySetupApproverUpdateDataView, BillPaySetupApproverView } from './view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelectorTypes';
|
|
399
400
|
import { BillPaySetupApproverViewState } from './view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewState';
|
|
@@ -436,6 +437,11 @@ import { ChargeCardBulkActionView, ChargeCardListSelectorView, ChargeCardListWit
|
|
|
436
437
|
import { clearChargeCardRepaymentDetail, fetchChargeCardRepaymentDetail, initiateChargeCardRepayment, updateChargeCardRepaymentLocalStore } from './view/spendManagement/chargeCards/chargeCardRepaymentDetail/chargeCardRepaymentDetailReducer';
|
|
437
438
|
import { ChargeCardRepaymentDetailSelectorView, getChargeCardRepaymentDetail } from './view/spendManagement/chargeCards/chargeCardRepaymentDetail/chargeCardRepaymentDetailSelector';
|
|
438
439
|
import { ChargeCardRepaymentDetailLocalData } from './view/spendManagement/chargeCards/chargeCardRepaymentDetail/chargeCardRepaymentDetailState';
|
|
440
|
+
import { ChargeCardPaymentHistoryDownloadReport, getChargeCardPaymentHistoryDownloadReport } from './view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryDownloadSelector';
|
|
441
|
+
import { fetchChargeCardPaymentPage, fetchChargeCardPaymentHistory, updatePaymentHistoryDownloadUIState, updatePaymentHistoryFilters, updatePaymentHistorySearchText, updatePaymentHistoryUIState } from './view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryReducer';
|
|
442
|
+
import { ChargeCardPaymentHistorySelectorView, ChargeCardRepaymentWithUser, getChargeCardPaymentHistoryView } from './view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistorySelector';
|
|
443
|
+
import { PAYMENT_HISTORY_FILTER_CATEGORIES, PaymentHistoryAccountInfo, PaymentHistoryFilterCategory, PaymentHistoryFilterCategoryDropdownOption, PaymentHistoryFilterCategoryField, PaymentHistoryFilters } from './view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistory';
|
|
444
|
+
import { getPaymentHistorySourceAccountName, getPaymentStatusDisplayText } from './view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryHelpers';
|
|
439
445
|
import { acceptChargeCardTerms, enableChargeCardAutoPay, expressInterestInChargeCard, fetchChargeCardSetupView } from './view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewReducer';
|
|
440
446
|
import { ChargeCardBusinessVerificationDetails, ChargeCardSetupView, getChargeCardBusinessVerificationDetails, getChargeCardSetupViewDetails } from './view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewSelector';
|
|
441
447
|
import { ChargeCardStatement } from './view/spendManagement/chargeCards/chargeCardStatementList/chargeCardStatementList';
|
|
@@ -467,7 +473,7 @@ import { RemiListDownloadReport, getRemiDownloadList } from './view/spendManagem
|
|
|
467
473
|
import { fetchRemiList, fetchRemiListPerTab, updateRemiDetailSaveRemiCode, updateRemiListDownloadUIState, updateFilterResult as updateRemiListFilterResult, updateSearchResult as updateRemiListSearchResult, updateSubTab as updateRemiListSubTab, updateTab as updateRemiListTab, updateRemiListUIState } from './view/spendManagement/reimbursement/remiListView/remiListReducer';
|
|
468
474
|
import { ReimbursementView, RemiListReport, getRemiList } from './view/spendManagement/reimbursement/remiListView/remiListSelector';
|
|
469
475
|
import { REIMBURSEMENT_FILTER_CATEGORIES, REIMBURSEMENT_FILTER_CATEGORIES_RESTRICTED, ReimbursementFilterCategory, ReimbursementFilters, ReimbursementViewSortKey, RemiBulkSelectExceptionInfoType, RemiListUIState, RemiListViewFilterCategoryField, RemiSubTabType, RemiTabType, toRemiSubTabType, toRemiSubTabTypeStrict, toRemiTabType, toRemiTabTypeStrict } from './view/spendManagement/reimbursement/remiListView/remiListState';
|
|
470
|
-
import { clearRemiSetupApproverView, clearRemiSetupApproverViewUpdateData, deleteRemiApprovalRule, fetchRemiApproversDetails, fetchRemiApproversList, fetchRemiSetupApproverView, initializeRemiSetupApproverViewUpdateData, saveRemiSetupApproverViewUpdateData, saveRemiSetupApproverViewUpdates } from './view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewReducer';
|
|
476
|
+
import { clearRemiSetupApproverView, clearRemiSetupApproverViewUpdateData, deleteRemiApprovalRule, fetchRemiApproversDetails, fetchRemiApproversList, fetchRemiSetupApproverView, initializeRemiSetupApproverViewUpdateData, saveRemiSetupApproverViewUpdateData, saveRemiSetupApproverViewUpdates, setListeningToPusherEvent as setRemiSetupApproverViewListeningToPusherEvent } from './view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewReducer';
|
|
471
477
|
import { getRemiSetupApproverUpdateDataView, getRemiSetupApproverView } from './view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewSelector';
|
|
472
478
|
import { ApprovalRuleWithUser as RemiApprovalRuleWithUser, RemiSetupApproverUpdateDataView, RemiSetupApproverView } from './view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewSelectorTypes';
|
|
473
479
|
import { RemiSetupApproverViewState } from './view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewState';
|
|
@@ -756,8 +762,8 @@ export { PaymentAccount, Logo, VERIFIED_PAYMENT_ACCOUNT_PROVIDER_VERIFICATION_ST
|
|
|
756
762
|
export { SubscriptionPaymentAccount };
|
|
757
763
|
export { PreviousBillsSelectorView, InvoiceProcessingPayload, InvoiceProcessingResponse, isSuccessResponse, isInvalidSessionError, isAccessDeniedError, };
|
|
758
764
|
export { Step, Actor as ApprovalRuleActor, ActorType, ApprovalActionType, StepOperatorType, ApprovalRuleState, ApprovalRule, AttributeType, Approvers, RoleType, EntityApprovalStatusState, EntityApprovalStatus, SpendManagementEntityType, SpendManagementEntityTypeWithOtherConnection, toAttributeTypeStrict, toAttributeOrRoleTypeStrict, toRoleTypeStrict, };
|
|
759
|
-
export { ApprovalRuleUpdateData, ApprovalRuleCreateData, BillPayApprovalRuleWithUser, ApprovalUpdateActionType, ApproverViewUpdateData, BillPaySetupApproverViewState, BillPaySetupApproverView, BillPaySetupApproverUpdateDataView, getBillPaySetupApproverView, getBillPaySetupApproverUpdateDataView, fetchBillPaySetupApproverView, fetchBillPayApproversDetails, fetchBillPayApproversList, deleteBillPayApprovalRule, saveBillPaySetupApproverViewUpdateData, saveBillPaySetupApproverViewUpdates, initializeBillPaySetupApproverViewUpdateData, clearBillPaySetupApproverViewUpdateData, clearBillPaySetupApproverView, };
|
|
760
|
-
export { RemiApprovalRuleWithUser, RemiSetupApproverViewState, RemiSetupApproverView, RemiSetupApproverUpdateDataView, getRemiSetupApproverView, getRemiSetupApproverUpdateDataView, fetchRemiSetupApproverView, fetchRemiApproversList, fetchRemiApproversDetails, deleteRemiApprovalRule, saveRemiSetupApproverViewUpdateData, saveRemiSetupApproverViewUpdates, initializeRemiSetupApproverViewUpdateData, clearRemiSetupApproverViewUpdateData, clearRemiSetupApproverView, };
|
|
765
|
+
export { ApprovalRuleUpdateData, ApprovalRuleCreateData, BillPayApprovalRuleWithUser, ApprovalUpdateActionType, ApproverViewUpdateData, BillPaySetupApproverViewState, BillPaySetupApproverView, BillPaySetupApproverUpdateDataView, getBillPaySetupApproverView, getBillPaySetupApproverUpdateDataView, fetchBillPaySetupApproverView, fetchBillPayApproversDetails, fetchBillPayApproversList, deleteBillPayApprovalRule, saveBillPaySetupApproverViewUpdateData, saveBillPaySetupApproverViewUpdates, setBillsSetupApproverViewListeningToPusherEvent, initializeBillPaySetupApproverViewUpdateData, clearBillPaySetupApproverViewUpdateData, clearBillPaySetupApproverView, };
|
|
766
|
+
export { RemiApprovalRuleWithUser, RemiSetupApproverViewState, RemiSetupApproverView, RemiSetupApproverUpdateDataView, getRemiSetupApproverView, getRemiSetupApproverUpdateDataView, fetchRemiSetupApproverView, fetchRemiApproversList, fetchRemiApproversDetails, deleteRemiApprovalRule, saveRemiSetupApproverViewUpdateData, saveRemiSetupApproverViewUpdates, initializeRemiSetupApproverViewUpdateData, setRemiSetupApproverViewListeningToPusherEvent, clearRemiSetupApproverViewUpdateData, clearRemiSetupApproverView, };
|
|
761
767
|
export { RemiDetailViewSelector, getRemiDetailView, RemiActivity, RemiDetails, checkApproveRejectBtnShowForRemi, };
|
|
762
768
|
export { RemiApprovalType, RemiDetailView, DuplicateLine };
|
|
763
769
|
export { saveRealTimeApproval, updateIsEditModeRealTimeApprovals, RealTimeApprovalDetailLocalData, RealTimeStepsData, };
|
|
@@ -809,7 +815,7 @@ export { CompanyHealthMetricsLocalData, CompanyHealthViewUIState };
|
|
|
809
815
|
export { getCompanyHealthMetricConfig, fetchCompanyHealthMetricConfig, CompanyHealthMetricConfigSelector, };
|
|
810
816
|
export { CompanyHealthMetric, CompanyRunway, updateCompaniesHealth, updateCompanyHealth, VerticalProductServices, LastEngagement, AdditionalChurnFactors, AdditionalChurnFactor, };
|
|
811
817
|
export { clearCompanyHealthMetricView, fetchCompanyHealthMetricView, initializeCompanyHealthMetricViewLocalData, removeSelectedCompanyId, saveCompanyHealthMetricById, updateCompanyHealthMetricLocalStore, updateCompanyHealthMetricViewErrorStatus, updateCompanyHealthMetricViewSuccessStatus, updateCompanyHealthViewUIState, };
|
|
812
|
-
export { CardStatusCodeType, updateChargeCardTransactionAttachments, TransactionReceiptsPayload, ProductServices, ProductServiceKey, isCompanyRunwayInfinite, getCompanyHealthMetricView, hasCompanyHealthMetricFormFieldChanged, companyHealthMetricDropDownOptions, CompanyHealthMetricViewSelector, CompanyHealthMetricDropDownOption, CompanyDetailWithHealthMetric, ChargeCardBusinessVerificationDetails, getChargeCardBusinessVerificationDetails, fetchDebitCardSummary, fetchChargeCardList, fetchChargeCardListPage, fetchChargeCardConfig, fetchCreditAccount, fetchCreditAccountRepayment, getChargeCardListView, getMyPendingActivationChargeCardListView, getMyRequestOnHoldChargeCardListWithShippingAddress, clearChargeCardRepaymentDetail, fetchChargeCardRepaymentDetail, initiateChargeCardRepayment, updateChargeCardRepaymentLocalStore, ChargeCardRepaymentDetailSelectorView, getChargeCardRepaymentDetail, ChargeCardRepaymentDetailLocalData, getCreditAccountDetails, ChargeCardStatementsSelectorView, fetchChargeCardDetailPage, fetchChargeCardDetail, fetchChargeCardTransactionStatistics, fetchDepositAccountLimit, getChargeCardDetailView, getChargeCardControlDetailView, getDepositAccountLimitFetchStateByDepositAccountId, ChargeCardControlDetailView, ChargeCardTransactionAttachmentView, getChargeCardTransactionAttachmentView, DebitCardPinSetSelectorView, getDebitCardSetPinView, getChargeCardRecurringExpensesByCardIds, getChargeCardRecurringExpensesView, getChargeCardRowActionView, getChargeCardBulkActionView, ChargeCardCVVActivateSelectorView, getChargeCardCVVActivateView, fetchChargeCardTransactionList, fetchCashbackDetail, ChargeCard, ChargeCardWithUser, ChargeCardWithUserAndShippingAddress, ChargeCardViewSortKey, ChargeCardRecommendation, toChargeCardSortKeyType, CashbackPeriod, CashbackDetailUIState, CashbackViewSortKey, getCashbackDetail, getZeniDateFromPeriod, CashbackDetailSelectorView, toCreditLimitFrequencyCodeType, ChargeCardListSelectorView, ChargeCardListWithShippingAddressSelectorView, MyPendingActivationChargeCardListSelectorView, ChargeCardRecurringExpensesByCardIds, ChargeCardRecurringExpenses, ChargeCardBulkActionView, ChargeCardRowActionView, DebitCardListSelectorView, getDepositAccountListWithDebitCardIssued, DebitCardSummaries, DepositAccountListWithDebitCardIssued, ChargeCardDetailSelectorView, IssueChargeCardSelectorView, ActiveChargeCardCount, ActiveDebitCardCount, ActiveDebitCardCountByUserId, IssueChargeCardState, getIssueChargeCardView, ChargeCardConfigState, ChargeCardListUIState, CreditAccount, CreditAccountRepayment, ChargeCardTransaction, ChargeCardTransactionStatusCode, ChargeCardTransactionTypeCode, ChargeCardTransactionStatus, ChargeCardDetailUiState, ChargeCardTransactionSortKey, RecurringExpense, TransactionStatistics, getChargeCardSetupViewDetails, ChargeCardSetupView, fetchChargeCardStatementList, ChargeCardStatement, getChargeCardStatements, fetchChargeCardSetupView, enableChargeCardAutoPay, acceptChargeCardTerms, expressInterestInChargeCard, IssueChargeCardLocalData, PhysicalCreditCardData, PhysicalDebitCardData, VirtualDebitCardData, DepositAccountWithLimit, getDepositAccountLimitForChargeCardByDepositAccountId, VirtualCreditCardData, CreditLimitFrequencyCodeType, CardAddressType, toCardAddressType, ShippingAddressType, toShippingAddressType, ConnectedAccount, ChargeCardType, CreditCardCodeType, DebitCardCodeType, CardActivationOrPinUpdateEventCodeType, CreditLimitFrequency, CardCodeType, toCardType, issueChargeCards, fetchIssueCardPage, fetchDepositAccountListForCards, getDebitCardList, getDebitCardSummary, updateCustomAddressId, updateChargeCardsLocalStore, resetIssueChargeCardForm, updateBulkActionCardIds, updateChargeCardListSearchText, updateChargeCardListUIState, updateCashbackDetailUIState, updateChargeCardDetail, updatePhysicalChargeCardAttempt, lockChargeCard, unlockChargeCard, closeChargeCard, updateChargeCardName, CardUserOnboardingLocalData, getCardUserOnboardingView, initializeCardUserOnboardingLocalData, updateCardUserOnboardingLocalData, CardUserOnboardingView, saveCardOnboardingUserDetails, updateChargeCardTransactionUploadReceiptsFetchStatus, completeDebitCardSetPinWait, startDebitCardSetPinWait, updateDebitCardPinAttempt, updateChargeCardTransactionReceiptsShowTickFetchStatus, updateChargeCardTransactionIsViewReceiptClicked, fetchChargeCardTransactionAttachments, completeCVVActivationWait, startCVVActivationWait, updateChargeCardSpendLimit, updateChargeCardSpendLimitSuccessOrFailure, resendCardInvite, revokeCardInvite, updateRowActionCardId, revokeChargeCardsInvite, lockChargeCards, unlockChargeCards, closeChargeCards, updateChargeCardsSpendLimit, fetchChargeCardsRecurringExpenses, startCardUserOnboardingActivationWait, completeCardUserOnboardingActivationWait, setFirstViewAfterActivation, setFirstViewCompleteAfterActivation, setCurrentDisplayedCardId, getChargeCardById, anyCardOnHold, };
|
|
818
|
+
export { CardStatusCodeType, updateChargeCardTransactionAttachments, TransactionReceiptsPayload, attachmentFilePathToAttachment, ProductServices, ProductServiceKey, isCompanyRunwayInfinite, getCompanyHealthMetricView, hasCompanyHealthMetricFormFieldChanged, companyHealthMetricDropDownOptions, CompanyHealthMetricViewSelector, CompanyHealthMetricDropDownOption, CompanyDetailWithHealthMetric, ChargeCardBusinessVerificationDetails, getChargeCardBusinessVerificationDetails, fetchDebitCardSummary, fetchChargeCardList, fetchChargeCardListPage, fetchChargeCardConfig, fetchCreditAccount, fetchCreditAccountRepayment, getChargeCardListView, getMyPendingActivationChargeCardListView, getMyRequestOnHoldChargeCardListWithShippingAddress, clearChargeCardRepaymentDetail, fetchChargeCardRepaymentDetail, initiateChargeCardRepayment, updateChargeCardRepaymentLocalStore, ChargeCardRepaymentDetailSelectorView, getChargeCardRepaymentDetail, ChargeCardRepaymentDetailLocalData, ChargeCardRepayment, ChargeCardRepaymentStatusCodeType, fetchChargeCardPaymentPage, fetchChargeCardPaymentHistory, updatePaymentHistoryDownloadUIState, updatePaymentHistoryFilters, updatePaymentHistorySearchText, updatePaymentHistoryUIState, ChargeCardPaymentHistoryDownloadReport, ChargeCardPaymentHistorySelectorView, ChargeCardRepaymentWithUser, getChargeCardPaymentHistoryDownloadReport, getChargeCardPaymentHistoryView, getPaymentHistorySourceAccountName, getPaymentStatusDisplayText, PAYMENT_HISTORY_FILTER_CATEGORIES, PaymentHistoryAccountInfo, PaymentHistoryFilterCategory, PaymentHistoryFilterCategoryDropdownOption, PaymentHistoryFilterCategoryField, PaymentHistoryFilters, getCreditAccountDetails, ChargeCardStatementsSelectorView, fetchChargeCardDetailPage, fetchChargeCardDetail, fetchChargeCardTransactionStatistics, fetchDepositAccountLimit, getChargeCardDetailView, getChargeCardControlDetailView, getDepositAccountLimitFetchStateByDepositAccountId, ChargeCardControlDetailView, ChargeCardTransactionAttachmentView, getChargeCardTransactionAttachmentView, DebitCardPinSetSelectorView, getDebitCardSetPinView, getChargeCardRecurringExpensesByCardIds, getChargeCardRecurringExpensesView, getChargeCardRowActionView, getChargeCardBulkActionView, ChargeCardCVVActivateSelectorView, getChargeCardCVVActivateView, fetchChargeCardTransactionList, fetchCashbackDetail, ChargeCard, ChargeCardWithUser, ChargeCardWithUserAndShippingAddress, ChargeCardViewSortKey, ChargeCardRecommendation, toChargeCardSortKeyType, CashbackPeriod, CashbackDetailUIState, CashbackViewSortKey, getCashbackDetail, getZeniDateFromPeriod, CashbackDetailSelectorView, toCreditLimitFrequencyCodeType, ChargeCardListSelectorView, ChargeCardListWithShippingAddressSelectorView, MyPendingActivationChargeCardListSelectorView, ChargeCardRecurringExpensesByCardIds, ChargeCardRecurringExpenses, ChargeCardBulkActionView, ChargeCardRowActionView, DebitCardListSelectorView, getDepositAccountListWithDebitCardIssued, DebitCardSummaries, DepositAccountListWithDebitCardIssued, ChargeCardDetailSelectorView, IssueChargeCardSelectorView, ActiveChargeCardCount, ActiveDebitCardCount, ActiveDebitCardCountByUserId, IssueChargeCardState, getIssueChargeCardView, ChargeCardConfigState, ChargeCardListUIState, CreditAccount, CreditAccountRepayment, ChargeCardTransaction, ChargeCardTransactionStatusCode, ChargeCardTransactionTypeCode, ChargeCardTransactionStatus, ChargeCardDetailUiState, ChargeCardTransactionSortKey, RecurringExpense, TransactionStatistics, getChargeCardSetupViewDetails, ChargeCardSetupView, fetchChargeCardStatementList, ChargeCardStatement, getChargeCardStatements, fetchChargeCardSetupView, enableChargeCardAutoPay, acceptChargeCardTerms, expressInterestInChargeCard, IssueChargeCardLocalData, PhysicalCreditCardData, PhysicalDebitCardData, VirtualDebitCardData, DepositAccountWithLimit, getDepositAccountLimitForChargeCardByDepositAccountId, VirtualCreditCardData, CreditLimitFrequencyCodeType, CardAddressType, toCardAddressType, ShippingAddressType, toShippingAddressType, ConnectedAccount, ChargeCardType, CreditCardCodeType, DebitCardCodeType, CardActivationOrPinUpdateEventCodeType, CreditLimitFrequency, CardCodeType, toCardType, issueChargeCards, fetchIssueCardPage, fetchDepositAccountListForCards, getDebitCardList, getDebitCardSummary, updateCustomAddressId, updateChargeCardsLocalStore, resetIssueChargeCardForm, updateBulkActionCardIds, updateChargeCardListSearchText, updateChargeCardListUIState, updateCashbackDetailUIState, updateChargeCardDetail, updatePhysicalChargeCardAttempt, lockChargeCard, unlockChargeCard, closeChargeCard, updateChargeCardName, CardUserOnboardingLocalData, getCardUserOnboardingView, initializeCardUserOnboardingLocalData, updateCardUserOnboardingLocalData, CardUserOnboardingView, saveCardOnboardingUserDetails, updateChargeCardTransactionUploadReceiptsFetchStatus, completeDebitCardSetPinWait, startDebitCardSetPinWait, updateDebitCardPinAttempt, updateChargeCardTransactionReceiptsShowTickFetchStatus, updateChargeCardTransactionIsViewReceiptClicked, fetchChargeCardTransactionAttachments, completeCVVActivationWait, startCVVActivationWait, updateChargeCardSpendLimit, updateChargeCardSpendLimitSuccessOrFailure, resendCardInvite, revokeCardInvite, updateRowActionCardId, revokeChargeCardsInvite, lockChargeCards, unlockChargeCards, closeChargeCards, updateChargeCardsSpendLimit, fetchChargeCardsRecurringExpenses, startCardUserOnboardingActivationWait, completeCardUserOnboardingActivationWait, setFirstViewAfterActivation, setFirstViewCompleteAfterActivation, setCurrentDisplayedCardId, getChargeCardById, anyCardOnHold, };
|
|
813
819
|
export { TIME_SERIES_DURATIONS, PerformanceReportKey, TimeSeriesDuration, convertToTimeSeriesSelectionRange, toTimeSeriesDuration, TimeSeriesRange, fetchAggregatedReport, aggregatedReportView, AggregatedReportType, AggregatedReportPersona, EventGroupType, MonthlySummaryType, PerformanceReportSummary, };
|
|
814
820
|
export { fetchApAging, getApAgingReport, updateApAgingUIState, AgingReportId, ApAgingReport, AgingBalance, AgingPeriod, AgingReportSortKey, AgingBalancesByVendor, AgingReportUIState, AgingDetailReportUIState, AgingDetailReportInvoice, AgingDateSelectionType, };
|
|
815
821
|
export { fetchApAgingDetail, AgingReportInvoice, ApAgingDetail, getApAgingDetailForVendor, updateApAgingDetailUIState, };
|