@zeniai/client-epic-state 4.15.26 → 4.15.28
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/timePeriod.d.ts +1 -1
- package/lib/commonStateTypes/timePeriod.js +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
- package/lib/configureStore.js +2 -1
- package/lib/entity/account/accountState.d.ts +1 -1
- package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
- package/lib/entity/accountRecon/accountReconPayload.d.ts +70 -0
- package/lib/entity/accountRecon/accountReconPayload.js +125 -0
- package/lib/entity/accountRecon/accountReconReducer.d.ts +16 -0
- package/lib/entity/accountRecon/accountReconReducer.js +71 -0
- package/lib/entity/accountRecon/accountReconSelector.d.ts +28 -0
- package/lib/entity/accountRecon/accountReconSelector.js +44 -0
- package/lib/entity/accountRecon/accountReconState.d.ts +70 -0
- package/lib/entity/accountRecon/accountReconState.js +28 -0
- package/lib/entity/class/classReducer.d.ts +4 -4
- package/lib/entity/class/classState.d.ts +1 -1
- package/lib/entity/customer/customerPayload.d.ts +1 -1
- package/lib/entity/customer/customerPayload.js +16 -6
- package/lib/entity/forecast/forecastState.d.ts +1 -1
- package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +4 -0
- package/lib/entity/task/taskState.d.ts +1 -1
- package/lib/entity/tenant/clearAllEpic.d.ts +4 -2
- package/lib/entity/tenant/clearAllEpic.js +4 -0
- package/lib/entity/tenant/tenantReducer.d.ts +1 -1
- package/lib/entity/tenant/tenantReducer.js +7 -2
- package/lib/entity/transaction/payloadTypes/customerTransactionPayload.d.ts +1 -1
- package/lib/entity/transaction/payloadTypes/customerTransactionPayload.js +1 -2
- package/lib/entity/transaction/payloadTypes/reconciliationTransactionPayloads.d.ts +35 -0
- package/lib/entity/transaction/payloadTypes/reconciliationTransactionPayloads.js +53 -0
- package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +2 -0
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +7 -3
- package/lib/entity/transaction/payloadTypes/vendorTransactionPayload.d.ts +9 -1
- package/lib/entity/transaction/payloadTypes/vendorTransactionPayload.js +23 -2
- package/lib/entity/transaction/stateTypes/reconciliationTransaction.d.ts +32 -0
- package/lib/entity/transaction/stateTypes/reconciliationTransaction.js +10 -0
- package/lib/entity/transaction/stateTypes/transaction.d.ts +3 -1
- package/lib/entity/transaction/stateTypes/transactionType.d.ts +1 -1
- package/lib/entity/transaction/stateTypes/transactionType.js +1 -0
- package/lib/entity/transaction/stateTypes/vendorTransaction.d.ts +5 -0
- package/lib/entity/transaction/stateTypes/vendorTransaction.js +5 -1
- package/lib/entity/transaction/toSupportedTransaction.js +6 -1
- package/lib/entity/transaction/transactionReducer.d.ts +17 -0
- package/lib/entity/transaction/transactionReducer.js +47 -2
- package/lib/entity/transaction/transactionSelector.d.ts +2 -0
- package/lib/entity/transaction/transactionSelector.js +5 -0
- package/lib/entity/transaction/transactionState.d.ts +6 -4
- package/lib/entity/vendorExpense/vendorExpenseSelector.d.ts +2 -2
- package/lib/epic.d.ts +6 -1
- package/lib/epic.js +6 -1
- package/lib/index.d.ts +14 -6
- package/lib/index.js +52 -27
- package/lib/reducer.d.ts +7 -1
- package/lib/reducer.js +6 -0
- package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
- package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
- package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
- package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
- package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
- package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewReducer.d.ts +2 -2
- package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.d.ts +15 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +118 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/initialiseLocalDataForSelectedAccountIdEpic.d.ts +10 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/initialiseLocalDataForSelectedAccountIdEpic.js +49 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationDetailEpic.d.ts +14 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationDetailEpic.js +169 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationReviewEpic.d.ts +9 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationReviewEpic.js +154 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/updateReconcileTabLocalDataEpic.d.ts +6 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/updateReconcileTabLocalDataEpic.js +110 -0
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.d.ts +2 -1
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +24 -10
- package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.d.ts +2 -1
- package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +14 -0
- package/lib/view/expenseAutomationView/epics/transactionCategorization/updateTransactionCategorizationEpic.js +20 -4
- package/lib/view/expenseAutomationView/expenseAutomationViewReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +17 -2
- package/lib/view/expenseAutomationView/expenseAutomationViewState.d.ts +2 -2
- package/lib/view/expenseAutomationView/expenseAutomationViewState.js +1 -1
- package/lib/view/expenseAutomationView/helpers/reconciliationHelpers.d.ts +7 -0
- package/lib/view/expenseAutomationView/helpers/reconciliationHelpers.js +18 -0
- package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +81 -30
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +54 -10
- package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +28 -0
- package/lib/view/expenseAutomationView/payload/reconciliationPayload.js +51 -0
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +66 -0
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +384 -0
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +2 -1
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +5 -4
- package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.d.ts +2 -0
- package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.js +1 -1
- package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +51 -0
- package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +7 -0
- package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.d.ts +5 -0
- package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +250 -0
- package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +103 -0
- package/lib/view/expenseAutomationView/types/reconciliationViewState.js +38 -0
- package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +8 -0
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billsBulkActionView/epics/validateBillsBulkActionEpic.ts.js +4 -3
- package/lib/view/spendManagement/plaidAccount/epic/plaidConnection/establishPlaidConnectionEpic.js +11 -3
- package/lib/view/spendManagement/plaidAccount/plaidAccountViewReducer.d.ts +2 -1
- package/lib/view/spendManagement/plaidAccount/plaidAccountViewReducer.js +3 -1
- package/lib/view/spendManagement/plaidAccount/plaidAccountViewState.d.ts +1 -1
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/lib/view/transactionDetail/epics/saveTransactionHelper.js +13 -4
- package/lib/view/transactionDetail/epics/updateTransactionDetailEpic.js +16 -3
- package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +22 -5
- package/lib/view/transactionDetail/transactionDetailState.d.ts +1 -0
- package/lib/view/transactionDetail/transactionDetailTypes.d.ts +6 -0
- package/lib/view/vendorReviewView/vendorGlobalReviewView/vendorGlobalReviewViewState.d.ts +1 -1
- package/lib/zeniAPI.d.ts +1 -0
- package/package.json +2 -1
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.updateSaveReconciliationReviewFetchStatus = exports.saveReconciliationReview = exports.updateReviewTabLocalData = exports.initializeReconciliationReviewTabLocalData = exports.updateReviewTabSortState = exports.updateSelectedDrawerAccountId = exports.clearExpenseAutomationReconciliationView = exports.initialiseLocalDataForSelectedAccountId = exports.updateBalancesLocalData = exports.updateSelectedTab = exports.saveReconciliationDetailSuccess = exports.updateReconcileTabListScrollState = exports.updateReconcileTabListSortState = exports.updateReconcileTabLocalData = exports.setConnectionInProgressForAccount = exports.updateSelectedAccountId = exports.saveReconciliationDetailFailure = exports.saveReconciliationDetail = exports.fetchReconciliationSuccess = exports.fetchReconciliationFailure = exports.fetchReconciliation = exports.initialState = exports.initialActionFetchState = exports.initialReconciliationTabsState = void 0;
|
|
5
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
+
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
7
|
+
const accountReconState_1 = require("../../../entity/accountRecon/accountReconState");
|
|
8
|
+
// Initial state
|
|
9
|
+
exports.initialReconciliationTabsState = {
|
|
10
|
+
balances: {
|
|
11
|
+
clearedBalance: { amount: 0, currencyCode: 'USD', currencySymbol: '$' },
|
|
12
|
+
variance: { amount: 0, currencyCode: 'USD', currencySymbol: '$' },
|
|
13
|
+
variancePercentage: 0,
|
|
14
|
+
deposits: {
|
|
15
|
+
count: 0,
|
|
16
|
+
totalAmount: { amount: 0, currencyCode: 'USD', currencySymbol: '$' },
|
|
17
|
+
},
|
|
18
|
+
payments: {
|
|
19
|
+
count: 0,
|
|
20
|
+
totalAmount: { amount: 0, currencyCode: 'USD', currencySymbol: '$' },
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
reconcile: {
|
|
24
|
+
localData: {
|
|
25
|
+
selectedTransactionIds: [],
|
|
26
|
+
},
|
|
27
|
+
uiState: {
|
|
28
|
+
scrollYOffset: undefined,
|
|
29
|
+
sortKey: 'date',
|
|
30
|
+
sortOrder: 'ascending',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
review: {
|
|
34
|
+
localData: {},
|
|
35
|
+
uiState: {
|
|
36
|
+
scrollPosition: undefined,
|
|
37
|
+
sortKey: 'date',
|
|
38
|
+
sortOrder: 'descending',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
exports.initialActionFetchState = {
|
|
43
|
+
excludeFetchById: {},
|
|
44
|
+
reconcileFetch: {
|
|
45
|
+
fetchState: 'Not-Started',
|
|
46
|
+
error: undefined,
|
|
47
|
+
},
|
|
48
|
+
saveForLaterFetch: {
|
|
49
|
+
fetchState: 'Not-Started',
|
|
50
|
+
error: undefined,
|
|
51
|
+
},
|
|
52
|
+
saveReconciliationReviewFetch: {},
|
|
53
|
+
};
|
|
54
|
+
exports.initialState = {
|
|
55
|
+
accountReconciliationRecordsBySelectedPeriod: {},
|
|
56
|
+
accountConnectionStatusByAccountID: {},
|
|
57
|
+
fetchState: 'Not-Started',
|
|
58
|
+
error: undefined,
|
|
59
|
+
selectedTab: 'review',
|
|
60
|
+
reconTabsState: exports.initialReconciliationTabsState,
|
|
61
|
+
refreshStatus: { fetchState: 'Not-Started', error: undefined },
|
|
62
|
+
actionFetchState: exports.initialActionFetchState,
|
|
63
|
+
selectedAccountId: undefined,
|
|
64
|
+
};
|
|
65
|
+
// Create slice with reducers
|
|
66
|
+
const expenseAutomationReconciliationView = (0, toolkit_1.createSlice)({
|
|
67
|
+
name: 'expenseAutomationReconciliationView',
|
|
68
|
+
initialState: exports.initialState,
|
|
69
|
+
reducers: {
|
|
70
|
+
fetchReconciliation: {
|
|
71
|
+
reducer(draft, action) {
|
|
72
|
+
if (action.payload.accountId == null) {
|
|
73
|
+
if (action.payload.refreshViewInBackground === true) {
|
|
74
|
+
draft.refreshStatus = { fetchState: 'In-Progress', error: undefined };
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
draft.fetchState = 'In-Progress';
|
|
78
|
+
draft.error = undefined;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
// select the account for which we are fetching
|
|
83
|
+
draft.selectedAccountId = action.payload.accountId;
|
|
84
|
+
const accountReconciliationRecords = draft.accountReconciliationRecordsBySelectedPeriod[(0, timePeriod_1.toMonthYearPeriodId)(action.payload.selectedPeriod)];
|
|
85
|
+
const { transactionFetchState } = accountReconciliationRecords.reconciliationByAccountID[action.payload.accountId];
|
|
86
|
+
if (transactionFetchState.fetchState !== 'Completed' ||
|
|
87
|
+
action.payload.cacheOverride === true) {
|
|
88
|
+
const data = accountReconciliationRecords.reconciliationByAccountID[action.payload.accountId];
|
|
89
|
+
if (action.payload.refreshViewInBackground === true) {
|
|
90
|
+
accountReconciliationRecords.reconciliationByAccountID[action.payload.accountId] = Object.assign(Object.assign({}, data), { refreshStatus: {
|
|
91
|
+
fetchState: 'In-Progress',
|
|
92
|
+
error: undefined,
|
|
93
|
+
}, accountId: action.payload.accountId, reconciliationId: undefined });
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
accountReconciliationRecords.reconciliationByAccountID[action.payload.accountId] = Object.assign(Object.assign({}, data), { transactionFetchState: {
|
|
97
|
+
fetchState: 'In-Progress',
|
|
98
|
+
error: undefined,
|
|
99
|
+
}, accountId: action.payload.accountId, reconciliationId: undefined });
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
prepare(selectedPeriod, accountId, cacheOverride = false, refreshViewInBackground = false) {
|
|
105
|
+
return {
|
|
106
|
+
payload: {
|
|
107
|
+
selectedPeriod,
|
|
108
|
+
accountId,
|
|
109
|
+
cacheOverride,
|
|
110
|
+
refreshViewInBackground,
|
|
111
|
+
},
|
|
112
|
+
};
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
fetchReconciliationSuccess: {
|
|
116
|
+
reducer(draft, action) {
|
|
117
|
+
if (action.payload.accountId == null) {
|
|
118
|
+
updateAllReconciliation(draft, action.payload.reconciliation.accounts, action.payload.selectedPeriod, action.payload.reconciliation.reconciliation, action.payload.refreshViewInBackground);
|
|
119
|
+
}
|
|
120
|
+
else if (action.payload.reconciliation.reconciliation.length > 0 &&
|
|
121
|
+
action.payload.reconciliation.accounts.length > 0) {
|
|
122
|
+
updateReconciliationByAccountID(draft, action.payload.reconciliation.accounts[0], action.payload.selectedPeriod, action.payload.accountId, action.payload.reconciliation.reconciliation[0], action.payload.refreshViewInBackground);
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
prepare(selectedPeriod, reconciliation, refreshViewInBackground = false, accountId, reconciliationId) {
|
|
126
|
+
return {
|
|
127
|
+
payload: {
|
|
128
|
+
selectedPeriod,
|
|
129
|
+
reconciliation,
|
|
130
|
+
refreshViewInBackground,
|
|
131
|
+
accountId,
|
|
132
|
+
reconciliationId,
|
|
133
|
+
},
|
|
134
|
+
};
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
fetchReconciliationFailure: (draft, action) => {
|
|
138
|
+
if (action.payload.accountId == null) {
|
|
139
|
+
if (action.payload.refreshViewInBackground === true) {
|
|
140
|
+
draft.refreshStatus = {
|
|
141
|
+
fetchState: 'Error',
|
|
142
|
+
error: action.payload.error,
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
draft.error = action.payload.error;
|
|
147
|
+
draft.fetchState = 'Error';
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
const accountReconciliationRecords = draft.accountReconciliationRecordsBySelectedPeriod[(0, timePeriod_1.toMonthYearPeriodId)(action.payload.selectedPeriod)];
|
|
152
|
+
if (action.payload.refreshViewInBackground === true) {
|
|
153
|
+
accountReconciliationRecords.reconciliationByAccountID[action.payload.accountId].refreshStatus.error = action.payload.error;
|
|
154
|
+
accountReconciliationRecords.reconciliationByAccountID[action.payload.accountId].refreshStatus.fetchState = 'Error';
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
accountReconciliationRecords.reconciliationByAccountID[action.payload.accountId].transactionFetchState.error = action.payload.error;
|
|
158
|
+
accountReconciliationRecords.reconciliationByAccountID[action.payload.accountId].transactionFetchState.fetchState = 'Error';
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
saveReconciliationDetail: (draft, action) => {
|
|
163
|
+
const { reconcileAction } = action.payload;
|
|
164
|
+
if (reconcileAction === 'reconcile') {
|
|
165
|
+
draft.actionFetchState.reconcileFetch = {
|
|
166
|
+
fetchState: 'In-Progress',
|
|
167
|
+
error: undefined,
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
else if (reconcileAction === 'save_reconcile_for_later') {
|
|
171
|
+
draft.actionFetchState.saveForLaterFetch = {
|
|
172
|
+
fetchState: 'In-Progress',
|
|
173
|
+
error: undefined,
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
else if (reconcileAction === 'exclude') {
|
|
177
|
+
const excludeTransactionId = action.payload.excludeTransactionId;
|
|
178
|
+
const excludeFetchStates = draft.actionFetchState.excludeFetchById;
|
|
179
|
+
draft.actionFetchState.excludeFetchById = Object.assign(Object.assign({}, excludeFetchStates), { [excludeTransactionId]: {
|
|
180
|
+
fetchState: 'In-Progress',
|
|
181
|
+
error: undefined,
|
|
182
|
+
} });
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
saveReconciliationDetailFailure: (draft, action) => {
|
|
186
|
+
const { reconcileAction } = action.payload.fetchStateByAction;
|
|
187
|
+
const { error } = action.payload;
|
|
188
|
+
if (reconcileAction === 'reconcile') {
|
|
189
|
+
draft.actionFetchState.reconcileFetch = {
|
|
190
|
+
fetchState: 'Error',
|
|
191
|
+
error: error,
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
else if (reconcileAction === 'save_reconcile_for_later') {
|
|
195
|
+
draft.actionFetchState.saveForLaterFetch = {
|
|
196
|
+
fetchState: 'Error',
|
|
197
|
+
error: error,
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
else if (reconcileAction === 'exclude') {
|
|
201
|
+
const excludeTransactionId = action.payload.fetchStateByAction.excludeTransactionId;
|
|
202
|
+
const excludeFetchStates = draft.actionFetchState.excludeFetchById;
|
|
203
|
+
draft.actionFetchState.excludeFetchById = Object.assign(Object.assign({}, excludeFetchStates), { [excludeTransactionId]: {
|
|
204
|
+
fetchState: 'Error',
|
|
205
|
+
error: error,
|
|
206
|
+
} });
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
saveReconciliationDetailSuccess: (draft, action) => {
|
|
210
|
+
const { reconcileAction } = action.payload;
|
|
211
|
+
if (reconcileAction === 'reconcile') {
|
|
212
|
+
draft.actionFetchState.reconcileFetch = {
|
|
213
|
+
fetchState: 'Completed',
|
|
214
|
+
error: undefined,
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
else if (reconcileAction === 'save_reconcile_for_later') {
|
|
218
|
+
draft.actionFetchState.saveForLaterFetch = {
|
|
219
|
+
fetchState: 'Completed',
|
|
220
|
+
error: undefined,
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
else if (reconcileAction === 'exclude') {
|
|
224
|
+
const excludeTransactionId = action.payload.excludeTransactionId;
|
|
225
|
+
const excludeFetchStates = draft.actionFetchState.excludeFetchById;
|
|
226
|
+
draft.actionFetchState.excludeFetchById = Object.assign(Object.assign({}, excludeFetchStates), { [excludeTransactionId]: {
|
|
227
|
+
fetchState: 'Completed',
|
|
228
|
+
error: undefined,
|
|
229
|
+
} });
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
updateReconcileTabLocalData: (draft, action) => {
|
|
233
|
+
const { selectedTransactionIds } = action.payload;
|
|
234
|
+
draft.reconTabsState.reconcile.localData.selectedTransactionIds =
|
|
235
|
+
selectedTransactionIds;
|
|
236
|
+
},
|
|
237
|
+
updateBalancesLocalData: (draft, action) => {
|
|
238
|
+
const { clearedBalance, variance, payments, deposits, variancePercentage } = action.payload;
|
|
239
|
+
draft.reconTabsState.balances = {
|
|
240
|
+
clearedBalance,
|
|
241
|
+
variance,
|
|
242
|
+
variancePercentage,
|
|
243
|
+
payments: payments,
|
|
244
|
+
deposits: deposits,
|
|
245
|
+
};
|
|
246
|
+
},
|
|
247
|
+
updateSelectedAccountId: (draft, action) => {
|
|
248
|
+
draft.selectedAccountId = action.payload.selectedAccountId;
|
|
249
|
+
},
|
|
250
|
+
updateSelectedDrawerAccountId: (draft, action) => {
|
|
251
|
+
draft.selectedDrawerAccountId = action.payload.selectedDrawerAccountId;
|
|
252
|
+
},
|
|
253
|
+
initialiseLocalDataForSelectedAccountId: () => { },
|
|
254
|
+
updateSelectedTab: (draft, action) => {
|
|
255
|
+
const { selectedTab } = action.payload;
|
|
256
|
+
draft.selectedTab = selectedTab;
|
|
257
|
+
},
|
|
258
|
+
updateReconcileTabListSortState: (draft, action) => {
|
|
259
|
+
draft.reconTabsState.reconcile.uiState = Object.assign(Object.assign({}, draft.reconTabsState.reconcile.uiState), { sortOrder: action.payload.sortOrder, sortKey: action.payload.sortKey });
|
|
260
|
+
},
|
|
261
|
+
updateReviewTabSortState: (draft, action) => {
|
|
262
|
+
draft.reconTabsState.review.uiState = Object.assign(Object.assign({}, draft.reconTabsState.review.uiState), { sortOrder: action.payload.sortOrder, sortKey: action.payload.sortKey });
|
|
263
|
+
},
|
|
264
|
+
updateReconcileTabListScrollState: (draft, action) => {
|
|
265
|
+
draft.reconTabsState.reconcile.uiState = Object.assign(Object.assign({}, draft.reconTabsState.reconcile.uiState), { scrollYOffset: action.payload.scrollYOffset });
|
|
266
|
+
},
|
|
267
|
+
updateReviewTabLocalData(draft, action) {
|
|
268
|
+
const { data, transactionId } = action.payload;
|
|
269
|
+
draft.reconTabsState.review.localData = Object.assign(Object.assign({}, draft.reconTabsState.review.localData), { [transactionId]: data });
|
|
270
|
+
},
|
|
271
|
+
saveReconciliationReview: {
|
|
272
|
+
reducer(draft, action) {
|
|
273
|
+
const { transactionId } = action.payload;
|
|
274
|
+
draft.actionFetchState.saveReconciliationReviewFetch[transactionId] = {
|
|
275
|
+
fetchState: 'In-Progress',
|
|
276
|
+
error: undefined,
|
|
277
|
+
};
|
|
278
|
+
},
|
|
279
|
+
prepare(transactionId) {
|
|
280
|
+
return {
|
|
281
|
+
payload: {
|
|
282
|
+
transactionId,
|
|
283
|
+
},
|
|
284
|
+
};
|
|
285
|
+
},
|
|
286
|
+
},
|
|
287
|
+
updateSaveReconciliationReviewFetchStatus: (draft, action) => {
|
|
288
|
+
const { transactionId, error, fetchState } = action.payload;
|
|
289
|
+
draft.actionFetchState.saveReconciliationReviewFetch[transactionId] = {
|
|
290
|
+
fetchState: fetchState,
|
|
291
|
+
error,
|
|
292
|
+
};
|
|
293
|
+
},
|
|
294
|
+
initializeReconciliationReviewTabLocalData: {
|
|
295
|
+
reducer(draft, action) {
|
|
296
|
+
draft.reconTabsState.review.localData = action.payload.localData;
|
|
297
|
+
},
|
|
298
|
+
prepare(localData) {
|
|
299
|
+
return {
|
|
300
|
+
payload: { localData },
|
|
301
|
+
};
|
|
302
|
+
},
|
|
303
|
+
},
|
|
304
|
+
setConnectionInProgressForAccount: (draft, action) => {
|
|
305
|
+
if (draft.accountConnectionStatusByAccountID[action.payload.accountId] ==
|
|
306
|
+
null) {
|
|
307
|
+
console.error(`Account ${action.payload.accountId} not found to set connection in progress`);
|
|
308
|
+
}
|
|
309
|
+
else {
|
|
310
|
+
draft.accountConnectionStatusByAccountID[action.payload.accountId] = Object.assign(Object.assign({}, draft.accountConnectionStatusByAccountID[action.payload.accountId]), { connectionInProgress: action.payload.connectionInProgress });
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
clearExpenseAutomationReconciliationView: (draft) => {
|
|
314
|
+
Object.assign(draft, exports.initialState);
|
|
315
|
+
},
|
|
316
|
+
},
|
|
317
|
+
});
|
|
318
|
+
// Export actions
|
|
319
|
+
_a = expenseAutomationReconciliationView.actions, exports.fetchReconciliation = _a.fetchReconciliation, exports.fetchReconciliationFailure = _a.fetchReconciliationFailure, exports.fetchReconciliationSuccess = _a.fetchReconciliationSuccess, exports.saveReconciliationDetail = _a.saveReconciliationDetail, exports.saveReconciliationDetailFailure = _a.saveReconciliationDetailFailure, exports.updateSelectedAccountId = _a.updateSelectedAccountId, exports.setConnectionInProgressForAccount = _a.setConnectionInProgressForAccount, exports.updateReconcileTabLocalData = _a.updateReconcileTabLocalData, exports.updateReconcileTabListSortState = _a.updateReconcileTabListSortState, exports.updateReconcileTabListScrollState = _a.updateReconcileTabListScrollState, exports.saveReconciliationDetailSuccess = _a.saveReconciliationDetailSuccess, exports.updateSelectedTab = _a.updateSelectedTab, exports.updateBalancesLocalData = _a.updateBalancesLocalData, exports.initialiseLocalDataForSelectedAccountId = _a.initialiseLocalDataForSelectedAccountId, exports.clearExpenseAutomationReconciliationView = _a.clearExpenseAutomationReconciliationView, exports.updateSelectedDrawerAccountId = _a.updateSelectedDrawerAccountId, exports.updateReviewTabSortState = _a.updateReviewTabSortState, exports.initializeReconciliationReviewTabLocalData = _a.initializeReconciliationReviewTabLocalData, exports.updateReviewTabLocalData = _a.updateReviewTabLocalData, exports.saveReconciliationReview = _a.saveReconciliationReview, exports.updateSaveReconciliationReviewFetchStatus = _a.updateSaveReconciliationReviewFetchStatus;
|
|
320
|
+
// Export reducer
|
|
321
|
+
exports.default = expenseAutomationReconciliationView.reducer;
|
|
322
|
+
function updateAllReconciliation(draft, accounts, selectedPeriod, reconciliationData, refreshViewInBackground) {
|
|
323
|
+
draft.accountReconciliationRecordsBySelectedPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = {
|
|
324
|
+
accountIDs: [],
|
|
325
|
+
reconciliationByAccountID: {},
|
|
326
|
+
};
|
|
327
|
+
const accountReconciliationRecords = draft.accountReconciliationRecordsBySelectedPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)];
|
|
328
|
+
reconciliationData.forEach((reconciliation) => {
|
|
329
|
+
var _a, _b, _c;
|
|
330
|
+
const account = accounts.find((account) => account.account_id === reconciliation.account_id);
|
|
331
|
+
const oldConnectionStatus = draft.accountConnectionStatusByAccountID[reconciliation.account_id];
|
|
332
|
+
if (oldConnectionStatus == null) {
|
|
333
|
+
draft.accountConnectionStatusByAccountID[reconciliation.account_id] = {
|
|
334
|
+
status: (0, accountReconState_1.toBankStatusCodeType)(reconciliation.bank_status.code),
|
|
335
|
+
connectionInProgress: false,
|
|
336
|
+
paymentAccountId: (_a = account === null || account === void 0 ? void 0 : account.payment_account_id) !== null && _a !== void 0 ? _a : undefined,
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
else {
|
|
340
|
+
draft.accountConnectionStatusByAccountID[reconciliation.account_id] = {
|
|
341
|
+
status: (0, accountReconState_1.toBankStatusCodeType)(reconciliation.bank_status.code),
|
|
342
|
+
connectionInProgress: reconciliation.bank_status.code === 'not_connected' &&
|
|
343
|
+
oldConnectionStatus.connectionInProgress === true,
|
|
344
|
+
paymentAccountId: (_b = account === null || account === void 0 ? void 0 : account.payment_account_id) !== null && _b !== void 0 ? _b : undefined,
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
accountReconciliationRecords.reconciliationByAccountID[reconciliation.account_id] = {
|
|
348
|
+
accountId: reconciliation.account_id,
|
|
349
|
+
reconciliationId: (_c = reconciliation.reconciliation_id) !== null && _c !== void 0 ? _c : undefined,
|
|
350
|
+
transactionFetchState: { fetchState: 'Not-Started', error: undefined },
|
|
351
|
+
refreshStatus: { fetchState: 'Not-Started', error: undefined },
|
|
352
|
+
};
|
|
353
|
+
accountReconciliationRecords.accountIDs.push(reconciliation.account_id);
|
|
354
|
+
});
|
|
355
|
+
if (refreshViewInBackground === true) {
|
|
356
|
+
draft.refreshStatus = {
|
|
357
|
+
fetchState: 'Completed',
|
|
358
|
+
error: undefined,
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
else {
|
|
362
|
+
draft.fetchState = 'Completed';
|
|
363
|
+
draft.error = undefined;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
function updateReconciliationByAccountID(draft, accounts, selectedPeriod, accountId, reconciliationData, refreshViewInBackground) {
|
|
367
|
+
var _a, _b, _c;
|
|
368
|
+
const oldRecord = draft.accountReconciliationRecordsBySelectedPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)].reconciliationByAccountID[accountId];
|
|
369
|
+
const oldConnectionStatus = draft.accountConnectionStatusByAccountID[accountId];
|
|
370
|
+
draft.accountConnectionStatusByAccountID[accountId] = {
|
|
371
|
+
status: (0, accountReconState_1.toBankStatusCodeType)(reconciliationData.bank_status.code),
|
|
372
|
+
connectionInProgress: oldConnectionStatus != null
|
|
373
|
+
? reconciliationData.bank_status.code === 'not_connected' &&
|
|
374
|
+
oldConnectionStatus.connectionInProgress === true
|
|
375
|
+
: false,
|
|
376
|
+
paymentAccountId: (_a = accounts.payment_account_id) !== null && _a !== void 0 ? _a : undefined,
|
|
377
|
+
};
|
|
378
|
+
if (refreshViewInBackground === true) {
|
|
379
|
+
draft.accountReconciliationRecordsBySelectedPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)].reconciliationByAccountID[accountId] = Object.assign(Object.assign({}, oldRecord), { reconciliationId: (_b = reconciliationData.reconciliation_id) !== null && _b !== void 0 ? _b : undefined, refreshStatus: { fetchState: 'Completed', error: undefined } });
|
|
380
|
+
}
|
|
381
|
+
else {
|
|
382
|
+
draft.accountReconciliationRecordsBySelectedPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)].reconciliationByAccountID[accountId] = Object.assign(Object.assign({}, oldRecord), { reconciliationId: (_c = reconciliationData.reconciliation_id) !== null && _c !== void 0 ? _c : undefined, transactionFetchState: { fetchState: 'Completed', error: undefined } });
|
|
383
|
+
}
|
|
384
|
+
}
|
|
@@ -76,12 +76,13 @@ export declare const fetchTransactionCategorization: import("@reduxjs/toolkit").
|
|
|
76
76
|
selectedTransaction: SupportedTransaction;
|
|
77
77
|
uncategorizedAccounts: UncategorizedAccounts;
|
|
78
78
|
updatedVendor?: VendorBase;
|
|
79
|
-
}, "expenseAutomationTransactionsView/updateSelectedVendorForTransaction">, setAllItemsToCategoryClassInLocalDataForCategorization: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedTab: "review" | "autoCategorized", transactionId: string, lineId: string, transactions: SupportedTransaction[], uncategorizedAccounts: UncategorizedAccounts, vendorId?: string | undefined, selectedAccount?: AccountBase | undefined, selectedClassBase?: ClassBase | undefined, lineEntity?: Entity | undefined, recommendations?: Recommendation[] | undefined], {
|
|
79
|
+
}, "expenseAutomationTransactionsView/updateSelectedVendorForTransaction">, setAllItemsToCategoryClassInLocalDataForCategorization: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedTab: "review" | "autoCategorized", transactionId: string, lineId: string, transactions: SupportedTransaction[], uncategorizedAccounts: UncategorizedAccounts, vendorId?: string | undefined, customerId?: string | undefined, selectedAccount?: AccountBase | undefined, selectedClassBase?: ClassBase | undefined, lineEntity?: Entity | undefined, recommendations?: Recommendation[] | undefined], {
|
|
80
80
|
selectedTab: "review" | "autoCategorized";
|
|
81
81
|
transactionId: string;
|
|
82
82
|
lineId: string;
|
|
83
83
|
transactions: SupportedTransaction[];
|
|
84
84
|
vendorId: string | undefined;
|
|
85
|
+
customerId: string | undefined;
|
|
85
86
|
lineEntity: Entity | undefined;
|
|
86
87
|
selectedAccount: AccountBase | undefined;
|
|
87
88
|
selectedClassBase: ClassBase | undefined;
|
|
@@ -261,7 +261,7 @@ const expenseAutomationTransactionsView = (0, toolkit_1.createSlice)({
|
|
|
261
261
|
},
|
|
262
262
|
setAllItemsToCategoryClassInLocalDataForCategorization: {
|
|
263
263
|
reducer(draft, action) {
|
|
264
|
-
const { vendorId, selectedAccount, selectedClassBase, transactions, transactionId, lineId, selectedTab, uncategorizedAccounts, } = action.payload;
|
|
264
|
+
const { vendorId, customerId, selectedAccount, selectedClassBase, transactions, transactionId, lineId, selectedTab, uncategorizedAccounts, } = action.payload;
|
|
265
265
|
const transactionLocalData = (0, get_1.default)(draft.transactionCategorizationView[selectedTab]
|
|
266
266
|
.transactionReviewLocalDataById, transactionId, undefined);
|
|
267
267
|
const existingAccount = transactionLocalData === null || transactionLocalData === void 0 ? void 0 : transactionLocalData.transactionReviewLocalData.lineItemById[lineId].account;
|
|
@@ -285,7 +285,7 @@ const expenseAutomationTransactionsView = (0, toolkit_1.createSlice)({
|
|
|
285
285
|
];
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
|
-
if (vendorId != null) {
|
|
288
|
+
if (vendorId != null || customerId != null) {
|
|
289
289
|
transactions.forEach((transaction) => {
|
|
290
290
|
const transactionLocalData = (0, get_1.default)(draft.transactionCategorizationView[selectedTab]
|
|
291
291
|
.transactionReviewLocalDataById, transaction.id, undefined);
|
|
@@ -294,13 +294,13 @@ const expenseAutomationTransactionsView = (0, toolkit_1.createSlice)({
|
|
|
294
294
|
transactionId: transaction.id,
|
|
295
295
|
transactionReviewLocalData: (0, transactionCategorizationLocalDataHelper_1.toSetAllLineItemsToCategoryClass)(draft.transactionCategorizationView[selectedTab], transaction, transactionId, lineId, transactionLocalData.transactionReviewLocalData, (existingAccount === null || existingAccount === void 0 ? void 0 : existingAccount.accountId) !== (selectedAccount === null || selectedAccount === void 0 ? void 0 : selectedAccount.accountId)
|
|
296
296
|
? 'category'
|
|
297
|
-
: 'class', uncategorizedAccounts, vendorId, selectedAccount, selectedClassBase),
|
|
297
|
+
: 'class', uncategorizedAccounts, vendorId, customerId, selectedAccount, selectedClassBase),
|
|
298
298
|
};
|
|
299
299
|
}
|
|
300
300
|
});
|
|
301
301
|
}
|
|
302
302
|
},
|
|
303
|
-
prepare(selectedTab, transactionId, lineId, transactions, uncategorizedAccounts, vendorId, selectedAccount, selectedClassBase, lineEntity, recommendations) {
|
|
303
|
+
prepare(selectedTab, transactionId, lineId, transactions, uncategorizedAccounts, vendorId, customerId, selectedAccount, selectedClassBase, lineEntity, recommendations) {
|
|
304
304
|
return {
|
|
305
305
|
payload: {
|
|
306
306
|
selectedTab,
|
|
@@ -308,6 +308,7 @@ const expenseAutomationTransactionsView = (0, toolkit_1.createSlice)({
|
|
|
308
308
|
lineId,
|
|
309
309
|
transactions,
|
|
310
310
|
vendorId,
|
|
311
|
+
customerId,
|
|
311
312
|
lineEntity,
|
|
312
313
|
selectedAccount,
|
|
313
314
|
selectedClassBase,
|
package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { TransactionsTab } from '../types/transactionsViewState';
|
|
|
9
9
|
import { ExpenseAutomationFluxAnalysisViewSelector } from './fluxAnalysisViewSelectorTypes';
|
|
10
10
|
import { ExpenseAutomationJESchedulesViewSelector } from './jeSchedulesSelectorTypes';
|
|
11
11
|
import { ExpenseAutomationMissingReceiptsViewSelector } from './missingReceiptsSelectorTypes';
|
|
12
|
+
import { ExpenseAutomationReconciliationViewSelector } from './reconciliationViewSelectorTypes';
|
|
12
13
|
import { ExpenseAutomationTransactionViewSelector } from './transactionsViewSelectorTypes';
|
|
13
14
|
export interface ExpenseAutomationStepDetails {
|
|
14
15
|
step: ExpenseAutomationViewType;
|
|
@@ -29,6 +30,7 @@ export interface ExpenseAutomationViewSelector extends SelectorView {
|
|
|
29
30
|
jeSchedules: ExpenseAutomationJESchedulesViewSelector;
|
|
30
31
|
missingReceipts: ExpenseAutomationMissingReceiptsViewSelector;
|
|
31
32
|
fluxAnalysis: ExpenseAutomationFluxAnalysisViewSelector;
|
|
33
|
+
reconciliation: ExpenseAutomationReconciliationViewSelector;
|
|
32
34
|
monthEndInsights?: CompanyMonthEndReportSelectorView;
|
|
33
35
|
saveStatus: FetchStateAndError;
|
|
34
36
|
updateStatus: FetchStateAndError;
|
|
@@ -19,7 +19,7 @@ const getAllSteps = (monthEndCloseChecksState, monthYearId, tenantId, auditSumma
|
|
|
19
19
|
isPrevDisabled: false,
|
|
20
20
|
isNextDisabled: false,
|
|
21
21
|
};
|
|
22
|
-
case '
|
|
22
|
+
case 'reconciliation':
|
|
23
23
|
case 'je_schedules':
|
|
24
24
|
case 'missing_receipts':
|
|
25
25
|
case 'flux_analysis':
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { NestedAccountHierarchyForReport } from '../../../commonStateTypes/accountView/nestedAccountID';
|
|
2
|
+
import { Amount } from '../../../commonStateTypes/amount';
|
|
3
|
+
import { NestedClassHierarchyForReport } from '../../../commonStateTypes/classesView/nestedClassID';
|
|
4
|
+
import { CompletionStatusType, FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
5
|
+
import { MonthYearPeriod } from '../../../commonStateTypes/timePeriod';
|
|
6
|
+
import { AccountBase } from '../../../entity/account/accountState';
|
|
7
|
+
import { AccountReconciliationEntity } from '../../../entity/accountRecon/accountReconSelector';
|
|
8
|
+
import { BankStatusCodeType } from '../../../entity/accountRecon/accountReconState';
|
|
9
|
+
import { ClassBase } from '../../../entity/class/classState';
|
|
10
|
+
import { PlaidConnectionDetails } from '../../spendManagement/plaidAccount/plaidAccountViewState';
|
|
11
|
+
import { ActionFetchStates, ReconciliationTabsState, ReconciliationViewTabType } from '../types/reconciliationViewState';
|
|
12
|
+
export declare const ALL_ACCOUNT_RECON_SECTION_IDS: readonly ["assets", "liabilities"];
|
|
13
|
+
declare const toAccountReconSectionID: (v: string) => "assets" | "liabilities";
|
|
14
|
+
export type AccountReconSectionID = ReturnType<typeof toAccountReconSectionID>;
|
|
15
|
+
export interface ExpenseAutomationReconciliationViewSelector {
|
|
16
|
+
fetchStatus: FetchStateAndError;
|
|
17
|
+
refreshStatus: FetchStateAndError;
|
|
18
|
+
completionStatus: CompletionStatusType;
|
|
19
|
+
selectedTab: ReconciliationViewTabType;
|
|
20
|
+
monthYearPeriod: MonthYearPeriod;
|
|
21
|
+
plaidConnectionDetails: PlaidConnectionDetails;
|
|
22
|
+
accountReconciliationBySectionID: Record<AccountReconSectionID, AccountReconciliationBySection>;
|
|
23
|
+
accountReconciliationsByAccountID: Record<ID, AccountReconciliationByAccount>;
|
|
24
|
+
reconciliationTabsState: ReconciliationTabsState;
|
|
25
|
+
selectedAccountId?: ID;
|
|
26
|
+
selectedReconAccount?: AccountReconciliationByAccount;
|
|
27
|
+
selectedDrawerAccountId?: ID;
|
|
28
|
+
actionFetchStates: ActionFetchStates;
|
|
29
|
+
accountListNestedAccountHierarchy: NestedAccountHierarchyForReport[];
|
|
30
|
+
classListNestedAccountHierarchy: NestedClassHierarchyForReport[];
|
|
31
|
+
allAccountList: AccountBase[];
|
|
32
|
+
allClassList: ClassBase[];
|
|
33
|
+
}
|
|
34
|
+
export interface AccountReconciliationBySection {
|
|
35
|
+
sectionId: AccountReconSectionID;
|
|
36
|
+
accountIDs: ID[];
|
|
37
|
+
totalBankBalance?: Amount;
|
|
38
|
+
totalClearedBalance?: Amount;
|
|
39
|
+
totalReconciledBalance?: Amount;
|
|
40
|
+
totalVariance?: Amount;
|
|
41
|
+
totalVariancePercentage?: number;
|
|
42
|
+
}
|
|
43
|
+
export interface AccountReconciliationByAccount {
|
|
44
|
+
accountConnectionStatus: BankStatusCodeType;
|
|
45
|
+
connectionInProgress: boolean;
|
|
46
|
+
accountReconEntity: AccountReconciliationEntity;
|
|
47
|
+
transactionFetchState: FetchStateAndError;
|
|
48
|
+
refreshStatus: FetchStateAndError;
|
|
49
|
+
paymentAccountId?: ID;
|
|
50
|
+
}
|
|
51
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ALL_ACCOUNT_RECON_SECTION_IDS = void 0;
|
|
4
|
+
const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
|
|
5
|
+
exports.ALL_ACCOUNT_RECON_SECTION_IDS = ['assets', 'liabilities'];
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
7
|
+
const toAccountReconSectionID = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_ACCOUNT_RECON_SECTION_IDS);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ReportIDPlusForecastID } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
2
|
+
import { RootState } from '../../../reducer';
|
|
3
|
+
import { ExpenseAutomationReconciliationViewSelector } from '../selectorTypes/reconciliationViewSelectorTypes';
|
|
4
|
+
export declare const getExpenseAutomationReconciliationView: (state: RootState) => ExpenseAutomationReconciliationViewSelector;
|
|
5
|
+
export declare const isAccountReconReport: (reportId: ReportIDPlusForecastID) => boolean;
|