@zeniai/client-epic-state 5.0.71-betaAS1 → 5.0.71-betaVR1
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/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.js +7 -1
- package/lib/esm/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +9 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.js +7 -1
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +9 -0
- package/package.json +2 -2
package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.js
CHANGED
|
@@ -50,7 +50,13 @@ export const fetchMultipleBatchDetailsEpic = (actions$, state$, zeniAPI) => acti
|
|
|
50
50
|
shouldFetchBatchDetailsForBatchId(bulkUpload.batchStatusById, bulkUpload.batchListByPeriod, currentId)) {
|
|
51
51
|
return of(fetchBulkUploadBatchDetails());
|
|
52
52
|
}
|
|
53
|
-
|
|
53
|
+
/**
|
|
54
|
+
* Close the pagination loop so the Unmatched-tab loading heuristic can settle.
|
|
55
|
+
* Without this, `batchDetailsPaginationState` stays at `Not-Started` forever after a
|
|
56
|
+
* list refresh that finds zero completed rows (or all of them already cached) — the
|
|
57
|
+
* direct-open-Unmatched-without-upload path then renders an infinite skeleton.
|
|
58
|
+
*/
|
|
59
|
+
return of(fetchMoreBatchDetailsComplete());
|
|
54
60
|
}
|
|
55
61
|
return concat(of(setInitialBatchDetailsLoading()), fetchBatchDetailsByIds(batchIdsToFetch, zeniAPI), of(fetchMoreBatchDetailsComplete()));
|
|
56
62
|
}));
|
|
@@ -321,6 +321,15 @@ const expenseAutomationMissingReceiptsView = createSlice({
|
|
|
321
321
|
if (action.payload.invalidateBatchDetailsCache === true) {
|
|
322
322
|
draft.bulkUpload.batchDetailsById = {};
|
|
323
323
|
draft.bulkUpload.failedBatchDetailIds = [];
|
|
324
|
+
/**
|
|
325
|
+
* Also reset pagination so the post-success epic re-runs the details chain from a
|
|
326
|
+
* clean slate. Otherwise a previously `Completed` pagination state survives the cache
|
|
327
|
+
* wipe and the Unmatched skeleton can stay up while no new details actually load.
|
|
328
|
+
*/
|
|
329
|
+
draft.bulkUpload.batchDetailsPaginationState = {
|
|
330
|
+
fetchState: 'Not-Started',
|
|
331
|
+
error: undefined,
|
|
332
|
+
};
|
|
324
333
|
}
|
|
325
334
|
draft.bulkUpload.batchListFetchState = {
|
|
326
335
|
fetchState: 'In-Progress',
|
package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.js
CHANGED
|
@@ -54,7 +54,13 @@ const fetchMultipleBatchDetailsEpic = (actions$, state$, zeniAPI) => actions$.pi
|
|
|
54
54
|
(0, missingReceiptsPayload_1.shouldFetchBatchDetailsForBatchId)(bulkUpload.batchStatusById, bulkUpload.batchListByPeriod, currentId)) {
|
|
55
55
|
return (0, rxjs_1.of)((0, missingReceiptsViewReducer_1.fetchBulkUploadBatchDetails)());
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
/**
|
|
58
|
+
* Close the pagination loop so the Unmatched-tab loading heuristic can settle.
|
|
59
|
+
* Without this, `batchDetailsPaginationState` stays at `Not-Started` forever after a
|
|
60
|
+
* list refresh that finds zero completed rows (or all of them already cached) — the
|
|
61
|
+
* direct-open-Unmatched-without-upload path then renders an infinite skeleton.
|
|
62
|
+
*/
|
|
63
|
+
return (0, rxjs_1.of)((0, missingReceiptsViewReducer_1.fetchMoreBatchDetailsComplete)());
|
|
58
64
|
}
|
|
59
65
|
return (0, rxjs_1.concat)((0, rxjs_1.of)((0, missingReceiptsViewReducer_1.setInitialBatchDetailsLoading)()), fetchBatchDetailsByIds(batchIdsToFetch, zeniAPI), (0, rxjs_1.of)((0, missingReceiptsViewReducer_1.fetchMoreBatchDetailsComplete)()));
|
|
60
66
|
}));
|
|
@@ -326,6 +326,15 @@ const expenseAutomationMissingReceiptsView = (0, toolkit_1.createSlice)({
|
|
|
326
326
|
if (action.payload.invalidateBatchDetailsCache === true) {
|
|
327
327
|
draft.bulkUpload.batchDetailsById = {};
|
|
328
328
|
draft.bulkUpload.failedBatchDetailIds = [];
|
|
329
|
+
/**
|
|
330
|
+
* Also reset pagination so the post-success epic re-runs the details chain from a
|
|
331
|
+
* clean slate. Otherwise a previously `Completed` pagination state survives the cache
|
|
332
|
+
* wipe and the Unmatched skeleton can stay up while no new details actually load.
|
|
333
|
+
*/
|
|
334
|
+
draft.bulkUpload.batchDetailsPaginationState = {
|
|
335
|
+
fetchState: 'Not-Started',
|
|
336
|
+
error: undefined,
|
|
337
|
+
};
|
|
329
338
|
}
|
|
330
339
|
draft.bulkUpload.batchListFetchState = {
|
|
331
340
|
fetchState: 'In-Progress',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.0.71-
|
|
3
|
+
"version": "5.0.71-betaVR1",
|
|
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",
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
"find-dead-code": "ts-prune | grep -v '(used in module)'",
|
|
117
117
|
"find-unused-exports": "ts-unused-exports ./tsconfig.json",
|
|
118
118
|
"circular-dependency": "npx madge --circular --extensions ts ./src",
|
|
119
|
-
"build": "concurrently --kill-others-on-fail --handle-input \"echo 'TypeScript build in progress...' && time tsc && echo 'ESM build...' && tsc -p tsconfig.esm.json\"
|
|
119
|
+
"build": "concurrently --kill-others-on-fail --handle-input \"echo 'TypeScript build in progress...' && time tsc && echo 'ESM build...' && tsc -p tsconfig.esm.json\"",
|
|
120
120
|
"only-build": "eslint . --ext .js,.jsx,.ts,.tsx && time tsc && tsc -p tsconfig.esm.json && rimraf \"lib/**/__mocks__\" \"lib/**/__testHelpers__\"",
|
|
121
121
|
"only-build-dev": "eslint . --ext .js,.jsx,.ts,.tsx && time tsc -p tsconfig.dev.json && tsc -p tsconfig.esm.dev.json && rimraf \"lib/**/__mocks__\" \"lib/**/__testHelpers__\"",
|
|
122
122
|
"format": "prettier --write --ignore-unknown \"src/**/*\" && pnpm lint",
|