@zeniai/client-epic-state 4.12.78 → 4.12.80
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 -8
- package/lib/entity/billPay/billTransaction/billTransactionPayload.js +16 -14
- package/lib/entity/billPay/billTransaction/billTransactionReducer.js +1 -1
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +13 -12
- package/lib/entity/billPay/billTransaction/billTransactionState.js +3 -3
- package/lib/entity/reimbursement/reimbursementPayload.d.ts +3 -1
- package/lib/entity/reimbursement/reimbursementPayload.js +3 -0
- package/lib/entity/reimbursement/reimbursementReducer.d.ts +2 -1
- package/lib/entity/reimbursement/reimbursementReducer.js +25 -2
- package/lib/entity/reimbursement/reimbursementState.d.ts +2 -1
- 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/toastNotification/epic/pushToastNotificationEpic.d.ts +1 -1
- package/lib/epic.d.ts +5 -1
- package/lib/epic.js +5 -1
- package/lib/index.d.ts +9 -7
- package/lib/index.js +30 -14
- package/lib/reducer.d.ts +3 -0
- package/lib/reducer.js +3 -0
- package/lib/view/cardPayment/epic/addCardPaymentSourceEpic.d.ts +1 -1
- package/lib/view/cardPayment/epic/confirmCardSetupIntentEpic.d.ts +1 -1
- package/lib/view/cardPayment/epic/createCardSetupIntentEpic.d.ts +1 -1
- package/lib/view/cardPayment/epic/fetchPaymentSourcesEpic.d.ts +1 -1
- package/lib/view/people/changeZeniPersonRolesEpic.d.ts +1 -1
- package/lib/view/people/deletePersonEpic.d.ts +1 -1
- package/lib/view/people/invitePeopleEpic.d.ts +1 -1
- package/lib/view/people/inviteZeniPeopleEpic.d.ts +1 -1
- package/lib/view/people/resendInviteEpic.d.ts +1 -1
- package/lib/view/settingsView/epic/saveNotificationSettingsEpic.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListSelector.d.ts +4 -4
- package/lib/view/spendManagement/billPay/billList/billListSelector.js +4 -4
- package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -0
- package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewPayload.d.ts +2 -2
- package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewSelector.d.ts +2 -1
- package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewState.d.ts +1 -2
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +1 -1
- package/lib/view/spendManagement/helpers.d.ts +6 -1
- package/lib/view/spendManagement/helpers.js +24 -3
- package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.d.ts +1 -0
- package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +13 -10
- package/lib/view/spendManagement/reimbursement/reimbursementConfig/reimbursementConfigPayload.d.ts +1 -0
- package/lib/view/spendManagement/reimbursement/reimbursementConfig/reimbursementConfigReducer.js +3 -0
- package/lib/view/spendManagement/reimbursement/reimbursementConfig/reimbursementConfigState.d.ts +1 -0
- package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.d.ts +2 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.js +4 -2
- package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.d.ts +18 -2
- package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +159 -3
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +1 -0
- package/lib/view/spendManagement/reimbursement/remisBulkActionView/epics/approveOrRejectRemisBulkActionEpic.d.ts +9 -0
- package/lib/view/spendManagement/reimbursement/remisBulkActionView/epics/approveOrRejectRemisBulkActionEpic.js +80 -0
- package/lib/view/spendManagement/reimbursement/remisBulkActionView/epics/cancelOrDeleteRemisBulkActionEpic.d.ts +8 -0
- package/lib/view/spendManagement/reimbursement/remisBulkActionView/epics/cancelOrDeleteRemisBulkActionEpic.js +81 -0
- package/lib/view/spendManagement/reimbursement/remisBulkActionView/epics/reviewDraftRemisBulkActionEpic.ts.d.ts +7 -0
- package/lib/view/spendManagement/reimbursement/remisBulkActionView/epics/reviewDraftRemisBulkActionEpic.ts.js +29 -0
- package/lib/view/spendManagement/reimbursement/remisBulkActionView/epics/submitDraftRemisBulkActionEpic.d.ts +8 -0
- package/lib/view/spendManagement/reimbursement/remisBulkActionView/epics/submitDraftRemisBulkActionEpic.js +74 -0
- package/lib/view/spendManagement/reimbursement/remisBulkActionView/remisBulkActionViewPayload.d.ts +14 -0
- package/lib/view/spendManagement/reimbursement/remisBulkActionView/remisBulkActionViewPayload.js +2 -0
- package/lib/view/spendManagement/reimbursement/remisBulkActionView/remisBulkActionViewReducer.d.ts +17 -0
- package/lib/view/spendManagement/reimbursement/remisBulkActionView/remisBulkActionViewReducer.js +166 -0
- package/lib/view/spendManagement/reimbursement/remisBulkActionView/remisBulkActionViewSelector.d.ts +25 -0
- package/lib/view/spendManagement/reimbursement/remisBulkActionView/remisBulkActionViewSelector.js +46 -0
- package/lib/view/spendManagement/reimbursement/remisBulkActionView/remisBulkActionViewState.d.ts +30 -0
- package/lib/view/spendManagement/reimbursement/remisBulkActionView/remisBulkActionViewState.js +24 -0
- package/lib/view/tagView/epics/createTagEpic.d.ts +1 -1
- package/lib/view/tagView/epics/deleteTagEpic.d.ts +1 -1
- package/package.json +1 -1
package/lib/view/spendManagement/reimbursement/remisBulkActionView/remisBulkActionViewReducer.js
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.clearRemiBulkActionView = exports.remisBulkActionSuccess = exports.incrementRemiBulkActionProcessedCount = exports.autoReviewPendingApprovalRemis = exports.remisBulkActionFailure = exports.cancelOrDeleteRemisBulkAction = exports.approveOrRejectRemisBulkAction = exports.submitDraftRemisBulkAction = exports.reviewDraftRemisBulkActionFailure = exports.reviewDraftRemisBulkActionSuccess = exports.reviewDraftRemisBulkAction = exports.clearAllRemisFromBulkActionList = exports.removeRemiFromBulkActionList = exports.updateRemisBulkActionList = exports.initialState = void 0;
|
|
5
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
+
const remisBulkActionViewState_1 = require("./remisBulkActionViewState");
|
|
7
|
+
exports.initialState = {
|
|
8
|
+
remisSelectedForBulkAction: [],
|
|
9
|
+
bulkReviewStateById: {},
|
|
10
|
+
bulkReviewFetchState: {
|
|
11
|
+
fetchState: 'Not-Started',
|
|
12
|
+
error: undefined,
|
|
13
|
+
},
|
|
14
|
+
bulkSubmissionFetchState: {
|
|
15
|
+
fetchState: 'Not-Started',
|
|
16
|
+
error: undefined,
|
|
17
|
+
},
|
|
18
|
+
bulkOperationTypeSelected: 'delete',
|
|
19
|
+
bulkOperationProgress: {
|
|
20
|
+
remisProcessed: 0,
|
|
21
|
+
remisProcessing: 0,
|
|
22
|
+
refreshTimeInSeconds: 0,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
const remisBulkActionView = (0, toolkit_1.createSlice)({
|
|
26
|
+
name: 'remisBulkActionView',
|
|
27
|
+
initialState: exports.initialState,
|
|
28
|
+
reducers: {
|
|
29
|
+
updateRemisBulkActionList(draft, action) {
|
|
30
|
+
draft.remisSelectedForBulkAction = action.payload;
|
|
31
|
+
},
|
|
32
|
+
removeRemiFromBulkActionList(draft, action) {
|
|
33
|
+
var _a, _b, _c;
|
|
34
|
+
draft.remisSelectedForBulkAction =
|
|
35
|
+
draft.remisSelectedForBulkAction.filter((remiId) => remiId !== action.payload);
|
|
36
|
+
//remove warning if duplicates within batch
|
|
37
|
+
if (draft.bulkOperationTypeSelected === 'send_for_approval' &&
|
|
38
|
+
draft.bulkReviewFetchState.fetchState === 'Completed') {
|
|
39
|
+
const duplicateIds = (_c = (_b = (_a = draft.bulkReviewStateById[action.payload]) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.duplicateTransactionIds) !== null && _c !== void 0 ? _c : [];
|
|
40
|
+
duplicateIds.forEach((id) => {
|
|
41
|
+
var _a, _b, _c, _d;
|
|
42
|
+
if (id in draft.bulkReviewStateById) {
|
|
43
|
+
if (((_b = (_a = draft.bulkReviewStateById[id].error) === null || _a === void 0 ? void 0 : _a.duplicateTransactionIds) === null || _b === void 0 ? void 0 : _b.length) === 1 &&
|
|
44
|
+
((_d = (_c = draft.bulkReviewStateById[id].error) === null || _c === void 0 ? void 0 : _c.duplicateTransactionIds) === null || _d === void 0 ? void 0 : _d[0]) === action.payload) {
|
|
45
|
+
draft.bulkReviewStateById[id].status = 'valid';
|
|
46
|
+
draft.bulkReviewStateById[id].error = undefined;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
clearAllRemisFromBulkActionList(draft) {
|
|
53
|
+
draft.remisSelectedForBulkAction = [];
|
|
54
|
+
},
|
|
55
|
+
reviewDraftRemisBulkAction(draft) {
|
|
56
|
+
draft.bulkReviewFetchState = {
|
|
57
|
+
fetchState: 'In-Progress',
|
|
58
|
+
error: undefined,
|
|
59
|
+
};
|
|
60
|
+
draft.bulkSubmissionFetchState = {
|
|
61
|
+
fetchState: 'Not-Started',
|
|
62
|
+
error: undefined,
|
|
63
|
+
};
|
|
64
|
+
draft.bulkOperationTypeSelected = 'send_for_approval';
|
|
65
|
+
},
|
|
66
|
+
reviewDraftRemisBulkActionSuccess(draft, action) {
|
|
67
|
+
draft.bulkReviewFetchState = {
|
|
68
|
+
fetchState: 'Completed',
|
|
69
|
+
error: undefined,
|
|
70
|
+
};
|
|
71
|
+
action.payload.forEach((result) => {
|
|
72
|
+
var _a;
|
|
73
|
+
const transactionId = result.entity_id;
|
|
74
|
+
const status = (0, remisBulkActionViewState_1.toBulkReviewStatusCode)(result.status);
|
|
75
|
+
draft.bulkReviewStateById[transactionId] = {
|
|
76
|
+
transactionId,
|
|
77
|
+
status,
|
|
78
|
+
error: status !== 'valid' && result.error != null
|
|
79
|
+
? {
|
|
80
|
+
code: (0, remisBulkActionViewState_1.toBulkReviewErrorCode)(result.error.error_code),
|
|
81
|
+
message: result.error.error_message,
|
|
82
|
+
duplicateTransactionIds: (_a = result.error.duplicate_entity_ids) !== null && _a !== void 0 ? _a : [],
|
|
83
|
+
}
|
|
84
|
+
: undefined,
|
|
85
|
+
};
|
|
86
|
+
});
|
|
87
|
+
},
|
|
88
|
+
reviewDraftRemisBulkActionFailure(draft, action) {
|
|
89
|
+
draft.bulkReviewFetchState = {
|
|
90
|
+
fetchState: 'Error',
|
|
91
|
+
error: action.payload,
|
|
92
|
+
};
|
|
93
|
+
},
|
|
94
|
+
autoReviewPendingApprovalRemis(draft) {
|
|
95
|
+
draft.bulkOperationTypeSelected = 'approve'; //or reject
|
|
96
|
+
draft.remisSelectedForBulkAction.forEach((id) => {
|
|
97
|
+
draft.bulkReviewStateById[id] = {
|
|
98
|
+
transactionId: id,
|
|
99
|
+
status: 'valid',
|
|
100
|
+
};
|
|
101
|
+
});
|
|
102
|
+
draft.bulkReviewFetchState = {
|
|
103
|
+
fetchState: 'Completed',
|
|
104
|
+
error: undefined,
|
|
105
|
+
};
|
|
106
|
+
draft.bulkSubmissionFetchState = {
|
|
107
|
+
fetchState: 'Not-Started',
|
|
108
|
+
error: undefined,
|
|
109
|
+
};
|
|
110
|
+
},
|
|
111
|
+
submitDraftRemisBulkAction(draft) {
|
|
112
|
+
draft.bulkOperationTypeSelected = 'send_for_approval';
|
|
113
|
+
draft.bulkSubmissionFetchState = {
|
|
114
|
+
fetchState: 'In-Progress',
|
|
115
|
+
error: undefined,
|
|
116
|
+
};
|
|
117
|
+
},
|
|
118
|
+
approveOrRejectRemisBulkAction: {
|
|
119
|
+
reducer(draft, action) {
|
|
120
|
+
draft.bulkOperationTypeSelected =
|
|
121
|
+
action.payload.approvalType === 'approved' ? 'approve' : 'reject';
|
|
122
|
+
draft.bulkSubmissionFetchState = {
|
|
123
|
+
fetchState: 'In-Progress',
|
|
124
|
+
error: undefined,
|
|
125
|
+
};
|
|
126
|
+
},
|
|
127
|
+
prepare(approvalType, description) {
|
|
128
|
+
return { payload: { approvalType, description } };
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
cancelOrDeleteRemisBulkAction: {
|
|
132
|
+
reducer(draft, action) {
|
|
133
|
+
draft.bulkOperationTypeSelected = action.payload.operationType;
|
|
134
|
+
draft.bulkSubmissionFetchState.fetchState = 'In-Progress';
|
|
135
|
+
},
|
|
136
|
+
prepare(operationType, description) {
|
|
137
|
+
return { payload: { operationType, description } };
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
remisBulkActionFailure(draft, action) {
|
|
141
|
+
draft.bulkSubmissionFetchState = {
|
|
142
|
+
fetchState: 'Error',
|
|
143
|
+
error: action.payload,
|
|
144
|
+
};
|
|
145
|
+
},
|
|
146
|
+
remisBulkActionSuccess(draft, action) {
|
|
147
|
+
Object.assign(draft, exports.initialState, {
|
|
148
|
+
bulkSubmissionFetchState: {
|
|
149
|
+
fetchState: 'Completed',
|
|
150
|
+
error: undefined,
|
|
151
|
+
},
|
|
152
|
+
}, {
|
|
153
|
+
bulkOperationProgress: Object.assign(Object.assign({}, draft.bulkOperationProgress), { remisProcessing: action.payload.remisProcessing, refreshTimeInSeconds: action.payload.refreshTime }),
|
|
154
|
+
});
|
|
155
|
+
},
|
|
156
|
+
incrementRemiBulkActionProcessedCount(draft) {
|
|
157
|
+
draft.bulkOperationProgress.remisProcessed =
|
|
158
|
+
draft.bulkOperationProgress.remisProcessed + 1;
|
|
159
|
+
},
|
|
160
|
+
clearRemiBulkActionView(draft) {
|
|
161
|
+
Object.assign(draft, exports.initialState);
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
});
|
|
165
|
+
_a = remisBulkActionView.actions, exports.updateRemisBulkActionList = _a.updateRemisBulkActionList, exports.removeRemiFromBulkActionList = _a.removeRemiFromBulkActionList, exports.clearAllRemisFromBulkActionList = _a.clearAllRemisFromBulkActionList, exports.reviewDraftRemisBulkAction = _a.reviewDraftRemisBulkAction, exports.reviewDraftRemisBulkActionSuccess = _a.reviewDraftRemisBulkActionSuccess, exports.reviewDraftRemisBulkActionFailure = _a.reviewDraftRemisBulkActionFailure, exports.submitDraftRemisBulkAction = _a.submitDraftRemisBulkAction, exports.approveOrRejectRemisBulkAction = _a.approveOrRejectRemisBulkAction, exports.cancelOrDeleteRemisBulkAction = _a.cancelOrDeleteRemisBulkAction, exports.remisBulkActionFailure = _a.remisBulkActionFailure, exports.autoReviewPendingApprovalRemis = _a.autoReviewPendingApprovalRemis, exports.incrementRemiBulkActionProcessedCount = _a.incrementRemiBulkActionProcessedCount, exports.remisBulkActionSuccess = _a.remisBulkActionSuccess, exports.clearRemiBulkActionView = _a.clearRemiBulkActionView;
|
|
166
|
+
exports.default = remisBulkActionView.reducer;
|
package/lib/view/spendManagement/reimbursement/remisBulkActionView/remisBulkActionViewSelector.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { RootState } from '../../../../reducer';
|
|
2
|
+
import { FetchState, ID } from '../../../../commonStateTypes/common';
|
|
3
|
+
import { SelectorView } from '../../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
4
|
+
import { BulkOperationProgress, BulkReviewErrorCode, BulkReviewStatusCode } from './remisBulkActionViewState';
|
|
5
|
+
import { RemiSubTabType, RemiTabType } from '../remiListView/remiListState';
|
|
6
|
+
import { User } from '../../../../entity/user/userState';
|
|
7
|
+
import { Reimbursement } from '../../../../entity/reimbursement/reimbursementState';
|
|
8
|
+
import { BulkOperationType } from '../../helpers';
|
|
9
|
+
export interface RemiForReview {
|
|
10
|
+
transactionId: ID;
|
|
11
|
+
reimbursement?: Reimbursement;
|
|
12
|
+
submittedBy?: User;
|
|
13
|
+
reviewStatus?: BulkReviewStatusCode;
|
|
14
|
+
reviewErrorCode?: BulkReviewErrorCode;
|
|
15
|
+
reviewInfoMessage?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface RemisBulkReviewView extends SelectorView {
|
|
18
|
+
remisForReview: RemiForReview[];
|
|
19
|
+
bulkSubmissionFetchState: FetchState;
|
|
20
|
+
bulkOperationTypeSelected: BulkOperationType;
|
|
21
|
+
currentTab: RemiTabType;
|
|
22
|
+
currentSubTab: RemiSubTabType;
|
|
23
|
+
}
|
|
24
|
+
export declare const getRemisBulkReviewView: (state: RootState) => RemisBulkReviewView;
|
|
25
|
+
export declare const getRemisBulkOperationProgress: (state: RootState) => BulkOperationProgress;
|
package/lib/view/spendManagement/reimbursement/remisBulkActionView/remisBulkActionViewSelector.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getRemisBulkOperationProgress = exports.getRemisBulkReviewView = void 0;
|
|
7
|
+
const get_1 = __importDefault(require("lodash/get"));
|
|
8
|
+
const userSelector_1 = require("../../../../entity/user/userSelector");
|
|
9
|
+
const getRemisBulkReviewView = (state) => {
|
|
10
|
+
const { reimbursementState, remisBulkActionViewState, remiListState, userState, } = state;
|
|
11
|
+
const transactionIds = remisBulkActionViewState.remisSelectedForBulkAction;
|
|
12
|
+
const { currentTab, currentSubTab } = remiListState;
|
|
13
|
+
let selectedTransactions = transactionIds.map((transactionId) => {
|
|
14
|
+
const transaction = (0, get_1.default)(reimbursementState.reimbursementById, transactionId);
|
|
15
|
+
return {
|
|
16
|
+
transactionId,
|
|
17
|
+
reimbursement: transaction,
|
|
18
|
+
submittedBy: transaction != null
|
|
19
|
+
? (0, userSelector_1.getUserByUserId)(userState, transaction.reimburseeUserId)
|
|
20
|
+
: undefined,
|
|
21
|
+
};
|
|
22
|
+
});
|
|
23
|
+
const bulkReviewFetchState = remisBulkActionViewState.bulkReviewFetchState.fetchState;
|
|
24
|
+
const bulkSubmissionFetchState = remisBulkActionViewState.bulkSubmissionFetchState.fetchState;
|
|
25
|
+
if (bulkReviewFetchState === 'Completed') {
|
|
26
|
+
selectedTransactions = selectedTransactions.map((transaction) => {
|
|
27
|
+
var _a, _b;
|
|
28
|
+
const reviewStateOfRemi = remisBulkActionViewState.bulkReviewStateById[transaction.transactionId];
|
|
29
|
+
return Object.assign(Object.assign({}, transaction), { reviewStatus: reviewStateOfRemi === null || reviewStateOfRemi === void 0 ? void 0 : reviewStateOfRemi.status, reviewInfoMessage: (_a = reviewStateOfRemi === null || reviewStateOfRemi === void 0 ? void 0 : reviewStateOfRemi.error) === null || _a === void 0 ? void 0 : _a.message, reviewErrorCode: (_b = reviewStateOfRemi === null || reviewStateOfRemi === void 0 ? void 0 : reviewStateOfRemi.error) === null || _b === void 0 ? void 0 : _b.code });
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
fetchState: bulkReviewFetchState,
|
|
34
|
+
remisForReview: selectedTransactions,
|
|
35
|
+
bulkSubmissionFetchState,
|
|
36
|
+
bulkOperationTypeSelected: remisBulkActionViewState.bulkOperationTypeSelected,
|
|
37
|
+
currentTab,
|
|
38
|
+
currentSubTab,
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
exports.getRemisBulkReviewView = getRemisBulkReviewView;
|
|
42
|
+
const getRemisBulkOperationProgress = (state) => {
|
|
43
|
+
const { remisBulkActionViewState } = state;
|
|
44
|
+
return remisBulkActionViewState.bulkOperationProgress;
|
|
45
|
+
};
|
|
46
|
+
exports.getRemisBulkOperationProgress = getRemisBulkOperationProgress;
|
package/lib/view/spendManagement/reimbursement/remisBulkActionView/remisBulkActionViewState.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { FetchStateAndError, ID } from '../../../../commonStateTypes/common';
|
|
2
|
+
import { BulkOperationType } from '../../helpers';
|
|
3
|
+
export interface BulkOperationProgress {
|
|
4
|
+
remisProcessed: number;
|
|
5
|
+
remisProcessing: number;
|
|
6
|
+
refreshTimeInSeconds: number;
|
|
7
|
+
}
|
|
8
|
+
export interface RemisBulkActionViewState {
|
|
9
|
+
remisSelectedForBulkAction: ID[];
|
|
10
|
+
bulkReviewStateById: Record<ID, BulkReviewState>;
|
|
11
|
+
bulkReviewFetchState: FetchStateAndError;
|
|
12
|
+
bulkSubmissionFetchState: FetchStateAndError;
|
|
13
|
+
bulkOperationTypeSelected: BulkOperationType;
|
|
14
|
+
bulkOperationProgress: BulkOperationProgress;
|
|
15
|
+
}
|
|
16
|
+
export interface BulkReviewState {
|
|
17
|
+
transactionId: ID;
|
|
18
|
+
status: BulkReviewStatusCode;
|
|
19
|
+
error?: {
|
|
20
|
+
code: BulkReviewErrorCode;
|
|
21
|
+
message: string;
|
|
22
|
+
duplicateTransactionIds: ID[];
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export declare const BULK_REVIEW_STATUS_CODES: readonly ["valid", "error", "warning"];
|
|
26
|
+
export declare const toBulkReviewStatusCode: (v: string) => "error" | "valid" | "warning";
|
|
27
|
+
export declare type BulkReviewStatusCode = ReturnType<typeof toBulkReviewStatusCode>;
|
|
28
|
+
export declare const BULK_REVIEW_ERROR_CODES: readonly ["ERR_INSUFFICIENT_DATA", "ERR_INVOICE_DATE_OUTSIDE_ACCOUNTING_PERIOD", "ERR_FUTURE_PAYMENT_DATE_SUPPORTED", "ERR_POSSIBLE_DUPLICATE_TRANSACTION", "ERR_INVALID_DATA", "ERR_PAYMENT_DATE_CURRENT_OR_FUTURE_DATE_SUPPORTED", "ERR_PHYSICAL_ADDRESS_REQUIRED", "ERR_START_DATE_GT_END_DATE", "ERR_RECURRING_PAYMENT_START_DATE_IS_PAST_DATE", "ERR_INCORRECT_RECURRING_PAYMENT_CYCLE", "ERR_INCORRECT_FIELD", "ERR_UPDATE_VENDOR_DETAILS", "ERR_AMOUNT_ZERO"];
|
|
29
|
+
export declare const toBulkReviewErrorCode: (v: string) => "ERR_INSUFFICIENT_DATA" | "ERR_INVOICE_DATE_OUTSIDE_ACCOUNTING_PERIOD" | "ERR_FUTURE_PAYMENT_DATE_SUPPORTED" | "ERR_POSSIBLE_DUPLICATE_TRANSACTION" | "ERR_INVALID_DATA" | "ERR_PAYMENT_DATE_CURRENT_OR_FUTURE_DATE_SUPPORTED" | "ERR_PHYSICAL_ADDRESS_REQUIRED" | "ERR_START_DATE_GT_END_DATE" | "ERR_RECURRING_PAYMENT_START_DATE_IS_PAST_DATE" | "ERR_INCORRECT_RECURRING_PAYMENT_CYCLE" | "ERR_INCORRECT_FIELD" | "ERR_UPDATE_VENDOR_DETAILS" | "ERR_AMOUNT_ZERO";
|
|
30
|
+
export declare type BulkReviewErrorCode = ReturnType<typeof toBulkReviewErrorCode>;
|
package/lib/view/spendManagement/reimbursement/remisBulkActionView/remisBulkActionViewState.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toBulkReviewErrorCode = exports.BULK_REVIEW_ERROR_CODES = exports.toBulkReviewStatusCode = exports.BULK_REVIEW_STATUS_CODES = void 0;
|
|
4
|
+
const stringToUnion_1 = require("../../../../commonStateTypes/stringToUnion");
|
|
5
|
+
exports.BULK_REVIEW_STATUS_CODES = ['valid', 'error', 'warning'];
|
|
6
|
+
const toBulkReviewStatusCode = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.BULK_REVIEW_STATUS_CODES);
|
|
7
|
+
exports.toBulkReviewStatusCode = toBulkReviewStatusCode;
|
|
8
|
+
exports.BULK_REVIEW_ERROR_CODES = [
|
|
9
|
+
'ERR_INSUFFICIENT_DATA',
|
|
10
|
+
'ERR_INVOICE_DATE_OUTSIDE_ACCOUNTING_PERIOD',
|
|
11
|
+
'ERR_FUTURE_PAYMENT_DATE_SUPPORTED',
|
|
12
|
+
'ERR_POSSIBLE_DUPLICATE_TRANSACTION',
|
|
13
|
+
'ERR_INVALID_DATA',
|
|
14
|
+
'ERR_PAYMENT_DATE_CURRENT_OR_FUTURE_DATE_SUPPORTED',
|
|
15
|
+
'ERR_PHYSICAL_ADDRESS_REQUIRED',
|
|
16
|
+
'ERR_START_DATE_GT_END_DATE',
|
|
17
|
+
'ERR_RECURRING_PAYMENT_START_DATE_IS_PAST_DATE',
|
|
18
|
+
'ERR_INCORRECT_RECURRING_PAYMENT_CYCLE',
|
|
19
|
+
'ERR_INCORRECT_FIELD',
|
|
20
|
+
'ERR_UPDATE_VENDOR_DETAILS',
|
|
21
|
+
'ERR_AMOUNT_ZERO',
|
|
22
|
+
];
|
|
23
|
+
const toBulkReviewErrorCode = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.BULK_REVIEW_ERROR_CODES);
|
|
24
|
+
exports.toBulkReviewErrorCode = toBulkReviewErrorCode;
|
|
@@ -8,7 +8,7 @@ import { updateCreatedTagToLocalStore } from '../../taskManager/taskDetailView/t
|
|
|
8
8
|
export declare type ActionType = ReturnType<typeof createTag> | ReturnType<typeof updateTagCreateStatus> | ReturnType<typeof openSnackbar> | ReturnType<typeof updateCreatedTagToLocalStore> | ReturnType<typeof updateTags>;
|
|
9
9
|
export declare const createTagEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
|
|
10
10
|
payload: {
|
|
11
|
-
messageSection: "bill_pay_setup" | "reimbursement_setup" | "charge_card_setup" | "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation";
|
|
11
|
+
messageSection: "bill_pay_setup" | "reimbursement_setup" | "charge_card_setup" | "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation";
|
|
12
12
|
messageText: "failed" | "success" | "notification";
|
|
13
13
|
type: import("../../..").SnackbarMessageType;
|
|
14
14
|
showStatusIcon?: boolean | undefined;
|
|
@@ -9,7 +9,7 @@ export declare const deleteTagEpic: (actions$: ActionsObservable<ActionType>, _s
|
|
|
9
9
|
type: string;
|
|
10
10
|
} | {
|
|
11
11
|
payload: {
|
|
12
|
-
messageSection: "bill_pay_setup" | "reimbursement_setup" | "charge_card_setup" | "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation";
|
|
12
|
+
messageSection: "bill_pay_setup" | "reimbursement_setup" | "charge_card_setup" | "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation";
|
|
13
13
|
messageText: "failed" | "success" | "notification";
|
|
14
14
|
type: import("../../..").SnackbarMessageType;
|
|
15
15
|
showStatusIcon?: boolean | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.12.
|
|
3
|
+
"version": "4.12.80",
|
|
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",
|