@zeniai/client-epic-state 4.19.96-betaJK20 → 4.19.96-betaJK21
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.
Potentially problematic release.
This version of @zeniai/client-epic-state might be problematic. Click here for more details.
- package/lib/commonStateTypes/animations.d.ts +1 -1
- package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +0 -1
- package/lib/entity/account/accountPayload.d.ts +0 -2
- package/lib/entity/account/accountReducer.d.ts +2 -5
- package/lib/entity/account/accountReducer.js +2 -7
- package/lib/entity/account/accountSelector.d.ts +0 -1
- package/lib/entity/account/accountSelector.js +1 -8
- package/lib/entity/account/accountState.d.ts +1 -1
- package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
- package/lib/entity/accountRecon/accountReconState.d.ts +1 -1
- package/lib/entity/accountRecon/accountReconState.js +1 -0
- package/lib/entity/aiCfo/aiCfoSelector.d.ts +2 -1
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +2 -2
- package/lib/entity/class/classReducer.d.ts +4 -4
- package/lib/entity/class/classState.d.ts +1 -1
- package/lib/entity/forecast/forecastState.d.ts +1 -1
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +0 -35
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +0 -44
- package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +1 -2
- package/lib/entity/jeSchedules/jeSchedulesSelector.js +1 -2
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +0 -13
- 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/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/transactionPayload.d.ts +0 -3
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +0 -12
- package/lib/entity/transaction/stateTypes/transaction.d.ts +0 -3
- package/lib/entity/transaction/stateTypes/transactionLine.d.ts +1 -1
- package/lib/epic.d.ts +1 -4
- package/lib/epic.js +1 -4
- package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +0 -1
- package/lib/esm/entity/account/accountReducer.js +1 -6
- package/lib/esm/entity/account/accountSelector.js +0 -6
- package/lib/esm/entity/accountRecon/accountReconState.js +1 -0
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +0 -44
- package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +1 -2
- package/lib/esm/entity/tenant/tenantReducer.js +0 -1
- package/lib/esm/entity/tenant/tenantSelector.js +0 -7
- package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +0 -12
- package/lib/esm/epic.js +1 -4
- package/lib/esm/index.js +9 -10
- 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 -15
- package/lib/esm/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +2 -6
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +13 -6
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/initialiseLocalDataForSelectedAccountIdEpic.js +1 -0
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/saveReconciliationReviewEpic.js +29 -2
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/uploadAccountStatementDocumentAIHelper.js +2 -1
- 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/reducers/reconciliationViewReducer.js +3 -148
- package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +3 -50
- package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +1 -1
- package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +1 -68
- package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +1 -17
- 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 +13 -16
- package/lib/index.js +32 -44
- 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 +2 -2
- 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/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 -15
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +0 -1
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +2 -6
- package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +13 -6
- package/lib/view/expenseAutomationView/epics/accountRecon/initialiseLocalDataForSelectedAccountIdEpic.js +1 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationReviewEpic.js +29 -2
- package/lib/view/expenseAutomationView/epics/accountRecon/uploadAccountStatementDocumentAIHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/epics/accountRecon/uploadAccountStatementDocumentAIHelper.js +2 -1
- package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
- package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +0 -33
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +2 -18
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +3 -14
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +4 -149
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +0 -2
- package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +1 -11
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +3 -50
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +1 -1
- package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +0 -67
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +0 -5
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +0 -19
- package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +4 -13
- 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/reportsResync/reportsResyncReducer.d.ts +2 -2
- 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/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- 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/esm/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +0 -44
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +0 -44
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +0 -8
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +0 -33
- package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.d.ts +0 -8
- package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +0 -48
- package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.d.ts +0 -9
- package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +0 -48
|
@@ -5,7 +5,7 @@ import { JEScheduledTransactionPayload } from '../../../entity/jeSchedules/jeSch
|
|
|
5
5
|
import { JEScheduleTransactionKey } from '../../../entity/jeSchedules/jeSchedulesTypes';
|
|
6
6
|
import { ZeniAPIStatus } from '../../../responsePayload';
|
|
7
7
|
import { AccountTypeRecommendationPayload } from '../../accountMappingView/accountTypeRecommendation/accountTypeRecommendationPayload';
|
|
8
|
-
import { AccountSettingsLocalData, AccountSettingsState, JEScheduleLocalData, JESchedulesViewState
|
|
8
|
+
import { AccountSettingsLocalData, AccountSettingsState, JEScheduleLocalData, JESchedulesViewState } from '../types/jeSchedulesViewState';
|
|
9
9
|
export declare const accountSettingsInitialState: AccountSettingsState;
|
|
10
10
|
export declare const initialState: JESchedulesViewState;
|
|
11
11
|
export declare const clearExpenseAutomationJESchedulesView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/clearExpenseAutomationJESchedulesView">, clearJeAccountSettingsLocalData: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/clearJeAccountSettingsLocalData">, clearJeScheduleLocalData: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/clearJeScheduleLocalData">, fetchAccountSettingsListForAccountTypes: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/fetchAccountSettingsListForAccountTypes">, fetchJeSchedules: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, refreshViewInBackground?: any], {
|
|
@@ -56,7 +56,7 @@ export declare const clearExpenseAutomationJESchedulesView: import("@reduxjs/too
|
|
|
56
56
|
accountPayload: AccountMetadataPayload[];
|
|
57
57
|
}, "expenseAutomationJESchedulesView/updateAccountSettingsListForAccountTypes">, updateAccountSettingsListForAccountTypesFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
58
58
|
status: ZeniAPIStatus;
|
|
59
|
-
}, "expenseAutomationJESchedulesView/updateAccountSettingsListForAccountTypesFailure">,
|
|
59
|
+
}, "expenseAutomationJESchedulesView/updateAccountSettingsListForAccountTypesFailure">, updateJeScheduleLocalDataById: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
60
60
|
localData: Partial<JEScheduleLocalData>;
|
|
61
61
|
scheduledJournalEntryID: ID;
|
|
62
62
|
}, "expenseAutomationJESchedulesView/updateJeScheduleLocalDataById">, updateJeScheduleTransactionKeys: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleKeys: (`${string}_bill_${string}` | `${string}_expense_${string}` | `${string}_check_${string}` | `${string}_refund_${string}` | `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_bill_payment_${string}` | `${string}_bill_payment_check_${string}` | `${string}_bill_payment_credit_card_${string}` | `${string}_vendor_credit_${string}` | `${string}_credit_card_credit_${string}` | `${string}_transfer_${string}` | `${string}_credit_card_payment_${string}` | `${string}_deposit_${string}` | `${string}_journal_entry_${string}`)[], selectedPeriod: MonthYearPeriod], {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.updateRecommendationForAccountSettingsFailure = exports.updateRecommendationForAccountSettings = exports.updateJeScheduleTransactionKeys = exports.updateJeScheduleLocalDataById = exports.
|
|
4
|
+
exports.updateRecommendationForAccountSettingsFailure = exports.updateRecommendationForAccountSettings = exports.updateJeScheduleTransactionKeys = exports.updateJeScheduleLocalDataById = exports.updateAccountSettingsListForAccountTypesFailure = exports.updateAccountSettingsListForAccountTypes = exports.saveAccountSettingsSuccess = exports.saveAccountSettingsLocalData = exports.saveAccountSettingsFailure = exports.saveAccountSettings = exports.retryJeScheduleSuccess = exports.retryJeScheduleFailure = exports.retryJeSchedule = exports.removeJeScheduleTransactionKey = exports.removeJeScheduleLocalDataById = exports.removeFailedJeScheduleTransactionKey = exports.initializeJeScheduleLocalData = exports.initializeAccountSettingsView = exports.ignoreRecommendedJeScheduleSuccess = exports.ignoreRecommendedJeScheduleFailure = exports.ignoreRecommendedJeSchedule = exports.fetchRecommendationForAccountSettings = exports.fetchJeSchedulesSuccess = exports.fetchJeSchedulesPage = exports.fetchJeSchedulesFailure = exports.fetchJeSchedules = exports.fetchAccountSettingsListForAccountTypes = exports.clearJeScheduleLocalData = exports.clearJeAccountSettingsLocalData = exports.clearExpenseAutomationJESchedulesView = exports.initialState = exports.accountSettingsInitialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const getNestedAccountIDHierarchyForReport_1 = require("../../../commonStateTypes/accountView/getNestedAccountIDHierarchyForReport");
|
|
7
7
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
@@ -48,8 +48,6 @@ exports.initialState = {
|
|
|
48
48
|
uiState: {
|
|
49
49
|
searchString: '',
|
|
50
50
|
scrollPosition: { scrollTop: 0, scrollLeft: undefined },
|
|
51
|
-
sortKey: 'startMonth',
|
|
52
|
-
sortOrder: 'descending',
|
|
53
51
|
totalCount: 0,
|
|
54
52
|
limit: 10,
|
|
55
53
|
},
|
|
@@ -371,26 +369,12 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
|
|
|
371
369
|
clearJeAccountSettingsLocalData(draft) {
|
|
372
370
|
draft.accountSettings.localData = exports.accountSettingsInitialState.localData;
|
|
373
371
|
},
|
|
374
|
-
updateJESchedulesUIState(draft, action) {
|
|
375
|
-
if (action.payload.sortKey != null) {
|
|
376
|
-
draft.uiState.sortKey = action.payload.sortKey;
|
|
377
|
-
}
|
|
378
|
-
if (action.payload.sortOrder != null) {
|
|
379
|
-
draft.uiState.sortOrder = action.payload.sortOrder;
|
|
380
|
-
}
|
|
381
|
-
if (action.payload.searchString != null) {
|
|
382
|
-
draft.uiState.searchString = action.payload.searchString;
|
|
383
|
-
}
|
|
384
|
-
if (action.payload.scrollPosition != null) {
|
|
385
|
-
draft.uiState.scrollPosition = action.payload.scrollPosition;
|
|
386
|
-
}
|
|
387
|
-
},
|
|
388
372
|
clearExpenseAutomationJESchedulesView(draft) {
|
|
389
373
|
Object.assign(draft, exports.initialState);
|
|
390
374
|
},
|
|
391
375
|
},
|
|
392
376
|
});
|
|
393
|
-
_a = expenseAutomationJESchedulesView.actions, exports.clearExpenseAutomationJESchedulesView = _a.clearExpenseAutomationJESchedulesView, exports.clearJeAccountSettingsLocalData = _a.clearJeAccountSettingsLocalData, exports.clearJeScheduleLocalData = _a.clearJeScheduleLocalData, exports.fetchAccountSettingsListForAccountTypes = _a.fetchAccountSettingsListForAccountTypes, exports.fetchJeSchedules = _a.fetchJeSchedules, exports.fetchJeSchedulesFailure = _a.fetchJeSchedulesFailure, exports.fetchJeSchedulesPage = _a.fetchJeSchedulesPage, exports.fetchJeSchedulesSuccess = _a.fetchJeSchedulesSuccess, exports.fetchRecommendationForAccountSettings = _a.fetchRecommendationForAccountSettings, exports.ignoreRecommendedJeSchedule = _a.ignoreRecommendedJeSchedule, exports.ignoreRecommendedJeScheduleFailure = _a.ignoreRecommendedJeScheduleFailure, exports.ignoreRecommendedJeScheduleSuccess = _a.ignoreRecommendedJeScheduleSuccess, exports.initializeAccountSettingsView = _a.initializeAccountSettingsView, exports.initializeJeScheduleLocalData = _a.initializeJeScheduleLocalData, exports.removeFailedJeScheduleTransactionKey = _a.removeFailedJeScheduleTransactionKey, exports.removeJeScheduleLocalDataById = _a.removeJeScheduleLocalDataById, exports.removeJeScheduleTransactionKey = _a.removeJeScheduleTransactionKey, exports.retryJeSchedule = _a.retryJeSchedule, exports.retryJeScheduleFailure = _a.retryJeScheduleFailure, exports.retryJeScheduleSuccess = _a.retryJeScheduleSuccess, exports.saveAccountSettings = _a.saveAccountSettings, exports.saveAccountSettingsFailure = _a.saveAccountSettingsFailure, exports.saveAccountSettingsLocalData = _a.saveAccountSettingsLocalData, exports.saveAccountSettingsSuccess = _a.saveAccountSettingsSuccess, exports.updateAccountSettingsListForAccountTypes = _a.updateAccountSettingsListForAccountTypes, exports.updateAccountSettingsListForAccountTypesFailure = _a.updateAccountSettingsListForAccountTypesFailure, exports.
|
|
377
|
+
_a = expenseAutomationJESchedulesView.actions, exports.clearExpenseAutomationJESchedulesView = _a.clearExpenseAutomationJESchedulesView, exports.clearJeAccountSettingsLocalData = _a.clearJeAccountSettingsLocalData, exports.clearJeScheduleLocalData = _a.clearJeScheduleLocalData, exports.fetchAccountSettingsListForAccountTypes = _a.fetchAccountSettingsListForAccountTypes, exports.fetchJeSchedules = _a.fetchJeSchedules, exports.fetchJeSchedulesFailure = _a.fetchJeSchedulesFailure, exports.fetchJeSchedulesPage = _a.fetchJeSchedulesPage, exports.fetchJeSchedulesSuccess = _a.fetchJeSchedulesSuccess, exports.fetchRecommendationForAccountSettings = _a.fetchRecommendationForAccountSettings, exports.ignoreRecommendedJeSchedule = _a.ignoreRecommendedJeSchedule, exports.ignoreRecommendedJeScheduleFailure = _a.ignoreRecommendedJeScheduleFailure, exports.ignoreRecommendedJeScheduleSuccess = _a.ignoreRecommendedJeScheduleSuccess, exports.initializeAccountSettingsView = _a.initializeAccountSettingsView, exports.initializeJeScheduleLocalData = _a.initializeJeScheduleLocalData, exports.removeFailedJeScheduleTransactionKey = _a.removeFailedJeScheduleTransactionKey, exports.removeJeScheduleLocalDataById = _a.removeJeScheduleLocalDataById, exports.removeJeScheduleTransactionKey = _a.removeJeScheduleTransactionKey, exports.retryJeSchedule = _a.retryJeSchedule, exports.retryJeScheduleFailure = _a.retryJeScheduleFailure, exports.retryJeScheduleSuccess = _a.retryJeScheduleSuccess, exports.saveAccountSettings = _a.saveAccountSettings, exports.saveAccountSettingsFailure = _a.saveAccountSettingsFailure, exports.saveAccountSettingsLocalData = _a.saveAccountSettingsLocalData, exports.saveAccountSettingsSuccess = _a.saveAccountSettingsSuccess, exports.updateAccountSettingsListForAccountTypes = _a.updateAccountSettingsListForAccountTypes, exports.updateAccountSettingsListForAccountTypesFailure = _a.updateAccountSettingsListForAccountTypesFailure, exports.updateJeScheduleLocalDataById = _a.updateJeScheduleLocalDataById, exports.updateJeScheduleTransactionKeys = _a.updateJeScheduleTransactionKeys, exports.updateRecommendationForAccountSettings = _a.updateRecommendationForAccountSettings, exports.updateRecommendationForAccountSettingsFailure = _a.updateRecommendationForAccountSettingsFailure;
|
|
394
378
|
exports.default = expenseAutomationJESchedulesView.reducer;
|
|
395
379
|
const doUpdateRecommendationForAccountSettings = (draft, payload) => {
|
|
396
380
|
const { prepaidExpensesRecommendations, fixedAssetsRecommendations, accruedExpensesRecommendations, } = (0, accountTypeRecommendationPayload_1.mapAccountTypeRecommendationPayloadToAccountRecommendationByType)(payload);
|
|
@@ -2,10 +2,9 @@ import { Amount } from '../../../commonStateTypes/amount';
|
|
|
2
2
|
import { FetchState, ID } from '../../../commonStateTypes/common';
|
|
3
3
|
import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
4
4
|
import { MonthYearPeriod } from '../../../commonStateTypes/timePeriod';
|
|
5
|
-
import { ReconciliationDataPayload } from '../../../entity/accountRecon/accountReconPayload';
|
|
6
5
|
import { ZeniAPIStatus } from '../../../responsePayload';
|
|
7
|
-
import {
|
|
8
|
-
import { AccountReconciliationLocalData, ActionFetchStates,
|
|
6
|
+
import { ReconciliationPayload, UploadStatementDocumentAIPayload } from '../payload/reconciliationPayload';
|
|
7
|
+
import { AccountReconciliationLocalData, ActionFetchStates, ReconReconcileSortKey, ReconReviewSortKey, ReconciliationReviewTabLocalData, ReconciliationTabsState, ReconciliationViewState, ReconciliationViewTabType, SaveReconcileDetailActionPayload, SaveReconciliationDetailFailurePayload, TransactionSummary } from '../types/reconciliationViewState';
|
|
9
8
|
export declare const initialReconciliationTabsState: ReconciliationTabsState;
|
|
10
9
|
export declare const initialActionFetchState: ActionFetchStates;
|
|
11
10
|
export declare const initialState: ReconciliationViewState;
|
|
@@ -87,17 +86,7 @@ export declare const fetchReconciliation: import("@reduxjs/toolkit").ActionCreat
|
|
|
87
86
|
accountId: ID;
|
|
88
87
|
error: ZeniAPIStatus;
|
|
89
88
|
selectedPeriod: MonthYearPeriod;
|
|
90
|
-
}, "expenseAutomationReconciliationView/deleteAccountStatementFailure">,
|
|
91
|
-
selectedPeriod: MonthYearPeriod;
|
|
92
|
-
account?: ExcludedAccountFromReconciliationPayload;
|
|
93
|
-
}, "expenseAutomationReconciliationView/excludeAccountFromReconciliationSuccess">, excludeAccountFromReconciliationFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
94
|
-
error: ZeniAPIStatus;
|
|
95
|
-
}, "expenseAutomationReconciliationView/excludeAccountFromReconciliationFailure">, includeAccountInReconciliation: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: ExcludeAccountFromReconciliationPayload], ExcludeAccountFromReconciliationPayload, "expenseAutomationReconciliationView/includeAccountInReconciliation", never, never>, includeAccountInReconciliationSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
96
|
-
selectedPeriod: MonthYearPeriod;
|
|
97
|
-
reconciliation?: ReconciliationDataPayload;
|
|
98
|
-
}, "expenseAutomationReconciliationView/includeAccountInReconciliationSuccess">, includeAccountInReconciliationFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
99
|
-
error: ZeniAPIStatus;
|
|
100
|
-
}, "expenseAutomationReconciliationView/includeAccountInReconciliationFailure">, uploadAccountStatement: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
89
|
+
}, "expenseAutomationReconciliationView/deleteAccountStatementFailure">, uploadAccountStatement: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
101
90
|
accountId: ID;
|
|
102
91
|
payload: UploadStatementDocumentAIPayload;
|
|
103
92
|
selectedPeriod: MonthYearPeriod;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.updateStatementUploadChosen = exports.uploadAccountStatementFailure = exports.uploadAccountStatementSuccess = exports.uploadAccountStatement = exports.
|
|
4
|
+
exports.updateStatementUploadChosen = exports.uploadAccountStatementFailure = exports.uploadAccountStatementSuccess = exports.uploadAccountStatement = exports.deleteAccountStatementFailure = exports.deleteAccountStatementSuccess = exports.deleteAccountStatement = exports.updateAccountReconciliationLocalData = exports.updateReconListScrollPosition = 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.setStatementParseInProgress = exports.setConnectionInProgressForAccount = exports.updateSelectedAccountId = exports.saveReconciliationDetailFailure = exports.saveReconciliationDetail = exports.fetchReconciliationSuccess = exports.fetchReconciliationFailure = exports.fetchReconciliation = exports.initialState = exports.initialActionFetchState = exports.initialReconciliationTabsState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
7
7
|
const accountState_1 = require("../../../entity/account/accountState");
|
|
@@ -41,15 +41,7 @@ exports.initialReconciliationTabsState = {
|
|
|
41
41
|
},
|
|
42
42
|
};
|
|
43
43
|
exports.initialActionFetchState = {
|
|
44
|
-
excludeAccountFetch: {
|
|
45
|
-
fetchState: 'Not-Started',
|
|
46
|
-
error: undefined,
|
|
47
|
-
},
|
|
48
44
|
excludeFetchById: {},
|
|
49
|
-
includeAccountFetch: {
|
|
50
|
-
fetchState: 'Not-Started',
|
|
51
|
-
error: undefined,
|
|
52
|
-
},
|
|
53
45
|
reconcileFetch: {
|
|
54
46
|
fetchState: 'Not-Started',
|
|
55
47
|
error: undefined,
|
|
@@ -63,7 +55,6 @@ exports.initialActionFetchState = {
|
|
|
63
55
|
exports.initialState = {
|
|
64
56
|
accountReconciliationRecordsBySelectedPeriod: {},
|
|
65
57
|
accountConnectionStatusByAccountID: {},
|
|
66
|
-
excludedAccountExclusionInfo: {},
|
|
67
58
|
fetchState: 'Not-Started',
|
|
68
59
|
error: undefined,
|
|
69
60
|
selectedTab: 'review',
|
|
@@ -77,7 +68,6 @@ exports.initialState = {
|
|
|
77
68
|
scrollTop: 0,
|
|
78
69
|
},
|
|
79
70
|
},
|
|
80
|
-
excludedAccountIDs: [],
|
|
81
71
|
};
|
|
82
72
|
// Create slice with reducers
|
|
83
73
|
const expenseAutomationReconciliationView = (0, toolkit_1.createSlice)({
|
|
@@ -146,7 +136,7 @@ const expenseAutomationReconciliationView = (0, toolkit_1.createSlice)({
|
|
|
146
136
|
fetchReconciliationSuccess: {
|
|
147
137
|
reducer(draft, action) {
|
|
148
138
|
if (action.payload.accountId == null) {
|
|
149
|
-
updateAllReconciliation(draft, action.payload.reconciliation.accounts, action.payload.selectedPeriod, action.payload.reconciliation.reconciliation, action.payload.refreshViewInBackground
|
|
139
|
+
updateAllReconciliation(draft, action.payload.reconciliation.accounts, action.payload.selectedPeriod, action.payload.reconciliation.reconciliation, action.payload.refreshViewInBackground);
|
|
150
140
|
}
|
|
151
141
|
else if (action.payload.reconciliation.reconciliation.length > 0 &&
|
|
152
142
|
action.payload.reconciliation.accounts.length > 0) {
|
|
@@ -435,113 +425,6 @@ const expenseAutomationReconciliationView = (0, toolkit_1.createSlice)({
|
|
|
435
425
|
...localData,
|
|
436
426
|
};
|
|
437
427
|
},
|
|
438
|
-
excludeAccountFromReconciliation: {
|
|
439
|
-
reducer(draft) {
|
|
440
|
-
draft.actionFetchState.excludeAccountFetch = {
|
|
441
|
-
fetchState: 'In-Progress',
|
|
442
|
-
error: undefined,
|
|
443
|
-
};
|
|
444
|
-
},
|
|
445
|
-
prepare(payload) {
|
|
446
|
-
return { payload };
|
|
447
|
-
},
|
|
448
|
-
},
|
|
449
|
-
excludeAccountFromReconciliationSuccess: (draft, action) => {
|
|
450
|
-
draft.actionFetchState.excludeAccountFetch = {
|
|
451
|
-
fetchState: 'Completed',
|
|
452
|
-
error: undefined,
|
|
453
|
-
};
|
|
454
|
-
const { account, selectedPeriod } = action.payload;
|
|
455
|
-
if (account != null) {
|
|
456
|
-
if (!draft.excludedAccountIDs.includes(account.account_id)) {
|
|
457
|
-
draft.excludedAccountIDs.push(account.account_id);
|
|
458
|
-
}
|
|
459
|
-
draft.excludedAccountExclusionInfo[account.account_id] = {
|
|
460
|
-
bankBalance: account.bank_balance != null
|
|
461
|
-
? {
|
|
462
|
-
amount: account.bank_balance,
|
|
463
|
-
currencyCode: account.currency_code ?? 'USD',
|
|
464
|
-
currencySymbol: account.currency_symbol ?? '$',
|
|
465
|
-
}
|
|
466
|
-
: undefined,
|
|
467
|
-
clearedBalance: account.cleared_balance != null
|
|
468
|
-
? {
|
|
469
|
-
amount: account.cleared_balance,
|
|
470
|
-
currencyCode: account.currency_code ?? 'USD',
|
|
471
|
-
currencySymbol: account.currency_symbol ?? '$',
|
|
472
|
-
}
|
|
473
|
-
: undefined,
|
|
474
|
-
variance: account.variance != null
|
|
475
|
-
? {
|
|
476
|
-
amount: account.variance,
|
|
477
|
-
currencyCode: account.currency_code ?? 'USD',
|
|
478
|
-
currencySymbol: account.currency_symbol ?? '$',
|
|
479
|
-
}
|
|
480
|
-
: undefined,
|
|
481
|
-
};
|
|
482
|
-
const monthYearPeriodId = (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod);
|
|
483
|
-
draft.accountReconciliationRecordsBySelectedPeriod[monthYearPeriodId].accountIDs = draft.accountReconciliationRecordsBySelectedPeriod[monthYearPeriodId].accountIDs.filter((id) => id !== account.account_id);
|
|
484
|
-
}
|
|
485
|
-
},
|
|
486
|
-
excludeAccountFromReconciliationFailure: (draft, action) => {
|
|
487
|
-
draft.actionFetchState.excludeAccountFetch = {
|
|
488
|
-
fetchState: 'Error',
|
|
489
|
-
error: action.payload.error,
|
|
490
|
-
};
|
|
491
|
-
},
|
|
492
|
-
includeAccountInReconciliation: {
|
|
493
|
-
reducer(draft) {
|
|
494
|
-
draft.actionFetchState.includeAccountFetch = {
|
|
495
|
-
fetchState: 'In-Progress',
|
|
496
|
-
error: undefined,
|
|
497
|
-
};
|
|
498
|
-
},
|
|
499
|
-
prepare(payload) {
|
|
500
|
-
return { payload };
|
|
501
|
-
},
|
|
502
|
-
},
|
|
503
|
-
includeAccountInReconciliationSuccess: (draft, action) => {
|
|
504
|
-
draft.actionFetchState.includeAccountFetch = {
|
|
505
|
-
fetchState: 'Completed',
|
|
506
|
-
error: undefined,
|
|
507
|
-
};
|
|
508
|
-
const { reconciliation, selectedPeriod } = action.payload;
|
|
509
|
-
if (reconciliation == null) {
|
|
510
|
-
return;
|
|
511
|
-
}
|
|
512
|
-
const accountId = reconciliation.account_id;
|
|
513
|
-
draft.excludedAccountIDs = draft.excludedAccountIDs.filter((id) => id !== accountId);
|
|
514
|
-
delete draft.excludedAccountExclusionInfo[accountId];
|
|
515
|
-
const monthYearPeriodId = (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod);
|
|
516
|
-
const accountReconciliationRecords = draft.accountReconciliationRecordsBySelectedPeriod[monthYearPeriodId];
|
|
517
|
-
if (accountReconciliationRecords != null) {
|
|
518
|
-
if (!accountReconciliationRecords.accountIDs.includes(accountId)) {
|
|
519
|
-
accountReconciliationRecords.accountIDs.push(accountId);
|
|
520
|
-
}
|
|
521
|
-
accountReconciliationRecords.reconciliationByAccountID[accountId] = {
|
|
522
|
-
accountId,
|
|
523
|
-
reconciliationId: reconciliation.reconciliation_id ?? undefined,
|
|
524
|
-
transactionFetchState: { fetchState: 'Not-Started', error: undefined },
|
|
525
|
-
refreshStatus: { fetchState: 'Not-Started', error: undefined },
|
|
526
|
-
statementDeleteStatus: { fetchState: 'Not-Started', error: undefined },
|
|
527
|
-
statementUploadStatus: { fetchState: 'Not-Started', error: undefined },
|
|
528
|
-
statementUpdateStatus: { fetchState: 'Not-Started', error: undefined },
|
|
529
|
-
statementParseInProgress: reconciliation.bank_status.code === 'parsing',
|
|
530
|
-
localData: {},
|
|
531
|
-
};
|
|
532
|
-
}
|
|
533
|
-
draft.accountConnectionStatusByAccountID[accountId] = {
|
|
534
|
-
status: (0, accountReconState_1.toBankStatusCodeType)(reconciliation.bank_status.code),
|
|
535
|
-
connectionInProgress: false,
|
|
536
|
-
paymentAccountId: undefined,
|
|
537
|
-
};
|
|
538
|
-
},
|
|
539
|
-
includeAccountInReconciliationFailure: (draft, action) => {
|
|
540
|
-
draft.actionFetchState.includeAccountFetch = {
|
|
541
|
-
fetchState: 'Error',
|
|
542
|
-
error: action.payload.error,
|
|
543
|
-
};
|
|
544
|
-
},
|
|
545
428
|
updateStatementUploadChosen: (draft, action) => {
|
|
546
429
|
draft.statementUploadChosen = action.payload.statementUploadChosen;
|
|
547
430
|
},
|
|
@@ -551,38 +434,10 @@ const expenseAutomationReconciliationView = (0, toolkit_1.createSlice)({
|
|
|
551
434
|
},
|
|
552
435
|
});
|
|
553
436
|
// Export actions
|
|
554
|
-
_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.setStatementParseInProgress = _a.setStatementParseInProgress, 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, exports.updateReconListScrollPosition = _a.updateReconListScrollPosition, exports.updateAccountReconciliationLocalData = _a.updateAccountReconciliationLocalData, exports.deleteAccountStatement = _a.deleteAccountStatement, exports.deleteAccountStatementSuccess = _a.deleteAccountStatementSuccess, exports.deleteAccountStatementFailure = _a.deleteAccountStatementFailure, exports.
|
|
437
|
+
_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.setStatementParseInProgress = _a.setStatementParseInProgress, 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, exports.updateReconListScrollPosition = _a.updateReconListScrollPosition, exports.updateAccountReconciliationLocalData = _a.updateAccountReconciliationLocalData, exports.deleteAccountStatement = _a.deleteAccountStatement, exports.deleteAccountStatementSuccess = _a.deleteAccountStatementSuccess, exports.deleteAccountStatementFailure = _a.deleteAccountStatementFailure, exports.uploadAccountStatement = _a.uploadAccountStatement, exports.uploadAccountStatementSuccess = _a.uploadAccountStatementSuccess, exports.uploadAccountStatementFailure = _a.uploadAccountStatementFailure, exports.updateStatementUploadChosen = _a.updateStatementUploadChosen;
|
|
555
438
|
// Export reducer
|
|
556
439
|
exports.default = expenseAutomationReconciliationView.reducer;
|
|
557
|
-
function updateAllReconciliation(draft, accounts, selectedPeriod, reconciliationData, refreshViewInBackground
|
|
558
|
-
draft.excludedAccountIDs = excludedAccounts.map((ea) => ea.account_id);
|
|
559
|
-
draft.excludedAccountExclusionInfo = {};
|
|
560
|
-
excludedAccounts.forEach((ea) => {
|
|
561
|
-
const { exclusion_info } = ea;
|
|
562
|
-
draft.excludedAccountExclusionInfo[ea.account_id] = {
|
|
563
|
-
bankBalance: exclusion_info.bank_balance != null
|
|
564
|
-
? {
|
|
565
|
-
amount: exclusion_info.bank_balance,
|
|
566
|
-
currencyCode: ea.currency_code ?? 'USD',
|
|
567
|
-
currencySymbol: ea.currency_symbol ?? '$',
|
|
568
|
-
}
|
|
569
|
-
: undefined,
|
|
570
|
-
clearedBalance: exclusion_info.cleared_balance != null
|
|
571
|
-
? {
|
|
572
|
-
amount: exclusion_info.cleared_balance,
|
|
573
|
-
currencyCode: ea.currency_code ?? 'USD',
|
|
574
|
-
currencySymbol: ea.currency_symbol ?? '$',
|
|
575
|
-
}
|
|
576
|
-
: undefined,
|
|
577
|
-
variance: exclusion_info.variance != null
|
|
578
|
-
? {
|
|
579
|
-
amount: exclusion_info.variance,
|
|
580
|
-
currencyCode: ea.currency_code ?? 'USD',
|
|
581
|
-
currencySymbol: ea.currency_symbol ?? '$',
|
|
582
|
-
}
|
|
583
|
-
: undefined,
|
|
584
|
-
};
|
|
585
|
-
});
|
|
440
|
+
function updateAllReconciliation(draft, accounts, selectedPeriod, reconciliationData, refreshViewInBackground) {
|
|
586
441
|
draft.accountReconciliationRecordsBySelectedPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = {
|
|
587
442
|
accountIDs: [],
|
|
588
443
|
reconciliationByAccountID: {},
|
|
@@ -18,12 +18,10 @@ export interface ExpenseAutomationJESchedulesViewSelector extends SelectorView {
|
|
|
18
18
|
allDepreciationAccountList: AccountBase[];
|
|
19
19
|
allDepreciationAccountListNestedAccountHierarchy: NestedAccountHierarchyForReport[];
|
|
20
20
|
classListNestedAccountHierarchy: NestedClassHierarchyForReport[];
|
|
21
|
-
completedSchedules: JEScheduledTransaction[];
|
|
22
21
|
completionStatus: CompletionStatusType;
|
|
23
22
|
draftSchedules: JEScheduledTransaction[];
|
|
24
23
|
ignoreStatusById: Record<JEScheduleTransactionKey, FetchStateAndError>;
|
|
25
24
|
jeScheduleLocalDataById: Record<ID, JEScheduleLocalData>;
|
|
26
|
-
ongoingSchedules: JEScheduledTransaction[];
|
|
27
25
|
postStatusById: Record<ID, FetchStateAndError>;
|
|
28
26
|
refreshStatus: FetchStateAndError;
|
|
29
27
|
resolveSchedules: JEScheduledTransactionWithFailedEntries[];
|
|
@@ -3,7 +3,7 @@ import { Amount } from '../../../commonStateTypes/amount';
|
|
|
3
3
|
import { NestedClassHierarchyForReport } from '../../../commonStateTypes/classesView/nestedClassID';
|
|
4
4
|
import { CompletionStatusType, FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
5
5
|
import { MonthYearPeriod } from '../../../commonStateTypes/timePeriod';
|
|
6
|
-
import {
|
|
6
|
+
import { AccountBase } from '../../../entity/account/accountState';
|
|
7
7
|
import { AccountReconciliationEntity } from '../../../entity/accountRecon/accountReconSelector';
|
|
8
8
|
import { BankStatusCodeType } from '../../../entity/accountRecon/accountReconState';
|
|
9
9
|
import { ClassBase } from '../../../entity/class/classState';
|
|
@@ -13,11 +13,6 @@ import { AccountReconciliationLocalData, ActionFetchStates, ReconListUIState, Re
|
|
|
13
13
|
export declare const ALL_ACCOUNT_RECON_SECTION_IDS: readonly ["assets", "liabilities"];
|
|
14
14
|
declare const toAccountReconSectionID: (v: string) => "assets" | "liabilities";
|
|
15
15
|
export type AccountReconSectionID = ReturnType<typeof toAccountReconSectionID>;
|
|
16
|
-
export interface ExcludedAccountReconciliation extends Account {
|
|
17
|
-
bankBalance?: Amount;
|
|
18
|
-
clearedBalance?: Amount;
|
|
19
|
-
variance?: Amount;
|
|
20
|
-
}
|
|
21
16
|
export interface ExpenseAutomationReconciliationViewSelector {
|
|
22
17
|
accountListNestedAccountHierarchy: NestedAccountHierarchyForReport[];
|
|
23
18
|
accountReconciliationBySectionID: Record<AccountReconSectionID, AccountReconciliationBySection>;
|
|
@@ -29,12 +24,7 @@ export interface ExpenseAutomationReconciliationViewSelector {
|
|
|
29
24
|
classListNestedAccountHierarchy: NestedClassHierarchyForReport[];
|
|
30
25
|
completionStatus: CompletionStatusType;
|
|
31
26
|
creditCards: AccountBase[];
|
|
32
|
-
excludeAccountFetchState: FetchStateAndError;
|
|
33
|
-
excludedAccountIDs: ID[];
|
|
34
|
-
excludedAccountReconciliationByAccountID: Record<ID, ExcludedAccountReconciliation>;
|
|
35
|
-
excludedAccountReconciliationBySectionID: Record<AccountReconSectionID, AccountReconciliationBySection>;
|
|
36
27
|
fetchStatus: FetchStateAndError;
|
|
37
|
-
includeAccountFetchState: FetchStateAndError;
|
|
38
28
|
monthYearPeriod: MonthYearPeriod;
|
|
39
29
|
plaidConnectionDetails: PlaidConnectionDetails;
|
|
40
30
|
reconciliationTabsState: ReconciliationTabsState;
|
|
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getExpenseAutomationJESchedulesView = getExpenseAutomationJESchedulesView;
|
|
7
7
|
const omit_1 = __importDefault(require("lodash/omit"));
|
|
8
|
-
const orderBy_1 = __importDefault(require("lodash/orderBy"));
|
|
9
8
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
10
9
|
const accountSelector_1 = require("../../../entity/account/accountSelector");
|
|
11
10
|
const jeSchedulesSelector_1 = require("../../../entity/jeSchedules/jeSchedulesSelector");
|
|
@@ -17,42 +16,6 @@ const scheduleDetailSelector_1 = require("../../scheduleView/scheduleDetailView/
|
|
|
17
16
|
const scheduleListHelper_1 = require("../../scheduleView/scheduleListView/scheduleListHelper");
|
|
18
17
|
const expenseAutomationViewSelectorTypes_1 = require("../selectorTypes/expenseAutomationViewSelectorTypes");
|
|
19
18
|
const jeAccountSettingsViewSelector_1 = require("./jeAccountSettingsViewSelector");
|
|
20
|
-
function getJEScheduleSortAccessor(sortKey) {
|
|
21
|
-
switch (sortKey) {
|
|
22
|
-
case 'vendor':
|
|
23
|
-
return (s) => s.vendor.name?.toLowerCase();
|
|
24
|
-
case 'category':
|
|
25
|
-
return (s) => s.jeDebit.account?.accountName?.toLowerCase();
|
|
26
|
-
case 'class':
|
|
27
|
-
return (s) => s.jeDebit.accountingClass?.className?.toLowerCase();
|
|
28
|
-
case 'scheduleCategory':
|
|
29
|
-
return (s) => s.jeScheduleType;
|
|
30
|
-
case 'startMonth':
|
|
31
|
-
return (s) => s.startDate?.valueOf();
|
|
32
|
-
case 'type':
|
|
33
|
-
return (s) => s.baseTransaction.typeOfTransaction;
|
|
34
|
-
case 'amortizationPeriod':
|
|
35
|
-
return (s) => s.period;
|
|
36
|
-
case 'jePostingDate':
|
|
37
|
-
return (s) => s.dayOfPostingDate;
|
|
38
|
-
case 'remainingMonths':
|
|
39
|
-
return (s) => s.period;
|
|
40
|
-
case 'runningBalance':
|
|
41
|
-
return (s) => s.balanceAsOfToday?.amount;
|
|
42
|
-
case 'totalAmount':
|
|
43
|
-
return (s) => s.baseTransaction.amount.amount;
|
|
44
|
-
case 'transactionDate':
|
|
45
|
-
return (s) => s.baseTransaction.date.valueOf();
|
|
46
|
-
case 'memo':
|
|
47
|
-
return (s) => s.baseTransaction.memo?.toLowerCase();
|
|
48
|
-
default:
|
|
49
|
-
return (s) => s.startDate?.valueOf();
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
function sortJEScheduledTransactions(transactions, sortKey, sortOrder) {
|
|
53
|
-
const accessor = getJEScheduleSortAccessor(sortKey);
|
|
54
|
-
return (0, orderBy_1.default)(transactions, [accessor], [sortOrder === 'ascending' ? 'asc' : 'desc']);
|
|
55
|
-
}
|
|
56
19
|
function getExpenseAutomationJESchedulesView(state) {
|
|
57
20
|
const jeScheduledTransaction = [];
|
|
58
21
|
const failedJeScheduledTransaction = [];
|
|
@@ -102,21 +65,13 @@ function getExpenseAutomationJESchedulesView(state) {
|
|
|
102
65
|
const jeScheduleDetails = (0, jeSchedulesSelector_1.getJEScheduledTransactionByJEScheduleTransactionKey)(jeScheduleKey, state);
|
|
103
66
|
failedJeScheduledTransaction.push(jeScheduleDetails);
|
|
104
67
|
});
|
|
105
|
-
const
|
|
106
|
-
const
|
|
107
|
-
const ongoingSchedules = sortJEScheduledTransactions(jeScheduledTransaction.filter((schedule) => schedule.status.code === 'ongoing'), sortKey, sortOrder);
|
|
108
|
-
const completedSchedules = sortJEScheduledTransactions(jeScheduledTransaction.filter((schedule) => schedule.status.code === 'completed' ||
|
|
109
|
-
schedule.status.code === 'marked_as_completed'), sortKey, sortOrder);
|
|
110
|
-
const unsortedResolveSchedules = [];
|
|
68
|
+
const draftSchedules = jeScheduledTransaction.filter((schedule) => schedule.status.code === 'draft');
|
|
69
|
+
const resolveSchedules = [];
|
|
111
70
|
failedJeScheduledTransaction.forEach((schedule) => {
|
|
112
71
|
schedule.scheduledJournalEntry.forEach((journalEntry) => {
|
|
113
|
-
|
|
114
|
-
...schedule,
|
|
115
|
-
scheduledJournalEntry: journalEntry,
|
|
116
|
-
});
|
|
72
|
+
resolveSchedules.push({ ...schedule, scheduledJournalEntry: journalEntry });
|
|
117
73
|
});
|
|
118
74
|
});
|
|
119
|
-
const resolveSchedules = sortJEScheduledTransactions(unsortedResolveSchedules, sortKey, sortOrder);
|
|
120
75
|
const allSteps = monthYearPeriodId != null
|
|
121
76
|
? (0, expenseAutomationViewSelectorTypes_1.getAllSteps)(monthEndCloseChecksState, monthYearPeriodId, currentTenant.tenantId)
|
|
122
77
|
: [];
|
|
@@ -130,9 +85,7 @@ function getExpenseAutomationJESchedulesView(state) {
|
|
|
130
85
|
allAccountList: filteredAccounts,
|
|
131
86
|
accountListNestedAccountHierarchy,
|
|
132
87
|
allClassList: allClasses,
|
|
133
|
-
completedSchedules,
|
|
134
88
|
draftSchedules,
|
|
135
|
-
ongoingSchedules,
|
|
136
89
|
resolveSchedules: resolveSchedules,
|
|
137
90
|
accountSettingsView,
|
|
138
91
|
postStatusById: postStatusById,
|
|
@@ -42,7 +42,7 @@ function getExpenseAutomationMissingReceiptsView(state) {
|
|
|
42
42
|
transaction.lines.length > 0 &&
|
|
43
43
|
transaction.lines[0]
|
|
44
44
|
?.class != null
|
|
45
|
-
? transaction.lines[0].class
|
|
45
|
+
? transaction.lines[0].class.className.toLowerCase()
|
|
46
46
|
: null;
|
|
47
47
|
case 'vendor':
|
|
48
48
|
default:
|
|
@@ -86,30 +86,6 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
|
|
|
86
86
|
totalVariancePercentage: undefined,
|
|
87
87
|
},
|
|
88
88
|
},
|
|
89
|
-
excludedAccountReconciliationByAccountID: {},
|
|
90
|
-
excludedAccountReconciliationBySectionID: {
|
|
91
|
-
assets: {
|
|
92
|
-
sectionId: 'assets',
|
|
93
|
-
accountIDs: [],
|
|
94
|
-
totalBankBalance: undefined,
|
|
95
|
-
totalClearedBalance: undefined,
|
|
96
|
-
totalReconciledBalance: undefined,
|
|
97
|
-
totalVariance: undefined,
|
|
98
|
-
totalVariancePercentage: undefined,
|
|
99
|
-
},
|
|
100
|
-
liabilities: {
|
|
101
|
-
sectionId: 'liabilities',
|
|
102
|
-
accountIDs: [],
|
|
103
|
-
totalBankBalance: undefined,
|
|
104
|
-
totalClearedBalance: undefined,
|
|
105
|
-
totalReconciledBalance: undefined,
|
|
106
|
-
totalVariance: undefined,
|
|
107
|
-
totalVariancePercentage: undefined,
|
|
108
|
-
},
|
|
109
|
-
},
|
|
110
|
-
excludeAccountFetchState: reconciliationViewState.actionFetchState.excludeAccountFetch,
|
|
111
|
-
includeAccountFetchState: reconciliationViewState.actionFetchState.includeAccountFetch,
|
|
112
|
-
excludedAccountIDs: reconciliationViewState.excludedAccountIDs,
|
|
113
89
|
};
|
|
114
90
|
}
|
|
115
91
|
const allAccountIDs = accountReconForMonthYearPeriod.accountIDs;
|
|
@@ -269,44 +245,6 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
|
|
|
269
245
|
totalVariancePercentage: liabilityTotals.variancePercentage,
|
|
270
246
|
},
|
|
271
247
|
};
|
|
272
|
-
const bankAccountIdSet = new Set(uniqueBankAccounts.map((a) => a.accountId));
|
|
273
|
-
const creditCardIdSet = new Set(uniqueCreditCards.map((a) => a.accountId));
|
|
274
|
-
const excludedAssetAccountIDs = [];
|
|
275
|
-
const excludedLiabilityAccountIDs = [];
|
|
276
|
-
reconciliationViewState.excludedAccountIDs.forEach((accountID) => {
|
|
277
|
-
const isAsset = bankAccountIdSet.has(accountID);
|
|
278
|
-
const isLiability = creditCardIdSet.has(accountID);
|
|
279
|
-
if (!isAsset && !isLiability) {
|
|
280
|
-
return;
|
|
281
|
-
}
|
|
282
|
-
if (isAsset) {
|
|
283
|
-
excludedAssetAccountIDs.push(accountID);
|
|
284
|
-
}
|
|
285
|
-
else {
|
|
286
|
-
excludedLiabilityAccountIDs.push(accountID);
|
|
287
|
-
}
|
|
288
|
-
});
|
|
289
|
-
const excludedAccountReconciliationBySectionID = {
|
|
290
|
-
assets: {
|
|
291
|
-
sectionId: 'assets',
|
|
292
|
-
accountIDs: excludedAssetAccountIDs,
|
|
293
|
-
},
|
|
294
|
-
liabilities: {
|
|
295
|
-
sectionId: 'liabilities',
|
|
296
|
-
accountIDs: excludedLiabilityAccountIDs,
|
|
297
|
-
},
|
|
298
|
-
};
|
|
299
|
-
const excludedAccountReconciliationByAccountID = {};
|
|
300
|
-
reconciliationViewState.excludedAccountIDs.forEach((excludedAccountID) => {
|
|
301
|
-
const account = (0, accountSelector_1.getAccountByAccountId)(accountState, excludedAccountID);
|
|
302
|
-
const exclusionInfo = reconciliationViewState.excludedAccountExclusionInfo[excludedAccountID];
|
|
303
|
-
if (account != null) {
|
|
304
|
-
excludedAccountReconciliationByAccountID[excludedAccountID] = {
|
|
305
|
-
...account,
|
|
306
|
-
...exclusionInfo,
|
|
307
|
-
};
|
|
308
|
-
}
|
|
309
|
-
});
|
|
310
248
|
const accountListNestedAccountHierarchy = (0, accountListSelector_1.getNestedAccountListHierarchy)(accountListState, 'accountList');
|
|
311
249
|
const classListNestedAccountHierarchy = (0, classListSelector_1.getNestedClassListHierarchy)(classListState);
|
|
312
250
|
const accountsList = (0, accountListSelector_1.getAccountList)(accountState, accountListState, 'accountList');
|
|
@@ -364,11 +302,6 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
|
|
|
364
302
|
allClassList: allClasses,
|
|
365
303
|
reviewTabSelectedVendorByTransactionId,
|
|
366
304
|
reconListUIState: reconciliationViewState.reconListUIState,
|
|
367
|
-
excludedAccountReconciliationBySectionID,
|
|
368
|
-
excludedAccountReconciliationByAccountID,
|
|
369
|
-
excludeAccountFetchState: reconciliationViewState.actionFetchState.excludeAccountFetch,
|
|
370
|
-
includeAccountFetchState: reconciliationViewState.actionFetchState.includeAccountFetch,
|
|
371
|
-
excludedAccountIDs: reconciliationViewState.excludedAccountIDs,
|
|
372
305
|
};
|
|
373
306
|
});
|
|
374
307
|
const isAccountReconReport = (reportId) => {
|
|
@@ -1,21 +1,16 @@
|
|
|
1
1
|
import { NestedAccountHierarchyForReport } from '../../../commonStateTypes/accountView/nestedAccountID';
|
|
2
2
|
import { FetchStateAndError, FetchedState, ID } from '../../../commonStateTypes/common';
|
|
3
3
|
import { Recommendation } from '../../../commonStateTypes/recommendationBase';
|
|
4
|
-
import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
5
4
|
import { MonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
|
|
6
5
|
import { AccountBase } from '../../../entity/account/accountState';
|
|
7
6
|
import { JEScheduleTransactionKey, ScheduleTypes } from '../../../entity/jeSchedules/jeSchedulesTypes';
|
|
8
7
|
import { VendorBase } from '../../../entity/vendor/vendorState';
|
|
9
|
-
export declare const toJEScheduleSortKey: (v: string) => "vendor" | "type" | "category" | "class" | "memo" | "transactionDate" | "totalAmount" | "runningBalance" | "scheduleCategory" | "startMonth" | "amortizationPeriod" | "jePostingDate" | "remainingMonths";
|
|
10
|
-
export type JEScheduleSortKey = ReturnType<typeof toJEScheduleSortKey>;
|
|
11
8
|
export interface JESchedulesViewUIState {
|
|
12
9
|
scrollPosition: {
|
|
13
10
|
scrollTop: number;
|
|
14
11
|
scrollLeft?: number;
|
|
15
12
|
} | undefined;
|
|
16
13
|
searchString: string;
|
|
17
|
-
sortKey: JEScheduleSortKey;
|
|
18
|
-
sortOrder: SortOrder;
|
|
19
14
|
totalCount: number;
|
|
20
15
|
limit?: number;
|
|
21
16
|
}
|
|
@@ -1,21 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toJEScheduleSortKey = void 0;
|
|
4
|
-
const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
|
|
5
|
-
const JE_SCHEDULE_SORT_KEYS = [
|
|
6
|
-
'vendor',
|
|
7
|
-
'category',
|
|
8
|
-
'class',
|
|
9
|
-
'scheduleCategory',
|
|
10
|
-
'startMonth',
|
|
11
|
-
'type',
|
|
12
|
-
'amortizationPeriod',
|
|
13
|
-
'jePostingDate',
|
|
14
|
-
'remainingMonths',
|
|
15
|
-
'runningBalance',
|
|
16
|
-
'totalAmount',
|
|
17
|
-
'transactionDate',
|
|
18
|
-
'memo',
|
|
19
|
-
];
|
|
20
|
-
const toJEScheduleSortKey = (v) => (0, stringToUnion_1.stringToUnion)(v, JE_SCHEDULE_SORT_KEYS);
|
|
21
|
-
exports.toJEScheduleSortKey = toJEScheduleSortKey;
|