@zeniai/client-epic-state 4.19.37-betaAS2 → 4.19.37-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/epic.d.ts +8 -1
- package/lib/epic.js +8 -1
- package/lib/esm/epic.js +8 -1
- package/lib/esm/index.js +8 -6
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +28 -0
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.js +25 -0
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.js +31 -0
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +16 -0
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +48 -0
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +27 -0
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +41 -0
- package/lib/esm/view/expenseAutomationView/payload/missingReceiptsPayload.js +164 -1
- package/lib/esm/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +245 -1
- package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +114 -1
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewReducer.js +1 -10
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +2 -4
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.js +2 -5
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewReducer.js +1 -10
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewSelector.js +2 -4
- package/lib/esm/zeniAPI.js +41 -3
- package/lib/index.d.ts +11 -9
- package/lib/index.js +57 -32
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.d.ts +18 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +32 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.d.ts +6 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.js +29 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.js +35 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.d.ts +6 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +20 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +52 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.d.ts +6 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +31 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.d.ts +15 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +46 -0
- package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.d.ts +168 -0
- package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.js +172 -0
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +43 -3
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +246 -2
- package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +60 -1
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.d.ts +1 -1
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +113 -0
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +102 -0
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewReducer.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewReducer.js +2 -11
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +2 -4
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelectorTypes.d.ts +0 -2
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewState.d.ts +0 -1
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.d.ts +0 -1
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.js +2 -5
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonState.d.ts +0 -2
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewReducer.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewReducer.js +2 -11
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewSelector.js +2 -4
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewSelectorTypes.d.ts +0 -2
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewState.d.ts +0 -1
- package/lib/zeniAPI.d.ts +9 -0
- package/lib/zeniAPI.js +40 -2
- package/package.json +1 -1
|
@@ -1,2 +1,174 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toBatchFile = toBatchFile;
|
|
4
|
+
exports.extractTransactionPayloadsFromBatchFiles = extractTransactionPayloadsFromBatchFiles;
|
|
5
|
+
exports.toBatchSummary = toBatchSummary;
|
|
6
|
+
exports.toBatchStatus = toBatchStatus;
|
|
7
|
+
exports.toBatchDetails = toBatchDetails;
|
|
8
|
+
exports.toBatchListItem = toBatchListItem;
|
|
9
|
+
exports.toManualSearchResult = toManualSearchResult;
|
|
10
|
+
exports.completedTransactionPayloadToSupportedTransactionPayload = completedTransactionPayloadToSupportedTransactionPayload;
|
|
11
|
+
// -- Converter functions --
|
|
12
|
+
function toBatchFile(payload) {
|
|
13
|
+
return {
|
|
14
|
+
attachmentId: payload.attachment_id,
|
|
15
|
+
candidates: payload.candidates?.map((c) => ({
|
|
16
|
+
transactionId: c.transaction_id,
|
|
17
|
+
matchScore: c.match_score,
|
|
18
|
+
})),
|
|
19
|
+
fileId: payload.file_id,
|
|
20
|
+
filePreviewUrl: payload.file_preview_url,
|
|
21
|
+
filename: payload.filename,
|
|
22
|
+
matchedTransactionId: payload.matched_transaction?.transaction_id,
|
|
23
|
+
status: payload.status,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function extractTransactionPayloadsFromBatchFiles(files) {
|
|
27
|
+
const seen = new Set();
|
|
28
|
+
const payloads = [];
|
|
29
|
+
for (const file of files) {
|
|
30
|
+
if (file.matched_transaction != null) {
|
|
31
|
+
const id = file.matched_transaction.transaction_id;
|
|
32
|
+
if (!seen.has(id)) {
|
|
33
|
+
seen.add(id);
|
|
34
|
+
payloads.push(matchedTransactionPayloadToSupportedTransactionPayload(file.matched_transaction));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
if (file.candidates != null) {
|
|
38
|
+
for (const candidate of file.candidates) {
|
|
39
|
+
const id = candidate.transaction_id;
|
|
40
|
+
if (!seen.has(id)) {
|
|
41
|
+
seen.add(id);
|
|
42
|
+
payloads.push(matchedTransactionPayloadToSupportedTransactionPayload(candidate));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return payloads;
|
|
48
|
+
}
|
|
49
|
+
function matchedTransactionPayloadToSupportedTransactionPayload(payload) {
|
|
50
|
+
return {
|
|
51
|
+
transaction_id: payload.transaction_id,
|
|
52
|
+
transaction_date: payload.transaction_date,
|
|
53
|
+
currency_code: payload.currency_code,
|
|
54
|
+
total_amount: payload.amount,
|
|
55
|
+
vendor_name: payload.vendor_name,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function toBatchSummary(payload) {
|
|
59
|
+
return {
|
|
60
|
+
failed: payload.failed,
|
|
61
|
+
matched: payload.matched,
|
|
62
|
+
noMatch: payload.no_match,
|
|
63
|
+
possibleMatches: payload.possible_matches,
|
|
64
|
+
total: payload.total,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
function toBatchStatus(payload) {
|
|
68
|
+
return {
|
|
69
|
+
batchId: payload.batch_id,
|
|
70
|
+
progress: payload.progress,
|
|
71
|
+
status: payload.status,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
function toBatchDetails(payload) {
|
|
75
|
+
return {
|
|
76
|
+
batchId: payload.batch_id,
|
|
77
|
+
createdAt: payload.created_at,
|
|
78
|
+
files: payload.files.map(toBatchFile),
|
|
79
|
+
status: payload.status,
|
|
80
|
+
summary: toBatchSummary(payload.summary),
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
function toBatchListItem(payload) {
|
|
84
|
+
return {
|
|
85
|
+
batchId: payload.batch_id,
|
|
86
|
+
createdAt: payload.created_at,
|
|
87
|
+
failedCount: payload.failed_count,
|
|
88
|
+
matchedCount: payload.matched_count,
|
|
89
|
+
noMatchCount: payload.no_match_count,
|
|
90
|
+
possibleMatchesCount: payload.possible_matches_count,
|
|
91
|
+
status: payload.status,
|
|
92
|
+
totalFiles: payload.total_files,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
function toManualSearchResult(payload) {
|
|
96
|
+
return {
|
|
97
|
+
amount: payload.amount,
|
|
98
|
+
currency: payload.currency,
|
|
99
|
+
entityId: payload.entity_id,
|
|
100
|
+
memo: payload.memo,
|
|
101
|
+
transactionDate: payload.transaction_date,
|
|
102
|
+
transactionId: payload.transaction_id,
|
|
103
|
+
transactionType: payload.transaction_type,
|
|
104
|
+
vendorName: payload.vendor_name,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
function completedTransactionAttachmentToAttachmentPayload(payload) {
|
|
108
|
+
return {
|
|
109
|
+
attachment_create_time: payload.attachment_create_time ?? '',
|
|
110
|
+
attachment_id: payload.attachment_id,
|
|
111
|
+
attachment_update_time: payload.attachment_update_time ?? '',
|
|
112
|
+
content_type: payload.content_type,
|
|
113
|
+
file_checksum: null,
|
|
114
|
+
file_download_url: payload.file_download_url,
|
|
115
|
+
file_name: payload.file_name,
|
|
116
|
+
file_size: payload.file_size,
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
function completedTransactionLineToLinePayload(payload) {
|
|
120
|
+
return {
|
|
121
|
+
amount: payload.amount,
|
|
122
|
+
line_description: payload.line_description,
|
|
123
|
+
line_detail_type: payload.line_detail_type,
|
|
124
|
+
line_id: payload.line_id,
|
|
125
|
+
categorization_status: payload.categorization_status,
|
|
126
|
+
line_detail: {
|
|
127
|
+
account: {
|
|
128
|
+
account_id: payload.line_detail.account?.account_id ?? '',
|
|
129
|
+
account_name: payload.line_detail.account?.account_name ?? '',
|
|
130
|
+
labels: [],
|
|
131
|
+
coa_id: payload.line_detail.account?.coa_id,
|
|
132
|
+
qbo_id: payload.line_detail.account?.qbo_id,
|
|
133
|
+
},
|
|
134
|
+
class: {
|
|
135
|
+
accounting_class_id: payload.line_detail.class?.accounting_class_id ?? '',
|
|
136
|
+
accounting_class_name: payload.line_detail.class?.accounting_class_name ?? '',
|
|
137
|
+
accounting_class_number: payload.line_detail.class?.accounting_class_number,
|
|
138
|
+
fully_qualified_accounting_class_name: payload.line_detail.class?.fully_qualified_accounting_class_name,
|
|
139
|
+
qbo_id: payload.line_detail.class?.qbo_id,
|
|
140
|
+
},
|
|
141
|
+
line_detail_type: payload.line_detail_type,
|
|
142
|
+
customer: payload.line_detail.customer != null
|
|
143
|
+
? {
|
|
144
|
+
customer_id: payload.line_detail.customer.customer_id,
|
|
145
|
+
customer_name: payload.line_detail.customer.customer_name,
|
|
146
|
+
qbo_id: payload.line_detail.customer.qbo_id,
|
|
147
|
+
}
|
|
148
|
+
: undefined,
|
|
149
|
+
vendor: payload.line_detail.vendor != null
|
|
150
|
+
? {
|
|
151
|
+
vendor_id: payload.line_detail.vendor.vendor_id,
|
|
152
|
+
vendor_name: payload.line_detail.vendor.vendor_name,
|
|
153
|
+
}
|
|
154
|
+
: undefined,
|
|
155
|
+
},
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
function completedTransactionPayloadToSupportedTransactionPayload(payload) {
|
|
159
|
+
return {
|
|
160
|
+
transaction_id: payload.transaction_id,
|
|
161
|
+
transaction_type: payload.transaction_type,
|
|
162
|
+
transaction_date: payload.transaction_date,
|
|
163
|
+
transaction_type_name: payload.transaction_type_name,
|
|
164
|
+
currency_code: payload.currency_code,
|
|
165
|
+
currency_symbol: payload.currency_symbol,
|
|
166
|
+
total_amount: payload.total_amount,
|
|
167
|
+
vendor_id: payload.vendor_id,
|
|
168
|
+
vendor_name: payload.vendor_name,
|
|
169
|
+
account_id: payload.account_id,
|
|
170
|
+
account_name: payload.account_name,
|
|
171
|
+
attachments: payload.attachments.map(completedTransactionAttachmentToAttachmentPayload),
|
|
172
|
+
lines: payload.lines.map(completedTransactionLineToLinePayload),
|
|
173
|
+
};
|
|
174
|
+
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Amount } from '../../../commonStateTypes/amount';
|
|
2
|
-
import { FetchStateAndError, UpdateType } from '../../../commonStateTypes/common';
|
|
2
|
+
import { FetchStateAndError, ID, UpdateType } from '../../../commonStateTypes/common';
|
|
3
|
+
import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
3
4
|
import { MonthYearPeriod, TimePeriod } from '../../../commonStateTypes/timePeriod';
|
|
4
5
|
import { TransactionPayload } from '../../../entity/transaction/payloadTypes/transactionPayload';
|
|
5
6
|
import { SupportedTransactionPayload } from '../../../entity/transaction/transactionState';
|
|
6
7
|
import { ZeniAPIStatus } from '../../../responsePayload';
|
|
7
|
-
import { MissingReceiptsViewState, MissingReceiptsViewUIState } from '../types/missingReceiptsViewState';
|
|
8
|
+
import type { BatchDetails, BatchListItem, BatchStatus, BulkUploadResultsTab, BulkUploadSortKey, BulkUploadState, CompletedSubTab, ManualSearchResult, MissingReceiptsViewState, MissingReceiptsViewUIState } from '../types/missingReceiptsViewState';
|
|
9
|
+
export declare const initialBulkUploadState: BulkUploadState;
|
|
8
10
|
export declare const initialState: MissingReceiptsViewState;
|
|
9
11
|
export declare const fetchMissingReceipts: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, minimumTransactionAmount: Amount, cacheOverride?: any, refreshViewInBackground?: any], {
|
|
10
12
|
period: TimePeriod;
|
|
@@ -26,6 +28,44 @@ export declare const fetchMissingReceipts: import("@reduxjs/toolkit").ActionCrea
|
|
|
26
28
|
}, "expenseAutomationMissingReceiptsView/updateMissingReceiptUploadState", never, never>, updateMissingReceiptsUIState: import("@reduxjs/toolkit").ActionCreatorWithPayload<Partial<MissingReceiptsViewUIState>, "expenseAutomationMissingReceiptsView/updateMissingReceiptsUIState">, markMissingReceiptAsDone: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[transactionPayload: SupportedTransactionPayload, selectedPeriod: MonthYearPeriod], {
|
|
27
29
|
transactionPayload: SupportedTransactionPayload;
|
|
28
30
|
selectedPeriod: MonthYearPeriod;
|
|
29
|
-
}, "expenseAutomationMissingReceiptsView/markMissingReceiptAsDone", never, never>, clearExpenseAutomationMissingReceiptsView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationMissingReceiptsView/clearExpenseAutomationMissingReceiptsView"
|
|
31
|
+
}, "expenseAutomationMissingReceiptsView/markMissingReceiptAsDone", never, never>, clearExpenseAutomationMissingReceiptsView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationMissingReceiptsView/clearExpenseAutomationMissingReceiptsView">, bulkUploadReceipts: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[files: File[]], {
|
|
32
|
+
files: File[];
|
|
33
|
+
}, "expenseAutomationMissingReceiptsView/bulkUploadReceipts", never, never>, updateBulkUploadProgress: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, "expenseAutomationMissingReceiptsView/updateBulkUploadProgress">, bulkUploadReceiptsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
34
|
+
batchId: ID;
|
|
35
|
+
}, "expenseAutomationMissingReceiptsView/bulkUploadReceiptsSuccess">, bulkUploadReceiptsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
36
|
+
error: ZeniAPIStatus;
|
|
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<{
|
|
38
|
+
error: ZeniAPIStatus;
|
|
39
|
+
}, "expenseAutomationMissingReceiptsView/fetchBulkUploadBatchDetailsFailure">, fetchBulkUploadBatches: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationMissingReceiptsView/fetchBulkUploadBatches">, fetchBulkUploadBatchesSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<BatchListItem[], "expenseAutomationMissingReceiptsView/fetchBulkUploadBatchesSuccess">, fetchBulkUploadBatchesFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
40
|
+
error: ZeniAPIStatus;
|
|
41
|
+
}, "expenseAutomationMissingReceiptsView/fetchBulkUploadBatchesFailure">, confirmBulkUploadMatch: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[batchId: string, attachmentId: string, transactionId: string], {
|
|
42
|
+
batchId: string;
|
|
43
|
+
attachmentId: string;
|
|
44
|
+
transactionId: string;
|
|
45
|
+
}, "expenseAutomationMissingReceiptsView/confirmBulkUploadMatch", never, never>, confirmBulkUploadMatchSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
46
|
+
attachmentId: ID;
|
|
47
|
+
batchId: ID;
|
|
48
|
+
transactionId: ID;
|
|
49
|
+
}, "expenseAutomationMissingReceiptsView/confirmBulkUploadMatchSuccess">, confirmBulkUploadMatchFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
50
|
+
error: ZeniAPIStatus;
|
|
51
|
+
}, "expenseAutomationMissingReceiptsView/confirmBulkUploadMatchFailure">, setBulkUploadResultsTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<BulkUploadResultsTab, "expenseAutomationMissingReceiptsView/setBulkUploadResultsTab">, setBulkUploadCompletedSubTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<CompletedSubTab, "expenseAutomationMissingReceiptsView/setBulkUploadCompletedSubTab">, setBulkUploadSortConfig: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
52
|
+
sortKey: BulkUploadSortKey;
|
|
53
|
+
sortOrder: SortOrder;
|
|
54
|
+
}, "expenseAutomationMissingReceiptsView/setBulkUploadSortConfig">, clearBulkUpload: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationMissingReceiptsView/clearBulkUpload">, searchTransactionsForManualMatch: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[query: string], {
|
|
55
|
+
query: string;
|
|
56
|
+
}, "expenseAutomationMissingReceiptsView/searchTransactionsForManualMatch", never, never>, searchTransactionsForManualMatchSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<ManualSearchResult[], "expenseAutomationMissingReceiptsView/searchTransactionsForManualMatchSuccess">, searchTransactionsForManualMatchFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
57
|
+
error: ZeniAPIStatus;
|
|
58
|
+
}, "expenseAutomationMissingReceiptsView/searchTransactionsForManualMatchFailure">, clearManualSearchResults: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationMissingReceiptsView/clearManualSearchResults">, fetchCompletedTransactions: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedPeriod: MonthYearPeriod, pageToken?: string | undefined], {
|
|
59
|
+
selectedPeriod: MonthYearPeriod;
|
|
60
|
+
pageToken: string | undefined;
|
|
61
|
+
}, "expenseAutomationMissingReceiptsView/fetchCompletedTransactions", never, never>, fetchCompletedTransactionsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
62
|
+
nextPageToken: string | null;
|
|
63
|
+
selectedPeriod: MonthYearPeriod;
|
|
64
|
+
totalCount: number;
|
|
65
|
+
transactionIds: ID[];
|
|
66
|
+
}, "expenseAutomationMissingReceiptsView/fetchCompletedTransactionsSuccess">, fetchCompletedTransactionsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
67
|
+
error: ZeniAPIStatus;
|
|
68
|
+
selectedPeriod: MonthYearPeriod;
|
|
69
|
+
}, "expenseAutomationMissingReceiptsView/fetchCompletedTransactionsFailure">;
|
|
30
70
|
declare const _default: import("redux").Reducer<MissingReceiptsViewState>;
|
|
31
71
|
export default _default;
|
|
@@ -1,10 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.clearExpenseAutomationMissingReceiptsView = exports.markMissingReceiptAsDone = exports.updateMissingReceiptsUIState = exports.updateMissingReceiptUploadState = exports.uploadMissingReceiptSuccess = exports.fetchMissingReceiptsFailure = exports.fetchMissingReceiptsSuccess = exports.fetchMissingReceipts = exports.initialState = void 0;
|
|
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.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
|
+
exports.initialBulkUploadState = {
|
|
8
|
+
batchDetailsById: {},
|
|
9
|
+
batchList: [],
|
|
10
|
+
batchListFetchState: { fetchState: 'Not-Started', error: undefined },
|
|
11
|
+
batchStatusById: {},
|
|
12
|
+
completedSubTab: 'all',
|
|
13
|
+
completedTransactionsByPeriod: {},
|
|
14
|
+
confirmMatchStatus: { fetchState: 'Not-Started', error: undefined },
|
|
15
|
+
currentBatchId: undefined,
|
|
16
|
+
currentResultsTab: 'unmatched',
|
|
17
|
+
manualSearch: {
|
|
18
|
+
fetchState: { fetchState: 'Not-Started', error: undefined },
|
|
19
|
+
results: [],
|
|
20
|
+
searchQuery: '',
|
|
21
|
+
},
|
|
22
|
+
phase: 'idle',
|
|
23
|
+
sortKey: 'date',
|
|
24
|
+
sortOrder: 'descending',
|
|
25
|
+
uploadProgress: 0,
|
|
26
|
+
uploadStatus: { fetchState: 'Not-Started', error: undefined },
|
|
27
|
+
};
|
|
7
28
|
exports.initialState = {
|
|
29
|
+
bulkUpload: exports.initialBulkUploadState,
|
|
8
30
|
uploadReceiptStatusById: {},
|
|
9
31
|
refreshStatus: {
|
|
10
32
|
fetchState: 'Not-Started',
|
|
@@ -124,7 +146,229 @@ const expenseAutomationMissingReceiptsView = (0, toolkit_1.createSlice)({
|
|
|
124
146
|
clearExpenseAutomationMissingReceiptsView(draft) {
|
|
125
147
|
Object.assign(draft, exports.initialState);
|
|
126
148
|
},
|
|
149
|
+
// -- Bulk Upload Actions --
|
|
150
|
+
bulkUploadReceipts: {
|
|
151
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
152
|
+
reducer(draft, _action) {
|
|
153
|
+
draft.bulkUpload.phase = 'uploading';
|
|
154
|
+
draft.bulkUpload.uploadProgress = 0;
|
|
155
|
+
draft.bulkUpload.uploadStatus = {
|
|
156
|
+
fetchState: 'In-Progress',
|
|
157
|
+
error: undefined,
|
|
158
|
+
};
|
|
159
|
+
},
|
|
160
|
+
prepare(files) {
|
|
161
|
+
return { payload: { files } };
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
updateBulkUploadProgress(draft, action) {
|
|
165
|
+
draft.bulkUpload.uploadProgress = action.payload;
|
|
166
|
+
},
|
|
167
|
+
bulkUploadReceiptsSuccess(draft, action) {
|
|
168
|
+
draft.bulkUpload.currentBatchId = action.payload.batchId;
|
|
169
|
+
draft.bulkUpload.uploadStatus = {
|
|
170
|
+
fetchState: 'Completed',
|
|
171
|
+
error: undefined,
|
|
172
|
+
};
|
|
173
|
+
draft.bulkUpload.phase = 'matching';
|
|
174
|
+
},
|
|
175
|
+
bulkUploadReceiptsFailure(draft, action) {
|
|
176
|
+
draft.bulkUpload.uploadStatus = {
|
|
177
|
+
fetchState: 'Error',
|
|
178
|
+
error: action.payload.error,
|
|
179
|
+
};
|
|
180
|
+
draft.bulkUpload.phase = 'idle';
|
|
181
|
+
},
|
|
182
|
+
updateBulkUploadBatchStatus(draft, action) {
|
|
183
|
+
const batchStatus = action.payload;
|
|
184
|
+
draft.bulkUpload.batchStatusById[batchStatus.batchId] = batchStatus;
|
|
185
|
+
},
|
|
186
|
+
pusherBatchStatusUpdate(draft, action) {
|
|
187
|
+
const batchStatus = action.payload;
|
|
188
|
+
draft.bulkUpload.batchStatusById[batchStatus.batchId] = batchStatus;
|
|
189
|
+
},
|
|
190
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
191
|
+
fetchBulkUploadBatchDetails(_draft) {
|
|
192
|
+
// trigger epic, no state change needed
|
|
193
|
+
},
|
|
194
|
+
fetchBulkUploadBatchDetailsSuccess(draft, action) {
|
|
195
|
+
const details = action.payload;
|
|
196
|
+
draft.bulkUpload.batchDetailsById[details.batchId] = details;
|
|
197
|
+
draft.bulkUpload.phase = 'completed';
|
|
198
|
+
},
|
|
199
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
200
|
+
fetchBulkUploadBatchDetailsFailure(draft, _action) {
|
|
201
|
+
draft.bulkUpload.phase = 'completed';
|
|
202
|
+
},
|
|
203
|
+
fetchBulkUploadBatches(draft) {
|
|
204
|
+
draft.bulkUpload.batchListFetchState = {
|
|
205
|
+
fetchState: 'In-Progress',
|
|
206
|
+
error: undefined,
|
|
207
|
+
};
|
|
208
|
+
},
|
|
209
|
+
fetchBulkUploadBatchesSuccess(draft, action) {
|
|
210
|
+
draft.bulkUpload.batchList = action.payload;
|
|
211
|
+
draft.bulkUpload.batchListFetchState = {
|
|
212
|
+
fetchState: 'Completed',
|
|
213
|
+
error: undefined,
|
|
214
|
+
};
|
|
215
|
+
},
|
|
216
|
+
fetchBulkUploadBatchesFailure(draft, action) {
|
|
217
|
+
draft.bulkUpload.batchListFetchState = {
|
|
218
|
+
fetchState: 'Error',
|
|
219
|
+
error: action.payload.error,
|
|
220
|
+
};
|
|
221
|
+
},
|
|
222
|
+
confirmBulkUploadMatch: {
|
|
223
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
224
|
+
reducer(draft, _action) {
|
|
225
|
+
draft.bulkUpload.confirmMatchStatus = {
|
|
226
|
+
fetchState: 'In-Progress',
|
|
227
|
+
error: undefined,
|
|
228
|
+
};
|
|
229
|
+
},
|
|
230
|
+
prepare(batchId, attachmentId, transactionId) {
|
|
231
|
+
return { payload: { batchId, attachmentId, transactionId } };
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
confirmBulkUploadMatchSuccess(draft, action) {
|
|
235
|
+
const { batchId, attachmentId, transactionId } = action.payload;
|
|
236
|
+
draft.bulkUpload.confirmMatchStatus = {
|
|
237
|
+
fetchState: 'Completed',
|
|
238
|
+
error: undefined,
|
|
239
|
+
};
|
|
240
|
+
const details = draft.bulkUpload.batchDetailsById[batchId];
|
|
241
|
+
if (details != null) {
|
|
242
|
+
const file = details.files.find((f) => f.attachmentId === attachmentId);
|
|
243
|
+
if (file != null) {
|
|
244
|
+
file.status = 'matched';
|
|
245
|
+
file.matchedTransactionId = transactionId;
|
|
246
|
+
file.candidates = undefined;
|
|
247
|
+
}
|
|
248
|
+
details.summary.matched += 1;
|
|
249
|
+
details.summary.possibleMatches = Math.max(0, details.summary.possibleMatches - 1);
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
confirmBulkUploadMatchFailure(draft, action) {
|
|
253
|
+
draft.bulkUpload.confirmMatchStatus = {
|
|
254
|
+
fetchState: 'Error',
|
|
255
|
+
error: action.payload.error,
|
|
256
|
+
};
|
|
257
|
+
},
|
|
258
|
+
setBulkUploadResultsTab(draft, action) {
|
|
259
|
+
draft.bulkUpload.currentResultsTab = action.payload;
|
|
260
|
+
},
|
|
261
|
+
setBulkUploadCompletedSubTab(draft, action) {
|
|
262
|
+
draft.bulkUpload.completedSubTab = action.payload;
|
|
263
|
+
draft.bulkUpload.completedTransactionsByPeriod = {};
|
|
264
|
+
},
|
|
265
|
+
setBulkUploadSortConfig(draft, action) {
|
|
266
|
+
draft.bulkUpload.sortKey = action.payload.sortKey;
|
|
267
|
+
draft.bulkUpload.sortOrder = action.payload.sortOrder;
|
|
268
|
+
},
|
|
269
|
+
clearBulkUpload(draft) {
|
|
270
|
+
Object.assign(draft.bulkUpload, exports.initialBulkUploadState);
|
|
271
|
+
},
|
|
272
|
+
searchTransactionsForManualMatch: {
|
|
273
|
+
reducer(draft, action) {
|
|
274
|
+
draft.bulkUpload.manualSearch.searchQuery = action.payload.query;
|
|
275
|
+
draft.bulkUpload.manualSearch.fetchState = {
|
|
276
|
+
fetchState: 'In-Progress',
|
|
277
|
+
error: undefined,
|
|
278
|
+
};
|
|
279
|
+
draft.bulkUpload.manualSearch.results = [];
|
|
280
|
+
},
|
|
281
|
+
prepare(query) {
|
|
282
|
+
return { payload: { query } };
|
|
283
|
+
},
|
|
284
|
+
},
|
|
285
|
+
searchTransactionsForManualMatchSuccess(draft, action) {
|
|
286
|
+
draft.bulkUpload.manualSearch.results = action.payload;
|
|
287
|
+
draft.bulkUpload.manualSearch.fetchState = {
|
|
288
|
+
fetchState: 'Completed',
|
|
289
|
+
error: undefined,
|
|
290
|
+
};
|
|
291
|
+
},
|
|
292
|
+
searchTransactionsForManualMatchFailure(draft, action) {
|
|
293
|
+
draft.bulkUpload.manualSearch.fetchState = {
|
|
294
|
+
fetchState: 'Error',
|
|
295
|
+
error: action.payload.error,
|
|
296
|
+
};
|
|
297
|
+
},
|
|
298
|
+
clearManualSearchResults(draft) {
|
|
299
|
+
draft.bulkUpload.manualSearch = exports.initialBulkUploadState.manualSearch;
|
|
300
|
+
},
|
|
301
|
+
// -- Completed Transactions Actions --
|
|
302
|
+
fetchCompletedTransactions: {
|
|
303
|
+
reducer(draft, action) {
|
|
304
|
+
const periodId = (0, timePeriod_1.toMonthYearPeriodId)(action.payload.selectedPeriod);
|
|
305
|
+
const existing = draft.bulkUpload.completedTransactionsByPeriod[periodId];
|
|
306
|
+
if (action.payload.pageToken == null) {
|
|
307
|
+
draft.bulkUpload.completedTransactionsByPeriod[periodId] = {
|
|
308
|
+
fetchState: { fetchState: 'In-Progress', error: undefined },
|
|
309
|
+
nextPageToken: null,
|
|
310
|
+
totalCount: 0,
|
|
311
|
+
transactionIds: [],
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
else if (existing != null) {
|
|
315
|
+
existing.fetchState = { fetchState: 'In-Progress', error: undefined };
|
|
316
|
+
}
|
|
317
|
+
else {
|
|
318
|
+
draft.bulkUpload.completedTransactionsByPeriod[periodId] = {
|
|
319
|
+
fetchState: { fetchState: 'In-Progress', error: undefined },
|
|
320
|
+
nextPageToken: null,
|
|
321
|
+
totalCount: 0,
|
|
322
|
+
transactionIds: [],
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
prepare(selectedPeriod, pageToken) {
|
|
327
|
+
return { payload: { selectedPeriod, pageToken } };
|
|
328
|
+
},
|
|
329
|
+
},
|
|
330
|
+
fetchCompletedTransactionsSuccess(draft, action) {
|
|
331
|
+
const { transactionIds, nextPageToken, totalCount, selectedPeriod } = action.payload;
|
|
332
|
+
const periodId = (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod);
|
|
333
|
+
const existing = draft.bulkUpload.completedTransactionsByPeriod[periodId];
|
|
334
|
+
if (existing != null) {
|
|
335
|
+
existing.transactionIds.push(...transactionIds);
|
|
336
|
+
existing.nextPageToken = nextPageToken;
|
|
337
|
+
existing.totalCount = totalCount;
|
|
338
|
+
existing.fetchState = { fetchState: 'Completed', error: undefined };
|
|
339
|
+
}
|
|
340
|
+
else {
|
|
341
|
+
draft.bulkUpload.completedTransactionsByPeriod[periodId] = {
|
|
342
|
+
transactionIds,
|
|
343
|
+
nextPageToken,
|
|
344
|
+
totalCount,
|
|
345
|
+
fetchState: { fetchState: 'Completed', error: undefined },
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
fetchCompletedTransactionsFailure(draft, action) {
|
|
350
|
+
const periodId = (0, timePeriod_1.toMonthYearPeriodId)(action.payload.selectedPeriod);
|
|
351
|
+
const existing = draft.bulkUpload.completedTransactionsByPeriod[periodId];
|
|
352
|
+
if (existing != null) {
|
|
353
|
+
existing.fetchState = {
|
|
354
|
+
fetchState: 'Error',
|
|
355
|
+
error: action.payload.error,
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
else {
|
|
359
|
+
draft.bulkUpload.completedTransactionsByPeriod[periodId] = {
|
|
360
|
+
fetchState: { fetchState: 'Error', error: action.payload.error },
|
|
361
|
+
nextPageToken: null,
|
|
362
|
+
totalCount: 0,
|
|
363
|
+
transactionIds: [],
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
},
|
|
127
367
|
},
|
|
128
368
|
});
|
|
129
|
-
_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
|
|
369
|
+
_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,
|
|
370
|
+
// Bulk Upload
|
|
371
|
+
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.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,
|
|
372
|
+
// Completed Transactions
|
|
373
|
+
exports.fetchCompletedTransactions = _a.fetchCompletedTransactions, exports.fetchCompletedTransactionsSuccess = _a.fetchCompletedTransactionsSuccess, exports.fetchCompletedTransactionsFailure = _a.fetchCompletedTransactionsFailure;
|
|
130
374
|
exports.default = expenseAutomationMissingReceiptsView.reducer;
|
|
@@ -1,8 +1,67 @@
|
|
|
1
1
|
import { CompletionStatusType, FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
3
|
import { SupportedTransaction } from '../../../entity/transaction/transactionState';
|
|
4
|
-
import {
|
|
4
|
+
import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
5
|
+
import type { BatchFileStatus, BatchListItem, BatchStatus, BulkUploadPhase, BulkUploadResultsTab, BulkUploadSortKey, CompletedSubTab, ManualSearchState, MatchSource, MissingReceiptsViewUIState } from '../types/missingReceiptsViewState';
|
|
6
|
+
export interface CompletedTransactionsSelectorData {
|
|
7
|
+
fetchState: FetchStateAndError;
|
|
8
|
+
nextPageToken: string | null;
|
|
9
|
+
totalCount: number;
|
|
10
|
+
transactions: SupportedTransaction[];
|
|
11
|
+
}
|
|
12
|
+
export interface ResolvedCandidate {
|
|
13
|
+
matchScore: number;
|
|
14
|
+
transaction: SupportedTransaction;
|
|
15
|
+
}
|
|
16
|
+
export interface ResolvedBatchFile {
|
|
17
|
+
attachmentId: ID;
|
|
18
|
+
fileId: ID;
|
|
19
|
+
filename: string;
|
|
20
|
+
filePreviewUrl: string;
|
|
21
|
+
status: BatchFileStatus;
|
|
22
|
+
candidates?: ResolvedCandidate[];
|
|
23
|
+
matchedTransaction?: SupportedTransaction;
|
|
24
|
+
matchSource?: MatchSource;
|
|
25
|
+
}
|
|
26
|
+
export interface BulkUploadSelectorData {
|
|
27
|
+
batchDetails: ResolvedBatchDetails | undefined;
|
|
28
|
+
batchList: BatchListItem[];
|
|
29
|
+
batchListFetchState: FetchStateAndError;
|
|
30
|
+
batchStatus: BatchStatus | undefined;
|
|
31
|
+
completedSubTab: CompletedSubTab;
|
|
32
|
+
completedTransactions: CompletedTransactionsSelectorData;
|
|
33
|
+
confirmMatchStatus: FetchStateAndError;
|
|
34
|
+
currentResultsTab: BulkUploadResultsTab;
|
|
35
|
+
manualSearch: ManualSearchState;
|
|
36
|
+
matchedFiles: ResolvedBatchFile[];
|
|
37
|
+
pastBatches: BatchListItem[];
|
|
38
|
+
phase: BulkUploadPhase;
|
|
39
|
+
progress: {
|
|
40
|
+
percentage: number;
|
|
41
|
+
processed: number;
|
|
42
|
+
total: number;
|
|
43
|
+
};
|
|
44
|
+
sortKey: BulkUploadSortKey;
|
|
45
|
+
sortOrder: SortOrder;
|
|
46
|
+
unmatchedFiles: ResolvedBatchFile[];
|
|
47
|
+
uploadProgress: number;
|
|
48
|
+
uploadStatus: FetchStateAndError;
|
|
49
|
+
}
|
|
50
|
+
export interface ResolvedBatchDetails {
|
|
51
|
+
batchId: ID;
|
|
52
|
+
createdAt: string;
|
|
53
|
+
files: ResolvedBatchFile[];
|
|
54
|
+
status: string;
|
|
55
|
+
summary: {
|
|
56
|
+
failed: number;
|
|
57
|
+
matched: number;
|
|
58
|
+
noMatch: number;
|
|
59
|
+
possibleMatches: number;
|
|
60
|
+
total: number;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
5
63
|
export interface ExpenseAutomationMissingReceiptsViewSelector extends SelectorView {
|
|
64
|
+
bulkUpload: BulkUploadSelectorData;
|
|
6
65
|
completionStatus: CompletionStatusType;
|
|
7
66
|
refreshStatus: FetchStateAndError;
|
|
8
67
|
transactions: SupportedTransaction[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { RootState } from '../../../reducer';
|
|
2
|
-
import { ExpenseAutomationMissingReceiptsViewSelector } from '../selectorTypes/missingReceiptsSelectorTypes';
|
|
2
|
+
import type { ExpenseAutomationMissingReceiptsViewSelector } from '../selectorTypes/missingReceiptsSelectorTypes';
|
|
3
3
|
export declare function getExpenseAutomationMissingReceiptsView(state: RootState): ExpenseAutomationMissingReceiptsViewSelector;
|