@zeniai/client-epic-state 4.9.67 → 4.9.70
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/recurringBills/recurringBillsState.d.ts +2 -2
- package/lib/entity/chargeCard/chargeCard.d.ts +2 -2
- package/lib/epic.d.ts +1 -4
- package/lib/epic.js +1 -4
- package/lib/index.d.ts +11 -12
- package/lib/index.js +16 -28
- package/lib/view/commonVendorView/vendorView/epics/fetchVendorEpic.d.ts +2 -2
- package/lib/view/commonVendorView/vendorView/epics/fetchVendorEpic.js +0 -1
- package/lib/view/commonVendorView/vendorView/vendorViewReducer.d.ts +1 -1
- package/lib/view/commonVendorView/vendorView/vendorViewReducer.js +2 -5
- package/lib/view/settingsView/epic/saveNotificationSettingsEpic.js +28 -42
- package/lib/view/settingsView/settingsViewHelpers.d.ts +2 -4
- package/lib/view/settingsView/settingsViewHelpers.js +7 -18
- package/lib/view/settingsView/settingsViewPayload.d.ts +0 -10
- package/lib/view/settingsView/settingsViewReducer.d.ts +1 -1
- package/lib/view/settingsView/settingsViewReducer.js +44 -79
- package/lib/view/settingsView/settingsViewSelector.d.ts +8 -3
- package/lib/view/settingsView/settingsViewSelector.js +2 -18
- package/lib/view/settingsView/settingsViewState.d.ts +8 -31
- package/lib/view/settingsView/settingsViewState.js +9 -9
- package/lib/view/settingsView/types/settingsViewSelectorTypes.d.ts +0 -12
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.js +1 -4
- package/lib/view/spendManagement/billPay/editBillView/editBillViewReducer.d.ts +1 -7
- package/lib/view/spendManagement/billPay/editBillView/editBillViewReducer.js +2 -21
- package/lib/view/spendManagement/billPay/editBillView/epics/parseInvoiceToBillEpic.js +1 -4
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +4 -4
- package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailPayload.d.ts +0 -15
- package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailPayload.js +0 -11
- package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailReducer.d.ts +1 -2
- package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailReducer.js +2 -33
- package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailSelector.d.ts +1 -2
- package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailSelector.js +1 -2
- package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailState.d.ts +0 -13
- package/package.json +1 -1
- package/lib/view/settingsView/epic/fetchNotificationSettingsViewEpic.d.ts +0 -6
- package/lib/view/settingsView/epic/fetchNotificationSettingsViewEpic.js +0 -13
- package/lib/view/spendManagement/billPay/editBillView/epics/fetchVendorAndUpdateBillLocalDataEpic.d.ts +0 -10
- package/lib/view/spendManagement/billPay/editBillView/epics/fetchVendorAndUpdateBillLocalDataEpic.js +0 -130
- package/lib/view/spendManagement/zeniAccounts/transferDetail/fetchReviewTransferDetailEpic.d.ts +0 -7
- package/lib/view/spendManagement/zeniAccounts/transferDetail/fetchReviewTransferDetailEpic.js +0 -40
|
@@ -1,35 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.clearSettingsView = exports.updateNotificationSettingsOnSaveFailure = exports.updateNotificationSettingsOnSaveSuccess = exports.saveNotificationSettings = exports.resetNotificationSettingsLocalData = exports.updateNotificationSettingsLocalData = exports.updateNotificationSettingsOnFailure = exports.updateNotificationSettingsOnSuccess = exports.fetchNotificationSettings = exports.fetchBankAccountsList = exports.updateBankConnectionOnFailure = exports.updateBankConnectionOnSuccess = exports.fetchBankConnectionsView = exports.updateMyProfileOnFailure = exports.updateMyProfileOnSuccess = exports.
|
|
4
|
+
exports.clearSettingsView = exports.updateNotificationSettingsOnSaveFailure = exports.updateNotificationSettingsOnSaveSuccess = exports.saveNotificationSettings = exports.resetNotificationSettingsLocalData = exports.updateNotificationSettingsLocalData = exports.updateNotificationSettingsOnFailure = exports.updateNotificationSettingsOnSuccess = exports.fetchNotificationSettings = exports.fetchBankAccountsList = exports.updateBankConnectionOnFailure = exports.updateBankConnectionOnSuccess = exports.fetchBankConnectionsView = exports.updateMyProfileOnFailure = exports.updateMyProfileOnSuccess = exports.fetchMyProfile = exports.fetchMyProfileView = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
-
const settingsViewState_1 = require("./settingsViewState");
|
|
7
6
|
const initialNotificationSettingsData = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
pendingReimbursementApprovalNotification: null,
|
|
13
|
-
},
|
|
14
|
-
monthEndInsightsNotificationSettings: {
|
|
15
|
-
enabled: false,
|
|
16
|
-
recipientEmailIds: [],
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
const initialRemindersLocalData = {
|
|
20
|
-
preferredMode: [],
|
|
21
|
-
frequency: 'bi-weekly',
|
|
7
|
+
missingReceiptNotification: null,
|
|
8
|
+
uncategorizedTransactionNotification: null,
|
|
9
|
+
pendingBillApprovalNotification: null,
|
|
10
|
+
pendingReimbursementApprovalNotification: null,
|
|
22
11
|
};
|
|
23
12
|
const initialNotificationSettingsLocalData = {
|
|
24
|
-
monthEndInsights: {
|
|
25
|
-
recipientEmailIds: [],
|
|
26
|
-
notify: false,
|
|
27
|
-
},
|
|
28
13
|
reminders: {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
14
|
+
isMissingReceiptNotificationActive: null,
|
|
15
|
+
isUncategorizedTransactionNotificationActive: null,
|
|
16
|
+
isPendingReimbursementApprovalNotificationActive: null,
|
|
17
|
+
isPendingBillApprovalNotificationActive: null,
|
|
33
18
|
},
|
|
34
19
|
};
|
|
35
20
|
exports.initialState = {
|
|
@@ -101,9 +86,6 @@ const settings = (0, toolkit_1.createSlice)({
|
|
|
101
86
|
draft.bankConnection.fetchState = 'Error';
|
|
102
87
|
draft.bankConnection.error = action.payload;
|
|
103
88
|
},
|
|
104
|
-
fetchNotificationSettingsView() {
|
|
105
|
-
// Do nothing.
|
|
106
|
-
},
|
|
107
89
|
fetchNotificationSettings(draft) {
|
|
108
90
|
draft.notification.fetchState = 'In-Progress';
|
|
109
91
|
draft.notification.error = undefined;
|
|
@@ -156,64 +138,47 @@ const settings = (0, toolkit_1.createSlice)({
|
|
|
156
138
|
},
|
|
157
139
|
},
|
|
158
140
|
});
|
|
159
|
-
_a = settings.actions, exports.fetchMyProfileView = _a.fetchMyProfileView, exports.fetchMyProfile = _a.fetchMyProfile, exports.
|
|
141
|
+
_a = settings.actions, exports.fetchMyProfileView = _a.fetchMyProfileView, exports.fetchMyProfile = _a.fetchMyProfile, exports.updateMyProfileOnSuccess = _a.updateMyProfileOnSuccess, exports.updateMyProfileOnFailure = _a.updateMyProfileOnFailure, exports.fetchBankConnectionsView = _a.fetchBankConnectionsView, exports.updateBankConnectionOnSuccess = _a.updateBankConnectionOnSuccess, exports.updateBankConnectionOnFailure = _a.updateBankConnectionOnFailure, exports.fetchBankAccountsList = _a.fetchBankAccountsList, exports.fetchNotificationSettings = _a.fetchNotificationSettings, exports.updateNotificationSettingsOnSuccess = _a.updateNotificationSettingsOnSuccess, exports.updateNotificationSettingsOnFailure = _a.updateNotificationSettingsOnFailure, exports.updateNotificationSettingsLocalData = _a.updateNotificationSettingsLocalData, exports.resetNotificationSettingsLocalData = _a.resetNotificationSettingsLocalData, exports.saveNotificationSettings = _a.saveNotificationSettings, exports.updateNotificationSettingsOnSaveSuccess = _a.updateNotificationSettingsOnSaveSuccess, exports.updateNotificationSettingsOnSaveFailure = _a.updateNotificationSettingsOnSaveFailure, exports.clearSettingsView = _a.clearSettingsView;
|
|
160
142
|
exports.default = settings.reducer;
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
return {
|
|
167
|
-
preferredMode: reminderNotificationSettingDetails.enabled
|
|
168
|
-
? reminderNotificationSettingDetails.preferredMode
|
|
169
|
-
: [],
|
|
170
|
-
frequency: reminderNotificationSettingDetails.frequency,
|
|
143
|
+
const toNotificationSettings = (data) => {
|
|
144
|
+
const notificationSettingsData = Object.assign({}, initialNotificationSettingsData);
|
|
145
|
+
if (data.is_missing_receipt_notification_active != null) {
|
|
146
|
+
notificationSettingsData.missingReceiptNotification = {
|
|
147
|
+
active: data.is_missing_receipt_notification_active,
|
|
171
148
|
};
|
|
172
149
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
var _a;
|
|
177
|
-
const { monthEndInsightsNotificationSettings, reminderNotificationSettings } = data;
|
|
178
|
-
const { missingReceiptNotification, pendingBillApprovalNotification, pendingReimbursementApprovalNotification, uncategorizedTransactionNotification, } = reminderNotificationSettings;
|
|
179
|
-
return {
|
|
180
|
-
monthEndInsights: {
|
|
181
|
-
notify: (_a = monthEndInsightsNotificationSettings.enabled) !== null && _a !== void 0 ? _a : false,
|
|
182
|
-
recipientEmailIds: monthEndInsightsNotificationSettings.recipientEmailIds,
|
|
183
|
-
},
|
|
184
|
-
reminders: {
|
|
185
|
-
missingReceiptNotification: toRemindersLocalData(missingReceiptNotification),
|
|
186
|
-
pendingBillApprovalNotification: toRemindersLocalData(pendingBillApprovalNotification),
|
|
187
|
-
pendingReimbursementApprovalNotification: toRemindersLocalData(pendingReimbursementApprovalNotification),
|
|
188
|
-
uncategorizedTransactionNotification: toRemindersLocalData(uncategorizedTransactionNotification),
|
|
189
|
-
},
|
|
190
|
-
};
|
|
191
|
-
};
|
|
192
|
-
function toReminderNotificationSettingsDetails(isNotificationActive, remindersPayload) {
|
|
193
|
-
if (isNotificationActive != null && remindersPayload != null) {
|
|
194
|
-
const { frequency_type, preferred_mode } = remindersPayload;
|
|
195
|
-
return {
|
|
196
|
-
enabled: isNotificationActive,
|
|
197
|
-
frequency: frequency_type != null
|
|
198
|
-
? (0, settingsViewState_1.toRemindersFrequencyType)(frequency_type)
|
|
199
|
-
: 'bi-weekly',
|
|
200
|
-
preferredMode: preferred_mode.map((mode) => (0, settingsViewState_1.toNotificationMode)(mode)),
|
|
150
|
+
if (data.is_pending_bill_approval_notification_active != null) {
|
|
151
|
+
notificationSettingsData.pendingBillApprovalNotification = {
|
|
152
|
+
active: data.is_pending_bill_approval_notification_active,
|
|
201
153
|
};
|
|
202
154
|
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
155
|
+
if (data.is_pending_reimbursement_approval_notification_active != null) {
|
|
156
|
+
notificationSettingsData.pendingReimbursementApprovalNotification = {
|
|
157
|
+
active: data.is_pending_reimbursement_approval_notification_active,
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
if (data.is_uncategorized_transaction_notification_active != null) {
|
|
161
|
+
notificationSettingsData.uncategorizedTransactionNotification = {
|
|
162
|
+
active: data.is_uncategorized_transaction_notification_active,
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
return notificationSettingsData;
|
|
166
|
+
};
|
|
167
|
+
const toNotificationSettingsLocalData = (data) => {
|
|
207
168
|
return {
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
169
|
+
reminders: {
|
|
170
|
+
isMissingReceiptNotificationActive: data.missingReceiptNotification != null
|
|
171
|
+
? data.missingReceiptNotification.active
|
|
172
|
+
: null,
|
|
173
|
+
isPendingBillApprovalNotificationActive: data.pendingBillApprovalNotification != null
|
|
174
|
+
? data.pendingBillApprovalNotification.active
|
|
175
|
+
: null,
|
|
176
|
+
isPendingReimbursementApprovalNotificationActive: data.pendingReimbursementApprovalNotification != null
|
|
177
|
+
? data.pendingReimbursementApprovalNotification.active
|
|
178
|
+
: null,
|
|
179
|
+
isUncategorizedTransactionNotificationActive: data.uncategorizedTransactionNotification != null
|
|
180
|
+
? data.uncategorizedTransactionNotification.active
|
|
181
|
+
: null,
|
|
217
182
|
},
|
|
218
183
|
};
|
|
219
184
|
};
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { RootState } from '../../reducer';
|
|
2
2
|
import { FetchStateAndError, ID } from '../../commonStateTypes/common';
|
|
3
|
-
import {
|
|
3
|
+
import { TenantExternalConnections } from '../../entity/tenant/tenantState';
|
|
4
|
+
import { Company } from '../../entity/company/companyStateTypes';
|
|
5
|
+
import { MyBankConnectionsView, BankConnectionsSetupView, MyProfileSelectorView } from './types/settingsViewSelectorTypes';
|
|
4
6
|
import { NotificationSettings } from './settingsViewState';
|
|
5
7
|
export declare function getApprovalRuleViewDetails(state: RootState): FetchStateAndError;
|
|
6
8
|
export declare function getBankConnectionsSetupViewDetails(state: RootState, companyId: ID): BankConnectionsSetupView;
|
|
7
9
|
export declare function getMyBankConnectionsDetails(state: RootState, userId: ID): MyBankConnectionsView;
|
|
10
|
+
export interface IntegrationsView {
|
|
11
|
+
externalConnections: TenantExternalConnections | undefined;
|
|
12
|
+
companyView: Company | undefined;
|
|
13
|
+
}
|
|
8
14
|
export declare function getIntegrationsView(state: RootState, companyId: ID): IntegrationsView;
|
|
9
15
|
export declare const getMyProfileView: (state: RootState) => MyProfileSelectorView;
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const getNotificationSettingsView: (state: RootState) => NotificationSettingsSelectorView;
|
|
16
|
+
export declare const getNotificationSettingsView: (state: RootState) => NotificationSettings;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getNotificationSettingsView = exports.
|
|
3
|
+
exports.getNotificationSettingsView = exports.getMyProfileView = exports.getIntegrationsView = exports.getMyBankConnectionsDetails = exports.getBankConnectionsSetupViewDetails = exports.getApprovalRuleViewDetails = void 0;
|
|
7
4
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
8
|
-
const values_1 = __importDefault(require("lodash/values"));
|
|
9
5
|
const tenantSelector_1 = require("../../entity/tenant/tenantSelector");
|
|
10
6
|
const companySelector_1 = require("../../entity/company/companySelector");
|
|
11
7
|
const userRoleSelector_1 = require("../../entity/userRole/userRoleSelector");
|
|
@@ -121,18 +117,6 @@ exports.getMyProfileView = (0, toolkit_1.createSelector)((state) => state.tenant
|
|
|
121
117
|
}
|
|
122
118
|
return myProfilePeopleView;
|
|
123
119
|
});
|
|
124
|
-
exports.
|
|
120
|
+
exports.getNotificationSettingsView = (0, toolkit_1.createSelector)((state) => state.settingsViewState, (settingsViewState) => {
|
|
125
121
|
return settingsViewState.notification;
|
|
126
122
|
});
|
|
127
|
-
exports.getNotificationSettingsView = (0, toolkit_1.createSelector)((state) => state.settingsViewState, (state) => state.userState, (state) => state.classState, (state) => state.classListState, (state) => (0, userListViewSelector_1.getUserList)(state, 'manager'), (state) => state.peopleState, (settingsViewState, userState, classState, classListState, managersListView, peopleState) => {
|
|
128
|
-
const classList = (0, classSelectorV2_1.getClassesByIds)(classState, {
|
|
129
|
-
classIds: classListState.classIds,
|
|
130
|
-
reportId: 'class_list',
|
|
131
|
-
});
|
|
132
|
-
const fetchState = (0, reduceFetchState_1.reduceAnyFetchState)([
|
|
133
|
-
settingsViewState.notification,
|
|
134
|
-
classListState,
|
|
135
|
-
peopleState,
|
|
136
|
-
]);
|
|
137
|
-
return Object.assign(Object.assign({}, settingsViewState.notification), { allUsers: (0, values_1.default)(userState.userByUserId), classList, managersList: managersListView.users, fetchState: fetchState.fetchState, error: fetchState.error });
|
|
138
|
-
});
|
|
@@ -5,43 +5,20 @@ interface MyProfile extends FetchStateAndError {
|
|
|
5
5
|
interface BankConnection extends FetchStateAndError {
|
|
6
6
|
bankAccountIds: ID[];
|
|
7
7
|
}
|
|
8
|
-
export declare const REMINDER_NOTIFICATION_TYPES: readonly ["missingReceiptNotification", "uncategorizedTransactionNotification", "pendingBillApprovalNotification", "pendingReimbursementApprovalNotification"];
|
|
9
8
|
declare const toReminderTypeKey: (v: string) => "missingReceiptNotification" | "uncategorizedTransactionNotification" | "pendingBillApprovalNotification" | "pendingReimbursementApprovalNotification";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export declare
|
|
14
|
-
export declare const toNotificationMode: (v: string) => "dashboard" | "email";
|
|
15
|
-
export declare type NotificationModeKey = ReturnType<typeof toNotificationMode>;
|
|
16
|
-
export interface MonthEndInsightsNotificationSettingsData {
|
|
17
|
-
enabled: boolean | null;
|
|
18
|
-
recipientEmailIds: string[];
|
|
19
|
-
}
|
|
20
|
-
export interface MonthEndInsightsNotificationSettingsLocalData {
|
|
21
|
-
notify: boolean;
|
|
22
|
-
recipientEmailIds: string[];
|
|
23
|
-
}
|
|
24
|
-
export interface ReminderNotificationSettingDetails {
|
|
25
|
-
enabled: boolean;
|
|
26
|
-
frequency: FrequencyTypeKey;
|
|
27
|
-
preferredMode: NotificationModeKey[];
|
|
28
|
-
}
|
|
29
|
-
export declare type RemindersLocalData = {
|
|
30
|
-
frequency: FrequencyTypeKey;
|
|
31
|
-
preferredMode: NotificationModeKey[];
|
|
32
|
-
};
|
|
33
|
-
export declare type ReminderNotificationSettingsData = Record<ReminderTypeKey, ReminderNotificationSettingDetails | null>;
|
|
34
|
-
export declare type ReminderNotificationSettingsLocalData = Record<ReminderTypeKey, RemindersLocalData>;
|
|
9
|
+
declare type ReminderTypeKey = ReturnType<typeof toReminderTypeKey>;
|
|
10
|
+
declare const toReminderFlagTypeKey: (v: string) => "isMissingReceiptNotificationActive" | "isUncategorizedTransactionNotificationActive" | "isPendingBillApprovalNotificationActive" | "isPendingReimbursementApprovalNotificationActive";
|
|
11
|
+
declare type ReminderFlagTypeKey = ReturnType<typeof toReminderFlagTypeKey>;
|
|
12
|
+
export declare type ReminderNotificationSettingsLocalData = Record<ReminderFlagTypeKey, boolean | null>;
|
|
35
13
|
export interface NotificationSettingsLocalData {
|
|
36
14
|
reminders: ReminderNotificationSettingsLocalData;
|
|
37
|
-
monthEndInsights: MonthEndInsightsNotificationSettingsLocalData;
|
|
38
15
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
monthEndInsightsNotificationSettings: MonthEndInsightsNotificationSettingsData;
|
|
16
|
+
interface ReminderNotificationSettingDetails {
|
|
17
|
+
active: boolean;
|
|
42
18
|
}
|
|
19
|
+
export declare type ReminderNotificationSettingsData = Record<ReminderTypeKey, ReminderNotificationSettingDetails | null>;
|
|
43
20
|
export interface NotificationSettings extends FetchStateAndError {
|
|
44
|
-
notificationSettings:
|
|
21
|
+
notificationSettings: ReminderNotificationSettingsData;
|
|
45
22
|
notificationSettingsLocalData: NotificationSettingsLocalData;
|
|
46
23
|
updateStatus: FetchStateAndError;
|
|
47
24
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toNotificationMode = exports.NOTIFICATION_MODES = exports.toRemindersFrequencyType = exports.REMINDER_NOTIFICATION_TYPES = void 0;
|
|
4
3
|
const stringToUnion_1 = require("../../commonStateTypes/stringToUnion");
|
|
5
|
-
|
|
4
|
+
const REMINDER_NOTIFICATION_TYPES = [
|
|
6
5
|
'missingReceiptNotification',
|
|
7
6
|
'uncategorizedTransactionNotification',
|
|
8
7
|
'pendingBillApprovalNotification',
|
|
9
8
|
'pendingReimbursementApprovalNotification',
|
|
10
9
|
];
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
const REMINDER_NOTIFICATION_FLAG_TYPES = [
|
|
11
|
+
'isMissingReceiptNotificationActive',
|
|
12
|
+
'isUncategorizedTransactionNotificationActive',
|
|
13
|
+
'isPendingBillApprovalNotificationActive',
|
|
14
|
+
'isPendingReimbursementApprovalNotificationActive',
|
|
15
|
+
];
|
|
16
|
+
const toReminderTypeKey = (v) => (0, stringToUnion_1.stringToUnion)(v, REMINDER_NOTIFICATION_TYPES);
|
|
17
|
+
const toReminderFlagTypeKey = (v) => (0, stringToUnion_1.stringToUnion)(v, REMINDER_NOTIFICATION_FLAG_TYPES);
|
|
@@ -7,9 +7,6 @@ import { UserRole } from '../../../entity/userRole/userRoleState';
|
|
|
7
7
|
import { Person } from '../../people/peopleSelectorTypes';
|
|
8
8
|
import { SetupView } from '../../spendManagement/commonSetup/setupViewSelector';
|
|
9
9
|
import { UserFinancialAccountSelectorView } from '../../userFinancialAccount/userFinancialAccountSelector';
|
|
10
|
-
import { NotificationSettings } from '../settingsViewState';
|
|
11
|
-
import { TenantExternalConnections } from '../../../entity/tenant/tenantState';
|
|
12
|
-
import { Company } from '../../../entity/company/companyStateTypes';
|
|
13
10
|
export interface MyProfileSelectorView extends SelectorView {
|
|
14
11
|
isZeniUser: boolean;
|
|
15
12
|
person: MyProfile;
|
|
@@ -30,12 +27,3 @@ export interface MyBankConnectionsView extends UserFinancialAccountSelectorView
|
|
|
30
27
|
export interface BankConnectionsSetupView extends FetchStateAndError {
|
|
31
28
|
setupView: SetupView;
|
|
32
29
|
}
|
|
33
|
-
export interface NotificationSettingsSelectorView extends NotificationSettings {
|
|
34
|
-
allUsers: User[];
|
|
35
|
-
classList: Class[];
|
|
36
|
-
managersList: Person[];
|
|
37
|
-
}
|
|
38
|
-
export interface IntegrationsView {
|
|
39
|
-
externalConnections: TenantExternalConnections | undefined;
|
|
40
|
-
companyView: Company | undefined;
|
|
41
|
-
}
|
|
@@ -4,7 +4,7 @@ import { AccountBase } from '../../../../entity/account/accountState';
|
|
|
4
4
|
import { ClassBase } from '../../../../entity/class/classState';
|
|
5
5
|
export declare const getBillPayConfigKey: (method: string, subMethod: string) => string;
|
|
6
6
|
export declare type BillPayConfigKey = ReturnType<typeof getBillPayConfigKey>;
|
|
7
|
-
export declare const getBillPayConfigMethodKey: (method: BillPaymentConfigCodeType, subMethod: BillPaymentSubConfigCodeKeyType, accType
|
|
7
|
+
export declare const getBillPayConfigMethodKey: (method: BillPaymentConfigCodeType, subMethod: BillPaymentSubConfigCodeKeyType, accType: AccountTypeSubConfigCodeKeyType, internationalMethod?: "usdToLocalCurrency" | "usdToUsd" | undefined, internationalSubMethod?: "swiftOur" | "swiftSha" | undefined) => string;
|
|
8
8
|
export declare type VendorCurrencyConfig = Record<BillPayConfigKey, Currency[]>;
|
|
9
9
|
export declare const DYNAMIC_FEE_TYPE: readonly ["percent", "fixed"];
|
|
10
10
|
export declare const toDynamicFeeType: (v: string) => "fixed" | "percent";
|
|
@@ -9,10 +9,7 @@ const getBillPayConfigKey = (method, subMethod) => {
|
|
|
9
9
|
};
|
|
10
10
|
exports.getBillPayConfigKey = getBillPayConfigKey;
|
|
11
11
|
const getBillPayConfigMethodKey = (method, subMethod, accType, internationalMethod, internationalSubMethod) => {
|
|
12
|
-
const keys = ['billPay', method, subMethod];
|
|
13
|
-
if (accType != null) {
|
|
14
|
-
keys.push(accType);
|
|
15
|
-
}
|
|
12
|
+
const keys = ['billPay', method, subMethod, accType];
|
|
16
13
|
if (internationalMethod != null) {
|
|
17
14
|
keys.push(internationalMethod);
|
|
18
15
|
}
|
|
@@ -65,12 +65,6 @@ export declare const fetchEditBillDetailPage: import("@reduxjs/toolkit").ActionC
|
|
|
65
65
|
amountPayload: AmountPayload;
|
|
66
66
|
conversionRate: number;
|
|
67
67
|
billId?: string | undefined;
|
|
68
|
-
}, string
|
|
69
|
-
vendorId: string | undefined;
|
|
70
|
-
billId: string | undefined;
|
|
71
|
-
}, string, never, never>, waitForVendorByIdThenSaveBillUpdatetoLocalStore: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[vendorId: string, billId?: string | undefined], {
|
|
72
|
-
vendorId: string;
|
|
73
|
-
billId: string | undefined;
|
|
74
|
-
}, string, never, never>;
|
|
68
|
+
}, string>;
|
|
75
69
|
declare const _default: import("@reduxjs/toolkit").Reducer<EditBillDetailViewState, import("@reduxjs/toolkit").AnyAction>;
|
|
76
70
|
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.
|
|
4
|
+
exports.updateHomeCurrencyConversion = exports.currencyConversionValueSuccessOrFailure = exports.convertAmountToHomeCurrency = exports.updateVendorContactSuccessOrFailure = exports.updateVendorContact = exports.updateSuggestedVendorIdFromParsedInvoice = exports.updateRecommendedVendorId = exports.updateBillUploadFetchState = exports.updateAddBillAutoFields = exports.updateShowAutofill = exports.updateInternationalTransferFeeBearerPaymentMethodInLocalData = exports.waitForVendorByNameThenParsetoLocalStore = exports.waitForBillDetailThenInitializeLocalStore = exports.clearEditBillViewDetail = exports.parseInvoiceToBill = exports.updateEditBillFetchStateCompleted = exports.saveBillSuccessOrFailure = exports.saveBillDetail = exports.discardBillUpdatesInLocalStore = exports.saveBillUpdatesToLocalStore = exports.initializeBillToLocalStore = exports.fetchVendorByNameAndParseInvoice = exports.fetchBillAndInitializeLocalStore = exports.fetchEditBillDetailPage = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const editBillViewState_1 = require("./editBillViewState");
|
|
7
7
|
const billDetailViewState_1 = require("../billDetailView/billDetailViewState");
|
|
@@ -36,9 +36,6 @@ const editBillView = (0, toolkit_1.createSlice)({
|
|
|
36
36
|
draft.editBillStateById[key] = Object.assign(Object.assign({}, oldData), { fetchStatus: {
|
|
37
37
|
fetchState: 'In-Progress',
|
|
38
38
|
error: undefined,
|
|
39
|
-
}, saveStatus: {
|
|
40
|
-
fetchState: 'Not-Started',
|
|
41
|
-
error: undefined,
|
|
42
39
|
}, showSkipAutofill: false });
|
|
43
40
|
},
|
|
44
41
|
prepare(billId, cacheOverride, isShowDeletedBillsEnabled) {
|
|
@@ -309,28 +306,12 @@ const editBillView = (0, toolkit_1.createSlice)({
|
|
|
309
306
|
return { payload: { internationalTransferFeeBearerPaymentMethod, billId } };
|
|
310
307
|
},
|
|
311
308
|
},
|
|
312
|
-
fetchVendorAndUpdateBillLocalData: {
|
|
313
|
-
reducer() {
|
|
314
|
-
// do nothing
|
|
315
|
-
},
|
|
316
|
-
prepare(vendorId, billId) {
|
|
317
|
-
return { payload: { vendorId, billId } };
|
|
318
|
-
},
|
|
319
|
-
},
|
|
320
|
-
waitForVendorByIdThenSaveBillUpdatetoLocalStore: {
|
|
321
|
-
reducer() {
|
|
322
|
-
// do nothing
|
|
323
|
-
},
|
|
324
|
-
prepare(vendorId, billId) {
|
|
325
|
-
return { payload: { vendorId, billId } };
|
|
326
|
-
},
|
|
327
|
-
},
|
|
328
309
|
clearEditBillViewDetail(draft) {
|
|
329
310
|
Object.assign(draft, exports.initialState);
|
|
330
311
|
},
|
|
331
312
|
},
|
|
332
313
|
});
|
|
333
|
-
_a = editBillView.actions, exports.fetchEditBillDetailPage = _a.fetchEditBillDetailPage, exports.fetchBillAndInitializeLocalStore = _a.fetchBillAndInitializeLocalStore, exports.fetchVendorByNameAndParseInvoice = _a.fetchVendorByNameAndParseInvoice, exports.initializeBillToLocalStore = _a.initializeBillToLocalStore, exports.saveBillUpdatesToLocalStore = _a.saveBillUpdatesToLocalStore, exports.discardBillUpdatesInLocalStore = _a.discardBillUpdatesInLocalStore, exports.saveBillDetail = _a.saveBillDetail, exports.saveBillSuccessOrFailure = _a.saveBillSuccessOrFailure, exports.updateEditBillFetchStateCompleted = _a.updateEditBillFetchStateCompleted, exports.parseInvoiceToBill = _a.parseInvoiceToBill, exports.clearEditBillViewDetail = _a.clearEditBillViewDetail, exports.waitForBillDetailThenInitializeLocalStore = _a.waitForBillDetailThenInitializeLocalStore, exports.waitForVendorByNameThenParsetoLocalStore = _a.waitForVendorByNameThenParsetoLocalStore, exports.updateInternationalTransferFeeBearerPaymentMethodInLocalData = _a.updateInternationalTransferFeeBearerPaymentMethodInLocalData, exports.updateShowAutofill = _a.updateShowAutofill, exports.updateAddBillAutoFields = _a.updateAddBillAutoFields, exports.updateBillUploadFetchState = _a.updateBillUploadFetchState, exports.updateRecommendedVendorId = _a.updateRecommendedVendorId, exports.updateSuggestedVendorIdFromParsedInvoice = _a.updateSuggestedVendorIdFromParsedInvoice, exports.updateVendorContact = _a.updateVendorContact, exports.updateVendorContactSuccessOrFailure = _a.updateVendorContactSuccessOrFailure, exports.convertAmountToHomeCurrency = _a.convertAmountToHomeCurrency, exports.currencyConversionValueSuccessOrFailure = _a.currencyConversionValueSuccessOrFailure, exports.updateHomeCurrencyConversion = _a.updateHomeCurrencyConversion
|
|
314
|
+
_a = editBillView.actions, exports.fetchEditBillDetailPage = _a.fetchEditBillDetailPage, exports.fetchBillAndInitializeLocalStore = _a.fetchBillAndInitializeLocalStore, exports.fetchVendorByNameAndParseInvoice = _a.fetchVendorByNameAndParseInvoice, exports.initializeBillToLocalStore = _a.initializeBillToLocalStore, exports.saveBillUpdatesToLocalStore = _a.saveBillUpdatesToLocalStore, exports.discardBillUpdatesInLocalStore = _a.discardBillUpdatesInLocalStore, exports.saveBillDetail = _a.saveBillDetail, exports.saveBillSuccessOrFailure = _a.saveBillSuccessOrFailure, exports.updateEditBillFetchStateCompleted = _a.updateEditBillFetchStateCompleted, exports.parseInvoiceToBill = _a.parseInvoiceToBill, exports.clearEditBillViewDetail = _a.clearEditBillViewDetail, exports.waitForBillDetailThenInitializeLocalStore = _a.waitForBillDetailThenInitializeLocalStore, exports.waitForVendorByNameThenParsetoLocalStore = _a.waitForVendorByNameThenParsetoLocalStore, exports.updateInternationalTransferFeeBearerPaymentMethodInLocalData = _a.updateInternationalTransferFeeBearerPaymentMethodInLocalData, exports.updateShowAutofill = _a.updateShowAutofill, exports.updateAddBillAutoFields = _a.updateAddBillAutoFields, exports.updateBillUploadFetchState = _a.updateBillUploadFetchState, exports.updateRecommendedVendorId = _a.updateRecommendedVendorId, exports.updateSuggestedVendorIdFromParsedInvoice = _a.updateSuggestedVendorIdFromParsedInvoice, exports.updateVendorContact = _a.updateVendorContact, exports.updateVendorContactSuccessOrFailure = _a.updateVendorContactSuccessOrFailure, exports.convertAmountToHomeCurrency = _a.convertAmountToHomeCurrency, exports.currencyConversionValueSuccessOrFailure = _a.currencyConversionValueSuccessOrFailure, exports.updateHomeCurrencyConversion = _a.updateHomeCurrencyConversion;
|
|
334
315
|
exports.default = editBillView.reducer;
|
|
335
316
|
function doUpdateRecurringBillLocalData(billDetail, currentConfig, prevConfig) {
|
|
336
317
|
var _a, _b, _c, _d;
|
|
@@ -84,7 +84,6 @@ 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;
|
|
88
87
|
}
|
|
89
88
|
else {
|
|
90
89
|
isVendorWithNewCurrency = true;
|
|
@@ -206,9 +205,7 @@ const toBillDetailLocalData = (state, showVendorGptRecommendationText, billPaylo
|
|
|
206
205
|
const isPayNowEnabled = payNowCutOffTime != null
|
|
207
206
|
? (0, zeniDayJS_1.dateNow)().isSameOrBefore(payNowCutOffTime)
|
|
208
207
|
: false;
|
|
209
|
-
const fromAccountType = ((_l = billPayload.bill_pay_info) === null || _l === void 0 ? void 0 : _l.from_account.account_type)
|
|
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;
|
|
208
|
+
const fromAccountType = (0, billPayConfigPayload_1.getAccountTypeSubConfigCodeKey)((0, billPayConfigState_1.toAccType)((_m = (_l = billPayload.bill_pay_info) === null || _l === void 0 ? void 0 : _l.from_account.account_type) !== null && _m !== void 0 ? _m : ''));
|
|
212
209
|
const bookCloseDate = currentCompany === null || currentCompany === void 0 ? void 0 : currentCompany.company.companyInfo.bookCloseDate;
|
|
213
210
|
const invoiceDate = Boolean(billPayload.transaction_date) === true
|
|
214
211
|
? (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;
|
|
44
44
|
switch (sortKey) {
|
|
45
45
|
case 'owner':
|
|
46
|
-
return (
|
|
46
|
+
return (_b = (_a = card.cardHolderUser) === null || _a === void 0 ? void 0 : _a.firstName) !== null && _b !== void 0 ? _b : '';
|
|
47
47
|
case 'cardName':
|
|
48
|
-
return card.cardName
|
|
48
|
+
return card.cardName;
|
|
49
49
|
case 'department':
|
|
50
|
-
return (
|
|
50
|
+
return (_d = (_c = card.department) === null || _c === void 0 ? void 0 : _c.className) !== null && _d !== void 0 ? _d : '';
|
|
51
51
|
case 'utilisation':
|
|
52
52
|
return card.limit.amount - card.available.amount;
|
|
53
53
|
case 'limit':
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { AmountPayload } from '../../../../entity/reimbursement/reimbursementPayload';
|
|
2
1
|
import { ZeniAPIResponse } from '../../../../responsePayload';
|
|
3
|
-
import { ReviewTransferMoney } from './transferDetailState';
|
|
4
2
|
export interface TransferMoneyPayload {
|
|
5
3
|
transaction_id: string;
|
|
6
4
|
amount: number;
|
|
@@ -8,17 +6,4 @@ export interface TransferMoneyPayload {
|
|
|
8
6
|
currency_symbol: string;
|
|
9
7
|
transaction_creation_time: string;
|
|
10
8
|
}
|
|
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>;
|
|
24
9
|
export declare type TransferMoneyResponse = ZeniAPIResponse<TransferMoneyPayload>;
|
|
@@ -1,13 +1,2 @@
|
|
|
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,13 +2,12 @@ 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';
|
|
6
5
|
export declare const initialState: TransferDetailState;
|
|
7
6
|
export declare const transferMoney: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[depositAccountId?: string | undefined], {
|
|
8
7
|
depositAccountId: string | undefined;
|
|
9
8
|
}, string, never, never>, transferMoneySuccessOrFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
10
9
|
fetchState: FetchState;
|
|
11
10
|
error?: ZeniAPIStatus<Record<string, unknown>> | undefined;
|
|
12
|
-
}, string>, updateLocalStore: import("@reduxjs/toolkit").ActionCreatorWithPayload<TransferDetailLocalData, string>, updateTransferToLocalData: import("@reduxjs/toolkit").ActionCreatorWithPayload<DepositAccount, string>,
|
|
11
|
+
}, string>, updateLocalStore: import("@reduxjs/toolkit").ActionCreatorWithPayload<TransferDetailLocalData, string>, updateTransferToLocalData: import("@reduxjs/toolkit").ActionCreatorWithPayload<DepositAccount, string>, clearTransferDetail: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
13
12
|
declare const _default: import("@reduxjs/toolkit").Reducer<TransferDetailState, import("@reduxjs/toolkit").AnyAction>;
|
|
14
13
|
export default _default;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.clearTransferDetail = exports.
|
|
4
|
+
exports.clearTransferDetail = 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");
|
|
7
6
|
exports.initialState = {
|
|
8
7
|
localData: {
|
|
9
8
|
amount: {
|
|
@@ -14,19 +13,6 @@ exports.initialState = {
|
|
|
14
13
|
transferFrom: undefined,
|
|
15
14
|
transferTo: undefined,
|
|
16
15
|
},
|
|
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
|
-
},
|
|
30
16
|
fetchState: 'Not-Started',
|
|
31
17
|
error: undefined,
|
|
32
18
|
};
|
|
@@ -74,27 +60,10 @@ const transferDetail = (0, toolkit_1.createSlice)({
|
|
|
74
60
|
draft.fetchState = action.payload.fetchState;
|
|
75
61
|
draft.error = action.payload.error;
|
|
76
62
|
},
|
|
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
|
-
},
|
|
94
63
|
clearTransferDetail(draft) {
|
|
95
64
|
Object.assign(draft, exports.initialState);
|
|
96
65
|
},
|
|
97
66
|
},
|
|
98
67
|
});
|
|
99
|
-
_a = transferDetail.actions, exports.transferMoney = _a.transferMoney, exports.transferMoneySuccessOrFailure = _a.transferMoneySuccessOrFailure, exports.updateLocalStore = _a.updateLocalStore, exports.updateTransferToLocalData = _a.updateTransferToLocalData, exports.
|
|
68
|
+
_a = transferDetail.actions, exports.transferMoney = _a.transferMoney, exports.transferMoneySuccessOrFailure = _a.transferMoneySuccessOrFailure, exports.updateLocalStore = _a.updateLocalStore, exports.updateTransferToLocalData = _a.updateTransferToLocalData, exports.clearTransferDetail = _a.clearTransferDetail;
|
|
100
69
|
exports.default = transferDetail.reducer;
|
|
@@ -3,12 +3,11 @@ 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 {
|
|
6
|
+
import { 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;
|
|
12
11
|
primaryPaymentAccount?: PaymentAccount;
|
|
13
12
|
}
|
|
14
13
|
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
|
|
10
|
+
const { localData, fetchState, error } = 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,7 +22,6 @@ const getTransferDetail = (state) => {
|
|
|
22
22
|
const primaryPaymentAccount = (0, paymentAccountListSelector_1.getPrimaryPaymentAccount)(paymentAccountState, paymentAccountListState);
|
|
23
23
|
return {
|
|
24
24
|
transferDetailLocalData: localData,
|
|
25
|
-
reviewTransferDetail,
|
|
26
25
|
fetchState,
|
|
27
26
|
error,
|
|
28
27
|
transferMoneyParties: transferParties,
|