@zeniai/client-epic-state 4.11.16 → 4.11.17
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 +9 -0
- package/lib/entity/billPay/billTransaction/billTransactionPayload.js +15 -2
- package/lib/entity/billPay/billTransaction/billTransactionReducer.d.ts +2 -1
- package/lib/entity/billPay/billTransaction/billTransactionReducer.js +25 -2
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +11 -1
- package/lib/entity/billPay/billTransaction/billTransactionState.js +9 -1
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +6 -0
- package/lib/entity/task/taskPayload.d.ts +2 -2
- package/lib/entity/task/taskPayload.js +1 -0
- package/lib/entity/task/taskState.d.ts +3 -2
- package/lib/entity/taskGroup/taskGroupPayload.d.ts +9 -0
- package/lib/entity/taskGroup/taskGroupPayload.js +14 -0
- package/lib/entity/taskGroup/taskGroupReducer.d.ts +6 -0
- package/lib/entity/taskGroup/taskGroupReducer.js +33 -0
- package/lib/entity/taskGroup/taskGroupSelector.d.ts +4 -0
- package/lib/entity/taskGroup/taskGroupSelector.js +18 -0
- package/lib/entity/taskGroup/taskGroupState.d.ts +12 -0
- package/lib/entity/taskGroup/taskGroupState.js +2 -0
- package/lib/entity/tenant/clearAllEpic.d.ts +5 -2
- package/lib/entity/tenant/clearAllEpic.js +8 -0
- package/lib/entity/toastNotification/epic/pushToastNotificationEpic.d.ts +1 -1
- package/lib/entity/transaction/stateTypes/attachment.d.ts +6 -0
- package/lib/entity/transaction/stateTypes/transactionType.d.ts +3 -0
- package/lib/entity/transaction/stateTypes/transactionType.js +7 -3
- package/lib/entity/vendor/vendorPayload.d.ts +2 -0
- package/lib/entity/vendor/vendorPayload.js +5 -1
- package/lib/entity/vendor/vendorState.d.ts +2 -0
- package/lib/epic.d.ts +12 -1
- package/lib/epic.js +12 -1
- package/lib/index.d.ts +18 -12
- package/lib/index.js +37 -10
- package/lib/reducer.d.ts +9 -0
- package/lib/reducer.js +9 -0
- package/lib/view/companyView/selector/companyManagementViewSelector.js +13 -7
- package/lib/view/companyView/selector/companyPortfolioViewSelector.js +1 -6
- package/lib/view/fileView/fileUploadHelpers.d.ts +5 -0
- 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/reviewCompanyView/reviewCompanyViewSelector.js +26 -9
- package/lib/view/scheduleView/scheduleListView/scheduleListSelector.js +1 -1
- package/lib/view/settingsView/epic/saveNotificationSettingsEpic.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListReducer.d.ts +3 -2
- package/lib/view/spendManagement/billPay/billList/billListReducer.js +9 -3
- package/lib/view/spendManagement/billPay/billList/billListSelector.d.ts +19 -2
- package/lib/view/spendManagement/billPay/billList/billListSelector.js +150 -3
- package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigPayload.d.ts +1 -0
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigReducer.js +2 -0
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.d.ts +1 -0
- package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewPayload.d.ts +32 -0
- package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewPayload.js +2 -0
- package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewReducer.d.ts +17 -0
- package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewReducer.js +166 -0
- package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewSelector.d.ts +24 -0
- package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewSelector.js +45 -0
- package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewState.d.ts +28 -0
- package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewState.js +7 -0
- package/lib/view/spendManagement/billPay/billsBulkActionView/epics/approveOrRejectBillsBulkActionEpic.d.ts +9 -0
- package/lib/view/spendManagement/billPay/billsBulkActionView/epics/approveOrRejectBillsBulkActionEpic.js +73 -0
- package/lib/view/spendManagement/billPay/billsBulkActionView/epics/cancelOrDeleteBillsBulkActionEpic.d.ts +8 -0
- package/lib/view/spendManagement/billPay/billsBulkActionView/epics/cancelOrDeleteBillsBulkActionEpic.js +74 -0
- package/lib/view/spendManagement/billPay/billsBulkActionView/epics/reviewDraftBillsBulkActionEpic.ts.d.ts +7 -0
- package/lib/view/spendManagement/billPay/billsBulkActionView/epics/reviewDraftBillsBulkActionEpic.ts.js +29 -0
- package/lib/view/spendManagement/billPay/billsBulkActionView/epics/submitDraftBillsBulkActionEpic.d.ts +8 -0
- package/lib/view/spendManagement/billPay/billsBulkActionView/epics/submitDraftBillsBulkActionEpic.js +62 -0
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +9 -8
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +6 -4
- package/lib/view/spendManagement/commonHistoryView/commonHistory.d.ts +1 -1
- package/lib/view/spendManagement/helpers.d.ts +3 -0
- package/lib/view/spendManagement/helpers.js +17 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +3 -3
- package/lib/view/subscriptionView/subscriptionViewSelector.js +5 -1
- package/lib/view/tagView/epics/createTagEpic.d.ts +1 -1
- package/lib/view/tagView/epics/deleteTagEpic.d.ts +1 -1
- package/lib/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.d.ts +2 -1
- package/lib/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +11 -4
- package/lib/view/taskManager/taskDetailView/taskDetailReducer.d.ts +2 -1
- package/lib/view/taskManager/taskDetailView/taskDetailReducer.js +2 -1
- package/lib/view/taskManager/taskGroupView/epics/createNewTaskGroupEpic.d.ts +10 -0
- package/lib/view/taskManager/taskGroupView/epics/createNewTaskGroupEpic.js +57 -0
- package/lib/view/taskManager/taskGroupView/epics/deleteTaskGroupEpic.d.ts +10 -0
- package/lib/view/taskManager/taskGroupView/epics/deleteTaskGroupEpic.js +41 -0
- package/lib/view/taskManager/taskGroupView/epics/fetchAllTaskGroupsEpic.d.ts +8 -0
- package/lib/view/taskManager/taskGroupView/epics/fetchAllTaskGroupsEpic.js +33 -0
- package/lib/view/taskManager/taskGroupView/epics/updateTaskGroupNameEpic.d.ts +10 -0
- package/lib/view/taskManager/taskGroupView/epics/updateTaskGroupNameEpic.js +51 -0
- package/lib/view/taskManager/taskGroupView/taskGroupViewPayload.d.ts +6 -0
- package/lib/view/taskManager/taskGroupView/taskGroupViewPayload.js +2 -0
- package/lib/view/taskManager/taskGroupView/taskGroupViewReducer.d.ts +34 -0
- package/lib/view/taskManager/taskGroupView/taskGroupViewReducer.js +123 -0
- package/lib/view/taskManager/taskGroupView/taskGroupViewState.d.ts +7 -0
- package/lib/view/taskManager/taskGroupView/taskGroupViewState.js +2 -0
- package/lib/view/taskManager/taskListView/bulkUpdateTaskListEpic.d.ts +8 -0
- package/lib/view/taskManager/taskListView/bulkUpdateTaskListEpic.js +88 -0
- package/lib/view/taskManager/taskListView/dragNDropTasksEpic.d.ts +6 -0
- package/lib/view/taskManager/taskListView/dragNDropTasksEpic.js +20 -0
- package/lib/view/taskManager/taskListView/fetchTaskListPageEpic.d.ts +3 -1
- package/lib/view/taskManager/taskListView/fetchTaskListPageEpic.js +12 -0
- package/lib/view/taskManager/taskListView/taskList.d.ts +14 -1
- package/lib/view/taskManager/taskListView/taskListReducer.d.ts +31 -2
- package/lib/view/taskManager/taskListView/taskListReducer.js +136 -9
- package/lib/view/taskManager/taskListView/taskListSelector.d.ts +12 -2
- package/lib/view/taskManager/taskListView/taskListSelector.js +59 -23
- package/lib/view/transactionDetail/epics/updateTransactionDetailEpic.js +22 -5
- package/lib/view/vendorReviewView/vendorFirstReviewView/epics/fetchVendorFirstReviewAttachmentsEpic.d.ts +10 -0
- package/lib/view/vendorReviewView/vendorFirstReviewView/epics/fetchVendorFirstReviewAttachmentsEpic.js +37 -0
- package/lib/view/vendorReviewView/vendorFirstReviewView/epics/fetchVendorFirstReviewViewEpic.js +1 -0
- package/lib/view/vendorReviewView/vendorFirstReviewView/epics/saveVendorFirstReviewViewEpic.js +11 -5
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewPayload.d.ts +15 -0
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.d.ts +13 -3
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.js +45 -3
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewSelector.d.ts +8 -0
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewSelector.js +17 -2
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewState.d.ts +6 -2
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewState.js +2 -1
- package/package.json +1 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.saveVendorFirstReviewViewSuccessOrFailure = exports.clearRecentlySavedErroredVendorData = exports.updateRecentlySavedErroredVendorData = exports.resetVendorFirstReviewLocalData = exports.updateVendorFirstReviewViewLocalData = exports.initializeVendorFirstReviewViewLocalData = exports.updateVendorFirstReviewSortUiState = exports.saveVendorFirstReviewView = exports.updateVendorFirstReviewViewPageToken = exports.updateVendorFirstReviewViewScrollYOffset = exports.clearVendorReviewView = exports.updateVendorFirstReviewViewFailure = exports.updateSavedVendorFirstReviewViewLocalData = exports.fetchVendorFirstReviewView = exports.initialState = void 0;
|
|
4
|
+
exports.updateVendorFirstReviewViewTransactionAttachmentsFailure = exports.updateVendorFirstReviewViewTransactionAttachments = exports.saveVendorFirstReviewViewSuccessOrFailure = exports.clearRecentlySavedErroredVendorData = exports.updateRecentlySavedErroredVendorData = exports.resetVendorFirstReviewLocalData = exports.updateVendorFirstReviewViewLocalData = exports.initializeVendorFirstReviewViewLocalData = exports.updateVendorFirstReviewSortUiState = exports.saveVendorFirstReviewView = exports.updateVendorFirstReviewViewPageToken = exports.updateVendorFirstReviewViewScrollYOffset = exports.clearVendorReviewView = exports.updateVendorFirstReviewViewFailure = exports.updateSavedVendorFirstReviewViewLocalData = exports.fetchVendorFirstReviewView = exports.fetchVendorFirstReviewAttachments = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const commonTypes_1 = require("../common/state/commonTypes");
|
|
7
|
+
const attachmentPayload_1 = require("../../../entity/transaction/payloadTypes/attachmentPayload");
|
|
7
8
|
exports.initialState = {
|
|
8
9
|
vendorFirstReviewViewLocalDataById: {},
|
|
9
10
|
fetchState: 'Not-Started',
|
|
@@ -16,6 +17,11 @@ exports.initialState = {
|
|
|
16
17
|
pageToken: null,
|
|
17
18
|
sortOrder: 'descending', //default sort order
|
|
18
19
|
},
|
|
20
|
+
transactionAttachmentsByVendorId: {},
|
|
21
|
+
attachmentFetchStatus: {
|
|
22
|
+
fetchState: 'Not-Started',
|
|
23
|
+
error: undefined,
|
|
24
|
+
},
|
|
19
25
|
hasValidState() {
|
|
20
26
|
return this.fetchState == 'Completed';
|
|
21
27
|
},
|
|
@@ -24,6 +30,22 @@ const vendorFirstReviewView = (0, toolkit_1.createSlice)({
|
|
|
24
30
|
name: 'vendorFirstReviewView',
|
|
25
31
|
initialState: exports.initialState,
|
|
26
32
|
reducers: {
|
|
33
|
+
fetchVendorFirstReviewAttachments: {
|
|
34
|
+
reducer(draft) {
|
|
35
|
+
draft.attachmentFetchStatus = {
|
|
36
|
+
fetchState: 'In-Progress',
|
|
37
|
+
error: undefined,
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
prepare(vendorId, attachmentIds) {
|
|
41
|
+
return {
|
|
42
|
+
payload: {
|
|
43
|
+
vendorId,
|
|
44
|
+
attachmentIds,
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
},
|
|
48
|
+
},
|
|
27
49
|
fetchVendorFirstReviewView: {
|
|
28
50
|
reducer(draft, action) {
|
|
29
51
|
var _a, _b;
|
|
@@ -140,11 +162,12 @@ const vendorFirstReviewView = (0, toolkit_1.createSlice)({
|
|
|
140
162
|
error: undefined,
|
|
141
163
|
} });
|
|
142
164
|
},
|
|
143
|
-
prepare(vendorId, markAsEmployee = false) {
|
|
165
|
+
prepare(vendorId, markAsEmployee = false, markAsLocalContractor = false) {
|
|
144
166
|
return {
|
|
145
167
|
payload: {
|
|
146
168
|
vendorId,
|
|
147
169
|
markAsEmployee,
|
|
170
|
+
markAsLocalContractor,
|
|
148
171
|
},
|
|
149
172
|
};
|
|
150
173
|
},
|
|
@@ -156,6 +179,22 @@ const vendorFirstReviewView = (0, toolkit_1.createSlice)({
|
|
|
156
179
|
draft.vendorFirstReviewViewLocalDataById[vendorId].vendorFirstReviewViewLocalData = toVendorReviewViewUpdatedVendorLocalData(vendorId, vendors[0]);
|
|
157
180
|
}
|
|
158
181
|
},
|
|
182
|
+
updateVendorFirstReviewViewTransactionAttachments(draft, action) {
|
|
183
|
+
const { vendorId, transactionAttachments } = action.payload;
|
|
184
|
+
draft.transactionAttachmentsByVendorId[vendorId] =
|
|
185
|
+
transactionAttachments.map((transactionAttachment) => (0, attachmentPayload_1.toAttachment)(transactionAttachment));
|
|
186
|
+
draft.attachmentFetchStatus = {
|
|
187
|
+
fetchState: 'Completed',
|
|
188
|
+
error: undefined,
|
|
189
|
+
};
|
|
190
|
+
},
|
|
191
|
+
updateVendorFirstReviewViewTransactionAttachmentsFailure(draft, action) {
|
|
192
|
+
const { status } = action.payload;
|
|
193
|
+
draft.attachmentFetchStatus = {
|
|
194
|
+
fetchState: 'Error',
|
|
195
|
+
error: status,
|
|
196
|
+
};
|
|
197
|
+
},
|
|
159
198
|
updateRecentlySavedErroredVendorData(draft, action) {
|
|
160
199
|
const { isQBOMergeError, vendorId, oldRecommendation, newRecommendation, vendorNameSentForReview, } = action.payload;
|
|
161
200
|
if (isQBOMergeError) {
|
|
@@ -254,9 +293,12 @@ const mapPayloadToVendorFirstReviewView = (payload) => {
|
|
|
254
293
|
mergeVendorName: payload.merge_vendor_name != null && payload.merge_vendor_name.length > 0
|
|
255
294
|
? payload.merge_vendor_name
|
|
256
295
|
: undefined,
|
|
296
|
+
transactionAttachments: payload.transaction_attachments != null
|
|
297
|
+
? payload.transaction_attachments.map((attachmentPayload) => (0, attachmentPayload_1.toAttachment)(attachmentPayload))
|
|
298
|
+
: [],
|
|
257
299
|
/* merge_vendor_name can be an empty string from platform in cases other than `merge_in_qbo` status.
|
|
258
300
|
So, to avoid further string length checks, making this undefined.*/
|
|
259
301
|
};
|
|
260
302
|
};
|
|
261
|
-
_a = vendorFirstReviewView.actions, exports.fetchVendorFirstReviewView = _a.fetchVendorFirstReviewView, exports.updateSavedVendorFirstReviewViewLocalData = _a.updateSavedVendorFirstReviewViewLocalData, exports.updateVendorFirstReviewViewFailure = _a.updateVendorFirstReviewViewFailure, exports.clearVendorReviewView = _a.clearVendorReviewView, exports.updateVendorFirstReviewViewScrollYOffset = _a.updateVendorFirstReviewViewScrollYOffset, exports.updateVendorFirstReviewViewPageToken = _a.updateVendorFirstReviewViewPageToken, exports.saveVendorFirstReviewView = _a.saveVendorFirstReviewView, exports.updateVendorFirstReviewSortUiState = _a.updateVendorFirstReviewSortUiState, exports.initializeVendorFirstReviewViewLocalData = _a.initializeVendorFirstReviewViewLocalData, exports.updateVendorFirstReviewViewLocalData = _a.updateVendorFirstReviewViewLocalData, exports.resetVendorFirstReviewLocalData = _a.resetVendorFirstReviewLocalData, exports.updateRecentlySavedErroredVendorData = _a.updateRecentlySavedErroredVendorData, exports.clearRecentlySavedErroredVendorData = _a.clearRecentlySavedErroredVendorData, exports.saveVendorFirstReviewViewSuccessOrFailure = _a.saveVendorFirstReviewViewSuccessOrFailure;
|
|
303
|
+
_a = vendorFirstReviewView.actions, exports.fetchVendorFirstReviewAttachments = _a.fetchVendorFirstReviewAttachments, exports.fetchVendorFirstReviewView = _a.fetchVendorFirstReviewView, exports.updateSavedVendorFirstReviewViewLocalData = _a.updateSavedVendorFirstReviewViewLocalData, exports.updateVendorFirstReviewViewFailure = _a.updateVendorFirstReviewViewFailure, exports.clearVendorReviewView = _a.clearVendorReviewView, exports.updateVendorFirstReviewViewScrollYOffset = _a.updateVendorFirstReviewViewScrollYOffset, exports.updateVendorFirstReviewViewPageToken = _a.updateVendorFirstReviewViewPageToken, exports.saveVendorFirstReviewView = _a.saveVendorFirstReviewView, exports.updateVendorFirstReviewSortUiState = _a.updateVendorFirstReviewSortUiState, exports.initializeVendorFirstReviewViewLocalData = _a.initializeVendorFirstReviewViewLocalData, exports.updateVendorFirstReviewViewLocalData = _a.updateVendorFirstReviewViewLocalData, exports.resetVendorFirstReviewLocalData = _a.resetVendorFirstReviewLocalData, exports.updateRecentlySavedErroredVendorData = _a.updateRecentlySavedErroredVendorData, exports.clearRecentlySavedErroredVendorData = _a.clearRecentlySavedErroredVendorData, exports.saveVendorFirstReviewViewSuccessOrFailure = _a.saveVendorFirstReviewViewSuccessOrFailure, exports.updateVendorFirstReviewViewTransactionAttachments = _a.updateVendorFirstReviewViewTransactionAttachments, exports.updateVendorFirstReviewViewTransactionAttachmentsFailure = _a.updateVendorFirstReviewViewTransactionAttachmentsFailure;
|
|
262
304
|
exports.default = vendorFirstReviewView.reducer;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
|
+
import { Attachment } from '../../../entity/transaction/stateTypes/attachment';
|
|
3
4
|
import { User } from '../../../entity/user/userState';
|
|
4
5
|
import { Vendor } from '../../../entity/vendor/vendorState';
|
|
5
6
|
import { RootState } from '../../../reducer';
|
|
@@ -27,8 +28,10 @@ export interface VendorFirstReviewSelectorView {
|
|
|
27
28
|
lastUpdatedVendorNameByUser?: User;
|
|
28
29
|
mergeVendorName: string | undefined;
|
|
29
30
|
saveStatus: FetchStateAndError;
|
|
31
|
+
attachmentFetchStatus: FetchStateAndError;
|
|
30
32
|
recommendations: RecommendedNonExistingGlobalMerchant[];
|
|
31
33
|
currentSelection: VendorReviewRowCurrentSelection;
|
|
34
|
+
transactionAttachments: Attachment[];
|
|
32
35
|
}
|
|
33
36
|
export interface RecentlySavedErroredVendorView {
|
|
34
37
|
vendorId: ID;
|
|
@@ -37,3 +40,8 @@ export interface RecentlySavedErroredVendorView {
|
|
|
37
40
|
newRecommendedVendor?: RecommendedNonExistingGlobalMerchant;
|
|
38
41
|
}
|
|
39
42
|
export declare const getVendorFirstReviewView: (state: RootState) => VendorFirstReviewViewSelectorView;
|
|
43
|
+
export interface VendorFirstReviewSelectorAttachmentView {
|
|
44
|
+
attachmentFetchStatus: FetchStateAndError;
|
|
45
|
+
transactionAttachments: Attachment[];
|
|
46
|
+
}
|
|
47
|
+
export declare const getVendorFirstReviewAttachmentView: (state: RootState, vendorId: ID) => VendorFirstReviewSelectorAttachmentView | undefined;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getVendorFirstReviewView = void 0;
|
|
3
|
+
exports.getVendorFirstReviewAttachmentView = exports.getVendorFirstReviewView = void 0;
|
|
4
4
|
const globalMerchantSelector_1 = require("../../../entity/globalMerchant/globalMerchantSelector");
|
|
5
5
|
const userSelector_1 = require("../../../entity/user/userSelector");
|
|
6
6
|
const vendorSelector_1 = require("../../../entity/vendor/vendorSelector");
|
|
7
7
|
const globalMerchantAutoCompleteViewSelector_1 = require("../../globalMerchantView/globalMerchantAutoCompleteView/globalMerchantAutoCompleteViewSelector");
|
|
8
8
|
const getVendorFirstReviewView = (state) => {
|
|
9
9
|
const { vendorFirstReviewViewState, userState, vendorState, globalMerchantState, } = state;
|
|
10
|
-
const { vendorFirstReviewViewLocalDataById, recentlySavedErroredVendorData, uiState, fetchState, error, } = vendorFirstReviewViewState;
|
|
10
|
+
const { vendorFirstReviewViewLocalDataById, recentlySavedErroredVendorData, attachmentFetchStatus, uiState, fetchState, error, } = vendorFirstReviewViewState;
|
|
11
11
|
const userIds = [];
|
|
12
12
|
const globalMerchantAutoCompleteView = (0, globalMerchantAutoCompleteViewSelector_1.getGlobalMerchantAutoCompleteResults)(state);
|
|
13
13
|
const vendorReviewView = Object.keys(vendorFirstReviewViewLocalDataById).map((id) => {
|
|
@@ -23,6 +23,7 @@ const getVendorFirstReviewView = (state) => {
|
|
|
23
23
|
...recommendations,
|
|
24
24
|
...vendorLocalData.recommendedNonExistingGlobalMerchants,
|
|
25
25
|
];
|
|
26
|
+
const transactionAttachments = vendorLocalData.transactionAttachments;
|
|
26
27
|
let selectedVendor;
|
|
27
28
|
const vendor = (0, vendorSelector_1.getVendorByVendorId)(vendorState, vendorLocalData.selectedVendorId);
|
|
28
29
|
if (vendor != null) {
|
|
@@ -57,10 +58,12 @@ const getVendorFirstReviewView = (state) => {
|
|
|
57
58
|
selectedVendor,
|
|
58
59
|
status: vendorLocalData.status,
|
|
59
60
|
saveStatus: vendorFirstReviewViewLocalDataById[id].saveStatus,
|
|
61
|
+
attachmentFetchStatus,
|
|
60
62
|
lastUpdatedVendorNameByUser: users.find((user) => user.userId === vendorLocalData.lastUpdatedVendorNameByUserId),
|
|
61
63
|
recommendations,
|
|
62
64
|
currentSelection: vendorLocalData.currentSelection,
|
|
63
65
|
mergeVendorName: vendorLocalData.mergeVendorName,
|
|
66
|
+
transactionAttachments,
|
|
64
67
|
};
|
|
65
68
|
});
|
|
66
69
|
let recentlyUpdatedErroredVendorData = undefined;
|
|
@@ -95,3 +98,15 @@ const getVendorFirstReviewView = (state) => {
|
|
|
95
98
|
};
|
|
96
99
|
};
|
|
97
100
|
exports.getVendorFirstReviewView = getVendorFirstReviewView;
|
|
101
|
+
const getVendorFirstReviewAttachmentView = (state, vendorId) => {
|
|
102
|
+
const { vendorFirstReviewViewState } = state;
|
|
103
|
+
const { transactionAttachmentsByVendorId } = vendorFirstReviewViewState;
|
|
104
|
+
if (transactionAttachmentsByVendorId[vendorId] == null) {
|
|
105
|
+
return undefined;
|
|
106
|
+
}
|
|
107
|
+
return {
|
|
108
|
+
attachmentFetchStatus: vendorFirstReviewViewState.attachmentFetchStatus,
|
|
109
|
+
transactionAttachments: transactionAttachmentsByVendorId[vendorId],
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
exports.getVendorFirstReviewAttachmentView = getVendorFirstReviewAttachmentView;
|
|
@@ -2,13 +2,14 @@ import { FetchedState, FetchStateAndError, ID } from '../../../commonStateTypes/
|
|
|
2
2
|
import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
3
3
|
import { PageToken } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
4
4
|
import { GlobalMerchant } from '../../../entity/globalMerchant/globalMerchantState';
|
|
5
|
+
import { Attachment } from '../../../entity/transaction/stateTypes/attachment';
|
|
5
6
|
import { VendorReviewRowCurrentSelection, ReviewStatus } from '../common/state/commonTypes';
|
|
6
|
-
export declare const VENDOR_FIRST_REVIEW_VIEW_COLUMN_KEYS: readonly ["vendor", "updateTo", "retain", "status", "action", "ytd"];
|
|
7
|
+
export declare const VENDOR_FIRST_REVIEW_VIEW_COLUMN_KEYS: readonly ["vendor", "updateTo", "retain", "status", "action", "ytd", "viewTenantInvoice"];
|
|
7
8
|
export interface CurrentSelectionByColumn {
|
|
8
9
|
retain: boolean;
|
|
9
10
|
update: boolean;
|
|
10
11
|
}
|
|
11
|
-
export declare const toVendorFirstReviewViewColumnKeyType: (v: string) => "action" | "status" | "vendor" | "retain" | "updateTo" | "ytd";
|
|
12
|
+
export declare const toVendorFirstReviewViewColumnKeyType: (v: string) => "action" | "status" | "vendor" | "retain" | "updateTo" | "ytd" | "viewTenantInvoice";
|
|
12
13
|
export declare type VendorFirstReviewViewColumnKey = ReturnType<typeof toVendorFirstReviewViewColumnKeyType>;
|
|
13
14
|
export interface RecommendedNonExistingGlobalMerchant extends Omit<GlobalMerchant, 'globalMerchantId'> {
|
|
14
15
|
globalMerchantId?: ID;
|
|
@@ -31,6 +32,7 @@ export interface VendorFirstReviewViewLocalData {
|
|
|
31
32
|
vendorRenamedText?: string;
|
|
32
33
|
lastUpdatedVendorNameByUserId?: ID;
|
|
33
34
|
mergeVendorName: string | undefined;
|
|
35
|
+
transactionAttachments: Attachment[];
|
|
34
36
|
}
|
|
35
37
|
export interface RecentlySavedErroredVendorData {
|
|
36
38
|
vendorId: ID;
|
|
@@ -46,4 +48,6 @@ export interface VendorFirstReviewViewState extends FetchedState {
|
|
|
46
48
|
vendorFirstReviewViewLocalDataById: Record<ID, VendorFirstReviewView>;
|
|
47
49
|
recentlySavedErroredVendorData?: RecentlySavedErroredVendorData;
|
|
48
50
|
uiState: VendorFirstReviewViewUIState;
|
|
51
|
+
attachmentFetchStatus: FetchStateAndError;
|
|
52
|
+
transactionAttachmentsByVendorId: Record<ID, Attachment[]>;
|
|
49
53
|
}
|
|
@@ -8,7 +8,8 @@ exports.VENDOR_FIRST_REVIEW_VIEW_COLUMN_KEYS = [
|
|
|
8
8
|
'retain',
|
|
9
9
|
'status',
|
|
10
10
|
'action',
|
|
11
|
-
'ytd',
|
|
11
|
+
'ytd',
|
|
12
|
+
'viewTenantInvoice',
|
|
12
13
|
];
|
|
13
14
|
const toVendorFirstReviewViewColumnKeyType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.VENDOR_FIRST_REVIEW_VIEW_COLUMN_KEYS);
|
|
14
15
|
exports.toVendorFirstReviewViewColumnKeyType = toVendorFirstReviewViewColumnKeyType;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.11.
|
|
3
|
+
"version": "4.11.17",
|
|
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",
|