@zeniai/client-epic-state 4.19.37-betaVR26 → 4.19.37-betaVR3
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/epic.d.ts +1 -2
- package/lib/epic.js +1 -2
- package/lib/esm/epic.js +1 -2
- package/lib/esm/index.js +2 -2
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +7 -3
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.js +13 -22
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +1 -7
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +3 -7
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.js +23 -45
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +24 -65
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +32 -33
- package/lib/esm/view/expenseAutomationView/payload/missingReceiptsPayload.js +16 -63
- package/lib/esm/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +26 -153
- package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +13 -108
- package/lib/index.d.ts +2 -2
- package/lib/index.js +32 -36
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.d.ts +5 -2
- package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +6 -2
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.js +11 -20
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +1 -7
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +2 -6
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.d.ts +2 -3
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.js +20 -43
- package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.d.ts +3 -11
- package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +22 -63
- package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.d.ts +7 -5
- package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +28 -29
- package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.d.ts +31 -30
- package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.js +18 -69
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +6 -25
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +27 -155
- package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +0 -6
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +13 -108
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +1 -16
- package/package.json +2 -2
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.js +0 -34
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.d.ts +0 -8
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.js +0 -38
|
@@ -3,27 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.toBatchFile = toBatchFile;
|
|
4
4
|
exports.extractTransactionPayloadsFromBatchFiles = extractTransactionPayloadsFromBatchFiles;
|
|
5
5
|
exports.toBatchSummary = toBatchSummary;
|
|
6
|
+
exports.toBatchStatus = toBatchStatus;
|
|
6
7
|
exports.toBatchDetails = toBatchDetails;
|
|
7
|
-
exports.isBatchListStatusCompleted = isBatchListStatusCompleted;
|
|
8
|
-
exports.filterBatchListItemsForBatchDetailsFetch = filterBatchListItemsForBatchDetailsFetch;
|
|
9
|
-
exports.isBatchDetailsApiStatusCompleted = isBatchDetailsApiStatusCompleted;
|
|
10
|
-
exports.findBatchListItemForBatchId = findBatchListItemForBatchId;
|
|
11
|
-
exports.shouldFetchBatchDetailsForBatchId = shouldFetchBatchDetailsForBatchId;
|
|
12
8
|
exports.toBatchListItem = toBatchListItem;
|
|
13
|
-
exports.
|
|
9
|
+
exports.toManualSearchResult = toManualSearchResult;
|
|
14
10
|
const urlPayload_1 = require("../../../commonPayloadTypes/urlPayload");
|
|
15
|
-
const transactionPayload_1 = require("../../../entity/transaction/payloadTypes/transactionPayload");
|
|
16
11
|
// -- Converter functions --
|
|
17
|
-
function toBatchFile(payload
|
|
12
|
+
function toBatchFile(payload) {
|
|
18
13
|
return {
|
|
19
14
|
attachmentId: payload.attachment_id,
|
|
20
15
|
candidates: payload.candidates?.map((c) => ({
|
|
21
16
|
transactionId: c.transaction_id,
|
|
22
17
|
matchScore: c.match_score,
|
|
23
18
|
})),
|
|
24
|
-
fileDownloadUrl: payload.file_id != null && filesEndPoint != null
|
|
25
|
-
? `${filesEndPoint}/1.0/files/${payload.file_id}?query=${encodeURIComponent(JSON.stringify({ download_file: true }))}`
|
|
26
|
-
: null,
|
|
27
19
|
fileId: payload.file_id,
|
|
28
20
|
filePreviewUrl: payload.file_preview_url,
|
|
29
21
|
filename: payload.filename,
|
|
@@ -75,62 +67,22 @@ function toBatchSummary(payload) {
|
|
|
75
67
|
total: payload.total,
|
|
76
68
|
};
|
|
77
69
|
}
|
|
78
|
-
function
|
|
70
|
+
function toBatchStatus(payload) {
|
|
71
|
+
return {
|
|
72
|
+
batchId: payload.batch_id,
|
|
73
|
+
progress: payload.progress,
|
|
74
|
+
status: payload.status,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
function toBatchDetails(payload) {
|
|
79
78
|
return {
|
|
80
79
|
batchId: payload.batch_id,
|
|
81
80
|
createdAt: payload.created_at,
|
|
82
|
-
files: payload.files.map(
|
|
81
|
+
files: payload.files.map(toBatchFile),
|
|
83
82
|
status: payload.status,
|
|
84
83
|
summary: toBatchSummary(payload.summary),
|
|
85
84
|
};
|
|
86
85
|
}
|
|
87
|
-
/** Batch list `status` is a string from the API — compare case-insensitively. */
|
|
88
|
-
function isBatchListStatusCompleted(status) {
|
|
89
|
-
return status.toLowerCase() === 'completed';
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Subset of the get-all-batches (`/batches?query=...`) list that is eligible for
|
|
93
|
-
* `GET /batches/:batchId` details fetches. The stored list may include pending, failed, or other
|
|
94
|
-
* statuses for UI; only `completed` rows should trigger batch-details requests.
|
|
95
|
-
*/
|
|
96
|
-
function filterBatchListItemsForBatchDetailsFetch(batches) {
|
|
97
|
-
return batches.filter((b) => isBatchListStatusCompleted(b.status));
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Batch details API response `status` field — only completed payloads should be stored from
|
|
101
|
-
* multi-batch fetch paths (list can be briefly stale vs. live processing state).
|
|
102
|
-
*/
|
|
103
|
-
function isBatchDetailsApiStatusCompleted(status) {
|
|
104
|
-
return status.toLowerCase() === 'completed';
|
|
105
|
-
}
|
|
106
|
-
function findBatchListItemForBatchId(batchListByPeriod, batchId) {
|
|
107
|
-
for (const list of Object.values(batchListByPeriod)) {
|
|
108
|
-
const found = list.find((b) => b.batchId === batchId);
|
|
109
|
-
if (found != null) {
|
|
110
|
-
return found;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
return undefined;
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Whether it is appropriate to call `GET .../batches/:id` for details.
|
|
117
|
-
* Skips when live batch status or batch list row indicates the batch is not completed yet.
|
|
118
|
-
* When status is unknown in both sources, allows the request (e.g. dispatch before list refresh).
|
|
119
|
-
*/
|
|
120
|
-
function shouldFetchBatchDetailsForBatchId(batchStatusById, batchListByPeriod, batchId) {
|
|
121
|
-
const live = batchStatusById[batchId]?.status;
|
|
122
|
-
if (live === 'completed') {
|
|
123
|
-
return true;
|
|
124
|
-
}
|
|
125
|
-
if (live === 'pending' || live === 'processing') {
|
|
126
|
-
return false;
|
|
127
|
-
}
|
|
128
|
-
const listItem = findBatchListItemForBatchId(batchListByPeriod, batchId);
|
|
129
|
-
if (listItem != null && !isBatchListStatusCompleted(listItem.status)) {
|
|
130
|
-
return false;
|
|
131
|
-
}
|
|
132
|
-
return true;
|
|
133
|
-
}
|
|
134
86
|
function toBatchListItem(payload) {
|
|
135
87
|
return {
|
|
136
88
|
batchId: payload.batch_id,
|
|
@@ -143,18 +95,15 @@ function toBatchListItem(payload) {
|
|
|
143
95
|
totalFiles: payload.total_files,
|
|
144
96
|
};
|
|
145
97
|
}
|
|
146
|
-
|
|
147
|
-
function supportedTransactionPayloadToManualSearchResult(payload) {
|
|
148
|
-
const amountPayload = (0, transactionPayload_1.getTransactionPayloadAmount)(payload);
|
|
98
|
+
function toManualSearchResult(payload) {
|
|
149
99
|
return {
|
|
150
|
-
amount:
|
|
151
|
-
currencyCode:
|
|
152
|
-
entityId: payload.
|
|
153
|
-
memo: payload.
|
|
100
|
+
amount: payload.amount,
|
|
101
|
+
currencyCode: payload.currency,
|
|
102
|
+
entityId: payload.entity_id,
|
|
103
|
+
memo: payload.memo,
|
|
154
104
|
transactionDate: payload.transaction_date,
|
|
155
105
|
transactionId: payload.transaction_id,
|
|
156
106
|
transactionType: payload.transaction_type,
|
|
157
|
-
vendorName: payload.vendor_name
|
|
158
|
-
vendorLogo: (0, urlPayload_1.toURL)(payload.logo)?.href,
|
|
107
|
+
vendorName: payload.vendor_name,
|
|
159
108
|
};
|
|
160
109
|
}
|
|
@@ -6,8 +6,6 @@ import { TransactionPayload } from '../../../entity/transaction/payloadTypes/tra
|
|
|
6
6
|
import { SupportedTransactionPayload } from '../../../entity/transaction/transactionState';
|
|
7
7
|
import { ZeniAPIStatus } from '../../../responsePayload';
|
|
8
8
|
import type { BatchDetails, BatchListItem, BatchStatus, BulkUploadResultsTab, BulkUploadSortKey, BulkUploadState, CompletedSubTab, ManualSearchResult, MissingReceiptsViewState, MissingReceiptsViewUIState } from '../types/missingReceiptsViewState';
|
|
9
|
-
import type { MonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
|
|
10
|
-
export declare const getCompletedTransactionsCacheKey: (periodId: MonthYearPeriodId, sortKey: BulkUploadSortKey, sortOrder: SortOrder, subTab: CompletedSubTab) => string;
|
|
11
9
|
export declare const initialBulkUploadState: BulkUploadState;
|
|
12
10
|
export declare const initialState: MissingReceiptsViewState;
|
|
13
11
|
export declare const fetchMissingReceipts: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, minimumTransactionAmount: Amount, cacheOverride?: any, refreshViewInBackground?: any], {
|
|
@@ -36,20 +34,10 @@ export declare const fetchMissingReceipts: import("@reduxjs/toolkit").ActionCrea
|
|
|
36
34
|
batchId: ID;
|
|
37
35
|
}, "expenseAutomationMissingReceiptsView/bulkUploadReceiptsSuccess">, bulkUploadReceiptsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
38
36
|
error: ZeniAPIStatus;
|
|
39
|
-
}, "expenseAutomationMissingReceiptsView/bulkUploadReceiptsFailure">, pusherBatchStatusUpdate: import("@reduxjs/toolkit").ActionCreatorWithPayload<BatchStatus, "expenseAutomationMissingReceiptsView/pusherBatchStatusUpdate">,
|
|
40
|
-
tab: BulkUploadResultsTab;
|
|
41
|
-
}, "expenseAutomationMissingReceiptsView/requestMissingReceiptsTabNavigation">, clearMissingReceiptsTabNavigation: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationMissingReceiptsView/clearMissingReceiptsTabNavigation">, fetchBulkUploadBatchDetails: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationMissingReceiptsView/fetchBulkUploadBatchDetails">, fetchBulkUploadBatchDetailsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<BatchDetails, "expenseAutomationMissingReceiptsView/fetchBulkUploadBatchDetailsSuccess">, fetchBulkUploadBatchDetailsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
37
|
+
}, "expenseAutomationMissingReceiptsView/bulkUploadReceiptsFailure">, updateBulkUploadBatchStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<BatchStatus, "expenseAutomationMissingReceiptsView/updateBulkUploadBatchStatus">, pusherBatchStatusUpdate: import("@reduxjs/toolkit").ActionCreatorWithPayload<BatchStatus, "expenseAutomationMissingReceiptsView/pusherBatchStatusUpdate">, fetchBulkUploadBatchDetails: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationMissingReceiptsView/fetchBulkUploadBatchDetails">, fetchBulkUploadBatchDetailsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<BatchDetails, "expenseAutomationMissingReceiptsView/fetchBulkUploadBatchDetailsSuccess">, fetchBulkUploadBatchDetailsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
42
38
|
error: ZeniAPIStatus;
|
|
43
|
-
}, "expenseAutomationMissingReceiptsView/fetchBulkUploadBatchDetailsFailure">, storeBatchDetails: import("@reduxjs/toolkit").ActionCreatorWithPayload<BatchDetails, "expenseAutomationMissingReceiptsView/storeBatchDetails">,
|
|
44
|
-
|
|
45
|
-
}, "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
|
-
error: ZeniAPIStatus;
|
|
47
|
-
}, "expenseAutomationMissingReceiptsView/fetchMoreBatchDetailsFailure">, fetchBulkUploadBatches: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[input?: boolean | {
|
|
48
|
-
cacheOverride?: boolean;
|
|
49
|
-
invalidateBatchDetailsCache?: boolean;
|
|
50
|
-
} | undefined], {
|
|
51
|
-
cacheOverride: boolean;
|
|
52
|
-
invalidateBatchDetailsCache: boolean;
|
|
39
|
+
}, "expenseAutomationMissingReceiptsView/fetchBulkUploadBatchDetailsFailure">, storeBatchDetails: import("@reduxjs/toolkit").ActionCreatorWithPayload<BatchDetails, "expenseAutomationMissingReceiptsView/storeBatchDetails">, fetchBulkUploadBatches: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[cacheOverride?: any], {
|
|
40
|
+
cacheOverride: any;
|
|
53
41
|
}, "expenseAutomationMissingReceiptsView/fetchBulkUploadBatches", never, never>, fetchBulkUploadBatchesSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
54
42
|
batchList: BatchListItem[];
|
|
55
43
|
selectedPeriod: MonthYearPeriod;
|
|
@@ -71,19 +59,12 @@ export declare const fetchMissingReceipts: import("@reduxjs/toolkit").ActionCrea
|
|
|
71
59
|
}, "expenseAutomationMissingReceiptsView/confirmBulkUploadMatchFailure">, setBulkUploadResultsTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<BulkUploadResultsTab, "expenseAutomationMissingReceiptsView/setBulkUploadResultsTab">, setBulkUploadCompletedSubTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<CompletedSubTab, "expenseAutomationMissingReceiptsView/setBulkUploadCompletedSubTab">, setBulkUploadSortConfig: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
72
60
|
sortKey: BulkUploadSortKey;
|
|
73
61
|
sortOrder: SortOrder;
|
|
74
|
-
}, "expenseAutomationMissingReceiptsView/setBulkUploadSortConfig">, clearBulkUpload: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationMissingReceiptsView/clearBulkUpload">, searchTransactionsForManualMatch: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[query: string
|
|
62
|
+
}, "expenseAutomationMissingReceiptsView/setBulkUploadSortConfig">, clearBulkUpload: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationMissingReceiptsView/clearBulkUpload">, searchTransactionsForManualMatch: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[query: string], {
|
|
75
63
|
query: string;
|
|
76
|
-
|
|
77
|
-
}, "expenseAutomationMissingReceiptsView/searchTransactionsForManualMatch", never, never>, searchTransactionsForManualMatchSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
78
|
-
append: boolean;
|
|
79
|
-
nextPageToken: string | null;
|
|
80
|
-
results: ManualSearchResult[];
|
|
81
|
-
totalCount: number;
|
|
82
|
-
}, "expenseAutomationMissingReceiptsView/searchTransactionsForManualMatchSuccess">, searchTransactionsForManualMatchFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
64
|
+
}, "expenseAutomationMissingReceiptsView/searchTransactionsForManualMatch", never, never>, searchTransactionsForManualMatchSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<ManualSearchResult[], "expenseAutomationMissingReceiptsView/searchTransactionsForManualMatchSuccess">, searchTransactionsForManualMatchFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
83
65
|
error: ZeniAPIStatus;
|
|
84
|
-
}, "expenseAutomationMissingReceiptsView/searchTransactionsForManualMatchFailure">, clearManualSearchResults: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationMissingReceiptsView/clearManualSearchResults">, fetchCompletedTransactions: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[pageToken?: string | undefined
|
|
66
|
+
}, "expenseAutomationMissingReceiptsView/searchTransactionsForManualMatchFailure">, clearManualSearchResults: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationMissingReceiptsView/clearManualSearchResults">, fetchCompletedTransactions: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[pageToken?: string | undefined], {
|
|
85
67
|
pageToken: string | undefined;
|
|
86
|
-
cacheOverride: boolean | undefined;
|
|
87
68
|
}, "expenseAutomationMissingReceiptsView/fetchCompletedTransactions", never, never>, fetchCompletedTransactionsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
88
69
|
isInitialLoad: boolean;
|
|
89
70
|
nextPageToken: string | null;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.fetchCompletedTransactionsFailure = exports.fetchCompletedTransactionsSuccess = exports.fetchCompletedTransactions = 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.
|
|
4
|
+
exports.fetchCompletedTransactionsFailure = exports.fetchCompletedTransactionsSuccess = exports.fetchCompletedTransactions = 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.storeBatchDetails = exports.fetchBulkUploadBatchDetailsFailure = exports.fetchBulkUploadBatchDetailsSuccess = exports.fetchBulkUploadBatchDetails = exports.pusherBatchStatusUpdate = exports.updateBulkUploadBatchStatus = 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.initialState = exports.initialBulkUploadState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
7
|
-
const getCompletedTransactionsCacheKey = (periodId, sortKey, sortOrder, subTab) => `completed-${subTab}-${sortKey}-${sortOrder === 'ascending' ? 'asc' : 'desc'}-${periodId}`;
|
|
8
|
-
exports.getCompletedTransactionsCacheKey = getCompletedTransactionsCacheKey;
|
|
9
7
|
exports.initialBulkUploadState = {
|
|
10
8
|
batchDetailsById: {},
|
|
11
|
-
batchDetailsPaginationState: { fetchState: 'Not-Started', error: undefined },
|
|
12
9
|
batchListByPeriod: {},
|
|
13
10
|
batchListFetchState: { fetchState: 'Not-Started', error: undefined },
|
|
14
11
|
batchStatusById: {},
|
|
@@ -17,15 +14,10 @@ exports.initialBulkUploadState = {
|
|
|
17
14
|
confirmMatchStatus: { fetchState: 'Not-Started', error: undefined },
|
|
18
15
|
currentBatchId: undefined,
|
|
19
16
|
currentResultsTab: 'unmatched',
|
|
20
|
-
failedBatchDetailIds: [],
|
|
21
17
|
manualSearch: {
|
|
22
18
|
fetchState: { fetchState: 'Not-Started', error: undefined },
|
|
23
|
-
isLoadingMore: false,
|
|
24
|
-
nextPageToken: null,
|
|
25
|
-
pageSize: 25,
|
|
26
19
|
results: [],
|
|
27
20
|
searchQuery: '',
|
|
28
|
-
totalCount: 0,
|
|
29
21
|
},
|
|
30
22
|
phase: 'idle',
|
|
31
23
|
sortKey: 'date',
|
|
@@ -35,7 +27,6 @@ exports.initialBulkUploadState = {
|
|
|
35
27
|
};
|
|
36
28
|
exports.initialState = {
|
|
37
29
|
bulkUpload: exports.initialBulkUploadState,
|
|
38
|
-
pendingMissingReceiptsTabNavigation: null,
|
|
39
30
|
uploadReceiptStatusById: {},
|
|
40
31
|
refreshStatus: {
|
|
41
32
|
fetchState: 'Not-Started',
|
|
@@ -188,25 +179,13 @@ const expenseAutomationMissingReceiptsView = (0, toolkit_1.createSlice)({
|
|
|
188
179
|
};
|
|
189
180
|
draft.bulkUpload.phase = 'idle';
|
|
190
181
|
},
|
|
191
|
-
|
|
182
|
+
updateBulkUploadBatchStatus(draft, action) {
|
|
192
183
|
const batchStatus = action.payload;
|
|
193
184
|
draft.bulkUpload.batchStatusById[batchStatus.batchId] = batchStatus;
|
|
194
|
-
/**
|
|
195
|
-
* Auto-matching banner (`phase === 'matching'`) must clear when the server reports this
|
|
196
|
-
* upload batch is done — otherwise the Missing tab keeps MatchingProgressBanner until
|
|
197
|
-
* batch-details APIs run; EmailUploadBanner should show again for the next upload.
|
|
198
|
-
*/
|
|
199
|
-
if (batchStatus.status === 'completed' &&
|
|
200
|
-
draft.bulkUpload.phase === 'matching' &&
|
|
201
|
-
draft.bulkUpload.currentBatchId === batchStatus.batchId) {
|
|
202
|
-
draft.bulkUpload.phase = 'completed';
|
|
203
|
-
}
|
|
204
|
-
},
|
|
205
|
-
requestMissingReceiptsTabNavigation(draft, action) {
|
|
206
|
-
draft.pendingMissingReceiptsTabNavigation = action.payload.tab;
|
|
207
185
|
},
|
|
208
|
-
|
|
209
|
-
|
|
186
|
+
pusherBatchStatusUpdate(draft, action) {
|
|
187
|
+
const batchStatus = action.payload;
|
|
188
|
+
draft.bulkUpload.batchStatusById[batchStatus.batchId] = batchStatus;
|
|
210
189
|
},
|
|
211
190
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
212
191
|
fetchBulkUploadBatchDetails(_draft) {
|
|
@@ -224,86 +203,17 @@ const expenseAutomationMissingReceiptsView = (0, toolkit_1.createSlice)({
|
|
|
224
203
|
storeBatchDetails(draft, action) {
|
|
225
204
|
const details = action.payload;
|
|
226
205
|
draft.bulkUpload.batchDetailsById[details.batchId] = details;
|
|
227
|
-
/**
|
|
228
|
-
* Multi-batch fetch paths use `storeBatchDetails` (not `fetchBulkUploadBatchDetailsSuccess`).
|
|
229
|
-
* Without this, `phase` stays `matching` after upload forever and the Unmatched tab keeps
|
|
230
|
-
* showing the skeleton (`bulkUploadPhase === 'matching'` in web-components).
|
|
231
|
-
*/
|
|
232
|
-
if (draft.bulkUpload.phase === 'matching' &&
|
|
233
|
-
draft.bulkUpload.currentBatchId === details.batchId) {
|
|
234
|
-
draft.bulkUpload.phase = 'completed';
|
|
235
|
-
}
|
|
236
|
-
},
|
|
237
|
-
batchDetailFetchFailed(draft, action) {
|
|
238
|
-
const { batchId } = action.payload;
|
|
239
|
-
if (!draft.bulkUpload.failedBatchDetailIds.includes(batchId)) {
|
|
240
|
-
draft.bulkUpload.failedBatchDetailIds.push(batchId);
|
|
241
|
-
}
|
|
242
|
-
if (draft.bulkUpload.phase === 'matching' &&
|
|
243
|
-
draft.bulkUpload.currentBatchId === batchId) {
|
|
244
|
-
draft.bulkUpload.phase = 'completed';
|
|
245
|
-
}
|
|
246
|
-
},
|
|
247
|
-
setInitialBatchDetailsLoading(draft) {
|
|
248
|
-
draft.bulkUpload.batchDetailsPaginationState = {
|
|
249
|
-
fetchState: 'In-Progress',
|
|
250
|
-
error: undefined,
|
|
251
|
-
};
|
|
252
|
-
},
|
|
253
|
-
fetchMoreBatchDetails(_draft) {
|
|
254
|
-
_draft.bulkUpload.batchDetailsPaginationState = {
|
|
255
|
-
fetchState: 'In-Progress',
|
|
256
|
-
error: undefined,
|
|
257
|
-
};
|
|
258
|
-
},
|
|
259
|
-
fetchMoreBatchDetailsComplete(draft) {
|
|
260
|
-
draft.bulkUpload.batchDetailsPaginationState = {
|
|
261
|
-
fetchState: 'Completed',
|
|
262
|
-
error: undefined,
|
|
263
|
-
};
|
|
264
|
-
const currentId = draft.bulkUpload.currentBatchId;
|
|
265
|
-
const currentDetails = currentId != null
|
|
266
|
-
? draft.bulkUpload.batchDetailsById[currentId]
|
|
267
|
-
: undefined;
|
|
268
|
-
if (draft.bulkUpload.phase === 'matching' &&
|
|
269
|
-
currentId != null &&
|
|
270
|
-
currentDetails?.status === 'completed') {
|
|
271
|
-
draft.bulkUpload.phase = 'completed';
|
|
272
|
-
}
|
|
273
|
-
},
|
|
274
|
-
fetchMoreBatchDetailsFailure(draft, action) {
|
|
275
|
-
draft.bulkUpload.batchDetailsPaginationState = {
|
|
276
|
-
fetchState: 'Error',
|
|
277
|
-
error: action.payload.error,
|
|
278
|
-
};
|
|
279
206
|
},
|
|
280
207
|
fetchBulkUploadBatches: {
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
draft.bulkUpload.batchDetailsById = {};
|
|
284
|
-
draft.bulkUpload.failedBatchDetailIds = [];
|
|
285
|
-
}
|
|
208
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
209
|
+
reducer(draft, _action) {
|
|
286
210
|
draft.bulkUpload.batchListFetchState = {
|
|
287
211
|
fetchState: 'In-Progress',
|
|
288
212
|
error: undefined,
|
|
289
213
|
};
|
|
290
214
|
},
|
|
291
|
-
prepare(
|
|
292
|
-
|
|
293
|
-
return {
|
|
294
|
-
payload: {
|
|
295
|
-
cacheOverride: input === true,
|
|
296
|
-
invalidateBatchDetailsCache: false,
|
|
297
|
-
},
|
|
298
|
-
};
|
|
299
|
-
}
|
|
300
|
-
const o = input ?? {};
|
|
301
|
-
return {
|
|
302
|
-
payload: {
|
|
303
|
-
cacheOverride: o.cacheOverride === true,
|
|
304
|
-
invalidateBatchDetailsCache: o.invalidateBatchDetailsCache === true,
|
|
305
|
-
},
|
|
306
|
-
};
|
|
215
|
+
prepare(cacheOverride = false) {
|
|
216
|
+
return { payload: { cacheOverride } };
|
|
307
217
|
},
|
|
308
218
|
},
|
|
309
219
|
fetchBulkUploadBatchesSuccess(draft, action) {
|
|
@@ -313,20 +223,6 @@ const expenseAutomationMissingReceiptsView = (0, toolkit_1.createSlice)({
|
|
|
313
223
|
fetchState: 'Completed',
|
|
314
224
|
error: undefined,
|
|
315
225
|
};
|
|
316
|
-
/**
|
|
317
|
-
* When the multi-batch-details epic has nothing to fetch (e.g. list rows not `completed`
|
|
318
|
-
* yet, or details already present), `phase` can stay `matching` even though we already
|
|
319
|
-
* have completed details for `currentBatchId` (from polling / Pusher). Sync so the UI can
|
|
320
|
-
* dismiss the Unmatched skeleton.
|
|
321
|
-
*/
|
|
322
|
-
const currentId = draft.bulkUpload.currentBatchId;
|
|
323
|
-
if (draft.bulkUpload.phase === 'matching' &&
|
|
324
|
-
currentId != null) {
|
|
325
|
-
const existing = draft.bulkUpload.batchDetailsById[currentId];
|
|
326
|
-
if (existing?.status === 'completed') {
|
|
327
|
-
draft.bulkUpload.phase = 'completed';
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
226
|
},
|
|
331
227
|
fetchBulkUploadBatchesFailure(draft, action) {
|
|
332
228
|
draft.bulkUpload.batchListFetchState = {
|
|
@@ -381,6 +277,7 @@ const expenseAutomationMissingReceiptsView = (0, toolkit_1.createSlice)({
|
|
|
381
277
|
},
|
|
382
278
|
setBulkUploadCompletedSubTab(draft, action) {
|
|
383
279
|
draft.bulkUpload.completedSubTab = action.payload;
|
|
280
|
+
draft.bulkUpload.completedTransactionsByPeriod = {};
|
|
384
281
|
},
|
|
385
282
|
setBulkUploadSortConfig(draft, action) {
|
|
386
283
|
draft.bulkUpload.sortKey = action.payload.sortKey;
|
|
@@ -388,51 +285,28 @@ const expenseAutomationMissingReceiptsView = (0, toolkit_1.createSlice)({
|
|
|
388
285
|
},
|
|
389
286
|
clearBulkUpload(draft) {
|
|
390
287
|
Object.assign(draft.bulkUpload, exports.initialBulkUploadState);
|
|
391
|
-
draft.pendingMissingReceiptsTabNavigation = null;
|
|
392
288
|
},
|
|
393
289
|
searchTransactionsForManualMatch: {
|
|
394
290
|
reducer(draft, action) {
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
else {
|
|
402
|
-
draft.bulkUpload.manualSearch.isLoadingMore = false;
|
|
403
|
-
draft.bulkUpload.manualSearch.results = [];
|
|
404
|
-
draft.bulkUpload.manualSearch.nextPageToken = null;
|
|
405
|
-
draft.bulkUpload.manualSearch.totalCount = 0;
|
|
406
|
-
draft.bulkUpload.manualSearch.fetchState = {
|
|
407
|
-
fetchState: 'In-Progress',
|
|
408
|
-
error: undefined,
|
|
409
|
-
};
|
|
410
|
-
}
|
|
291
|
+
draft.bulkUpload.manualSearch.searchQuery = action.payload.query;
|
|
292
|
+
draft.bulkUpload.manualSearch.fetchState = {
|
|
293
|
+
fetchState: 'In-Progress',
|
|
294
|
+
error: undefined,
|
|
295
|
+
};
|
|
296
|
+
draft.bulkUpload.manualSearch.results = [];
|
|
411
297
|
},
|
|
412
|
-
prepare(query
|
|
413
|
-
return { payload: { query
|
|
298
|
+
prepare(query) {
|
|
299
|
+
return { payload: { query } };
|
|
414
300
|
},
|
|
415
301
|
},
|
|
416
302
|
searchTransactionsForManualMatchSuccess(draft, action) {
|
|
417
|
-
|
|
418
|
-
if (append) {
|
|
419
|
-
const merged = [...draft.bulkUpload.manualSearch.results, ...results];
|
|
420
|
-
const byId = new Map(merged.map((r) => [r.transactionId, r]));
|
|
421
|
-
draft.bulkUpload.manualSearch.results = Array.from(byId.values());
|
|
422
|
-
}
|
|
423
|
-
else {
|
|
424
|
-
draft.bulkUpload.manualSearch.results = results;
|
|
425
|
-
}
|
|
426
|
-
draft.bulkUpload.manualSearch.nextPageToken = nextPageToken;
|
|
427
|
-
draft.bulkUpload.manualSearch.totalCount = totalCount;
|
|
428
|
-
draft.bulkUpload.manualSearch.isLoadingMore = false;
|
|
303
|
+
draft.bulkUpload.manualSearch.results = action.payload;
|
|
429
304
|
draft.bulkUpload.manualSearch.fetchState = {
|
|
430
305
|
fetchState: 'Completed',
|
|
431
306
|
error: undefined,
|
|
432
307
|
};
|
|
433
308
|
},
|
|
434
309
|
searchTransactionsForManualMatchFailure(draft, action) {
|
|
435
|
-
draft.bulkUpload.manualSearch.isLoadingMore = false;
|
|
436
310
|
draft.bulkUpload.manualSearch.fetchState = {
|
|
437
311
|
fetchState: 'Error',
|
|
438
312
|
error: action.payload.error,
|
|
@@ -458,16 +332,15 @@ const expenseAutomationMissingReceiptsView = (0, toolkit_1.createSlice)({
|
|
|
458
332
|
}
|
|
459
333
|
}
|
|
460
334
|
},
|
|
461
|
-
prepare(pageToken
|
|
462
|
-
return { payload: { pageToken
|
|
335
|
+
prepare(pageToken) {
|
|
336
|
+
return { payload: { pageToken } };
|
|
463
337
|
},
|
|
464
338
|
},
|
|
465
339
|
fetchCompletedTransactionsSuccess(draft, action) {
|
|
466
340
|
const { transactionIds, nextPageToken, totalCount, selectedPeriod, isInitialLoad } = action.payload;
|
|
467
341
|
const periodId = (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod);
|
|
468
|
-
const cacheKey = (0, exports.getCompletedTransactionsCacheKey)(periodId, draft.bulkUpload.sortKey, draft.bulkUpload.sortOrder, draft.bulkUpload.completedSubTab);
|
|
469
342
|
if (isInitialLoad) {
|
|
470
|
-
draft.bulkUpload.completedTransactionsByPeriod[
|
|
343
|
+
draft.bulkUpload.completedTransactionsByPeriod[periodId] = {
|
|
471
344
|
transactionIds,
|
|
472
345
|
nextPageToken,
|
|
473
346
|
totalCount,
|
|
@@ -475,7 +348,7 @@ const expenseAutomationMissingReceiptsView = (0, toolkit_1.createSlice)({
|
|
|
475
348
|
};
|
|
476
349
|
}
|
|
477
350
|
else {
|
|
478
|
-
const existing = draft.bulkUpload.completedTransactionsByPeriod[
|
|
351
|
+
const existing = draft.bulkUpload.completedTransactionsByPeriod[periodId];
|
|
479
352
|
if (existing != null) {
|
|
480
353
|
existing.transactionIds.push(...transactionIds);
|
|
481
354
|
existing.nextPageToken = nextPageToken;
|
|
@@ -483,7 +356,7 @@ const expenseAutomationMissingReceiptsView = (0, toolkit_1.createSlice)({
|
|
|
483
356
|
existing.fetchState = { fetchState: 'Completed', error: undefined };
|
|
484
357
|
}
|
|
485
358
|
else {
|
|
486
|
-
draft.bulkUpload.completedTransactionsByPeriod[
|
|
359
|
+
draft.bulkUpload.completedTransactionsByPeriod[periodId] = {
|
|
487
360
|
transactionIds,
|
|
488
361
|
nextPageToken,
|
|
489
362
|
totalCount,
|
|
@@ -494,8 +367,7 @@ const expenseAutomationMissingReceiptsView = (0, toolkit_1.createSlice)({
|
|
|
494
367
|
},
|
|
495
368
|
fetchCompletedTransactionsFailure(draft, action) {
|
|
496
369
|
const periodId = (0, timePeriod_1.toMonthYearPeriodId)(action.payload.selectedPeriod);
|
|
497
|
-
const
|
|
498
|
-
const existing = draft.bulkUpload.completedTransactionsByPeriod[cacheKey];
|
|
370
|
+
const existing = draft.bulkUpload.completedTransactionsByPeriod[periodId];
|
|
499
371
|
if (existing != null) {
|
|
500
372
|
existing.fetchState = {
|
|
501
373
|
fetchState: 'Error',
|
|
@@ -503,7 +375,7 @@ const expenseAutomationMissingReceiptsView = (0, toolkit_1.createSlice)({
|
|
|
503
375
|
};
|
|
504
376
|
}
|
|
505
377
|
else {
|
|
506
|
-
draft.bulkUpload.completedTransactionsByPeriod[
|
|
378
|
+
draft.bulkUpload.completedTransactionsByPeriod[periodId] = {
|
|
507
379
|
fetchState: { fetchState: 'Error', error: action.payload.error },
|
|
508
380
|
nextPageToken: null,
|
|
509
381
|
totalCount: 0,
|
|
@@ -515,7 +387,7 @@ const expenseAutomationMissingReceiptsView = (0, toolkit_1.createSlice)({
|
|
|
515
387
|
});
|
|
516
388
|
_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,
|
|
517
389
|
// Bulk Upload
|
|
518
|
-
exports.bulkUploadReceipts = _a.bulkUploadReceipts, exports.updateBulkUploadProgress = _a.updateBulkUploadProgress, exports.bulkUploadReceiptsSuccess = _a.bulkUploadReceiptsSuccess, exports.bulkUploadReceiptsFailure = _a.bulkUploadReceiptsFailure, exports.
|
|
390
|
+
exports.bulkUploadReceipts = _a.bulkUploadReceipts, exports.updateBulkUploadProgress = _a.updateBulkUploadProgress, exports.bulkUploadReceiptsSuccess = _a.bulkUploadReceiptsSuccess, exports.bulkUploadReceiptsFailure = _a.bulkUploadReceiptsFailure, exports.updateBulkUploadBatchStatus = _a.updateBulkUploadBatchStatus, exports.pusherBatchStatusUpdate = _a.pusherBatchStatusUpdate, exports.fetchBulkUploadBatchDetails = _a.fetchBulkUploadBatchDetails, exports.fetchBulkUploadBatchDetailsSuccess = _a.fetchBulkUploadBatchDetailsSuccess, exports.fetchBulkUploadBatchDetailsFailure = _a.fetchBulkUploadBatchDetailsFailure, exports.storeBatchDetails = _a.storeBatchDetails, 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,
|
|
519
391
|
// Completed Transactions
|
|
520
392
|
exports.fetchCompletedTransactions = _a.fetchCompletedTransactions, exports.fetchCompletedTransactionsSuccess = _a.fetchCompletedTransactionsSuccess, exports.fetchCompletedTransactionsFailure = _a.fetchCompletedTransactionsFailure;
|
|
521
393
|
exports.default = expenseAutomationMissingReceiptsView.reducer;
|
|
@@ -15,8 +15,6 @@ export interface ResolvedCandidate {
|
|
|
15
15
|
}
|
|
16
16
|
export interface ResolvedBatchFile {
|
|
17
17
|
attachmentId: ID;
|
|
18
|
-
batchId: ID;
|
|
19
|
-
fileDownloadUrl: string | null;
|
|
20
18
|
fileId: ID;
|
|
21
19
|
filename: string;
|
|
22
20
|
filePreviewUrl: string | null;
|
|
@@ -27,7 +25,6 @@ export interface ResolvedBatchFile {
|
|
|
27
25
|
}
|
|
28
26
|
export interface BulkUploadSelectorData {
|
|
29
27
|
batchDetails: ResolvedBatchDetails | undefined;
|
|
30
|
-
batchDetailsPaginationState: FetchStateAndError;
|
|
31
28
|
batchList: BatchListItem[];
|
|
32
29
|
batchListFetchState: FetchStateAndError;
|
|
33
30
|
batchStatus: BatchStatus | undefined;
|
|
@@ -35,7 +32,6 @@ export interface BulkUploadSelectorData {
|
|
|
35
32
|
completedTransactions: CompletedTransactionsSelectorData;
|
|
36
33
|
confirmMatchStatus: FetchStateAndError;
|
|
37
34
|
currentResultsTab: BulkUploadResultsTab;
|
|
38
|
-
hasMoreBatchDetails: boolean;
|
|
39
35
|
manualSearch: ManualSearchState;
|
|
40
36
|
matchedFiles: ResolvedBatchFile[];
|
|
41
37
|
pastBatches: BatchListItem[];
|
|
@@ -68,8 +64,6 @@ export interface ResolvedBatchDetails {
|
|
|
68
64
|
export interface ExpenseAutomationMissingReceiptsViewSelector extends SelectorView {
|
|
69
65
|
bulkUpload: BulkUploadSelectorData;
|
|
70
66
|
completionStatus: CompletionStatusType;
|
|
71
|
-
/** When set, UI should switch bulk-upload sub-tab once (e.g. Unmatched on batch completion). */
|
|
72
|
-
pendingMissingReceiptsTabNavigation: BulkUploadResultsTab | null;
|
|
73
67
|
refreshStatus: FetchStateAndError;
|
|
74
68
|
transactions: SupportedTransaction[];
|
|
75
69
|
uiState: MissingReceiptsViewUIState;
|