@zeniai/client-epic-state 4.19.99-betaSS4 → 4.19.99
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/commonStateTypes/animations.d.ts +1 -1
- package/lib/entity/aiCfo/aiCfoSelector.d.ts +2 -1
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +2 -2
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +0 -38
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +0 -78
- package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +1 -4
- package/lib/entity/jeSchedules/jeSchedulesSelector.js +1 -5
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +0 -37
- package/lib/entity/tenant/tenantPayload.d.ts +0 -1
- package/lib/entity/tenant/tenantReducer.js +0 -1
- package/lib/entity/tenant/tenantSelector.d.ts +0 -1
- package/lib/entity/tenant/tenantSelector.js +1 -9
- package/lib/entity/tenant/tenantState.d.ts +0 -1
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +1 -4
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -1
- package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +0 -3
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +1 -17
- package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +0 -1
- package/lib/entity/transaction/stateTypes/transaction.d.ts +0 -5
- package/lib/entity/transaction/stateTypes/transactionLine.d.ts +1 -1
- package/lib/epic.d.ts +1 -2
- package/lib/epic.js +1 -2
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +0 -78
- package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +1 -5
- package/lib/esm/entity/tenant/tenantReducer.js +0 -1
- package/lib/esm/entity/tenant/tenantSelector.js +0 -7
- package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -1
- package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +1 -17
- package/lib/esm/epic.js +1 -2
- package/lib/esm/index.js +7 -8
- package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +1 -82
- package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +2 -8
- package/lib/esm/view/classList/fetchClassListEpic.js +2 -9
- package/lib/esm/view/commonVendorView/vendorView/vendorViewSelector.js +5 -18
- package/lib/esm/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +2 -6
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +2 -2
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +3 -4
- package/lib/esm/view/expenseAutomationView/expenseAutomationViewSelector.js +1 -0
- package/lib/esm/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
- package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
- package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +1 -17
- package/lib/esm/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +2 -10
- package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +6 -63
- package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +4 -12
- package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +9 -22
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +6 -12
- package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +1 -18
- package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +8 -3
- package/lib/esm/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.js +63 -144
- package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +0 -10
- package/lib/esm/view/spendManagement/billPay/billList/billListState.js +0 -1
- package/lib/esm/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +3 -7
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +2 -7
- package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +6 -13
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
- package/lib/esm/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +4 -7
- package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
- package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
- package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
- package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
- package/lib/esm/view/transactionDetail/transactionDetailLocalDataHelper.js +14 -16
- package/lib/index.d.ts +10 -13
- package/lib/index.js +32 -42
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -0
- package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +0 -7
- package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +1 -15
- package/lib/view/aiCfoView/aiCfoViewReducer.js +2 -83
- package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +1 -4
- package/lib/view/aiCfoView/aiCfoViewSelector.js +2 -9
- package/lib/view/aiCfoView/aiCfoViewState.d.ts +1 -18
- package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
- package/lib/view/classList/fetchClassListEpic.d.ts +1 -1
- package/lib/view/classList/fetchClassListEpic.js +1 -8
- package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +0 -1
- package/lib/view/commonVendorView/vendorView/vendorViewSelector.js +5 -18
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +0 -1
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +2 -6
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
- package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +1 -1
- package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +3 -4
- package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +1 -0
- package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +1 -1
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +2 -18
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +0 -2
- package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +2 -10
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +6 -63
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +4 -12
- package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +9 -22
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +5 -11
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +0 -5
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +0 -20
- package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +8 -3
- package/lib/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.js +63 -144
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListSelector.js +0 -10
- package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListState.js +0 -1
- package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +3 -7
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +2 -7
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +6 -13
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
- package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +3 -6
- package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.d.ts +0 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
- package/lib/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
- package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +14 -16
- package/package.json +1 -1
- package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +0 -29
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +0 -8
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +0 -33
|
@@ -28,31 +28,30 @@ function enrichHorizontalSection(report, section) {
|
|
|
28
28
|
return total?.balance.amount ?? 0;
|
|
29
29
|
});
|
|
30
30
|
section.sectionHeaderBalancesSlice = buildHorizontalClassColumnBalancesSlice(report, classAmounts, section.sectionTotal.amount);
|
|
31
|
-
const
|
|
32
|
-
const childrenRowIndicesByParent = buildHorizontalAccountChildIndicesByParent(parentIndices);
|
|
31
|
+
const childrenRowIndicesByParent = buildHorizontalAccountChildIndicesByParent(section.accounts);
|
|
33
32
|
const childrenRecord = {};
|
|
34
33
|
childrenRowIndicesByParent.forEach((childIndices, parentIndex) => {
|
|
35
34
|
childrenRecord[parentIndex] = childIndices;
|
|
36
35
|
});
|
|
37
36
|
section.treeLayout = {
|
|
38
37
|
rootAccountRowIndices: section.accounts
|
|
39
|
-
.map((_, i) => (
|
|
38
|
+
.map((_, i) => findHorizontalAccountParentIndex(section.accounts, i) === -1 ? i : -1)
|
|
40
39
|
.filter((i) => i >= 0),
|
|
41
40
|
childrenRowIndicesByParent: childrenRecord,
|
|
42
41
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
for (let i = 0; i < section.accounts.length; i++) {
|
|
43
|
+
const row = section.accounts[i];
|
|
44
|
+
const classRowAmounts = report.classColumns.map((col) => {
|
|
45
|
+
const cb = row.classBalances.find((b) => b.classId === col.classId);
|
|
46
|
+
return cb?.balance.amount ?? 0;
|
|
47
|
+
});
|
|
49
48
|
row.accountReportData = {
|
|
50
49
|
accountId: row.accountId,
|
|
51
50
|
accountName: row.accountName,
|
|
52
51
|
accountType: row.accountType,
|
|
53
52
|
depth: row.depth,
|
|
54
53
|
balancesInTimeframe: buildHorizontalClassColumnBalancesSlice(report, classRowAmounts, row.rowTotal.amount),
|
|
55
|
-
horizontalTreeView:
|
|
54
|
+
horizontalTreeView: buildHorizontalTreeView(section.accounts, i),
|
|
56
55
|
};
|
|
57
56
|
}
|
|
58
57
|
}
|
|
@@ -84,9 +83,9 @@ function buildHorizontalClassColumnBalancesSlice(report, classAmounts, totalAmou
|
|
|
84
83
|
return emptySlice;
|
|
85
84
|
}
|
|
86
85
|
const { startDate, endDate } = report.selectedPeriod;
|
|
87
|
-
const balances = report.classColumns.map((col,
|
|
86
|
+
const balances = report.classColumns.map((col, i) => ({
|
|
88
87
|
balance: {
|
|
89
|
-
amount: classAmounts[
|
|
88
|
+
amount: classAmounts[i] ?? 0,
|
|
90
89
|
currencyCode,
|
|
91
90
|
currencySymbol,
|
|
92
91
|
},
|
|
@@ -124,157 +123,64 @@ function buildHorizontalClassColumnBalancesSlice(report, classAmounts, totalAmou
|
|
|
124
123
|
},
|
|
125
124
|
};
|
|
126
125
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
if (accountRow == null) {
|
|
138
|
-
continue;
|
|
139
|
-
}
|
|
140
|
-
const depth = accountRow.depth;
|
|
141
|
-
while (stack.length > 0) {
|
|
142
|
-
const topIndex = stack[stack.length - 1];
|
|
143
|
-
if (topIndex == null) {
|
|
144
|
-
break;
|
|
145
|
-
}
|
|
146
|
-
const topRow = rows[topIndex];
|
|
147
|
-
if (topRow == null) {
|
|
148
|
-
stack.pop();
|
|
149
|
-
continue;
|
|
150
|
-
}
|
|
151
|
-
if (topRow.depth < depth) {
|
|
152
|
-
break;
|
|
153
|
-
}
|
|
154
|
-
stack.pop();
|
|
155
|
-
}
|
|
156
|
-
if (depth <= 2) {
|
|
157
|
-
parentIndex[rowIndex] = -1;
|
|
158
|
-
}
|
|
159
|
-
else if (stack.length === 0) {
|
|
160
|
-
parentIndex[rowIndex] = -1;
|
|
161
|
-
}
|
|
162
|
-
else {
|
|
163
|
-
const peek = stack[stack.length - 1];
|
|
164
|
-
if (peek == null) {
|
|
165
|
-
parentIndex[rowIndex] = -1;
|
|
166
|
-
}
|
|
167
|
-
else {
|
|
168
|
-
const parentRow = rows[peek];
|
|
169
|
-
parentIndex[rowIndex] =
|
|
170
|
-
parentRow != null && parentRow.depth === depth - 1 ? peek : -1;
|
|
126
|
+
function findHorizontalAccountParentIndex(dfsOrderedAccountRows, childRowIndex) {
|
|
127
|
+
const childDepth = dfsOrderedAccountRows[childRowIndex].depth;
|
|
128
|
+
if (childDepth <= 2) {
|
|
129
|
+
return -1;
|
|
130
|
+
}
|
|
131
|
+
for (let earlierRowIndex = childRowIndex - 1; earlierRowIndex >= 0; earlierRowIndex--) {
|
|
132
|
+
const earlierDepth = dfsOrderedAccountRows[earlierRowIndex].depth;
|
|
133
|
+
if (earlierDepth < childDepth) {
|
|
134
|
+
if (earlierDepth === childDepth - 1) {
|
|
135
|
+
return earlierRowIndex;
|
|
171
136
|
}
|
|
137
|
+
return -1;
|
|
172
138
|
}
|
|
173
|
-
stack.push(rowIndex);
|
|
174
139
|
}
|
|
175
|
-
return
|
|
140
|
+
return -1;
|
|
176
141
|
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
const
|
|
180
|
-
const
|
|
181
|
-
for (let
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
}
|
|
187
|
-
const key = `${parentRowIndex}:${accountRow.depth}`;
|
|
188
|
-
let siblingGroup = keyToIndices.get(key);
|
|
189
|
-
if (siblingGroup == null) {
|
|
190
|
-
siblingGroup = [];
|
|
191
|
-
keyToIndices.set(key, siblingGroup);
|
|
142
|
+
function getHorizontalAccountSiblingIndices(dfsOrderedAccountRows, rowIndex) {
|
|
143
|
+
const parentRowIndex = findHorizontalAccountParentIndex(dfsOrderedAccountRows, rowIndex);
|
|
144
|
+
const rowDepth = dfsOrderedAccountRows[rowIndex].depth;
|
|
145
|
+
const siblings = [];
|
|
146
|
+
for (let i = 0; i < dfsOrderedAccountRows.length; i++) {
|
|
147
|
+
if (dfsOrderedAccountRows[i].depth === rowDepth &&
|
|
148
|
+
findHorizontalAccountParentIndex(dfsOrderedAccountRows, i) ===
|
|
149
|
+
parentRowIndex) {
|
|
150
|
+
siblings.push(i);
|
|
192
151
|
}
|
|
193
|
-
siblingGroup.push(rowIndex);
|
|
194
152
|
}
|
|
195
|
-
|
|
196
|
-
for (let rowIndex = 0; rowIndex < accountRowCount; rowIndex++) {
|
|
197
|
-
const parentRowIndex = parentIndices[rowIndex];
|
|
198
|
-
const accountRow = rows[rowIndex];
|
|
199
|
-
if (parentRowIndex == null || accountRow == null) {
|
|
200
|
-
siblingsPerRow[rowIndex] = [rowIndex];
|
|
201
|
-
continue;
|
|
202
|
-
}
|
|
203
|
-
const key = `${parentRowIndex}:${accountRow.depth}`;
|
|
204
|
-
const group = keyToIndices.get(key);
|
|
205
|
-
siblingsPerRow[rowIndex] = group != null ? group : [rowIndex];
|
|
206
|
-
}
|
|
207
|
-
return siblingsPerRow;
|
|
153
|
+
return siblings;
|
|
208
154
|
}
|
|
209
|
-
function
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
for (let rowIndex = 0; rowIndex < rowCount; rowIndex++) {
|
|
213
|
-
const parentRowIndex = parentIndices[rowIndex];
|
|
214
|
-
if (parentRowIndex != null &&
|
|
215
|
-
parentRowIndex >= 0 &&
|
|
216
|
-
parentRowIndex < rowCount) {
|
|
217
|
-
flags[parentRowIndex] = true;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
return flags;
|
|
155
|
+
function horizontalAccountHasChildRows(dfsOrderedAccountRows, parentRowIndex) {
|
|
156
|
+
return dfsOrderedAccountRows.some((_, rowIndex) => findHorizontalAccountParentIndex(dfsOrderedAccountRows, rowIndex) ===
|
|
157
|
+
parentRowIndex);
|
|
221
158
|
}
|
|
222
|
-
function
|
|
223
|
-
const
|
|
159
|
+
function buildHorizontalSubAccountAncestorMetadata(dfsOrderedAccountRows, currentRowIndex) {
|
|
160
|
+
const ancestorRowIndicesRootToLeaf = [];
|
|
224
161
|
let walkRowIndex = currentRowIndex;
|
|
225
162
|
while (walkRowIndex >= 0) {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
if (parentRowIndex == null) {
|
|
229
|
-
break;
|
|
230
|
-
}
|
|
231
|
-
walkRowIndex = parentRowIndex;
|
|
163
|
+
ancestorRowIndicesRootToLeaf.unshift(walkRowIndex);
|
|
164
|
+
walkRowIndex = findHorizontalAccountParentIndex(dfsOrderedAccountRows, walkRowIndex);
|
|
232
165
|
}
|
|
233
|
-
return
|
|
234
|
-
const
|
|
235
|
-
const siblingIndices = siblingsPerRow[rowIndex];
|
|
236
|
-
const hasChild = hasChildFlags[rowIndex];
|
|
237
|
-
if (accountRow == null || siblingIndices == null) {
|
|
238
|
-
return {
|
|
239
|
-
depth: 0,
|
|
240
|
-
hasSibling: false,
|
|
241
|
-
hasChildren: hasChild === true,
|
|
242
|
-
isLastNode: true,
|
|
243
|
-
name: '',
|
|
244
|
-
};
|
|
245
|
-
}
|
|
166
|
+
return ancestorRowIndicesRootToLeaf.map((rowIndex) => {
|
|
167
|
+
const siblingIndices = getHorizontalAccountSiblingIndices(dfsOrderedAccountRows, rowIndex);
|
|
246
168
|
return {
|
|
247
|
-
depth:
|
|
169
|
+
depth: dfsOrderedAccountRows[rowIndex].depth - 2,
|
|
248
170
|
hasSibling: siblingIndices.length > 1,
|
|
249
|
-
hasChildren:
|
|
171
|
+
hasChildren: horizontalAccountHasChildRows(dfsOrderedAccountRows, rowIndex),
|
|
250
172
|
isLastNode: rowIndex === siblingIndices[siblingIndices.length - 1],
|
|
251
|
-
name:
|
|
173
|
+
name: dfsOrderedAccountRows[rowIndex].accountName,
|
|
252
174
|
};
|
|
253
175
|
});
|
|
254
176
|
}
|
|
255
|
-
function
|
|
256
|
-
const siblingIndices = siblingsPerRow[currentRowIndex];
|
|
257
|
-
const accountRow = dfsOrderedAccountRows[currentRowIndex];
|
|
258
|
-
const hasChildrenFlag = hasChildFlags[currentRowIndex];
|
|
259
|
-
const treeDepth = accountRow != null ? Math.max(0, accountRow.depth - 2) : 0;
|
|
260
|
-
const hasChildren = hasChildrenFlag === true;
|
|
261
|
-
const siblings = siblingIndices ?? [currentRowIndex];
|
|
262
|
-
return {
|
|
263
|
-
subAccountAncestorMetadata: buildHorizontalSubAccountAncestorMetadataFromPrecomputed(dfsOrderedAccountRows, currentRowIndex, parentIndices, siblingsPerRow, hasChildFlags),
|
|
264
|
-
treeDepth,
|
|
265
|
-
hasChildren,
|
|
266
|
-
hasSiblings: siblings.length > 1,
|
|
267
|
-
isLeaf: !hasChildren,
|
|
268
|
-
isLastNode: currentRowIndex === siblings[siblings.length - 1],
|
|
269
|
-
};
|
|
270
|
-
}
|
|
271
|
-
function buildHorizontalAccountChildIndicesByParent(parentIndices) {
|
|
177
|
+
function buildHorizontalAccountChildIndicesByParent(dfsOrderedAccountRows) {
|
|
272
178
|
const childIndicesByParentRowIndex = new Map();
|
|
273
|
-
for (let rowIndex = 0; rowIndex <
|
|
274
|
-
const parentRowIndex =
|
|
275
|
-
if (parentRowIndex
|
|
179
|
+
for (let rowIndex = 0; rowIndex < dfsOrderedAccountRows.length; rowIndex++) {
|
|
180
|
+
const parentRowIndex = findHorizontalAccountParentIndex(dfsOrderedAccountRows, rowIndex);
|
|
181
|
+
if (parentRowIndex >= 0) {
|
|
276
182
|
let childRowIndices = childIndicesByParentRowIndex.get(parentRowIndex);
|
|
277
|
-
if (childRowIndices
|
|
183
|
+
if (childRowIndices === undefined) {
|
|
278
184
|
childRowIndices = [];
|
|
279
185
|
childIndicesByParentRowIndex.set(parentRowIndex, childRowIndices);
|
|
280
186
|
}
|
|
@@ -283,3 +189,16 @@ function buildHorizontalAccountChildIndicesByParent(parentIndices) {
|
|
|
283
189
|
}
|
|
284
190
|
return childIndicesByParentRowIndex;
|
|
285
191
|
}
|
|
192
|
+
function buildHorizontalTreeView(dfsOrderedAccountRows, currentRowIndex) {
|
|
193
|
+
const treeDepth = Math.max(0, dfsOrderedAccountRows[currentRowIndex].depth - 2);
|
|
194
|
+
const siblingIndices = getHorizontalAccountSiblingIndices(dfsOrderedAccountRows, currentRowIndex);
|
|
195
|
+
const hasChildren = horizontalAccountHasChildRows(dfsOrderedAccountRows, currentRowIndex);
|
|
196
|
+
return {
|
|
197
|
+
subAccountAncestorMetadata: buildHorizontalSubAccountAncestorMetadata(dfsOrderedAccountRows, currentRowIndex),
|
|
198
|
+
treeDepth,
|
|
199
|
+
hasChildren,
|
|
200
|
+
hasSiblings: siblingIndices.length > 1,
|
|
201
|
+
isLeaf: !hasChildren,
|
|
202
|
+
isLastNode: currentRowIndex === siblingIndices[siblingIndices.length - 1],
|
|
203
|
+
};
|
|
204
|
+
}
|
|
@@ -7,7 +7,7 @@ export declare const getScheduleListKey: (selectedCategory: ID, selectedTimefram
|
|
|
7
7
|
export type ScheduleListKey = ReturnType<typeof getScheduleListKey>;
|
|
8
8
|
export declare const toScheduleSubTabType: (v: string) => "completed" | "new" | "ongoing" | "all";
|
|
9
9
|
export type ScheduleSubTabType = ReturnType<typeof toScheduleSubTabType>;
|
|
10
|
-
declare const toScheduleSortKeyType: (v: string) => "months" | "amount" | "vendor" | "status" | "user" | "createTime" | "class" | "memo" | "balanceAsOfToday" | "transactionDate" | "transactionType" | "assetId" | "
|
|
10
|
+
declare const toScheduleSortKeyType: (v: string) => "months" | "amount" | "vendor" | "status" | "user" | "createTime" | "class" | "memo" | "balanceAsOfToday" | "transactionDate" | "transactionType" | "assetId" | "accruedExpenseCategory" | "scheduleCategory" | "expenseCategory" | "accumulatedDepreciationCategory" | "startMonth" | "endMonth";
|
|
11
11
|
export declare type ScheduleListSortKey = ReturnType<typeof toScheduleSortKeyType>;
|
|
12
12
|
export interface DownloadJEScheduleTabOptions {
|
|
13
13
|
categoryId: ID;
|
|
@@ -424,14 +424,6 @@ const getBillListOnSort = (sortKey, sortOrder, currentTab, transactions) => {
|
|
|
424
424
|
transactionsWithNoSortKeyValue.push(transaction);
|
|
425
425
|
}
|
|
426
426
|
break;
|
|
427
|
-
case 'invoiceNumber':
|
|
428
|
-
if (transaction.documentId != null) {
|
|
429
|
-
transactionsWithSortKeyValue.push(transaction);
|
|
430
|
-
}
|
|
431
|
-
else {
|
|
432
|
-
transactionsWithNoSortKeyValue.push(transaction);
|
|
433
|
-
}
|
|
434
|
-
break;
|
|
435
427
|
case 'dueDate':
|
|
436
428
|
if (currentTab === 'draft') {
|
|
437
429
|
if (Boolean(transaction.dueDate) === true) {
|
|
@@ -534,8 +526,6 @@ const getBillListOnSort = (sortKey, sortOrder, currentTab, transactions) => {
|
|
|
534
526
|
return transaction.totalAmountInUSD?.amount ?? 0;
|
|
535
527
|
case 'paymentMethod':
|
|
536
528
|
return transaction.billPayInfo.billPaymentMethodType.name;
|
|
537
|
-
case 'invoiceNumber':
|
|
538
|
-
return transaction.documentId;
|
|
539
529
|
}
|
|
540
530
|
}, getColumnWiseSortOrder(sortOrder));
|
|
541
531
|
return [
|
|
@@ -37,7 +37,7 @@ declare const toBillTabType: (v: string) => "paid" | "pending_approval" | "sched
|
|
|
37
37
|
export type BillTab = ReturnType<typeof toBillTabType>;
|
|
38
38
|
declare const toBillsSubTabType: (v: string) => "rejected" | "failed" | "ach" | "wire" | "cancelled" | "deleted" | "overdue" | "all" | "awaiting_approval" | "awaiting_my_approval" | "offline";
|
|
39
39
|
export type BillsSubTabType = ReturnType<typeof toBillsSubTabType>;
|
|
40
|
-
declare const toBillPaySortKeyType: (v: string) => "amount" | "status" | "name" | "dueDate" | "paymentMethod" | "
|
|
40
|
+
declare const toBillPaySortKeyType: (v: string) => "amount" | "status" | "name" | "dueDate" | "paymentMethod" | "invoiceDate";
|
|
41
41
|
export declare type BillPayViewSortKey = ReturnType<typeof toBillPaySortKeyType>;
|
|
42
42
|
export interface BillPayFilters {
|
|
43
43
|
categories: BillPayFilterCategory[];
|
|
@@ -47,7 +47,6 @@ const ALL_BILL_PAY_SORT_KEYS = [
|
|
|
47
47
|
'invoiceDate',
|
|
48
48
|
'name',
|
|
49
49
|
'paymentMethod',
|
|
50
|
-
'invoiceNumber',
|
|
51
50
|
];
|
|
52
51
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
53
52
|
const toBillPaySortKeyType = (v) => (0, stringToUnion_1.stringToUnion)(v, ALL_BILL_PAY_SORT_KEYS);
|
|
@@ -8,7 +8,6 @@ const get_1 = __importDefault(require("lodash/get"));
|
|
|
8
8
|
const reduceFetchState_1 = require("../../../../commonStateTypes/reduceFetchState");
|
|
9
9
|
const contactSelector_1 = require("../../../../entity/billPay/contact/contactSelector");
|
|
10
10
|
const paymentAccountSelector_1 = require("../../../../entity/paymentAccount/paymentAccountSelector");
|
|
11
|
-
const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
|
|
12
11
|
const vendorSelector_1 = require("../../../../entity/vendor/vendorSelector");
|
|
13
12
|
const accountListSelector_1 = require("../../../accountList/accountListSelector");
|
|
14
13
|
const setupViewSelector_1 = require("../../commonSetup/setupViewSelector");
|
|
@@ -81,14 +80,11 @@ const getReviewPageBillDetail = (state, billId) => {
|
|
|
81
80
|
}
|
|
82
81
|
}
|
|
83
82
|
if (sourceBillDetail != null) {
|
|
84
|
-
|
|
83
|
+
sourceBillDetailFetchState = (0, reduceFetchState_1.reduceFetchState)([
|
|
85
84
|
sourceBillDetail.fetchStatus,
|
|
86
85
|
accountListState.byReportId['billPayAccountList'],
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
fetchStateList.push(classListState);
|
|
90
|
-
}
|
|
91
|
-
sourceBillDetailFetchState = (0, reduceFetchState_1.reduceFetchState)(fetchStateList).fetchState;
|
|
86
|
+
classListState,
|
|
87
|
+
]).fetchState;
|
|
92
88
|
}
|
|
93
89
|
}
|
|
94
90
|
else {
|
|
@@ -9,7 +9,6 @@ const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
|
|
|
9
9
|
const reduceFetchState_1 = require("../../../../commonStateTypes/reduceFetchState");
|
|
10
10
|
const approvalRuleSelector_1 = require("../../../../entity/approvalRule/approvalRuleSelector");
|
|
11
11
|
const classSelector_1 = require("../../../../entity/class/classSelector");
|
|
12
|
-
const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
|
|
13
12
|
const userSelector_1 = require("../../../../entity/user/userSelector");
|
|
14
13
|
const userRoleSelector_1 = require("../../../../entity/userRole/userRoleSelector");
|
|
15
14
|
exports.getBillPaySetupApproverView = (0, toolkit_1.createSelector)((state) => state.billPaySetupApproverViewState, (state) => state.approvalRuleState, (state) => state.userState, (billPaySetupApproverViewState, approvalRuleState, userState) => {
|
|
@@ -51,7 +50,7 @@ exports.getBillPaySetupApproverView = (0, toolkit_1.createSelector)((state) => s
|
|
|
51
50
|
newApprovalRuleId,
|
|
52
51
|
};
|
|
53
52
|
});
|
|
54
|
-
exports.getBillPaySetupApproverUpdateDataView = (0, toolkit_1.createSelector)((state) => state.billPaySetupApproverViewState, (state) => state.approvalRuleState, (state) => state.userState, (state) => state.classState, (state) => state.classListState, (state) => state.userRoleState, (
|
|
53
|
+
exports.getBillPaySetupApproverUpdateDataView = (0, toolkit_1.createSelector)((state) => state.billPaySetupApproverViewState, (state) => state.approvalRuleState, (state) => state.userState, (state) => state.classState, (state) => state.classListState, (state) => state.userRoleState, (billPaySetupApproverViewState, approvalRuleState, userState, classState, classListState, userRoleState) => {
|
|
55
54
|
const { affectedEntityIds, approvalRuleIds, approverListState, billPaySetupApproverViewUpdateData, fetchState, error, listeningToPusherEvent, } = billPaySetupApproverViewState;
|
|
56
55
|
const { approverIds, attributes } = approverListState;
|
|
57
56
|
const allApprovalRules = (0, approvalRuleSelector_1.getApprovalRulesByIds)(approvalRuleState, approvalRuleIds);
|
|
@@ -99,9 +98,10 @@ exports.getBillPaySetupApproverUpdateDataView = (0, toolkit_1.createSelector)((s
|
|
|
99
98
|
allAttributes,
|
|
100
99
|
filteredAttributes,
|
|
101
100
|
billPaySetupApproverViewUpdateData,
|
|
102
|
-
approverListFetchStatus:
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
approverListFetchStatus: (0, reduceFetchState_1.reduceAllFetchState)([
|
|
102
|
+
approverListState.fetchStatus,
|
|
103
|
+
classListState,
|
|
104
|
+
]),
|
|
105
105
|
fetchState,
|
|
106
106
|
allAccountingClasses,
|
|
107
107
|
error,
|
|
@@ -3,28 +3,23 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.fetchBillPayApproversDetailsEpic = void 0;
|
|
4
4
|
const rxjs_1 = require("rxjs");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const tenantSelector_1 = require("../../../../../entity/tenant/tenantSelector");
|
|
7
6
|
const classListReducer_1 = require("../../../../classList/classListReducer");
|
|
8
7
|
const billPaySetupApproverViewReducer_1 = require("../billPaySetupApproverViewReducer");
|
|
9
8
|
const fetchBillPayApproversDetailsEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(billPaySetupApproverViewReducer_1.fetchBillPayApproversDetails.match), (0, operators_1.mergeMap)((action) => {
|
|
10
9
|
const { cacheOverride, includeUserRoles } = action.payload;
|
|
11
10
|
const { billPaySetupApproverViewState, classListState } = state$.value;
|
|
12
11
|
const { approverListState } = billPaySetupApproverViewState;
|
|
13
|
-
const isAccountingClassesEnabled = (0, tenantSelector_1.getIsAccountingClassesEnabled)(state$.value);
|
|
14
12
|
const actions = [];
|
|
15
13
|
if (cacheOverride === true) {
|
|
16
14
|
actions.push((0, billPaySetupApproverViewReducer_1.fetchBillPayApproversList)(cacheOverride, includeUserRoles));
|
|
17
|
-
|
|
18
|
-
actions.push((0, classListReducer_1.fetchClassList)());
|
|
19
|
-
}
|
|
15
|
+
actions.push((0, classListReducer_1.fetchClassList)());
|
|
20
16
|
}
|
|
21
17
|
else {
|
|
22
18
|
if (billPaySetupApproverViewState.hasValidState() === false &&
|
|
23
19
|
approverListState.fetchStatus.fetchState !== 'In-Progress') {
|
|
24
20
|
actions.push((0, billPaySetupApproverViewReducer_1.fetchBillPayApproversList)(true, includeUserRoles));
|
|
25
21
|
}
|
|
26
|
-
if (
|
|
27
|
-
classListState.hasValidState() === false &&
|
|
22
|
+
if (classListState.hasValidState() === false &&
|
|
28
23
|
classListState.fetchState !== 'In-Progress') {
|
|
29
24
|
actions.push((0, classListReducer_1.fetchClassList)());
|
|
30
25
|
}
|
|
@@ -16,7 +16,6 @@ const companySelector_1 = require("../../../../entity/company/companySelector");
|
|
|
16
16
|
const depositAccountSelector_1 = require("../../../../entity/depositAccount/depositAccountSelector");
|
|
17
17
|
const paymentAccountSelector_1 = require("../../../../entity/paymentAccount/paymentAccountSelector");
|
|
18
18
|
const paymentInstrumentSelector_1 = require("../../../../entity/paymentInstrument/paymentInstrumentSelector");
|
|
19
|
-
const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
|
|
20
19
|
const userSelector_1 = require("../../../../entity/user/userSelector");
|
|
21
20
|
const vendorSelector_1 = require("../../../../entity/vendor/vendorSelector");
|
|
22
21
|
const zeniDayJS_1 = require("../../../../zeniDayJS");
|
|
@@ -182,15 +181,12 @@ const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, isZeniAc
|
|
|
182
181
|
isCancelled = sourceBillDetail.billDetailLocalData.isCancelled;
|
|
183
182
|
billStage = billPayInfo?.stage.code ?? 'draft';
|
|
184
183
|
if (billViewState != null) {
|
|
185
|
-
|
|
184
|
+
fetchState = (0, reduceFetchState_1.reduceFetchState)([
|
|
186
185
|
sourceBillDetail.fetchStatus,
|
|
187
186
|
accountListState.byReportId.billPayAccountList,
|
|
187
|
+
classListState,
|
|
188
188
|
billPaySetupApproverViewState,
|
|
189
|
-
];
|
|
190
|
-
if ((0, tenantSelector_1.getIsAccountingClassesEnabled)(state)) {
|
|
191
|
-
fetchStateList.push(classListState);
|
|
192
|
-
}
|
|
193
|
-
fetchState = (0, reduceFetchState_1.reduceFetchState)(fetchStateList).fetchState;
|
|
189
|
+
]).fetchState;
|
|
194
190
|
deleteStatus = billViewState.deleteStatus;
|
|
195
191
|
billActivities = (0, billDetailViewSelector_1.getBillActivities)(state, billId, billPayInfo?.stage.code);
|
|
196
192
|
}
|
|
@@ -204,14 +200,11 @@ const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, isZeniAc
|
|
|
204
200
|
}
|
|
205
201
|
}
|
|
206
202
|
else {
|
|
207
|
-
|
|
203
|
+
fetchState = (0, reduceFetchState_1.reduceFetchState)([
|
|
208
204
|
accountListState.byReportId.billPayAccountList,
|
|
205
|
+
classListState,
|
|
209
206
|
billPaySetupApproverViewState,
|
|
210
|
-
];
|
|
211
|
-
if ((0, tenantSelector_1.getIsAccountingClassesEnabled)(state)) {
|
|
212
|
-
newBillFetchStateList.push(classListState);
|
|
213
|
-
}
|
|
214
|
-
fetchState = (0, reduceFetchState_1.reduceFetchState)(newBillFetchStateList).fetchState;
|
|
207
|
+
]).fetchState;
|
|
215
208
|
}
|
|
216
209
|
if (sourceBillDetail != null && fetchState == 'Completed') {
|
|
217
210
|
const updatedRecord = sourceBillDetail.billDetailLocalData;
|
|
@@ -61,7 +61,7 @@ export declare const initialCreditAcc: CreditAccount;
|
|
|
61
61
|
export declare const initialDebitCardSummaries: DebitCardSummaries;
|
|
62
62
|
export declare const initialResendRevokeCardInvite: ResendRevokeCardInvite;
|
|
63
63
|
export declare const initialCreditAccountRepayment: CreditAccountRepayment;
|
|
64
|
-
export declare const toChargeCardSortKeyType: (v: string) => "status" | "
|
|
64
|
+
export declare const toChargeCardSortKeyType: (v: string) => "status" | "owner" | "cardName" | "limit" | "department" | "cardType" | "utilisation";
|
|
65
65
|
export declare type ChargeCardViewSortKey = ReturnType<typeof toChargeCardSortKeyType>;
|
|
66
66
|
export declare const ALL_CASHBACK_SORT_KEYS: readonly ["month", "cashback"];
|
|
67
67
|
export declare const toCashbackSortKeyType: (v: string) => "month" | "cashback";
|
|
@@ -233,8 +233,6 @@ const getCardsBySortKey = (card, sortKey) => {
|
|
|
233
233
|
return card.cardName.toLowerCase();
|
|
234
234
|
case 'cardType':
|
|
235
235
|
return card.type.code;
|
|
236
|
-
case 'accountType':
|
|
237
|
-
return card.type.code.includes('credit') ? 'credit' : 'debit';
|
|
238
236
|
case 'status':
|
|
239
237
|
return card.status.code;
|
|
240
238
|
case 'utilisation':
|
|
@@ -69,16 +69,13 @@ const getEditRemiDetail = (state, reimbursementId) => {
|
|
|
69
69
|
paymentTo: reimbursementInfo?.toAccount.billAccountId,
|
|
70
70
|
};
|
|
71
71
|
if (sourceRemiDetail != null) {
|
|
72
|
-
|
|
72
|
+
fetchState = (0, reduceFetchState_1.reduceFetchState)([
|
|
73
73
|
sourceRemiDetail.fetchStatus,
|
|
74
74
|
accountListState.byReportId.reimbursementAccountList,
|
|
75
|
+
classListState,
|
|
75
76
|
merchantListState,
|
|
76
77
|
reimbursementConfigState,
|
|
77
|
-
];
|
|
78
|
-
if ((0, tenantSelector_1.getIsAccountingClassesEnabled)(state)) {
|
|
79
|
-
fetchStateList.push(classListState);
|
|
80
|
-
}
|
|
81
|
-
fetchState = (0, reduceFetchState_1.reduceFetchState)(fetchStateList).fetchState;
|
|
78
|
+
]).fetchState;
|
|
82
79
|
remiStage = reimbursementInfo?.stage.code ?? 'draft';
|
|
83
80
|
createdBy = (0, userSelector_1.getUserByUserId)(userState, reimbursement?.createdBy ?? '');
|
|
84
81
|
createTime = reimbursement?.createTime;
|
|
@@ -42,7 +42,6 @@ export interface ReimbursementView extends Reimbursement {
|
|
|
42
42
|
approvers: Approvers;
|
|
43
43
|
submittedBy: User | undefined;
|
|
44
44
|
bulkSelectInfo?: RemiBulkSelectInfo;
|
|
45
|
-
createdByUser?: User;
|
|
46
45
|
}
|
|
47
46
|
export declare const getRemiList: (state: RootState, currentTimePeriod: TimePeriod, isBulkActionFeatureEnabled: boolean) => RemiListReport;
|
|
48
47
|
export declare const getApproversOrRejectors: (reimbursement: Reimbursement, entityApprovalStatusState: EntityApprovalStatusState, userState: UserState) => Approvers;
|
|
@@ -51,7 +51,6 @@ const getRemiList = (state, currentTimePeriod, isBulkActionFeatureEnabled) => {
|
|
|
51
51
|
return {
|
|
52
52
|
...reimbursement,
|
|
53
53
|
submittedBy: (0, userSelector_1.getUserByUserId)(userState, reimbursement.reimburseeUserId),
|
|
54
|
-
createdByUser: (0, userSelector_1.getUserByUserId)(userState, reimbursement.createdBy),
|
|
55
54
|
approvers: approvers,
|
|
56
55
|
};
|
|
57
56
|
});
|
|
@@ -424,14 +423,6 @@ const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements) => {
|
|
|
424
423
|
reimbursementsWithNoSortKeyValue.push(reimbursement);
|
|
425
424
|
}
|
|
426
425
|
break;
|
|
427
|
-
case 'createdBy':
|
|
428
|
-
if (reimbursement.createdByUser != null) {
|
|
429
|
-
reimbursementsWithSortKeyValue.push(reimbursement);
|
|
430
|
-
}
|
|
431
|
-
else {
|
|
432
|
-
reimbursementsWithNoSortKeyValue.push(reimbursement);
|
|
433
|
-
}
|
|
434
|
-
break;
|
|
435
426
|
}
|
|
436
427
|
});
|
|
437
428
|
const getColumnWiseSortOrder = (sortOrder) => {
|
|
@@ -439,7 +430,6 @@ const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements) => {
|
|
|
439
430
|
case 'reportName':
|
|
440
431
|
case 'type':
|
|
441
432
|
case 'status':
|
|
442
|
-
case 'createdBy':
|
|
443
433
|
return sortOrder === 'ascending' ? 'asc' : 'desc';
|
|
444
434
|
default:
|
|
445
435
|
return sortOrder === 'ascending' ? 'desc' : 'asc';
|
|
@@ -459,8 +449,6 @@ const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements) => {
|
|
|
459
449
|
return getStatusPerTab(reimbursement);
|
|
460
450
|
case 'amount':
|
|
461
451
|
return reimbursement.amount.amount ?? 0;
|
|
462
|
-
case 'createdBy':
|
|
463
|
-
return `${reimbursement.createdByUser?.firstName ?? ''} ${reimbursement.createdByUser?.lastName ?? ''}`.toLowerCase();
|
|
464
452
|
}
|
|
465
453
|
}, getColumnWiseSortOrder(sortOrder));
|
|
466
454
|
return [
|
|
@@ -38,7 +38,7 @@ export declare const toRemiSubTabTypeStrict: (v: string) => "rejected" | "failed
|
|
|
38
38
|
export type RemiSubTabType = ReturnType<typeof toRemiSubTabType>;
|
|
39
39
|
export declare const toRemiSubTabUnderScoreType: (v: string) => "rejected" | "failed" | "ach" | "wire" | "cancelled" | "deleted" | "overdue" | "all" | "awaiting_approval" | "awaiting_my_approval" | "my_drafts" | "awaiting_all_approval";
|
|
40
40
|
export type RemiSubTabUnderScoreType = ReturnType<typeof toRemiSubTabUnderScoreType>;
|
|
41
|
-
declare const toReimbursementSortKeyType: (v: string) => "amount" | "status" | "type" | "
|
|
41
|
+
declare const toReimbursementSortKeyType: (v: string) => "amount" | "status" | "type" | "submittedOn" | "reportName";
|
|
42
42
|
export type ReimbursementViewSortKey = ReturnType<typeof toReimbursementSortKeyType>;
|
|
43
43
|
export interface ReimbursementFilters {
|
|
44
44
|
categories: ReimbursementFilterCategory[];
|
|
@@ -78,8 +78,8 @@ const toTransactionUpdatesFromTransactionDetailLocalData = (transactionDetailLoc
|
|
|
78
78
|
lineItem.account?.qboId !== accountLine.account.qboId &&
|
|
79
79
|
Boolean(lineItem.account?.qboId);
|
|
80
80
|
hasClassChanged =
|
|
81
|
-
(lineItem.class?.qboId
|
|
82
|
-
lineItem.class?.qboId !== accountLine.class
|
|
81
|
+
Boolean(lineItem.class?.qboId) &&
|
|
82
|
+
lineItem.class?.qboId !== accountLine.class.qboId;
|
|
83
83
|
const recommendedAccountBase = (0, exports.toRecommendedAccountBase)(lineItem.amount.amount, lineItem.account);
|
|
84
84
|
const recommendedClassBase = (0, exports.toRecommendedClassBase)(lineItem.amount.amount, lineItem.class);
|
|
85
85
|
const latestRecommendedCategory = lineItem.recommendedAccount;
|