@zeniai/client-epic-state 4.9.66 → 4.9.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/entity/billPay/billTransaction/billTransactionPayload.d.ts +10 -7
- package/lib/entity/billPay/billTransaction/billTransactionPayload.js +1 -1
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +2 -1
- package/lib/entity/billPay/recurringBills/recurringBillsState.d.ts +2 -2
- package/lib/entity/chargeCard/chargeCard.d.ts +2 -2
- package/lib/epic.d.ts +4 -1
- package/lib/epic.js +4 -1
- package/lib/index.d.ts +12 -11
- package/lib/index.js +28 -16
- package/lib/view/commonVendorView/vendorView/epics/fetchVendorEpic.d.ts +2 -2
- package/lib/view/commonVendorView/vendorView/epics/fetchVendorEpic.js +1 -0
- package/lib/view/commonVendorView/vendorView/vendorViewReducer.d.ts +1 -1
- package/lib/view/commonVendorView/vendorView/vendorViewReducer.js +5 -2
- package/lib/view/settingsView/epic/fetchNotificationSettingsViewEpic.d.ts +6 -0
- package/lib/view/settingsView/epic/fetchNotificationSettingsViewEpic.js +13 -0
- package/lib/view/settingsView/epic/saveNotificationSettingsEpic.js +42 -28
- package/lib/view/settingsView/settingsViewHelpers.d.ts +4 -2
- package/lib/view/settingsView/settingsViewHelpers.js +18 -7
- package/lib/view/settingsView/settingsViewPayload.d.ts +10 -0
- package/lib/view/settingsView/settingsViewReducer.d.ts +1 -1
- package/lib/view/settingsView/settingsViewReducer.js +79 -44
- package/lib/view/settingsView/settingsViewSelector.d.ts +3 -8
- package/lib/view/settingsView/settingsViewSelector.js +18 -2
- package/lib/view/settingsView/settingsViewState.d.ts +31 -8
- package/lib/view/settingsView/settingsViewState.js +9 -9
- package/lib/view/settingsView/types/settingsViewSelectorTypes.d.ts +12 -0
- package/lib/view/spendManagement/billPay/billList/billListSelector.js +2 -2
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.js +4 -1
- package/lib/view/spendManagement/billPay/editBillView/editBillViewReducer.d.ts +7 -1
- package/lib/view/spendManagement/billPay/editBillView/editBillViewReducer.js +21 -2
- package/lib/view/spendManagement/billPay/editBillView/epics/fetchVendorAndUpdateBillLocalDataEpic.d.ts +10 -0
- package/lib/view/spendManagement/billPay/editBillView/epics/fetchVendorAndUpdateBillLocalDataEpic.js +130 -0
- package/lib/view/spendManagement/billPay/editBillView/epics/parseInvoiceToBillEpic.d.ts +2 -2
- package/lib/view/spendManagement/billPay/editBillView/epics/parseInvoiceToBillEpic.js +27 -6
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +4 -4
- package/lib/view/spendManagement/zeniAccounts/transferDetail/fetchReviewTransferDetailEpic.d.ts +7 -0
- package/lib/view/spendManagement/zeniAccounts/transferDetail/fetchReviewTransferDetailEpic.js +40 -0
- package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailPayload.d.ts +15 -0
- package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailPayload.js +11 -0
- package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailReducer.d.ts +2 -1
- package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailReducer.js +33 -2
- package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailSelector.d.ts +2 -1
- package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailSelector.js +2 -1
- package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailState.d.ts +13 -0
- package/package.json +1 -1
|
@@ -29,7 +29,7 @@ const billTransactionState_1 = require("../../../../../entity/billPay/billTransa
|
|
|
29
29
|
const workingDayHelper_1 = require("../../../../../commonStateTypes/workingDayHelper");
|
|
30
30
|
const companySelector_1 = require("../../../../../entity/company/companySelector");
|
|
31
31
|
const parseInvoiceToBillEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(editBillViewReducer_1.parseInvoiceToBill.match), (0, operators_1.mergeMap)((action) => {
|
|
32
|
-
var _a, _b, _c, _d, _e, _f;
|
|
32
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
33
33
|
const { invoiceProcessingPayload, isVendorRecommendationFeatureEnabled } = action.payload;
|
|
34
34
|
const state = state$.value;
|
|
35
35
|
const showSkipAutofill = state.editBillDetailViewState.newBillState.showSkipAutofill;
|
|
@@ -84,6 +84,7 @@ const parseInvoiceToBillEpic = (actions$, state$) => actions$.pipe((0, operators
|
|
|
84
84
|
if (vendorCurrency === currencyInInvoice) {
|
|
85
85
|
finalVendor = suggestedVendor;
|
|
86
86
|
showVendorGptRecommendationText = true;
|
|
87
|
+
recommendedVendorId = suggestedVendor === null || suggestedVendor === void 0 ? void 0 : suggestedVendor.id;
|
|
87
88
|
}
|
|
88
89
|
else {
|
|
89
90
|
isVendorWithNewCurrency = true;
|
|
@@ -101,10 +102,28 @@ const parseInvoiceToBillEpic = (actions$, state$) => actions$.pipe((0, operators
|
|
|
101
102
|
const finalBill = Object.assign(Object.assign({}, (0, exports.toBillDetailLocalData)(state, showVendorGptRecommendationText, invoiceProcessingPayload.bills[0], finalVendor, recommendedVendorId)), { file: file });
|
|
102
103
|
const addBillAutoFields = (0, exports.getAutoFieldsData)(finalBill, isVendorWithNewCurrency, vendorNameFromInvoice, currencyInInvoice, vendorCurrency);
|
|
103
104
|
if (finalVendor != null) {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
let actions = [];
|
|
106
|
+
if (finalVendor.vendorCurrencyCode != null &&
|
|
107
|
+
finalVendor.vendorCurrencyCode !== 'USD') {
|
|
108
|
+
actions.push((0, editBillViewReducer_1.convertAmountToHomeCurrency)(true, {
|
|
109
|
+
amount: (_e = (_d = finalBill.totalAmount) === null || _d === void 0 ? void 0 : _d.amount) !== null && _e !== void 0 ? _e : 0,
|
|
110
|
+
currencyCode: finalVendor.vendorCurrencyCode,
|
|
111
|
+
currencySymbol: finalVendor.vendorCurrencySymbol,
|
|
112
|
+
}, 'USD'));
|
|
113
|
+
}
|
|
114
|
+
actions = [
|
|
115
|
+
...actions,
|
|
116
|
+
(0, editBillViewReducer_1.saveBillUpdatesToLocalStore)({ billDetailLocalData: finalBill }),
|
|
117
|
+
(0, previousBillsReducer_1.fetchPreviousBills)(finalVendor.qboId, false),
|
|
118
|
+
(0, billPayReviewReducer_1.fetchDuplicateBill)(finalVendor.name, finalVendor.id, (_g = (_f = finalBill.totalAmount) === null || _f === void 0 ? void 0 : _f.amount) !== null && _g !== void 0 ? _g : 0, (_h = finalBill.whatForSection) === null || _h === void 0 ? void 0 : _h.invoiceNumber),
|
|
119
|
+
(0, editBillViewReducer_1.updateShowAutofill)(false),
|
|
120
|
+
(0, editBillViewReducer_1.updateAddBillAutoFields)(addBillAutoFields),
|
|
121
|
+
(0, editBillViewReducer_1.updateBillUploadFetchState)({
|
|
122
|
+
fetchState: 'Completed',
|
|
123
|
+
error: undefined,
|
|
124
|
+
}),
|
|
125
|
+
];
|
|
126
|
+
return (0, rxjs_1.from)(actions);
|
|
108
127
|
}
|
|
109
128
|
else {
|
|
110
129
|
const actions = [
|
|
@@ -187,7 +206,9 @@ const toBillDetailLocalData = (state, showVendorGptRecommendationText, billPaylo
|
|
|
187
206
|
const isPayNowEnabled = payNowCutOffTime != null
|
|
188
207
|
? (0, zeniDayJS_1.dateNow)().isSameOrBefore(payNowCutOffTime)
|
|
189
208
|
: false;
|
|
190
|
-
const fromAccountType = (
|
|
209
|
+
const fromAccountType = ((_l = billPayload.bill_pay_info) === null || _l === void 0 ? void 0 : _l.from_account.account_type) != null
|
|
210
|
+
? (0, billPayConfigPayload_1.getAccountTypeSubConfigCodeKey)((0, billPayConfigState_1.toAccType)((_m = billPayload.bill_pay_info) === null || _m === void 0 ? void 0 : _m.from_account.account_type))
|
|
211
|
+
: undefined;
|
|
191
212
|
const bookCloseDate = currentCompany === null || currentCompany === void 0 ? void 0 : currentCompany.company.companyInfo.bookCloseDate;
|
|
192
213
|
const invoiceDate = Boolean(billPayload.transaction_date) === true
|
|
193
214
|
? (0, editBillViewSelector_1.getInvoiceDate)('draft', (0, zeniDayJS_1.date)(billPayload.transaction_date), bookCloseDate)
|
|
@@ -40,14 +40,14 @@ const getChargeCardListView = (state, includeCreditAccount) => {
|
|
|
40
40
|
const sortKey = chargeCardListState.uiState.sortKey;
|
|
41
41
|
const sortOrder = (0, sortOrderPayload_1.getSortOrder)(chargeCardListState.uiState.sortOrder);
|
|
42
42
|
const cardsInOrder = (0, orderBy_1.default)(cards, (card) => {
|
|
43
|
-
var _a, _b, _c, _d;
|
|
43
|
+
var _a, _b, _c, _d, _e;
|
|
44
44
|
switch (sortKey) {
|
|
45
45
|
case 'owner':
|
|
46
|
-
return (
|
|
46
|
+
return ((_c = `${(_a = card.cardHolderUser) === null || _a === void 0 ? void 0 : _a.firstName.toLowerCase()} ${(_b = card.cardHolderUser) === null || _b === void 0 ? void 0 : _b.lastName.toLowerCase()}`) !== null && _c !== void 0 ? _c : '');
|
|
47
47
|
case 'cardName':
|
|
48
|
-
return card.cardName;
|
|
48
|
+
return card.cardName.toLowerCase();
|
|
49
49
|
case 'department':
|
|
50
|
-
return (
|
|
50
|
+
return (_e = (_d = card.department) === null || _d === void 0 ? void 0 : _d.className.toLowerCase()) !== null && _e !== void 0 ? _e : '';
|
|
51
51
|
case 'utilisation':
|
|
52
52
|
return card.limit.amount - card.available.amount;
|
|
53
53
|
case 'limit':
|
package/lib/view/spendManagement/zeniAccounts/transferDetail/fetchReviewTransferDetailEpic.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { RootState } from '../../../../reducer';
|
|
4
|
+
import { ZeniAPI } from '../../../../zeniAPI';
|
|
5
|
+
import { fetchReviewTransferDetail, updateReviewTransferDetail, updateReviewTransferDetailFailure } from './transferDetailReducer';
|
|
6
|
+
export declare type ActionType = ReturnType<typeof fetchReviewTransferDetail> | ReturnType<typeof updateReviewTransferDetail> | ReturnType<typeof updateReviewTransferDetailFailure>;
|
|
7
|
+
export declare const fetchReviewTransferDetailEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchReviewTransferDetailEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const responsePayload_1 = require("../../../../responsePayload");
|
|
7
|
+
const transferDetailReducer_1 = require("./transferDetailReducer");
|
|
8
|
+
const helpers_1 = require("../../helpers");
|
|
9
|
+
const fetchReviewTransferDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(transferDetailReducer_1.fetchReviewTransferDetail.match), (0, operators_1.switchMap)(() => {
|
|
10
|
+
var _a, _b, _c, _d, _e, _f;
|
|
11
|
+
const state = state$.value;
|
|
12
|
+
const localData = state.transferDetailState.localData;
|
|
13
|
+
const payload = {
|
|
14
|
+
from_account: {
|
|
15
|
+
account_id: (_a = localData.transferFrom) === null || _a === void 0 ? void 0 : _a.id,
|
|
16
|
+
account_type: (_c = (0, helpers_1.accountTypeSubConfigCodeToAccType)((_b = localData.transferFrom) === null || _b === void 0 ? void 0 : _b.accType)) !== null && _c !== void 0 ? _c : '',
|
|
17
|
+
},
|
|
18
|
+
to_account: {
|
|
19
|
+
account_id: (_d = localData.transferTo) === null || _d === void 0 ? void 0 : _d.id,
|
|
20
|
+
account_type: (_f = (0, helpers_1.accountTypeSubConfigCodeToAccType)((_e = localData.transferTo) === null || _e === void 0 ? void 0 : _e.accType)) !== null && _f !== void 0 ? _f : '',
|
|
21
|
+
},
|
|
22
|
+
amount: localData.amount.amount,
|
|
23
|
+
currency_code: localData.amount.currencyCode,
|
|
24
|
+
currency_symbol: localData.amount.currencySymbol,
|
|
25
|
+
};
|
|
26
|
+
return zeniAPI
|
|
27
|
+
.postAndGetJSON(`${zeniAPI.apiEndPoints.payMicroServiceBaseUrl}/1.0/deposit-accounts/transfers/review`, payload)
|
|
28
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
29
|
+
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
30
|
+
return (0, rxjs_1.of)((0, transferDetailReducer_1.updateReviewTransferDetail)(response.data));
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
return (0, rxjs_1.of)((0, transferDetailReducer_1.updateReviewTransferDetailFailure)(response.status));
|
|
34
|
+
}
|
|
35
|
+
}), (0, operators_1.catchError)((error) => {
|
|
36
|
+
return (0, rxjs_1.of)((0, transferDetailReducer_1.updateReviewTransferDetailFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Review Transfer Detail REST API call errored out' +
|
|
37
|
+
JSON.stringify(error))));
|
|
38
|
+
}));
|
|
39
|
+
}));
|
|
40
|
+
exports.fetchReviewTransferDetailEpic = fetchReviewTransferDetailEpic;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { AmountPayload } from '../../../../entity/reimbursement/reimbursementPayload';
|
|
1
2
|
import { ZeniAPIResponse } from '../../../../responsePayload';
|
|
3
|
+
import { ReviewTransferMoney } from './transferDetailState';
|
|
2
4
|
export interface TransferMoneyPayload {
|
|
3
5
|
transaction_id: string;
|
|
4
6
|
amount: number;
|
|
@@ -6,4 +8,17 @@ export interface TransferMoneyPayload {
|
|
|
6
8
|
currency_symbol: string;
|
|
7
9
|
transaction_creation_time: string;
|
|
8
10
|
}
|
|
11
|
+
export interface TransferSchedulePayload {
|
|
12
|
+
amount: number;
|
|
13
|
+
currency_code: string;
|
|
14
|
+
currency_symbol: string;
|
|
15
|
+
schedule_time: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ReviewTransferMoneyPayload {
|
|
18
|
+
is_show_daily_ach_limit_warning: boolean;
|
|
19
|
+
daily_ach_debit_limit: AmountPayload | null;
|
|
20
|
+
transfer_schedules: TransferSchedulePayload[];
|
|
21
|
+
}
|
|
22
|
+
export declare const mapReviewTransferMoneyPayloadToReviewTransferMoney: (payload: ReviewTransferMoneyPayload) => ReviewTransferMoney;
|
|
23
|
+
export declare type ReviewTransferMoneyResponse = ZeniAPIResponse<ReviewTransferMoneyPayload>;
|
|
9
24
|
export declare type TransferMoneyResponse = ZeniAPIResponse<TransferMoneyPayload>;
|
|
@@ -1,2 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mapReviewTransferMoneyPayloadToReviewTransferMoney = void 0;
|
|
4
|
+
const amount_1 = require("../../../../commonStateTypes/amount");
|
|
5
|
+
const zeniDayJS_1 = require("../../../../zeniDayJS");
|
|
6
|
+
const mapReviewTransferMoneyPayloadToReviewTransferMoney = (payload) => ({
|
|
7
|
+
isShowDailyAchLimitWarning: payload.is_show_daily_ach_limit_warning,
|
|
8
|
+
dailyAchDebitLimit: payload.daily_ach_debit_limit != null
|
|
9
|
+
? (0, amount_1.toAmount)(payload.daily_ach_debit_limit.amount, payload.daily_ach_debit_limit.currency_code, payload.daily_ach_debit_limit.currency_symbol)
|
|
10
|
+
: (0, amount_1.toAmount)(0, 'USD', '$'),
|
|
11
|
+
transferSchedules: payload.transfer_schedules.map((transfer_schedule) => (Object.assign(Object.assign({}, (0, amount_1.toAmount)(transfer_schedule.amount, transfer_schedule.currency_code, transfer_schedule.currency_symbol)), { scheduleTime: (0, zeniDayJS_1.dateInLocal)(transfer_schedule.schedule_time) }))),
|
|
12
|
+
});
|
|
13
|
+
exports.mapReviewTransferMoneyPayloadToReviewTransferMoney = mapReviewTransferMoneyPayloadToReviewTransferMoney;
|
|
@@ -2,12 +2,13 @@ import { FetchState } from '../../../../commonStateTypes/common';
|
|
|
2
2
|
import { DepositAccount } from '../../../../entity/depositAccount/depositAccount';
|
|
3
3
|
import { ZeniAPIStatus } from '../../../../responsePayload';
|
|
4
4
|
import { TransferDetailLocalData, TransferDetailState } from './transferDetailState';
|
|
5
|
+
import { ReviewTransferMoneyPayload } from './transferDetailPayload';
|
|
5
6
|
export declare const initialState: TransferDetailState;
|
|
6
7
|
export declare const transferMoney: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[depositAccountId?: string | undefined], {
|
|
7
8
|
depositAccountId: string | undefined;
|
|
8
9
|
}, string, never, never>, transferMoneySuccessOrFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
9
10
|
fetchState: FetchState;
|
|
10
11
|
error?: ZeniAPIStatus<Record<string, unknown>> | undefined;
|
|
11
|
-
}, string>, updateLocalStore: import("@reduxjs/toolkit").ActionCreatorWithPayload<TransferDetailLocalData, string>, updateTransferToLocalData: import("@reduxjs/toolkit").ActionCreatorWithPayload<DepositAccount, string>, clearTransferDetail: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
12
|
+
}, string>, updateLocalStore: import("@reduxjs/toolkit").ActionCreatorWithPayload<TransferDetailLocalData, string>, updateTransferToLocalData: import("@reduxjs/toolkit").ActionCreatorWithPayload<DepositAccount, string>, fetchReviewTransferDetail: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, updateReviewTransferDetail: import("@reduxjs/toolkit").ActionCreatorWithPayload<ReviewTransferMoneyPayload, string>, updateReviewTransferDetailFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, string>, clearReviewTransferDetail: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, clearTransferDetail: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
12
13
|
declare const _default: import("@reduxjs/toolkit").Reducer<TransferDetailState, import("@reduxjs/toolkit").AnyAction>;
|
|
13
14
|
export default _default;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.clearTransferDetail = exports.updateTransferToLocalData = exports.updateLocalStore = exports.transferMoneySuccessOrFailure = exports.transferMoney = exports.initialState = void 0;
|
|
4
|
+
exports.clearTransferDetail = exports.clearReviewTransferDetail = exports.updateReviewTransferDetailFailure = exports.updateReviewTransferDetail = exports.fetchReviewTransferDetail = exports.updateTransferToLocalData = exports.updateLocalStore = exports.transferMoneySuccessOrFailure = exports.transferMoney = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
+
const transferDetailPayload_1 = require("./transferDetailPayload");
|
|
6
7
|
exports.initialState = {
|
|
7
8
|
localData: {
|
|
8
9
|
amount: {
|
|
@@ -13,6 +14,19 @@ exports.initialState = {
|
|
|
13
14
|
transferFrom: undefined,
|
|
14
15
|
transferTo: undefined,
|
|
15
16
|
},
|
|
17
|
+
reviewTransferDetail: {
|
|
18
|
+
reviewTransferMoney: {
|
|
19
|
+
isShowDailyAchLimitWarning: false,
|
|
20
|
+
dailyAchDebitLimit: {
|
|
21
|
+
amount: 0,
|
|
22
|
+
currencyCode: 'USD',
|
|
23
|
+
currencySymbol: '$',
|
|
24
|
+
},
|
|
25
|
+
transferSchedules: [],
|
|
26
|
+
},
|
|
27
|
+
fetchState: 'Not-Started',
|
|
28
|
+
error: undefined,
|
|
29
|
+
},
|
|
16
30
|
fetchState: 'Not-Started',
|
|
17
31
|
error: undefined,
|
|
18
32
|
};
|
|
@@ -60,10 +74,27 @@ const transferDetail = (0, toolkit_1.createSlice)({
|
|
|
60
74
|
draft.fetchState = action.payload.fetchState;
|
|
61
75
|
draft.error = action.payload.error;
|
|
62
76
|
},
|
|
77
|
+
fetchReviewTransferDetail(draft) {
|
|
78
|
+
draft.reviewTransferDetail.fetchState = 'In-Progress';
|
|
79
|
+
draft.reviewTransferDetail.error = undefined;
|
|
80
|
+
},
|
|
81
|
+
updateReviewTransferDetail(draft, action) {
|
|
82
|
+
draft.reviewTransferDetail.fetchState = 'Completed';
|
|
83
|
+
draft.reviewTransferDetail.error = undefined;
|
|
84
|
+
draft.reviewTransferDetail.reviewTransferMoney =
|
|
85
|
+
(0, transferDetailPayload_1.mapReviewTransferMoneyPayloadToReviewTransferMoney)(action.payload);
|
|
86
|
+
},
|
|
87
|
+
updateReviewTransferDetailFailure(draft, action) {
|
|
88
|
+
draft.reviewTransferDetail.fetchState = 'Error';
|
|
89
|
+
draft.reviewTransferDetail.error = action.payload;
|
|
90
|
+
},
|
|
91
|
+
clearReviewTransferDetail(draft) {
|
|
92
|
+
draft.reviewTransferDetail = exports.initialState.reviewTransferDetail;
|
|
93
|
+
},
|
|
63
94
|
clearTransferDetail(draft) {
|
|
64
95
|
Object.assign(draft, exports.initialState);
|
|
65
96
|
},
|
|
66
97
|
},
|
|
67
98
|
});
|
|
68
|
-
_a = transferDetail.actions, exports.transferMoney = _a.transferMoney, exports.transferMoneySuccessOrFailure = _a.transferMoneySuccessOrFailure, exports.updateLocalStore = _a.updateLocalStore, exports.updateTransferToLocalData = _a.updateTransferToLocalData, exports.clearTransferDetail = _a.clearTransferDetail;
|
|
99
|
+
_a = transferDetail.actions, exports.transferMoney = _a.transferMoney, exports.transferMoneySuccessOrFailure = _a.transferMoneySuccessOrFailure, exports.updateLocalStore = _a.updateLocalStore, exports.updateTransferToLocalData = _a.updateTransferToLocalData, exports.fetchReviewTransferDetail = _a.fetchReviewTransferDetail, exports.updateReviewTransferDetail = _a.updateReviewTransferDetail, exports.updateReviewTransferDetailFailure = _a.updateReviewTransferDetailFailure, exports.clearReviewTransferDetail = _a.clearReviewTransferDetail, exports.clearTransferDetail = _a.clearTransferDetail;
|
|
69
100
|
exports.default = transferDetail.reducer;
|
|
@@ -3,11 +3,12 @@ import { SelectorView } from '../../../../commonStateTypes/viewAndReport/viewAnd
|
|
|
3
3
|
import { DepositAccount } from '../../../../entity/depositAccount/depositAccount';
|
|
4
4
|
import { PaymentAccount } from '../../../../entity/paymentAccount/paymentAccountState';
|
|
5
5
|
import { RootState } from '../../../../reducer';
|
|
6
|
-
import { TransferDetailLocalData, TransferMoneyParty } from './transferDetailState';
|
|
6
|
+
import { ReviewTransferDetail, TransferDetailLocalData, TransferMoneyParty } from './transferDetailState';
|
|
7
7
|
export interface TransferDetailSelectorView extends SelectorView {
|
|
8
8
|
transferDetailLocalData: TransferDetailLocalData;
|
|
9
9
|
transferMoneyParties: TransferMoneyParty[];
|
|
10
10
|
transferMoneyPartiesFetchState: FetchState;
|
|
11
|
+
reviewTransferDetail: ReviewTransferDetail;
|
|
11
12
|
primaryPaymentAccount?: PaymentAccount;
|
|
12
13
|
}
|
|
13
14
|
export declare const getTransferDetail: (state: RootState) => TransferDetailSelectorView;
|
|
@@ -7,7 +7,7 @@ const depositAccountListSelector_1 = require("../depositAccountList/depositAccou
|
|
|
7
7
|
const paymentAccountListSelector_1 = require("../paymentAccountList/paymentAccountListSelector");
|
|
8
8
|
const getTransferDetail = (state) => {
|
|
9
9
|
const { transferDetailState, depositAccountState, paymentAccountState, depositAccountListState, paymentAccountListState, } = state;
|
|
10
|
-
const { localData, fetchState, error } = transferDetailState;
|
|
10
|
+
const { localData, fetchState, error, reviewTransferDetail } = transferDetailState;
|
|
11
11
|
const depositAccountsView = (0, depositAccountListSelector_1.getAllDepostAccounts)(depositAccountState, depositAccountListState);
|
|
12
12
|
const paymentAccountsView = (0, paymentAccountListSelector_1.getAllPaymentAccounts)(paymentAccountState, paymentAccountListState);
|
|
13
13
|
let transferParties = [];
|
|
@@ -22,6 +22,7 @@ const getTransferDetail = (state) => {
|
|
|
22
22
|
const primaryPaymentAccount = (0, paymentAccountListSelector_1.getPrimaryPaymentAccount)(paymentAccountState, paymentAccountListState);
|
|
23
23
|
return {
|
|
24
24
|
transferDetailLocalData: localData,
|
|
25
|
+
reviewTransferDetail,
|
|
25
26
|
fetchState,
|
|
26
27
|
error,
|
|
27
28
|
transferMoneyParties: transferParties,
|
|
@@ -2,9 +2,14 @@ import { Amount } from '../../../../commonStateTypes/amount';
|
|
|
2
2
|
import { Balance } from '../../../../commonStateTypes/balance';
|
|
3
3
|
import { FetchStateAndError, ID } from '../../../../commonStateTypes/common';
|
|
4
4
|
import { Logo } from '../../../../entity/paymentAccount/paymentAccountState';
|
|
5
|
+
import { ZeniDate } from '../../../../zeniDayJS';
|
|
5
6
|
import { AccountTypeSubConfigCodeKeyType } from '../../billPay/billPayConfig/billPayConfigState';
|
|
6
7
|
export interface TransferDetailState extends FetchStateAndError {
|
|
7
8
|
localData: TransferDetailLocalData;
|
|
9
|
+
reviewTransferDetail: ReviewTransferDetail;
|
|
10
|
+
}
|
|
11
|
+
export interface ReviewTransferDetail extends FetchStateAndError {
|
|
12
|
+
reviewTransferMoney: ReviewTransferMoney;
|
|
8
13
|
}
|
|
9
14
|
export interface TransferDetailLocalData {
|
|
10
15
|
amount: Amount;
|
|
@@ -19,3 +24,11 @@ export interface TransferMoneyParty {
|
|
|
19
24
|
accountBalance?: Balance;
|
|
20
25
|
logo?: Logo;
|
|
21
26
|
}
|
|
27
|
+
export interface ReviewTransferMoney {
|
|
28
|
+
isShowDailyAchLimitWarning: boolean;
|
|
29
|
+
dailyAchDebitLimit: Amount;
|
|
30
|
+
transferSchedules: TransferSchedule[];
|
|
31
|
+
}
|
|
32
|
+
export interface TransferSchedule extends Amount {
|
|
33
|
+
scheduleTime: ZeniDate;
|
|
34
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.9.
|
|
3
|
+
"version": "4.9.67",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|