@zeniai/client-epic-state 4.15.84 → 4.15.85
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/animations.d.ts +1 -1
- package/lib/commonStateTypes/animations.js +1 -1
- package/lib/entity/chargeCard/chargeCard.d.ts +26 -8
- package/lib/entity/chargeCard/chargeCard.js +25 -6
- package/lib/entity/chargeCard/chargeCardPayload.d.ts +41 -5
- package/lib/entity/chargeCard/chargeCardPayload.js +20 -8
- package/lib/entity/company/companyPayload.d.ts +12 -1
- package/lib/entity/company/companyPayload.js +14 -0
- package/lib/entity/company/companyStateTypes.d.ts +11 -0
- package/lib/entity/connectedAccount/connectedAccount.d.ts +19 -0
- package/lib/entity/connectedAccount/connectedAccount.js +10 -0
- package/lib/entity/connectedAccount/connectedAccountPayload.d.ts +11 -0
- package/lib/entity/connectedAccount/connectedAccountPayload.js +15 -0
- package/lib/entity/connectedAccount/connectedAccountReducer.d.ts +6 -0
- package/lib/entity/connectedAccount/connectedAccountReducer.js +27 -0
- package/lib/entity/connectedAccount/connectedAccountSelector.d.ts +4 -0
- package/lib/entity/connectedAccount/connectedAccountSelector.js +17 -0
- package/lib/entity/depositAccount/depositAccount.d.ts +20 -2
- package/lib/entity/depositAccount/depositAccountPayload.d.ts +22 -1
- package/lib/entity/depositAccount/depositAccountPayload.js +39 -1
- package/lib/entity/depositAccount/depositAccountReducer.d.ts +2 -2
- package/lib/entity/depositAccount/depositAccountReducer.js +8 -2
- package/lib/entity/depositAccount/depositAccountSelector.d.ts +3 -1
- package/lib/entity/depositAccount/depositAccountSelector.js +10 -0
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +2 -0
- package/lib/entity/tenant/clearAllEpic.d.ts +2 -1
- package/lib/entity/tenant/clearAllEpic.js +2 -0
- package/lib/entity/tenant/tenantSelector.d.ts +5 -1
- package/lib/entity/tenant/tenantSelector.js +6 -0
- package/lib/epic.d.ts +5 -1
- package/lib/epic.js +5 -1
- package/lib/index.d.ts +11 -11
- package/lib/index.js +21 -13
- package/lib/reducer.d.ts +3 -0
- package/lib/reducer.js +3 -0
- package/lib/view/addressView/__mocks__/json/createCompanyAddressSuccess.json +8 -0
- package/lib/view/addressView/__mocks__/json/createCompanyUserAddressSuccess.json +16 -0
- package/lib/view/addressView/addressViewState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +1 -1
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +1 -1
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingSelector.js +4 -3
- package/lib/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigPayload.d.ts +5 -3
- package/lib/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigPayload.js +4 -2
- package/lib/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigReducer.js +8 -3
- package/lib/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigState.d.ts +4 -2
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +12 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.js +26 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailPayload.d.ts +2 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.d.ts +43 -4
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.js +104 -9
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.d.ts +15 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.js +70 -16
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailEpic.d.ts +2 -1
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailEpic.js +12 -3
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardTransactionListEpic.js +2 -1
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchDepositAccountLimitEpic.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchDepositAccountLimitEpic.js +41 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/updateChargeCardLimitEpic.js +2 -2
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/updateDebitCardPinAttemptEpic.d.ts +11 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/updateDebitCardPinAttemptEpic.js +42 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +11 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +20 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListPayload.d.ts +16 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.d.ts +5 -3
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.js +30 -4
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +5 -2
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +24 -13
- package/lib/view/spendManagement/chargeCards/chargeCardList/fetchChargeCardListPageEpic.d.ts +2 -2
- package/lib/view/spendManagement/chargeCards/chargeCardList/fetchChargeCardListPageEpic.js +16 -2
- package/lib/view/spendManagement/chargeCards/chargeCardList/fetchDebitCardSummaryEpic.d.ts +7 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/fetchDebitCardSummaryEpic.js +23 -0
- package/lib/view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewReducer.d.ts +2 -1
- package/lib/view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewReducer.js +4 -2
- package/lib/view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewSelector.d.ts +2 -1
- package/lib/view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewSelector.js +2 -0
- package/lib/view/spendManagement/chargeCards/chargeCardSetUp/epic/acceptChargeCardTermsEpic.js +19 -2
- package/lib/view/spendManagement/chargeCards/issueChargeCard/depositAccountWithLimitPayload.d.ts +6 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/depositAccountWithLimitPayload.js +2 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/fetchDepositAccountListForCardsEpic.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/fetchDepositAccountListForCardsEpic.js +31 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/fetchIssueCardPageEpic.d.ts +2 -2
- package/lib/view/spendManagement/chargeCards/issueChargeCard/fetchIssueCardPageEpic.js +15 -3
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.d.ts +2 -2
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.js +65 -25
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.d.ts +11 -3
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +45 -11
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.d.ts +6 -3
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +33 -18
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.d.ts +41 -8
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.js +0 -21
- package/lib/view/spendManagement/commonSetup/epic/setup/enableSetupEpic.js +9 -0
- package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.js +8 -3
- package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +4 -4
- package/lib/view/spendManagement/commonSetup/setupViewSelector.js +2 -1
- package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +3 -1
- package/lib/view/spendManagement/commonSetup/setupViewState.js +13 -1
- package/lib/view/spendManagement/helpers.d.ts +3 -0
- package/lib/view/spendManagement/helpers.js +13 -1
- package/lib/view/spendManagement/plaidAccount/epic/paymentAccounts/getPaymentAccountsEpic.js +2 -1
- package/lib/view/spendManagement/plaidAccount/epic/paymentAccounts/updatePaymentAccountEpic.js +2 -1
- package/lib/view/spendManagement/plaidAccount/epic/paymentAccounts/updatePaymentAccountLoginStatusEpic.js +2 -1
- package/lib/view/spendManagement/plaidAccount/epic/paymentAccounts/updatePaymentAccountStatusEpic.js +2 -1
- package/lib/view/spendManagement/plaidAccount/epic/plaidConnection/establishPlaidConnectionEpic.js +2 -1
- package/lib/view/spendManagement/plaidAccount/plaidAccountViewReducer.d.ts +10 -10
- package/lib/view/spendManagement/zeniAccounts/checkDeposit/checkDepositSelector.js +1 -1
- package/lib/view/spendManagement/zeniAccounts/depositAccountList/depositAccountListSelector.d.ts +1 -1
- package/lib/view/spendManagement/zeniAccounts/depositAccountList/depositAccountListSelector.js +3 -3
- package/lib/view/spendManagement/zeniAccounts/expressPay/expressPaySelector.js +1 -1
- package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailSelector.js +1 -1
- package/lib/view/spendManagement/zeniAccounts/zeniAccountList/zeniAccountListSelector.js +1 -1
- package/lib/view/twoFactorAuthentication/resendOtpEpic.d.ts +3 -2
- package/lib/view/twoFactorAuthentication/resendOtpEpic.js +44 -19
- package/lib/view/twoFactorAuthentication/sendOtpEpic.d.ts +2 -1
- package/lib/view/twoFactorAuthentication/sendOtpEpic.js +45 -18
- package/lib/view/twoFactorAuthentication/twoFactorAuthentication.d.ts +17 -5
- package/lib/view/twoFactorAuthentication/twoFactorAuthentication.js +33 -0
- package/lib/view/twoFactorAuthentication/twoFactorAuthenticationPayload.d.ts +7 -7
- package/lib/view/twoFactorAuthentication/twoFactorAuthenticationPayload.js +6 -6
- package/lib/view/twoFactorAuthentication/twoFactorAuthenticationReducer.d.ts +22 -6
- package/lib/view/twoFactorAuthentication/twoFactorAuthenticationReducer.js +176 -60
- package/lib/view/twoFactorAuthentication/twoFactorAuthenticationSelector.d.ts +5 -3
- package/lib/view/twoFactorAuthentication/twoFactorAuthenticationSelector.js +13 -2
- package/lib/view/twoFactorAuthentication/verifyOtpEpic.d.ts +5 -2
- package/lib/view/twoFactorAuthentication/verifyOtpEpic.js +46 -5
- package/lib/view/userListView/fetchUserListByTypeEpic.d.ts +2 -2
- package/lib/view/userListView/fetchUserListByTypeEpic.js +4 -3
- package/lib/view/userListView/userListViewPayload.d.ts +11 -0
- package/package.json +1 -1
|
@@ -17,12 +17,34 @@ exports.initialTransactionAttachments = {
|
|
|
17
17
|
error: undefined,
|
|
18
18
|
};
|
|
19
19
|
exports.emptyChargeCardDetail = {
|
|
20
|
+
twoFAState: {
|
|
21
|
+
sendOtpStatus: {
|
|
22
|
+
fetchState: 'Not-Started',
|
|
23
|
+
error: undefined,
|
|
24
|
+
},
|
|
25
|
+
isPhoneVerified: false,
|
|
26
|
+
verifyOtpStatus: {
|
|
27
|
+
fetchState: 'Not-Started',
|
|
28
|
+
error: undefined,
|
|
29
|
+
},
|
|
30
|
+
phone: undefined,
|
|
31
|
+
otpChallenge: undefined,
|
|
32
|
+
},
|
|
33
|
+
isRefreshingViewInBackground: false,
|
|
34
|
+
depositAccountLimitFetchState: {
|
|
35
|
+
fetchState: 'Not-Started',
|
|
36
|
+
error: undefined,
|
|
37
|
+
},
|
|
20
38
|
id: '',
|
|
21
39
|
fetchState: 'Not-Started',
|
|
22
40
|
cvvActivationWaitStatus: {
|
|
23
41
|
fetchState: 'Not-Started',
|
|
24
42
|
error: undefined,
|
|
25
43
|
},
|
|
44
|
+
debitCardSetPinWaitStatus: {
|
|
45
|
+
fetchState: 'Not-Started',
|
|
46
|
+
error: undefined,
|
|
47
|
+
},
|
|
26
48
|
transactionList: {
|
|
27
49
|
isViewReceiptClickedImmediatelyAfterUploadTransactionId: {},
|
|
28
50
|
transactionAttachmentsByTransactionId: {},
|
|
@@ -52,6 +74,10 @@ exports.emptyChargeCardDetail = {
|
|
|
52
74
|
fetchState: 'Not-Started',
|
|
53
75
|
error: undefined,
|
|
54
76
|
},
|
|
77
|
+
updateDebitCardPinAttemptFetchState: {
|
|
78
|
+
fetchState: 'Not-Started',
|
|
79
|
+
error: undefined,
|
|
80
|
+
},
|
|
55
81
|
updateChargeCardLimitFetchState: {
|
|
56
82
|
fetchState: 'Completed',
|
|
57
83
|
error: undefined,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AddressPayload } from '../../../../entity/address/addressPayload';
|
|
2
2
|
import { ChargeCardPayload } from '../../../../entity/chargeCard/chargeCardPayload';
|
|
3
3
|
import { ChargeCardTransactionPayload } from '../../../../entity/chargeCardTransaction/chargeCardTransactionPayload';
|
|
4
|
+
import { ConnectedAccountPayload } from '../../../../entity/connectedAccount/connectedAccountPayload';
|
|
4
5
|
import { AttachmentPayload } from '../../../../entity/transaction/payloadTypes/attachmentPayload';
|
|
5
6
|
import { UserPayload } from '../../../../entity/user/userPayload';
|
|
6
7
|
import { UserRolePayload } from '../../../../entity/userRole/userRolePayload';
|
|
@@ -14,6 +15,7 @@ interface ChargeCardDetailPayload {
|
|
|
14
15
|
users: UserPayload[];
|
|
15
16
|
user_roles: UserRolePayload[];
|
|
16
17
|
addresses: AddressPayload[];
|
|
18
|
+
connected_account: ConnectedAccountPayload;
|
|
17
19
|
}
|
|
18
20
|
export type FetchChargeCardDetailResponse = ZeniAPIResponse<ChargeCardDetailPayload>;
|
|
19
21
|
export type UpdateChargeCardLimitResponse = ZeniAPIResponse<ChargeCardPayload>;
|
|
@@ -15,18 +15,21 @@ export declare const fetchChargeCardDetailPage: import("@reduxjs/toolkit").Actio
|
|
|
15
15
|
cacheOverride: any;
|
|
16
16
|
}, "chargeCardDetail/fetchChargeCardDetail", never, never>, updateChargeCardDetailFetchState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
17
17
|
chargeCardId: ID;
|
|
18
|
+
isRefreshingViewInBackground: boolean;
|
|
18
19
|
fetchState: FetchState;
|
|
19
20
|
error?: ZeniAPIStatus;
|
|
20
|
-
}, "chargeCardDetail/updateChargeCardDetailFetchState">, fetchChargeCardTransactionList: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[chargeCardId: string, pageToken: PageToken, pageTokenType: PageToken], {
|
|
21
|
+
}, "chargeCardDetail/updateChargeCardDetailFetchState">, fetchChargeCardTransactionList: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[chargeCardId: string, pageToken: PageToken, pageTokenType: PageToken, cacheOverride?: any], {
|
|
21
22
|
chargeCardId: string;
|
|
22
23
|
pageToken: PageToken;
|
|
23
24
|
pageTokenType: PageToken;
|
|
25
|
+
cacheOverride: any;
|
|
24
26
|
}, "chargeCardDetail/fetchChargeCardTransactionList", never, never>, updateChargeCardDetailUIState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
25
27
|
chargeCardId: ID;
|
|
26
28
|
uiState: Partial<ChargeCardDetailUiState>;
|
|
27
29
|
}, "chargeCardDetail/updateChargeCardDetailUIState">, updateChargeCardTransactionList: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
28
30
|
chargeCardId: ID;
|
|
29
31
|
data: ChargeCardTransactionListPayload;
|
|
32
|
+
cacheOverride: boolean;
|
|
30
33
|
}, "chargeCardDetail/updateChargeCardTransactionList">, updateChargeCardTransactionUploadReceiptsFetchStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
31
34
|
transactionId: ID;
|
|
32
35
|
chargeCardId: ID;
|
|
@@ -51,7 +54,14 @@ export declare const fetchChargeCardDetailPage: import("@reduxjs/toolkit").Actio
|
|
|
51
54
|
}, "chargeCardDetail/updatePhysicalChargeCardAttemptSuccessOrFailure">, updatePhysicalChargeCardAttempt: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[chargeCardId: string, statusCode: "failed" | "success"], {
|
|
52
55
|
chargeCardId: string;
|
|
53
56
|
statusCode: "failed" | "success";
|
|
54
|
-
}, "chargeCardDetail/updatePhysicalChargeCardAttempt", never, never>,
|
|
57
|
+
}, "chargeCardDetail/updatePhysicalChargeCardAttempt", never, never>, updateDebitCardPinAttempt: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[chargeCardId: string, statusCode: "failed" | "success"], {
|
|
58
|
+
chargeCardId: string;
|
|
59
|
+
statusCode: "failed" | "success";
|
|
60
|
+
}, "chargeCardDetail/updateDebitCardPinAttempt", never, never>, updateDebitCardPinAttemptSuccessOrFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
61
|
+
chargeCardId: ID;
|
|
62
|
+
fetchState: FetchState;
|
|
63
|
+
error?: ZeniAPIStatus;
|
|
64
|
+
}, "chargeCardDetail/updateDebitCardPinAttemptSuccessOrFailure">, updateChargeCardTransactionReceiptsShowTickFetchStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
55
65
|
transactionId: ID;
|
|
56
66
|
chargeCardId: ID;
|
|
57
67
|
shouldShowTick: boolean;
|
|
@@ -69,7 +79,11 @@ export declare const fetchChargeCardDetailPage: import("@reduxjs/toolkit").Actio
|
|
|
69
79
|
chargeCardId: ID;
|
|
70
80
|
}, "chargeCardDetail/startCVVActivationWait">, completeCVVActivationWait: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
71
81
|
chargeCardId: ID;
|
|
72
|
-
}, "chargeCardDetail/completeCVVActivationWait">,
|
|
82
|
+
}, "chargeCardDetail/completeCVVActivationWait">, startDebitCardSetPinWait: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
83
|
+
chargeCardId: ID;
|
|
84
|
+
}, "chargeCardDetail/startDebitCardSetPinWait">, completeDebitCardSetPinWait: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
85
|
+
chargeCardId: ID;
|
|
86
|
+
}, "chargeCardDetail/completeDebitCardSetPinWait">, updateChargeCardDetailUpdateStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
73
87
|
chargeCardId: ID;
|
|
74
88
|
fetchState: FetchState;
|
|
75
89
|
error?: ZeniAPIStatus;
|
|
@@ -82,6 +96,31 @@ export declare const fetchChargeCardDetailPage: import("@reduxjs/toolkit").Actio
|
|
|
82
96
|
chargeCardId: ID;
|
|
83
97
|
fetchState: FetchState;
|
|
84
98
|
error?: ZeniAPIStatus;
|
|
85
|
-
}, "chargeCardDetail/updateChargeCardSpendLimitSuccessOrFailure">,
|
|
99
|
+
}, "chargeCardDetail/updateChargeCardSpendLimitSuccessOrFailure">, fetchDepositAccountLimit: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
100
|
+
depositAccountId: ID;
|
|
101
|
+
chargeCardId: ID;
|
|
102
|
+
}, "chargeCardDetail/fetchDepositAccountLimit">, updateDepositAccountLimitFetchStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
103
|
+
chargeCardId: ID;
|
|
104
|
+
fetchState: FetchState;
|
|
105
|
+
error?: ZeniAPIStatus;
|
|
106
|
+
}, "chargeCardDetail/updateDepositAccountLimitFetchStatus">, sendOtpCardHolder: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
107
|
+
chargeCardId: ID;
|
|
108
|
+
phone: string;
|
|
109
|
+
}, "chargeCardDetail/sendOtpCardHolder">, resendOtpCardHolder: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
110
|
+
chargeCardId: ID;
|
|
111
|
+
}, "chargeCardDetail/resendOtpCardHolder">, sendOtpCardHolderSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
112
|
+
otpChallenge: string;
|
|
113
|
+
chargeCardId: ID;
|
|
114
|
+
}, "chargeCardDetail/sendOtpCardHolderSuccess">, sendOtpCardHolderFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
115
|
+
error: ZeniAPIStatus;
|
|
116
|
+
chargeCardId: ID;
|
|
117
|
+
}, "chargeCardDetail/sendOtpCardHolderFailure">, verifyOtpCardHolder: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
118
|
+
chargeCardId: ID;
|
|
119
|
+
}, "chargeCardDetail/verifyOtpCardHolder">, verifyOtpCardHolderSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
120
|
+
chargeCardId: ID;
|
|
121
|
+
}, "chargeCardDetail/verifyOtpCardHolderSuccess">, verifyOtpCardHolderFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
122
|
+
error: ZeniAPIStatus;
|
|
123
|
+
chargeCardId: ID;
|
|
124
|
+
}, "chargeCardDetail/verifyOtpCardHolderFailure">, clearChargeCardDetail: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"chargeCardDetail/clearChargeCardDetail">;
|
|
86
125
|
declare const _default: import("redux").Reducer<ChargeCardDetailState>;
|
|
87
126
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.clearChargeCardDetail = exports.updateChargeCardSpendLimitSuccessOrFailure = exports.updateChargeCardSpendLimit = exports.updateChargeCardDetailUpdateStatus = exports.completeCVVActivationWait = exports.startCVVActivationWait = exports.updateChargeCardDetail = exports.updateChargeCardTransactionListFailure = exports.updateChargeCardTransactionAttachmentsInCardDetail = exports.updateChargeCardTransactionReceiptsShowTickFetchStatus = exports.updatePhysicalChargeCardAttempt = exports.updatePhysicalChargeCardAttemptSuccessOrFailure = exports.updateChargeCardTransactionAttachmentsFailure = exports.updateChargeCardTransactionIsViewReceiptClicked = exports.fetchChargeCardTransactionAttachments = exports.updateChargeCardTransactionUploadReceiptsFetchStatus = exports.updateChargeCardTransactionList = exports.updateChargeCardDetailUIState = exports.fetchChargeCardTransactionList = exports.updateChargeCardDetailFetchState = exports.fetchChargeCardDetail = exports.fetchChargeCardDetailPage = exports.initialState = void 0;
|
|
4
|
+
exports.clearChargeCardDetail = exports.verifyOtpCardHolderFailure = exports.verifyOtpCardHolderSuccess = exports.verifyOtpCardHolder = exports.sendOtpCardHolderFailure = exports.sendOtpCardHolderSuccess = exports.resendOtpCardHolder = exports.sendOtpCardHolder = exports.updateDepositAccountLimitFetchStatus = exports.fetchDepositAccountLimit = exports.updateChargeCardSpendLimitSuccessOrFailure = exports.updateChargeCardSpendLimit = exports.updateChargeCardDetailUpdateStatus = exports.completeDebitCardSetPinWait = exports.startDebitCardSetPinWait = exports.completeCVVActivationWait = exports.startCVVActivationWait = exports.updateChargeCardDetail = exports.updateChargeCardTransactionListFailure = exports.updateChargeCardTransactionAttachmentsInCardDetail = exports.updateChargeCardTransactionReceiptsShowTickFetchStatus = exports.updateDebitCardPinAttemptSuccessOrFailure = exports.updateDebitCardPinAttempt = exports.updatePhysicalChargeCardAttempt = exports.updatePhysicalChargeCardAttemptSuccessOrFailure = exports.updateChargeCardTransactionAttachmentsFailure = exports.updateChargeCardTransactionIsViewReceiptClicked = exports.fetchChargeCardTransactionAttachments = exports.updateChargeCardTransactionUploadReceiptsFetchStatus = exports.updateChargeCardTransactionList = exports.updateChargeCardDetailUIState = exports.fetchChargeCardTransactionList = exports.updateChargeCardDetailFetchState = exports.fetchChargeCardDetail = exports.fetchChargeCardDetailPage = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const sortOrderPayload_1 = require("../../../../commonPayloadTypes/sortOrderPayload");
|
|
7
7
|
const attachmentPayload_1 = require("../../../../entity/transaction/payloadTypes/attachmentPayload");
|
|
@@ -30,7 +30,7 @@ const chargeCardDetail = (0, toolkit_1.createSlice)({
|
|
|
30
30
|
if (action.payload.cacheOverride === true ||
|
|
31
31
|
detail == null ||
|
|
32
32
|
detail.fetchState !== 'In-Progress') {
|
|
33
|
-
draft.detailById[chargeCardId] = Object.assign(Object.assign({}, chargeCardDetail_1.emptyChargeCardDetail), { id: chargeCardId });
|
|
33
|
+
draft.detailById[chargeCardId] = Object.assign(Object.assign(Object.assign({}, chargeCardDetail_1.emptyChargeCardDetail), draft.detailById[chargeCardId]), { id: chargeCardId, isRefreshingViewInBackground: action.payload.cacheOverride });
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
prepare(chargeCardId, cacheOverride = false) {
|
|
@@ -40,10 +40,11 @@ const chargeCardDetail = (0, toolkit_1.createSlice)({
|
|
|
40
40
|
},
|
|
41
41
|
},
|
|
42
42
|
updateChargeCardDetailFetchState(draft, action) {
|
|
43
|
-
const { chargeCardId, fetchState, error } = action.payload;
|
|
43
|
+
const { chargeCardId, fetchState, error, isRefreshingViewInBackground } = action.payload;
|
|
44
44
|
const existingCardDetail = draft.detailById[chargeCardId];
|
|
45
45
|
draft.detailById[chargeCardId] = Object.assign(Object.assign({}, existingCardDetail), { fetchState,
|
|
46
|
-
error
|
|
46
|
+
error,
|
|
47
|
+
isRefreshingViewInBackground });
|
|
47
48
|
},
|
|
48
49
|
fetchChargeCardTransactionList: {
|
|
49
50
|
reducer(draft, action) {
|
|
@@ -53,19 +54,21 @@ const chargeCardDetail = (0, toolkit_1.createSlice)({
|
|
|
53
54
|
? 0
|
|
54
55
|
: existingCardDetail.transactionList.uiState.scrollYOffset, pageToken: pageToken, pageTokenType: pageTokenType }) }) });
|
|
55
56
|
},
|
|
56
|
-
prepare(chargeCardId, pageToken, pageTokenType) {
|
|
57
|
+
prepare(chargeCardId, pageToken, pageTokenType, cacheOverride = false) {
|
|
57
58
|
return {
|
|
58
|
-
payload: { chargeCardId, pageToken, pageTokenType },
|
|
59
|
+
payload: { chargeCardId, pageToken, pageTokenType, cacheOverride },
|
|
59
60
|
};
|
|
60
61
|
},
|
|
61
62
|
},
|
|
62
63
|
updateChargeCardTransactionList(draft, action) {
|
|
63
|
-
const { chargeCardId, data } = action.payload;
|
|
64
|
+
const { chargeCardId, data, cacheOverride } = action.payload;
|
|
64
65
|
const existingCardDetail = draft.detailById[chargeCardId];
|
|
65
66
|
const newTransactionIds = data.transactions.map((tran) => tran.transaction_id);
|
|
66
67
|
draft.detailById[chargeCardId] = Object.assign(Object.assign({}, existingCardDetail), { transactionList: Object.assign(Object.assign({}, existingCardDetail.transactionList), { transactionIds: [
|
|
67
68
|
...new Set([
|
|
68
|
-
...
|
|
69
|
+
...(cacheOverride
|
|
70
|
+
? []
|
|
71
|
+
: existingCardDetail.transactionList.transactionIds),
|
|
69
72
|
...newTransactionIds,
|
|
70
73
|
]),
|
|
71
74
|
], fetchState: 'Completed', error: undefined, uiState: Object.assign(Object.assign({}, existingCardDetail.transactionList.uiState), { sortOrder: (0, sortOrderPayload_1.mapSortOrderPayloadToSortOrder)(data.query.sort_order), sortKey: data.query.sort_by === 'transaction_date'
|
|
@@ -117,6 +120,29 @@ const chargeCardDetail = (0, toolkit_1.createSlice)({
|
|
|
117
120
|
error,
|
|
118
121
|
} });
|
|
119
122
|
},
|
|
123
|
+
updateDebitCardPinAttempt: {
|
|
124
|
+
reducer(draft, action) {
|
|
125
|
+
const { chargeCardId } = action.payload;
|
|
126
|
+
const existingCardDetail = draft.detailById[chargeCardId];
|
|
127
|
+
draft.detailById[chargeCardId] = Object.assign(Object.assign({}, existingCardDetail), { updateDebitCardPinAttemptFetchState: {
|
|
128
|
+
fetchState: 'In-Progress',
|
|
129
|
+
error: undefined,
|
|
130
|
+
} });
|
|
131
|
+
},
|
|
132
|
+
prepare(chargeCardId, statusCode) {
|
|
133
|
+
return {
|
|
134
|
+
payload: { chargeCardId, statusCode },
|
|
135
|
+
};
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
updateDebitCardPinAttemptSuccessOrFailure(draft, action) {
|
|
139
|
+
const { chargeCardId, fetchState, error } = action.payload;
|
|
140
|
+
const existingCardDetail = draft.detailById[chargeCardId];
|
|
141
|
+
draft.detailById[chargeCardId] = Object.assign(Object.assign({}, existingCardDetail), { updateDebitCardPinAttemptFetchState: {
|
|
142
|
+
fetchState,
|
|
143
|
+
error,
|
|
144
|
+
} });
|
|
145
|
+
},
|
|
120
146
|
updateChargeCardDetail: {
|
|
121
147
|
reducer(draft, action) {
|
|
122
148
|
const { chargeCardId } = action.payload;
|
|
@@ -189,6 +215,12 @@ const chargeCardDetail = (0, toolkit_1.createSlice)({
|
|
|
189
215
|
},
|
|
190
216
|
} }) });
|
|
191
217
|
},
|
|
218
|
+
startDebitCardSetPinWait(draft, action) {
|
|
219
|
+
draft.detailById[action.payload.chargeCardId].debitCardSetPinWaitStatus.fetchState = 'In-Progress';
|
|
220
|
+
},
|
|
221
|
+
completeDebitCardSetPinWait(draft, action) {
|
|
222
|
+
draft.detailById[action.payload.chargeCardId].debitCardSetPinWaitStatus.fetchState = 'Completed';
|
|
223
|
+
},
|
|
192
224
|
startCVVActivationWait(draft, action) {
|
|
193
225
|
draft.detailById[action.payload.chargeCardId].cvvActivationWaitStatus.fetchState = 'In-Progress';
|
|
194
226
|
},
|
|
@@ -233,10 +265,73 @@ const chargeCardDetail = (0, toolkit_1.createSlice)({
|
|
|
233
265
|
error,
|
|
234
266
|
} });
|
|
235
267
|
},
|
|
268
|
+
fetchDepositAccountLimit(draft, action) {
|
|
269
|
+
const { chargeCardId } = action.payload;
|
|
270
|
+
draft.detailById[chargeCardId].depositAccountLimitFetchState.fetchState =
|
|
271
|
+
'In-Progress';
|
|
272
|
+
},
|
|
273
|
+
updateDepositAccountLimitFetchStatus(draft, action) {
|
|
274
|
+
const { chargeCardId, fetchState, error } = action.payload;
|
|
275
|
+
draft.detailById[chargeCardId].depositAccountLimitFetchState.fetchState =
|
|
276
|
+
fetchState;
|
|
277
|
+
draft.detailById[chargeCardId].depositAccountLimitFetchState.error =
|
|
278
|
+
error;
|
|
279
|
+
},
|
|
280
|
+
sendOtpCardHolder(draft, action) {
|
|
281
|
+
const { chargeCardId, phone } = action.payload;
|
|
282
|
+
draft.detailById[chargeCardId].twoFAState.sendOtpStatus.fetchState =
|
|
283
|
+
'In-Progress';
|
|
284
|
+
draft.detailById[chargeCardId].twoFAState.sendOtpStatus.error = undefined;
|
|
285
|
+
draft.detailById[chargeCardId].twoFAState.phone = phone;
|
|
286
|
+
},
|
|
287
|
+
resendOtpCardHolder(draft, action) {
|
|
288
|
+
const { chargeCardId } = action.payload;
|
|
289
|
+
draft.detailById[chargeCardId].twoFAState.sendOtpStatus.fetchState =
|
|
290
|
+
'In-Progress';
|
|
291
|
+
draft.detailById[chargeCardId].twoFAState.sendOtpStatus.error = undefined;
|
|
292
|
+
},
|
|
293
|
+
sendOtpCardHolderSuccess(draft, action) {
|
|
294
|
+
const { chargeCardId, otpChallenge } = action.payload;
|
|
295
|
+
if (draft.detailById[chargeCardId].twoFAState.phone != null) {
|
|
296
|
+
draft.detailById[chargeCardId].twoFAState.otpChallenge = otpChallenge;
|
|
297
|
+
}
|
|
298
|
+
draft.detailById[chargeCardId].twoFAState.sendOtpStatus.fetchState =
|
|
299
|
+
'Completed';
|
|
300
|
+
draft.detailById[chargeCardId].twoFAState.sendOtpStatus.error = undefined;
|
|
301
|
+
},
|
|
302
|
+
sendOtpCardHolderFailure(draft, action) {
|
|
303
|
+
const { chargeCardId, error } = action.payload;
|
|
304
|
+
draft.detailById[chargeCardId].twoFAState.sendOtpStatus.fetchState =
|
|
305
|
+
'Error';
|
|
306
|
+
draft.detailById[chargeCardId].twoFAState.sendOtpStatus.error = error;
|
|
307
|
+
},
|
|
308
|
+
verifyOtpCardHolder(draft, action) {
|
|
309
|
+
const { chargeCardId } = action.payload;
|
|
310
|
+
draft.detailById[chargeCardId].twoFAState.verifyOtpStatus.fetchState =
|
|
311
|
+
'In-Progress';
|
|
312
|
+
draft.detailById[chargeCardId].twoFAState.verifyOtpStatus.error =
|
|
313
|
+
undefined;
|
|
314
|
+
},
|
|
315
|
+
verifyOtpCardHolderSuccess(draft, action) {
|
|
316
|
+
const { chargeCardId } = action.payload;
|
|
317
|
+
if (draft.detailById[chargeCardId].twoFAState.phone != null) {
|
|
318
|
+
draft.detailById[chargeCardId].twoFAState.isPhoneVerified = true;
|
|
319
|
+
}
|
|
320
|
+
draft.detailById[chargeCardId].twoFAState.verifyOtpStatus.fetchState =
|
|
321
|
+
'Completed';
|
|
322
|
+
draft.detailById[chargeCardId].twoFAState.verifyOtpStatus.error =
|
|
323
|
+
undefined;
|
|
324
|
+
},
|
|
325
|
+
verifyOtpCardHolderFailure(draft, action) {
|
|
326
|
+
const { chargeCardId, error } = action.payload;
|
|
327
|
+
draft.detailById[chargeCardId].twoFAState.verifyOtpStatus.fetchState =
|
|
328
|
+
'Error';
|
|
329
|
+
draft.detailById[chargeCardId].twoFAState.verifyOtpStatus.error = error;
|
|
330
|
+
},
|
|
236
331
|
clearChargeCardDetail(draft) {
|
|
237
332
|
Object.assign(draft, exports.initialState);
|
|
238
333
|
},
|
|
239
334
|
},
|
|
240
335
|
});
|
|
241
|
-
_a = chargeCardDetail.actions, exports.fetchChargeCardDetailPage = _a.fetchChargeCardDetailPage, exports.fetchChargeCardDetail = _a.fetchChargeCardDetail, exports.updateChargeCardDetailFetchState = _a.updateChargeCardDetailFetchState, exports.fetchChargeCardTransactionList = _a.fetchChargeCardTransactionList, exports.updateChargeCardDetailUIState = _a.updateChargeCardDetailUIState, exports.updateChargeCardTransactionList = _a.updateChargeCardTransactionList, exports.updateChargeCardTransactionUploadReceiptsFetchStatus = _a.updateChargeCardTransactionUploadReceiptsFetchStatus, exports.fetchChargeCardTransactionAttachments = _a.fetchChargeCardTransactionAttachments, exports.updateChargeCardTransactionIsViewReceiptClicked = _a.updateChargeCardTransactionIsViewReceiptClicked, exports.updateChargeCardTransactionAttachmentsFailure = _a.updateChargeCardTransactionAttachmentsFailure, exports.updatePhysicalChargeCardAttemptSuccessOrFailure = _a.updatePhysicalChargeCardAttemptSuccessOrFailure, exports.updatePhysicalChargeCardAttempt = _a.updatePhysicalChargeCardAttempt, exports.updateChargeCardTransactionReceiptsShowTickFetchStatus = _a.updateChargeCardTransactionReceiptsShowTickFetchStatus, exports.updateChargeCardTransactionAttachmentsInCardDetail = _a.updateChargeCardTransactionAttachmentsInCardDetail, exports.updateChargeCardTransactionListFailure = _a.updateChargeCardTransactionListFailure, exports.updateChargeCardDetail = _a.updateChargeCardDetail, exports.startCVVActivationWait = _a.startCVVActivationWait, exports.completeCVVActivationWait = _a.completeCVVActivationWait, exports.updateChargeCardDetailUpdateStatus = _a.updateChargeCardDetailUpdateStatus, exports.updateChargeCardSpendLimit = _a.updateChargeCardSpendLimit, exports.updateChargeCardSpendLimitSuccessOrFailure = _a.updateChargeCardSpendLimitSuccessOrFailure, exports.clearChargeCardDetail = _a.clearChargeCardDetail;
|
|
336
|
+
_a = chargeCardDetail.actions, exports.fetchChargeCardDetailPage = _a.fetchChargeCardDetailPage, exports.fetchChargeCardDetail = _a.fetchChargeCardDetail, exports.updateChargeCardDetailFetchState = _a.updateChargeCardDetailFetchState, exports.fetchChargeCardTransactionList = _a.fetchChargeCardTransactionList, exports.updateChargeCardDetailUIState = _a.updateChargeCardDetailUIState, exports.updateChargeCardTransactionList = _a.updateChargeCardTransactionList, exports.updateChargeCardTransactionUploadReceiptsFetchStatus = _a.updateChargeCardTransactionUploadReceiptsFetchStatus, exports.fetchChargeCardTransactionAttachments = _a.fetchChargeCardTransactionAttachments, exports.updateChargeCardTransactionIsViewReceiptClicked = _a.updateChargeCardTransactionIsViewReceiptClicked, exports.updateChargeCardTransactionAttachmentsFailure = _a.updateChargeCardTransactionAttachmentsFailure, exports.updatePhysicalChargeCardAttemptSuccessOrFailure = _a.updatePhysicalChargeCardAttemptSuccessOrFailure, exports.updatePhysicalChargeCardAttempt = _a.updatePhysicalChargeCardAttempt, exports.updateDebitCardPinAttempt = _a.updateDebitCardPinAttempt, exports.updateDebitCardPinAttemptSuccessOrFailure = _a.updateDebitCardPinAttemptSuccessOrFailure, exports.updateChargeCardTransactionReceiptsShowTickFetchStatus = _a.updateChargeCardTransactionReceiptsShowTickFetchStatus, exports.updateChargeCardTransactionAttachmentsInCardDetail = _a.updateChargeCardTransactionAttachmentsInCardDetail, exports.updateChargeCardTransactionListFailure = _a.updateChargeCardTransactionListFailure, exports.updateChargeCardDetail = _a.updateChargeCardDetail, exports.startCVVActivationWait = _a.startCVVActivationWait, exports.completeCVVActivationWait = _a.completeCVVActivationWait, exports.startDebitCardSetPinWait = _a.startDebitCardSetPinWait, exports.completeDebitCardSetPinWait = _a.completeDebitCardSetPinWait, exports.updateChargeCardDetailUpdateStatus = _a.updateChargeCardDetailUpdateStatus, exports.updateChargeCardSpendLimit = _a.updateChargeCardSpendLimit, exports.updateChargeCardSpendLimitSuccessOrFailure = _a.updateChargeCardSpendLimitSuccessOrFailure, exports.fetchDepositAccountLimit = _a.fetchDepositAccountLimit, exports.updateDepositAccountLimitFetchStatus = _a.updateDepositAccountLimitFetchStatus, exports.sendOtpCardHolder = _a.sendOtpCardHolder, exports.resendOtpCardHolder = _a.resendOtpCardHolder, exports.sendOtpCardHolderSuccess = _a.sendOtpCardHolderSuccess, exports.sendOtpCardHolderFailure = _a.sendOtpCardHolderFailure, exports.verifyOtpCardHolder = _a.verifyOtpCardHolder, exports.verifyOtpCardHolderSuccess = _a.verifyOtpCardHolderSuccess, exports.verifyOtpCardHolderFailure = _a.verifyOtpCardHolderFailure, exports.clearChargeCardDetail = _a.clearChargeCardDetail;
|
|
242
337
|
exports.default = chargeCardDetail.reducer;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { FetchStateAndError, ID } from '../../../../commonStateTypes/common';
|
|
2
2
|
import { SelectorView } from '../../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
|
+
import { ChargeCard } from '../../../../entity/chargeCard/chargeCard';
|
|
3
4
|
import { ChargeCardTransaction } from '../../../../entity/chargeCardTransaction/chargeCardTransaction';
|
|
5
|
+
import { ConnectedAccount } from '../../../../entity/connectedAccount/connectedAccount';
|
|
6
|
+
import { DepositAccountWithLimit } from '../../../../entity/depositAccount/depositAccount';
|
|
4
7
|
import { Attachment } from '../../../../entity/transaction/stateTypes/attachment';
|
|
5
8
|
import { RootState } from '../../../../reducer';
|
|
6
9
|
import { TwoFactorAuthenticationView } from '../../../twoFactorAuthentication/twoFactorAuthenticationSelector';
|
|
@@ -10,6 +13,7 @@ import { ChargeCardWithUser } from '../chargeCardList/chargeCardListSelector';
|
|
|
10
13
|
import { ChargeCardDetailUiState } from './chargeCardDetail';
|
|
11
14
|
export interface ChargeCardDetailSelectorView extends SelectorView {
|
|
12
15
|
chargeCardConfig: ChargeCardConfigState;
|
|
16
|
+
isRefreshingViewInBackground: boolean;
|
|
13
17
|
transactions: ChargeCardTransaction[];
|
|
14
18
|
uploadReceiptsFetchStateByTransactionId: Record<ID, FetchStateAndError>;
|
|
15
19
|
uploadReceiptsShowTickByTransactionId: Record<ID, boolean>;
|
|
@@ -21,12 +25,23 @@ export interface ChargeCardDetailSelectorView extends SelectorView {
|
|
|
21
25
|
updateFetchState: FetchStateAndError;
|
|
22
26
|
updatePhysicalChargeCardAttemptFetchState: FetchStateAndError;
|
|
23
27
|
creditAccount: CreditAccount;
|
|
28
|
+
depositAccountLimitFetchState: FetchStateAndError;
|
|
24
29
|
updateChargeCardLimitFetchState: FetchStateAndError;
|
|
30
|
+
depositAccountLimit?: DepositAccountWithLimit;
|
|
25
31
|
chargeCard?: ChargeCardWithUser;
|
|
32
|
+
connectedAccount?: ConnectedAccount;
|
|
26
33
|
}
|
|
27
34
|
export declare const getChargeCardDetailView: (state: RootState, chargeCardId: ID, includeCreditAccountInfo: boolean) => ChargeCardDetailSelectorView;
|
|
35
|
+
export interface DebitCardPinSetSelectorView extends SelectorView {
|
|
36
|
+
updateDebitCardPinAttemptFetchState: FetchStateAndError;
|
|
37
|
+
updateStatus: FetchStateAndError;
|
|
38
|
+
isRefreshingViewInBackground: boolean;
|
|
39
|
+
chargeCard?: ChargeCard;
|
|
40
|
+
}
|
|
41
|
+
export declare const getDebitCardSetPinView: (state: RootState, chargeCardId: ID) => DebitCardPinSetSelectorView;
|
|
28
42
|
export interface ChargeCardCVVActivateSelectorView extends SelectorView {
|
|
29
43
|
updatePhysicalChargeCardAttemptFetchState: FetchStateAndError;
|
|
44
|
+
isRefreshingViewInBackground: boolean;
|
|
30
45
|
updateStatus: FetchStateAndError;
|
|
31
46
|
chargeCard?: ChargeCardWithUser;
|
|
32
47
|
}
|
|
@@ -3,24 +3,33 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getChargeCardTransactionAttachmentView = exports.getChargeCardCVVActivateView = exports.getChargeCardDetailView = void 0;
|
|
6
|
+
exports.getChargeCardTransactionAttachmentView = exports.getChargeCardCVVActivateView = exports.getDebitCardSetPinView = exports.getChargeCardDetailView = void 0;
|
|
7
7
|
const get_1 = __importDefault(require("lodash/get"));
|
|
8
8
|
const reduceFetchState_1 = require("../../../../commonStateTypes/reduceFetchState");
|
|
9
9
|
const addressSelector_1 = require("../../../../entity/address/addressSelector");
|
|
10
10
|
const chargeCardSelector_1 = require("../../../../entity/chargeCard/chargeCardSelector");
|
|
11
11
|
const chargeCardTransactionSelector_1 = require("../../../../entity/chargeCardTransaction/chargeCardTransactionSelector");
|
|
12
12
|
const classSelector_1 = require("../../../../entity/class/classSelector");
|
|
13
|
+
const connectedAccountSelector_1 = require("../../../../entity/connectedAccount/connectedAccountSelector");
|
|
14
|
+
const depositAccountSelector_1 = require("../../../../entity/depositAccount/depositAccountSelector");
|
|
13
15
|
const userSelector_1 = require("../../../../entity/user/userSelector");
|
|
14
16
|
const userRoleSelector_1 = require("../../../../entity/userRole/userRoleSelector");
|
|
17
|
+
const twoFactorAuthentication_1 = require("../../../twoFactorAuthentication/twoFactorAuthentication");
|
|
15
18
|
const twoFactorAuthenticationSelector_1 = require("../../../twoFactorAuthentication/twoFactorAuthenticationSelector");
|
|
16
19
|
const chargeCardDetail_1 = require("./chargeCardDetail");
|
|
17
20
|
const getChargeCardDetailView = (state, chargeCardId, includeCreditAccountInfo) => {
|
|
18
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
19
|
-
const { tenantState, addressState, chargeCardDetailState, chargeCardState, classState, userState, userRoleState, chargeCardConfigState, chargeCardTransactionState, chargeCardListState, } = state;
|
|
20
|
-
const twoFactorAuthenticationView = (0, twoFactorAuthenticationSelector_1.
|
|
21
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
22
|
+
const { tenantState, addressState, chargeCardDetailState, chargeCardState, classState, userState, userRoleState, chargeCardConfigState, chargeCardTransactionState, chargeCardListState, connectedAccountState, depositAccountState, } = state;
|
|
23
|
+
const twoFactorAuthenticationView = (0, twoFactorAuthenticationSelector_1.getTwoFactorAuthenticationViewForChargeCardHolder)(state, chargeCardId);
|
|
21
24
|
const loggedInUserId = (_b = (_a = tenantState.loggedInUser) === null || _a === void 0 ? void 0 : _a.userId) !== null && _b !== void 0 ? _b : '';
|
|
22
25
|
const loggedInUserPhone = (_e = (_c = twoFactorAuthenticationView.phone) !== null && _c !== void 0 ? _c : (_d = (0, userSelector_1.getUserByUserId)(userState, loggedInUserId)) === null || _d === void 0 ? void 0 : _d.phone) !== null && _e !== void 0 ? _e : '';
|
|
23
26
|
let chargeCardWithUser = undefined;
|
|
27
|
+
let connectedAccount = undefined;
|
|
28
|
+
let depositAccountLimitFetchState = {
|
|
29
|
+
fetchState: 'Not-Started',
|
|
30
|
+
error: undefined,
|
|
31
|
+
};
|
|
32
|
+
let depositAccountLimit = undefined;
|
|
24
33
|
const chargeCardDetail = (0, get_1.default)(chargeCardDetailState.detailById, chargeCardId, undefined);
|
|
25
34
|
const chargeCard = (0, chargeCardSelector_1.getChargeCardById)(chargeCardState, chargeCardId);
|
|
26
35
|
let reducedFetchState = {
|
|
@@ -58,6 +67,7 @@ const getChargeCardDetailView = (state, chargeCardId, includeCreditAccountInfo)
|
|
|
58
67
|
? (0, addressSelector_1.getAddressByAddressId)(addressState, chargeCard.mailingAddressId)
|
|
59
68
|
: undefined;
|
|
60
69
|
const billingAddress = (0, addressSelector_1.getAddressByAddressId)(addressState, chargeCard.billingAddressId);
|
|
70
|
+
connectedAccount = (0, connectedAccountSelector_1.getConnectedAccountByConnectedAccountId)(connectedAccountState, chargeCard.connectedAccountId);
|
|
61
71
|
if (cardCreatedByUser == null ||
|
|
62
72
|
cardHolderUser == null ||
|
|
63
73
|
cardHolderUserRole == null ||
|
|
@@ -75,6 +85,9 @@ const getChargeCardDetailView = (state, chargeCardId, includeCreditAccountInfo)
|
|
|
75
85
|
error: chargeCardDetail.transactionList.error,
|
|
76
86
|
};
|
|
77
87
|
uiState = chargeCardDetail.transactionList.uiState;
|
|
88
|
+
depositAccountLimitFetchState =
|
|
89
|
+
chargeCardDetail.depositAccountLimitFetchState;
|
|
90
|
+
depositAccountLimit = (0, depositAccountSelector_1.getDepositAccountLimitForChargeCardByDepositAccountId)(depositAccountState, chargeCard.connectedAccountId);
|
|
78
91
|
}
|
|
79
92
|
return {
|
|
80
93
|
fetchState: reducedFetchState.fetchState,
|
|
@@ -82,34 +95,76 @@ const getChargeCardDetailView = (state, chargeCardId, includeCreditAccountInfo)
|
|
|
82
95
|
fetchState: 'Not-Started',
|
|
83
96
|
error: undefined,
|
|
84
97
|
},
|
|
85
|
-
|
|
98
|
+
isRefreshingViewInBackground: (_g = chargeCardDetail === null || chargeCardDetail === void 0 ? void 0 : chargeCardDetail.isRefreshingViewInBackground) !== null && _g !== void 0 ? _g : false,
|
|
99
|
+
updatePhysicalChargeCardAttemptFetchState: (_h = chargeCardDetail === null || chargeCardDetail === void 0 ? void 0 : chargeCardDetail.updatePhysicalChargeCardAttemptFetchState) !== null && _h !== void 0 ? _h : {
|
|
86
100
|
fetchState: 'Not-Started',
|
|
87
101
|
error: undefined,
|
|
88
102
|
},
|
|
89
|
-
updateChargeCardLimitFetchState: (
|
|
103
|
+
updateChargeCardLimitFetchState: (_j = chargeCardDetail === null || chargeCardDetail === void 0 ? void 0 : chargeCardDetail.updateChargeCardLimitFetchState) !== null && _j !== void 0 ? _j : {
|
|
90
104
|
fetchState: 'Not-Started',
|
|
91
105
|
error: undefined,
|
|
92
106
|
},
|
|
93
107
|
chargeCard: chargeCardWithUser,
|
|
108
|
+
connectedAccount,
|
|
94
109
|
error: reducedFetchState.error,
|
|
95
110
|
chargeCardConfig: chargeCardConfigState,
|
|
96
111
|
transactions,
|
|
97
|
-
uploadReceiptsFetchStateByTransactionId: (
|
|
98
|
-
uploadReceiptsShowTickByTransactionId: (
|
|
99
|
-
isViewReceiptClickedImmediatelyAfterUploadTransactionId: (
|
|
112
|
+
uploadReceiptsFetchStateByTransactionId: (_k = chargeCardDetail === null || chargeCardDetail === void 0 ? void 0 : chargeCardDetail.transactionList.uploadReceiptsFetchStateByTransactionId) !== null && _k !== void 0 ? _k : {},
|
|
113
|
+
uploadReceiptsShowTickByTransactionId: (_l = chargeCardDetail === null || chargeCardDetail === void 0 ? void 0 : chargeCardDetail.transactionList.uploadReceiptsShowTickByTransactionId) !== null && _l !== void 0 ? _l : {},
|
|
114
|
+
isViewReceiptClickedImmediatelyAfterUploadTransactionId: (_m = chargeCardDetail === null || chargeCardDetail === void 0 ? void 0 : chargeCardDetail.transactionList.isViewReceiptClickedImmediatelyAfterUploadTransactionId) !== null && _m !== void 0 ? _m : {},
|
|
100
115
|
uiState,
|
|
101
116
|
transactionListFetchState,
|
|
102
117
|
twoFAView: twoFactorAuthenticationView,
|
|
103
118
|
loggedInUserPhone,
|
|
119
|
+
depositAccountLimitFetchState,
|
|
120
|
+
depositAccountLimit,
|
|
104
121
|
version: '1.0',
|
|
105
122
|
creditAccount: chargeCardListState.creditAccount,
|
|
106
123
|
};
|
|
107
124
|
};
|
|
108
125
|
exports.getChargeCardDetailView = getChargeCardDetailView;
|
|
126
|
+
const getDebitCardSetPinView = (state, chargeCardId) => {
|
|
127
|
+
var _a, _b, _c, _d, _e;
|
|
128
|
+
const { chargeCardDetailState, chargeCardState, chargeCardConfigState } = state;
|
|
129
|
+
const twoFactorAuthenticationView = (_a = (0, twoFactorAuthenticationSelector_1.getTwoFactorAuthenticationViewForChargeCardHolder)(state, chargeCardId)) !== null && _a !== void 0 ? _a : twoFactorAuthentication_1.initialTwoFactorAuthentication;
|
|
130
|
+
const chargeCardDetail = (0, get_1.default)(chargeCardDetailState.detailById, chargeCardId, undefined);
|
|
131
|
+
const chargeCard = (0, chargeCardSelector_1.getChargeCardById)(chargeCardState, chargeCardId);
|
|
132
|
+
let reducedFetchState = {
|
|
133
|
+
fetchState: 'Not-Started',
|
|
134
|
+
error: undefined,
|
|
135
|
+
};
|
|
136
|
+
if (chargeCardDetail) {
|
|
137
|
+
reducedFetchState = (0, reduceFetchState_1.reduceFetchState)([
|
|
138
|
+
chargeCardDetail,
|
|
139
|
+
chargeCardConfigState,
|
|
140
|
+
]);
|
|
141
|
+
}
|
|
142
|
+
const debitCardSetPinWaitStatus = (_c = (_b = chargeCardDetailState.detailById[chargeCardId]) === null || _b === void 0 ? void 0 : _b.debitCardSetPinWaitStatus) !== null && _c !== void 0 ? _c : {
|
|
143
|
+
fetchState: 'Not-Started',
|
|
144
|
+
error: undefined,
|
|
145
|
+
};
|
|
146
|
+
const updateStatus = (0, reduceFetchState_1.reduceAllFetchState)([
|
|
147
|
+
twoFactorAuthenticationView.sendOtpStatus,
|
|
148
|
+
debitCardSetPinWaitStatus,
|
|
149
|
+
]);
|
|
150
|
+
return {
|
|
151
|
+
fetchState: reducedFetchState.fetchState,
|
|
152
|
+
updateStatus,
|
|
153
|
+
isRefreshingViewInBackground: (_d = chargeCardDetail === null || chargeCardDetail === void 0 ? void 0 : chargeCardDetail.isRefreshingViewInBackground) !== null && _d !== void 0 ? _d : false,
|
|
154
|
+
updateDebitCardPinAttemptFetchState: (_e = chargeCardDetail === null || chargeCardDetail === void 0 ? void 0 : chargeCardDetail.updateDebitCardPinAttemptFetchState) !== null && _e !== void 0 ? _e : {
|
|
155
|
+
fetchState: 'Not-Started',
|
|
156
|
+
error: undefined,
|
|
157
|
+
},
|
|
158
|
+
chargeCard: chargeCard,
|
|
159
|
+
error: reducedFetchState.error,
|
|
160
|
+
version: '1.0',
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
exports.getDebitCardSetPinView = getDebitCardSetPinView;
|
|
109
164
|
const getChargeCardCVVActivateView = (state, chargeCardId) => {
|
|
110
|
-
var _a, _b, _c;
|
|
165
|
+
var _a, _b, _c, _d, _e;
|
|
111
166
|
const { addressState, chargeCardDetailState, chargeCardState, classState, userState, userRoleState, chargeCardConfigState, } = state;
|
|
112
|
-
const twoFactorAuthenticationView = (0, twoFactorAuthenticationSelector_1.
|
|
167
|
+
const twoFactorAuthenticationView = (_a = (0, twoFactorAuthenticationSelector_1.getTwoFactorAuthenticationViewForChargeCardHolder)(state, chargeCardId)) !== null && _a !== void 0 ? _a : twoFactorAuthentication_1.initialTwoFactorAuthentication;
|
|
113
168
|
let chargeCardWithUser = undefined;
|
|
114
169
|
const chargeCardDetail = (0, get_1.default)(chargeCardDetailState.detailById, chargeCardId, undefined);
|
|
115
170
|
const chargeCard = (0, chargeCardSelector_1.getChargeCardById)(chargeCardState, chargeCardId);
|
|
@@ -123,9 +178,7 @@ const getChargeCardCVVActivateView = (state, chargeCardId) => {
|
|
|
123
178
|
chargeCardConfigState,
|
|
124
179
|
]);
|
|
125
180
|
}
|
|
126
|
-
if (chargeCardDetail &&
|
|
127
|
-
chargeCardDetail.fetchState === 'Completed' &&
|
|
128
|
-
chargeCard != null) {
|
|
181
|
+
if (chargeCardDetail && chargeCard != null) {
|
|
129
182
|
const cardCreatedByUser = (0, userSelector_1.getUserByUserId)(userState, chargeCard.cardCreaterUserId);
|
|
130
183
|
const cardHolderUser = (0, userSelector_1.getUserByUserId)(userState, chargeCard.cardHolderUserId);
|
|
131
184
|
const cardHolderUserRole = (0, userRoleSelector_1.getUserRoleByUserId)(userRoleState, chargeCard.cardHolderUserId);
|
|
@@ -150,7 +203,7 @@ const getChargeCardCVVActivateView = (state, chargeCardId) => {
|
|
|
150
203
|
mailingAddress,
|
|
151
204
|
billingAddress });
|
|
152
205
|
}
|
|
153
|
-
const cvvActivationWaitStatus = (
|
|
206
|
+
const cvvActivationWaitStatus = (_c = (_b = chargeCardDetailState.detailById[chargeCardId]) === null || _b === void 0 ? void 0 : _b.cvvActivationWaitStatus) !== null && _c !== void 0 ? _c : {
|
|
154
207
|
fetchState: 'Not-Started',
|
|
155
208
|
error: undefined,
|
|
156
209
|
};
|
|
@@ -161,7 +214,8 @@ const getChargeCardCVVActivateView = (state, chargeCardId) => {
|
|
|
161
214
|
return {
|
|
162
215
|
fetchState: reducedFetchState.fetchState,
|
|
163
216
|
updateStatus,
|
|
164
|
-
|
|
217
|
+
isRefreshingViewInBackground: (_d = chargeCardDetail === null || chargeCardDetail === void 0 ? void 0 : chargeCardDetail.isRefreshingViewInBackground) !== null && _d !== void 0 ? _d : false,
|
|
218
|
+
updatePhysicalChargeCardAttemptFetchState: (_e = chargeCardDetail === null || chargeCardDetail === void 0 ? void 0 : chargeCardDetail.updatePhysicalChargeCardAttemptFetchState) !== null && _e !== void 0 ? _e : {
|
|
165
219
|
fetchState: 'Not-Started',
|
|
166
220
|
error: undefined,
|
|
167
221
|
},
|
package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailEpic.d.ts
CHANGED
|
@@ -2,10 +2,11 @@ import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { updateAddress, updateAddresses } from '../../../../entity/address/addressReducer';
|
|
4
4
|
import { updateChargeCard } from '../../../../entity/chargeCard/chargeCardReducer';
|
|
5
|
+
import { updateConnectedAccount } from '../../../../entity/connectedAccount/connectedAccountReducer';
|
|
5
6
|
import { updateAllUsers } from '../../../../entity/user/userReducer';
|
|
6
7
|
import { updateUserRoles } from '../../../../entity/userRole/userRoleReducer';
|
|
7
8
|
import { RootState } from '../../../../reducer';
|
|
8
9
|
import { ZeniAPI } from '../../../../zeniAPI';
|
|
9
10
|
import { fetchChargeCardDetail, updateChargeCardDetailFetchState } from './chargeCardDetailReducer';
|
|
10
|
-
export type ActionType = ReturnType<typeof fetchChargeCardDetail> | ReturnType<typeof updateChargeCardDetailFetchState> | ReturnType<typeof updateAllUsers> | ReturnType<typeof updateUserRoles> | ReturnType<typeof updateAddress> | ReturnType<typeof updateAddresses> | ReturnType<typeof updateChargeCard>;
|
|
11
|
+
export type ActionType = ReturnType<typeof fetchChargeCardDetail> | ReturnType<typeof updateChargeCardDetailFetchState> | ReturnType<typeof updateAllUsers> | ReturnType<typeof updateUserRoles> | ReturnType<typeof updateAddress> | ReturnType<typeof updateConnectedAccount> | ReturnType<typeof updateAddresses> | ReturnType<typeof updateChargeCard>;
|
|
11
12
|
export declare const fetchChargeCardDetailEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -9,6 +9,7 @@ const rxjs_1 = require("rxjs");
|
|
|
9
9
|
const operators_1 = require("rxjs/operators");
|
|
10
10
|
const addressReducer_1 = require("../../../../entity/address/addressReducer");
|
|
11
11
|
const chargeCardReducer_1 = require("../../../../entity/chargeCard/chargeCardReducer");
|
|
12
|
+
const connectedAccountReducer_1 = require("../../../../entity/connectedAccount/connectedAccountReducer");
|
|
12
13
|
const userReducer_1 = require("../../../../entity/user/userReducer");
|
|
13
14
|
const userRoleReducer_1 = require("../../../../entity/userRole/userRoleReducer");
|
|
14
15
|
const responsePayload_1 = require("../../../../responsePayload");
|
|
@@ -23,15 +24,21 @@ const fetchChargeCardDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe((
|
|
|
23
24
|
chargeCardDetail.fetchState !== 'In-Progress') {
|
|
24
25
|
chargeCardAction.push((0, chargeCardDetailReducer_1.updateChargeCardDetailFetchState)({
|
|
25
26
|
chargeCardId,
|
|
27
|
+
isRefreshingViewInBackground: cacheOverride,
|
|
26
28
|
fetchState: 'In-Progress',
|
|
27
29
|
}));
|
|
30
|
+
const query = {
|
|
31
|
+
is_include_card_activation_events: true,
|
|
32
|
+
is_include_connected_account_info: true,
|
|
33
|
+
is_include_card_pin_change_attempt_history: true,
|
|
34
|
+
};
|
|
28
35
|
const getChargeCardDetail$ = zeniAPI
|
|
29
|
-
.getJSON(`${zeniAPI.apiEndPoints.cardMicroServiceBaseUrl}/1.0/cards/${chargeCardId}?query
|
|
30
|
-
"is_include_card_activation_events":true}`)
|
|
36
|
+
.getJSON(`${zeniAPI.apiEndPoints.cardMicroServiceBaseUrl}/1.0/cards/${chargeCardId}?query=${JSON.stringify(query)}`)
|
|
31
37
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
32
38
|
if ((0, responsePayload_1.isSuccessStatus)(response) && response.data != null) {
|
|
33
|
-
return (0, rxjs_1.of)((0, chargeCardReducer_1.updateChargeCard)(response.data.card), (0, userReducer_1.updateAllUsers)({ users: response.data.users }), (0, userRoleReducer_1.updateUserRoles)(response.data.user_roles), (0, addressReducer_1.updateAddresses)(response.data.addresses), (0, chargeCardDetailReducer_1.updateChargeCardDetailFetchState)({
|
|
39
|
+
return (0, rxjs_1.of)((0, chargeCardReducer_1.updateChargeCard)(response.data.card), (0, userReducer_1.updateAllUsers)({ users: response.data.users }), (0, userRoleReducer_1.updateUserRoles)(response.data.user_roles), (0, addressReducer_1.updateAddresses)(response.data.addresses), (0, connectedAccountReducer_1.updateConnectedAccount)(response.data.connected_account), (0, chargeCardDetailReducer_1.updateChargeCardDetailFetchState)({
|
|
34
40
|
chargeCardId,
|
|
41
|
+
isRefreshingViewInBackground: false,
|
|
35
42
|
fetchState: 'Completed',
|
|
36
43
|
}));
|
|
37
44
|
}
|
|
@@ -39,6 +46,7 @@ const fetchChargeCardDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe((
|
|
|
39
46
|
return (0, rxjs_1.of)((0, chargeCardDetailReducer_1.updateChargeCardDetailFetchState)({
|
|
40
47
|
chargeCardId,
|
|
41
48
|
fetchState: 'Error',
|
|
49
|
+
isRefreshingViewInBackground: false,
|
|
42
50
|
error: response.status,
|
|
43
51
|
}));
|
|
44
52
|
}
|
|
@@ -46,6 +54,7 @@ const fetchChargeCardDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe((
|
|
|
46
54
|
return (0, rxjs_1.of)((0, chargeCardDetailReducer_1.updateChargeCardDetailFetchState)({
|
|
47
55
|
chargeCardId,
|
|
48
56
|
fetchState: 'Error',
|
|
57
|
+
isRefreshingViewInBackground: false,
|
|
49
58
|
error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch card detail API call errored out' +
|
|
50
59
|
JSON.stringify(error)),
|
|
51
60
|
}));
|
package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardTransactionListEpic.js
CHANGED
|
@@ -10,7 +10,7 @@ const chargeCardDetail_1 = require("./chargeCardDetail");
|
|
|
10
10
|
const chargeCardDetailReducer_1 = require("./chargeCardDetailReducer");
|
|
11
11
|
const fetchChargeCardTransactionListEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(chargeCardDetailReducer_1.fetchChargeCardTransactionList.match), (0, operators_1.switchMap)((action) => {
|
|
12
12
|
var _a, _b;
|
|
13
|
-
const { chargeCardId, pageToken, pageTokenType } = action.payload;
|
|
13
|
+
const { chargeCardId, pageToken, pageTokenType, cacheOverride } = action.payload;
|
|
14
14
|
const { uiState } = (_b = (_a = state$.value.chargeCardDetailState.detailById[chargeCardId]) === null || _a === void 0 ? void 0 : _a.transactionList) !== null && _b !== void 0 ? _b : chargeCardDetail_1.emptyChargeCardDetail.transactionList;
|
|
15
15
|
const queryParam = {
|
|
16
16
|
page_token: pageToken,
|
|
@@ -27,6 +27,7 @@ const fetchChargeCardTransactionListEpic = (actions$, state$, zeniAPI) => action
|
|
|
27
27
|
return (0, rxjs_1.of)((0, chargeCardTransactionReducer_1.updateChargeCardTransactions)(response.data.transactions), (0, chargeCardDetailReducer_1.updateChargeCardTransactionList)({
|
|
28
28
|
chargeCardId,
|
|
29
29
|
data: response.data,
|
|
30
|
+
cacheOverride,
|
|
30
31
|
}));
|
|
31
32
|
}
|
|
32
33
|
else {
|