@zeniai/client-epic-state 4.19.84-betaVR11 → 4.19.84-betaVR12
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/esm/index.js +1 -0
- package/lib/esm/view/expenseAutomationView/bulkUploadTiming.js +5 -0
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +4 -3
- package/lib/esm/view/expenseAutomationView/payload/missingReceiptsPayload.js +2 -2
- package/lib/esm/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +17 -16
- package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +27 -4
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -1
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
- package/lib/view/expenseAutomationView/bulkUploadTiming.d.ts +5 -0
- package/lib/view/expenseAutomationView/bulkUploadTiming.js +8 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.d.ts +3 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +2 -1
- package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.js +1 -1
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +6 -2
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +17 -16
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +27 -4
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BULK_UPLOAD_BAR_COMPLETE_HOLD_MS = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* After upload API success, hold the bar at 100% this long before transitioning to matching,
|
|
6
|
+
* so the fill animation can complete without an abrupt swap to the auto-matching banner.
|
|
7
|
+
*/
|
|
8
|
+
exports.BULK_UPLOAD_BAR_COMPLETE_HOLD_MS = 400;
|
|
@@ -12,4 +12,7 @@ export declare const bulkUploadReceiptsEpic: (actions$: ActionsObservable<Action
|
|
|
12
12
|
error: import("../../../../responsePayload").ZeniAPIStatus;
|
|
13
13
|
};
|
|
14
14
|
type: "expenseAutomationMissingReceiptsView/bulkUploadReceiptsFailure";
|
|
15
|
+
} | {
|
|
16
|
+
payload: number;
|
|
17
|
+
type: "expenseAutomationMissingReceiptsView/updateBulkUploadProgress";
|
|
15
18
|
}>;
|
|
@@ -4,6 +4,7 @@ exports.bulkUploadReceiptsEpic = void 0;
|
|
|
4
4
|
const rxjs_1 = require("rxjs");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
6
|
const responsePayload_1 = require("../../../../responsePayload");
|
|
7
|
+
const bulkUploadTiming_1 = require("../../bulkUploadTiming");
|
|
7
8
|
const missingReceiptsViewReducer_1 = require("../../reducers/missingReceiptsViewReducer");
|
|
8
9
|
const bulkUploadReceiptsEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.bulkUploadReceipts.match), (0, operators_1.mergeMap)((action) => {
|
|
9
10
|
const { files } = action.payload;
|
|
@@ -21,7 +22,7 @@ const bulkUploadReceiptsEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0,
|
|
|
21
22
|
error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Bulk upload succeeded but batch_id was missing or empty.'),
|
|
22
23
|
}));
|
|
23
24
|
}
|
|
24
|
-
return (0, rxjs_1.of)((0, missingReceiptsViewReducer_1.bulkUploadReceiptsSuccess)({ batchId }));
|
|
25
|
+
return (0, rxjs_1.concat)((0, rxjs_1.of)((0, missingReceiptsViewReducer_1.updateBulkUploadProgress)(100)), (0, rxjs_1.timer)(bulkUploadTiming_1.BULK_UPLOAD_BAR_COMPLETE_HOLD_MS).pipe((0, operators_1.mergeMap)(() => (0, rxjs_1.of)((0, missingReceiptsViewReducer_1.bulkUploadReceiptsSuccess)({ batchId })))));
|
|
25
26
|
}
|
|
26
27
|
return (0, rxjs_1.of)((0, missingReceiptsViewReducer_1.bulkUploadReceiptsFailure)({ error: response.status }));
|
|
27
28
|
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, missingReceiptsViewReducer_1.bulkUploadReceiptsFailure)({
|
|
@@ -59,7 +59,7 @@ function toBatchFile(payload, filesEndPoint) {
|
|
|
59
59
|
? (0, missingReceiptsViewState_1.toMatchSource)(payload.match_source)
|
|
60
60
|
: undefined,
|
|
61
61
|
matchedTransactionId: payload.matched_transaction?.transaction_id,
|
|
62
|
-
status:
|
|
62
|
+
status: (0, missingReceiptsViewState_1.toBatchFileStatus)(payload.status),
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
65
|
function extractTransactionPayloadsFromBatchFiles(files) {
|
|
@@ -10,6 +10,8 @@ import type { MonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
|
|
|
10
10
|
export declare const getCompletedTransactionsCacheKey: (periodId: MonthYearPeriodId, sortKey: BulkUploadSortKey, sortOrder: SortOrder, subTab: CompletedSubTab) => string;
|
|
11
11
|
export declare const initialBulkUploadState: BulkUploadState;
|
|
12
12
|
export declare const initialState: MissingReceiptsViewState;
|
|
13
|
+
/** Epic trigger only; batch-details fetch is handled in epics. */
|
|
14
|
+
export declare const fetchBulkUploadBatchDetails: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationMissingReceiptsView/fetchBulkUploadBatchDetails">;
|
|
13
15
|
export declare const fetchMissingReceipts: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, minimumTransactionAmount: Amount, cacheOverride?: any, refreshViewInBackground?: any], {
|
|
14
16
|
period: TimePeriod;
|
|
15
17
|
minimumTransactionAmount: Amount;
|
|
@@ -38,9 +40,11 @@ export declare const fetchMissingReceipts: import("@reduxjs/toolkit").ActionCrea
|
|
|
38
40
|
error: ZeniAPIStatus;
|
|
39
41
|
}, "expenseAutomationMissingReceiptsView/bulkUploadReceiptsFailure">, pusherBatchStatusUpdate: import("@reduxjs/toolkit").ActionCreatorWithPayload<BatchStatus, "expenseAutomationMissingReceiptsView/pusherBatchStatusUpdate">, requestMissingReceiptsTabNavigation: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
40
42
|
tab: BulkUploadResultsTab;
|
|
41
|
-
}, "expenseAutomationMissingReceiptsView/requestMissingReceiptsTabNavigation">, clearMissingReceiptsTabNavigation: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationMissingReceiptsView/clearMissingReceiptsTabNavigation">,
|
|
43
|
+
}, "expenseAutomationMissingReceiptsView/requestMissingReceiptsTabNavigation">, clearMissingReceiptsTabNavigation: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationMissingReceiptsView/clearMissingReceiptsTabNavigation">, fetchBulkUploadBatchDetailsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<BatchDetails, "expenseAutomationMissingReceiptsView/fetchBulkUploadBatchDetailsSuccess">, fetchBulkUploadBatchDetailsFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: {
|
|
42
44
|
error: ZeniAPIStatus;
|
|
43
|
-
},
|
|
45
|
+
}], {
|
|
46
|
+
error: ZeniAPIStatus;
|
|
47
|
+
}, "expenseAutomationMissingReceiptsView/fetchBulkUploadBatchDetailsFailure", never, never>, storeBatchDetails: import("@reduxjs/toolkit").ActionCreatorWithPayload<BatchDetails, "expenseAutomationMissingReceiptsView/storeBatchDetails">, batchDetailFetchFailed: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
44
48
|
batchId: ID;
|
|
45
49
|
}, "expenseAutomationMissingReceiptsView/batchDetailFetchFailed">, setInitialBatchDetailsLoading: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationMissingReceiptsView/setInitialBatchDetailsLoading">, fetchMoreBatchDetails: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationMissingReceiptsView/fetchMoreBatchDetails">, fetchMoreBatchDetailsComplete: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationMissingReceiptsView/fetchMoreBatchDetailsComplete">, fetchMoreBatchDetailsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
46
50
|
error: ZeniAPIStatus;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.fetchCompletedTransactionsFailure = exports.fetchCompletedTransactionsSuccess = exports.fetchCompletedTransactions = exports.acknowledgeBulkUploadConfirmMatchComplete = exports.clearManualSearchResults = exports.searchTransactionsForManualMatchFailure = exports.searchTransactionsForManualMatchSuccess = exports.searchTransactionsForManualMatch = exports.clearBulkUpload = exports.setBulkUploadSortConfig = exports.setBulkUploadCompletedSubTab = exports.setBulkUploadResultsTab = exports.confirmBulkUploadMatchFailure = exports.confirmBulkUploadMatchSuccess = exports.confirmBulkUploadMatch = exports.fetchBulkUploadBatchesFailure = exports.fetchBulkUploadBatchesSuccess = exports.fetchBulkUploadBatches = exports.fetchMoreBatchDetailsFailure = exports.fetchMoreBatchDetailsComplete = exports.fetchMoreBatchDetails = exports.setInitialBatchDetailsLoading = exports.batchDetailFetchFailed = exports.storeBatchDetails = exports.fetchBulkUploadBatchDetailsFailure = exports.fetchBulkUploadBatchDetailsSuccess = exports.
|
|
4
|
+
exports.fetchCompletedTransactionsFailure = exports.fetchCompletedTransactionsSuccess = exports.fetchCompletedTransactions = exports.acknowledgeBulkUploadConfirmMatchComplete = exports.clearManualSearchResults = exports.searchTransactionsForManualMatchFailure = exports.searchTransactionsForManualMatchSuccess = exports.searchTransactionsForManualMatch = exports.clearBulkUpload = exports.setBulkUploadSortConfig = exports.setBulkUploadCompletedSubTab = exports.setBulkUploadResultsTab = exports.confirmBulkUploadMatchFailure = exports.confirmBulkUploadMatchSuccess = exports.confirmBulkUploadMatch = exports.fetchBulkUploadBatchesFailure = exports.fetchBulkUploadBatchesSuccess = exports.fetchBulkUploadBatches = exports.fetchMoreBatchDetailsFailure = exports.fetchMoreBatchDetailsComplete = exports.fetchMoreBatchDetails = exports.setInitialBatchDetailsLoading = exports.batchDetailFetchFailed = exports.storeBatchDetails = exports.fetchBulkUploadBatchDetailsFailure = exports.fetchBulkUploadBatchDetailsSuccess = exports.clearMissingReceiptsTabNavigation = exports.requestMissingReceiptsTabNavigation = exports.pusherBatchStatusUpdate = exports.bulkUploadReceiptsFailure = exports.bulkUploadReceiptsSuccess = exports.updateBulkUploadProgress = exports.bulkUploadReceipts = exports.clearExpenseAutomationMissingReceiptsView = exports.markMissingReceiptAsDone = exports.updateMissingReceiptsUIState = exports.updateMissingReceiptUploadState = exports.uploadMissingReceiptSuccess = exports.fetchMissingReceiptsFailure = exports.fetchMissingReceiptsSuccess = exports.fetchMissingReceipts = exports.fetchBulkUploadBatchDetails = exports.initialState = exports.initialBulkUploadState = exports.getCompletedTransactionsCacheKey = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
7
7
|
const missingReceiptsViewState_1 = require("../types/missingReceiptsViewState");
|
|
@@ -56,6 +56,8 @@ exports.initialState = {
|
|
|
56
56
|
return this.fetchState == 'Completed';
|
|
57
57
|
},
|
|
58
58
|
};
|
|
59
|
+
/** Epic trigger only; batch-details fetch is handled in epics. */
|
|
60
|
+
exports.fetchBulkUploadBatchDetails = (0, toolkit_1.createAction)('expenseAutomationMissingReceiptsView/fetchBulkUploadBatchDetails');
|
|
59
61
|
const expenseAutomationMissingReceiptsView = (0, toolkit_1.createSlice)({
|
|
60
62
|
name: 'expenseAutomationMissingReceiptsView',
|
|
61
63
|
initialState: exports.initialState,
|
|
@@ -159,8 +161,7 @@ const expenseAutomationMissingReceiptsView = (0, toolkit_1.createSlice)({
|
|
|
159
161
|
},
|
|
160
162
|
// -- Bulk Upload Actions --
|
|
161
163
|
bulkUploadReceipts: {
|
|
162
|
-
|
|
163
|
-
reducer(draft, _action) {
|
|
164
|
+
reducer(draft) {
|
|
164
165
|
draft.bulkUpload.phase = 'uploading';
|
|
165
166
|
draft.bulkUpload.uploadProgress = 0;
|
|
166
167
|
draft.bulkUpload.uploadStatus = {
|
|
@@ -177,6 +178,7 @@ const expenseAutomationMissingReceiptsView = (0, toolkit_1.createSlice)({
|
|
|
177
178
|
},
|
|
178
179
|
bulkUploadReceiptsSuccess(draft, action) {
|
|
179
180
|
draft.bulkUpload.currentBatchId = action.payload.batchId;
|
|
181
|
+
draft.bulkUpload.uploadProgress = 100;
|
|
180
182
|
draft.bulkUpload.uploadStatus = {
|
|
181
183
|
fetchState: 'Completed',
|
|
182
184
|
error: undefined,
|
|
@@ -210,18 +212,18 @@ const expenseAutomationMissingReceiptsView = (0, toolkit_1.createSlice)({
|
|
|
210
212
|
clearMissingReceiptsTabNavigation(draft) {
|
|
211
213
|
draft.pendingMissingReceiptsTabNavigation = null;
|
|
212
214
|
},
|
|
213
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
214
|
-
fetchBulkUploadBatchDetails(_draft) {
|
|
215
|
-
// trigger epic, no state change needed
|
|
216
|
-
},
|
|
217
215
|
fetchBulkUploadBatchDetailsSuccess(draft, action) {
|
|
218
216
|
const details = action.payload;
|
|
219
217
|
draft.bulkUpload.batchDetailsById[details.batchId] = details;
|
|
220
218
|
draft.bulkUpload.phase = 'completed';
|
|
221
219
|
},
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
220
|
+
fetchBulkUploadBatchDetailsFailure: {
|
|
221
|
+
reducer(draft) {
|
|
222
|
+
draft.bulkUpload.phase = 'completed';
|
|
223
|
+
},
|
|
224
|
+
prepare(payload) {
|
|
225
|
+
return { payload };
|
|
226
|
+
},
|
|
225
227
|
},
|
|
226
228
|
storeBatchDetails(draft, action) {
|
|
227
229
|
const details = action.payload;
|
|
@@ -252,8 +254,8 @@ const expenseAutomationMissingReceiptsView = (0, toolkit_1.createSlice)({
|
|
|
252
254
|
error: undefined,
|
|
253
255
|
};
|
|
254
256
|
},
|
|
255
|
-
fetchMoreBatchDetails(
|
|
256
|
-
|
|
257
|
+
fetchMoreBatchDetails(draft) {
|
|
258
|
+
draft.bulkUpload.batchDetailsPaginationState = {
|
|
257
259
|
fetchState: 'In-Progress',
|
|
258
260
|
error: undefined,
|
|
259
261
|
};
|
|
@@ -329,8 +331,7 @@ const expenseAutomationMissingReceiptsView = (0, toolkit_1.createSlice)({
|
|
|
329
331
|
};
|
|
330
332
|
},
|
|
331
333
|
confirmBulkUploadMatch: {
|
|
332
|
-
|
|
333
|
-
reducer(draft, _action) {
|
|
334
|
+
reducer(draft) {
|
|
334
335
|
draft.bulkUpload.confirmMatchStatus = {
|
|
335
336
|
fetchState: 'In-Progress',
|
|
336
337
|
error: undefined,
|
|
@@ -431,7 +432,7 @@ const expenseAutomationMissingReceiptsView = (0, toolkit_1.createSlice)({
|
|
|
431
432
|
const { append, nextPageToken, results, totalCount } = action.payload;
|
|
432
433
|
if (append) {
|
|
433
434
|
const merged = [...draft.bulkUpload.manualSearch.results, ...results];
|
|
434
|
-
const byId = new Map(merged.map((
|
|
435
|
+
const byId = new Map(merged.map((result) => [result.transactionId, result]));
|
|
435
436
|
draft.bulkUpload.manualSearch.results = Array.from(byId.values());
|
|
436
437
|
}
|
|
437
438
|
else {
|
|
@@ -536,7 +537,7 @@ const expenseAutomationMissingReceiptsView = (0, toolkit_1.createSlice)({
|
|
|
536
537
|
});
|
|
537
538
|
_a = expenseAutomationMissingReceiptsView.actions, exports.fetchMissingReceipts = _a.fetchMissingReceipts, exports.fetchMissingReceiptsSuccess = _a.fetchMissingReceiptsSuccess, exports.fetchMissingReceiptsFailure = _a.fetchMissingReceiptsFailure, exports.uploadMissingReceiptSuccess = _a.uploadMissingReceiptSuccess, exports.updateMissingReceiptUploadState = _a.updateMissingReceiptUploadState, exports.updateMissingReceiptsUIState = _a.updateMissingReceiptsUIState, exports.markMissingReceiptAsDone = _a.markMissingReceiptAsDone, exports.clearExpenseAutomationMissingReceiptsView = _a.clearExpenseAutomationMissingReceiptsView,
|
|
538
539
|
// Bulk Upload
|
|
539
|
-
exports.bulkUploadReceipts = _a.bulkUploadReceipts, exports.updateBulkUploadProgress = _a.updateBulkUploadProgress, exports.bulkUploadReceiptsSuccess = _a.bulkUploadReceiptsSuccess, exports.bulkUploadReceiptsFailure = _a.bulkUploadReceiptsFailure, exports.pusherBatchStatusUpdate = _a.pusherBatchStatusUpdate, exports.requestMissingReceiptsTabNavigation = _a.requestMissingReceiptsTabNavigation, exports.clearMissingReceiptsTabNavigation = _a.clearMissingReceiptsTabNavigation, exports.
|
|
540
|
+
exports.bulkUploadReceipts = _a.bulkUploadReceipts, exports.updateBulkUploadProgress = _a.updateBulkUploadProgress, exports.bulkUploadReceiptsSuccess = _a.bulkUploadReceiptsSuccess, exports.bulkUploadReceiptsFailure = _a.bulkUploadReceiptsFailure, exports.pusherBatchStatusUpdate = _a.pusherBatchStatusUpdate, exports.requestMissingReceiptsTabNavigation = _a.requestMissingReceiptsTabNavigation, exports.clearMissingReceiptsTabNavigation = _a.clearMissingReceiptsTabNavigation, exports.fetchBulkUploadBatchDetailsSuccess = _a.fetchBulkUploadBatchDetailsSuccess, exports.fetchBulkUploadBatchDetailsFailure = _a.fetchBulkUploadBatchDetailsFailure, exports.storeBatchDetails = _a.storeBatchDetails, exports.batchDetailFetchFailed = _a.batchDetailFetchFailed, exports.setInitialBatchDetailsLoading = _a.setInitialBatchDetailsLoading, exports.fetchMoreBatchDetails = _a.fetchMoreBatchDetails, exports.fetchMoreBatchDetailsComplete = _a.fetchMoreBatchDetailsComplete, exports.fetchMoreBatchDetailsFailure = _a.fetchMoreBatchDetailsFailure, exports.fetchBulkUploadBatches = _a.fetchBulkUploadBatches, exports.fetchBulkUploadBatchesSuccess = _a.fetchBulkUploadBatchesSuccess, exports.fetchBulkUploadBatchesFailure = _a.fetchBulkUploadBatchesFailure, exports.confirmBulkUploadMatch = _a.confirmBulkUploadMatch, exports.confirmBulkUploadMatchSuccess = _a.confirmBulkUploadMatchSuccess, exports.confirmBulkUploadMatchFailure = _a.confirmBulkUploadMatchFailure, exports.setBulkUploadResultsTab = _a.setBulkUploadResultsTab, exports.setBulkUploadCompletedSubTab = _a.setBulkUploadCompletedSubTab, exports.setBulkUploadSortConfig = _a.setBulkUploadSortConfig, exports.clearBulkUpload = _a.clearBulkUpload, exports.searchTransactionsForManualMatch = _a.searchTransactionsForManualMatch, exports.searchTransactionsForManualMatchSuccess = _a.searchTransactionsForManualMatchSuccess, exports.searchTransactionsForManualMatchFailure = _a.searchTransactionsForManualMatchFailure, exports.clearManualSearchResults = _a.clearManualSearchResults, exports.acknowledgeBulkUploadConfirmMatchComplete = _a.acknowledgeBulkUploadConfirmMatchComplete,
|
|
540
541
|
// Completed Transactions
|
|
541
542
|
exports.fetchCompletedTransactions = _a.fetchCompletedTransactions, exports.fetchCompletedTransactionsSuccess = _a.fetchCompletedTransactionsSuccess, exports.fetchCompletedTransactionsFailure = _a.fetchCompletedTransactionsFailure;
|
|
542
543
|
exports.default = expenseAutomationMissingReceiptsView.reducer;
|
|
@@ -70,10 +70,33 @@ function getExpenseAutomationMissingReceiptsView(state) {
|
|
|
70
70
|
* so we do not block the whole tab while other rows are not fetched yet.
|
|
71
71
|
*/
|
|
72
72
|
const primaryBatchIdFromDetailsOrder = getPrimaryBatchIdFromBatchListOrder(batchList, bulkUpload.batchDetailsById, bulkUpload.failedBatchDetailIds);
|
|
73
|
-
/**
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
/**
|
|
74
|
+
* During upload/matching, prefer `currentBatchId` only when it is not yet in the period
|
|
75
|
+
* `batchList` (true in-flight), or when its details are completed and include unmatched-tab work.
|
|
76
|
+
* Otherwise keep `primaryBatchIdFromDetailsOrder` so a new batch with no `possible_matches` /
|
|
77
|
+
* `no_match` rows yet does not vacate the primary column and push older batches into "past".
|
|
78
|
+
*/
|
|
79
|
+
const unmatchedSectionBatchId = (() => {
|
|
80
|
+
const phase = bulkUpload.phase;
|
|
81
|
+
if (phase !== 'matching' && phase !== 'uploading') {
|
|
82
|
+
return primaryBatchIdFromDetailsOrder;
|
|
83
|
+
}
|
|
84
|
+
const currentId = bulkUpload.currentBatchId;
|
|
85
|
+
if (currentId == null) {
|
|
86
|
+
return primaryBatchIdFromDetailsOrder;
|
|
87
|
+
}
|
|
88
|
+
const currentInBatchList = batchList.some((b) => b.batchId === currentId);
|
|
89
|
+
if (!currentInBatchList) {
|
|
90
|
+
return currentId;
|
|
91
|
+
}
|
|
92
|
+
const currentDetails = bulkUpload.batchDetailsById[currentId];
|
|
93
|
+
if (currentDetails != null &&
|
|
94
|
+
currentDetails.status === 'completed' &&
|
|
95
|
+
batchDetailsHasUnmatchedWork(currentDetails)) {
|
|
96
|
+
return currentId;
|
|
97
|
+
}
|
|
98
|
+
return primaryBatchIdFromDetailsOrder;
|
|
99
|
+
})();
|
|
77
100
|
const completedBatchesInApiOrder = batchList.filter((batchListItem) => (0, missingReceiptsPayload_1.isBatchListStatusCompleted)(batchListItem.status));
|
|
78
101
|
const currentBatchDetails = unmatchedSectionBatchId != null
|
|
79
102
|
? bulkUpload.batchDetailsById[unmatchedSectionBatchId]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.19.84-
|
|
3
|
+
"version": "4.19.84-betaVR12",
|
|
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
|
"module": "lib/esm/index.js",
|