@zeniai/client-epic-state 4.20.3-betaML22 → 4.20.3-betaNB1
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/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/accountState.d.ts +1 -1
- package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
- package/lib/entity/accountRecon/accountReconPayload.d.ts +1 -1
- package/lib/entity/accountRecon/accountReconPayload.js +2 -4
- 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/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 +0 -1
- package/lib/entity/tenant/tenantReducer.d.ts +2 -5
- package/lib/entity/tenant/tenantReducer.js +2 -8
- package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +0 -6
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +0 -62
- package/lib/entity/transaction/stateTypes/transaction.d.ts +0 -6
- package/lib/epic.d.ts +7 -10
- package/lib/epic.js +7 -10
- package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +0 -1
- package/lib/esm/entity/account/accountReducer.js +1 -6
- package/lib/esm/entity/accountRecon/accountReconPayload.js +2 -4
- package/lib/esm/entity/snackbar/snackbarTypes.js +0 -1
- package/lib/esm/entity/tenant/tenantReducer.js +1 -7
- package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +0 -62
- package/lib/esm/epic.js +7 -10
- package/lib/esm/index.js +7 -7
- package/lib/esm/view/companyView/companyViewReducer.js +1 -26
- package/lib/esm/view/companyView/types/companyPassport/companyPassportViewState.js +0 -4
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +9 -4
- package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +1 -5
- package/lib/esm/view/expenseAutomationView/reducers/reconciliationViewReducer.js +3 -167
- package/lib/esm/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +2 -1
- package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +0 -114
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +6 -10
- package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +0 -6
- package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +2 -4
- package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.js +1 -1
- package/lib/index.d.ts +7 -7
- package/lib/index.js +33 -38
- 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/companyView/companyViewReducer.d.ts +1 -6
- package/lib/view/companyView/companyViewReducer.js +2 -28
- package/lib/view/companyView/types/companyPassport/companyPassportViewState.d.ts +0 -1
- package/lib/view/companyView/types/companyPassport/companyPassportViewState.js +0 -4
- package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +9 -4
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +0 -45
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +1 -5
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +4 -18
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +4 -168
- package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +2 -7
- package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +2 -2
- package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +0 -114
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +5 -9
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +0 -3
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +1 -8
- package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +0 -14
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +2 -4
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.js +1 -1
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/package.json +1 -1
- package/lib/esm/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +0 -61
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +0 -44
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +0 -44
- package/lib/tsconfig.typecheck.tsbuildinfo +0 -1
- package/lib/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.d.ts +0 -10
- package/lib/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +0 -65
- 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
|
@@ -12,7 +12,7 @@ export declare const getCashPosition: (accountState: AccountState, cashPositionS
|
|
|
12
12
|
firstMonthOfFY: 1 | 3 | 12 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
|
|
13
13
|
dataAvailable: import("../../commonStateTypes/timeframeTick").TimeframeTick | undefined;
|
|
14
14
|
availableNumberOfPeriods: number | undefined;
|
|
15
|
-
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card"
|
|
15
|
+
reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card";
|
|
16
16
|
reportTitle: string;
|
|
17
17
|
version: string | number | undefined;
|
|
18
18
|
status: import("../..").Status | undefined;
|
|
@@ -63,12 +63,7 @@ export declare const fetchCompanyPassportView: import("@reduxjs/toolkit").Action
|
|
|
63
63
|
}, "companyView/companyPassportUpdateCompanyDetailsSuccess", never, never>, companyPassportUpdateCompanyDetailsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
64
64
|
companyId: ID;
|
|
65
65
|
status: ZeniAPIStatus;
|
|
66
|
-
}, "companyView/companyPassportUpdateCompanyDetailsFailure">,
|
|
67
|
-
companyId: string;
|
|
68
|
-
enabled: boolean;
|
|
69
|
-
}, "companyView/updateAccountingClassesEnabled", never, never>, updateAccountingClassesEnabledSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"companyView/updateAccountingClassesEnabledSuccess">, updateAccountingClassesEnabledFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
70
|
-
status: ZeniAPIStatus;
|
|
71
|
-
}, "companyView/updateAccountingClassesEnabledFailure">, companyPassportUpdatePrimaryContact: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string, primaryContact: PrimaryContactLocalData], {
|
|
66
|
+
}, "companyView/companyPassportUpdateCompanyDetailsFailure">, companyPassportUpdatePrimaryContact: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string, primaryContact: PrimaryContactLocalData], {
|
|
72
67
|
companyId: string;
|
|
73
68
|
primaryContact: PrimaryContactLocalData;
|
|
74
69
|
}, "companyView/companyPassportUpdatePrimaryContact", never, never>, companyPassportUpdatePrimaryContactSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string], {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.updateCompanyMetaDataOnFailure = exports.updateCompanyMetaDataOnSuccess = exports.fetchCompanyMetaData = exports.updateCompanyDownloadState = exports.updateParentSubsidiaryViewOnFailure = exports.updateParentSubsidiaryView = exports.fetchParentSubsidiaryManagementView = exports.saveCompanyPassportDetails = exports.saveIndustryAndIncDateInCompanyPassportLocalStore = exports.updateCompanyPassportLocalStoreData = exports.companyPassportCreateCompanyOfficersFailure = exports.companyPassportCreateCompanyOfficersSuccess = exports.companyPassportCreateCompanyOfficers = exports.companyPassportUpdateCompanyOfficerFailure = exports.companyPassportUpdateCompanyOfficerSuccess = exports.companyPassportUpdateCompanyOfficer = exports.companyPassportUpdatePrimaryContactFailure = exports.companyPassportUpdatePrimaryContactSuccess = exports.companyPassportUpdatePrimaryContact = exports.
|
|
5
|
-
exports.updateMetaDataOnSendMonthEndReport = void 0;
|
|
4
|
+
exports.updateMetaDataOnSendMonthEndReport = exports.updateCompanyMetaDataOnFailure = exports.updateCompanyMetaDataOnSuccess = exports.fetchCompanyMetaData = exports.updateCompanyDownloadState = exports.updateParentSubsidiaryViewOnFailure = exports.updateParentSubsidiaryView = exports.fetchParentSubsidiaryManagementView = exports.saveCompanyPassportDetails = exports.saveIndustryAndIncDateInCompanyPassportLocalStore = exports.updateCompanyPassportLocalStoreData = exports.companyPassportCreateCompanyOfficersFailure = exports.companyPassportCreateCompanyOfficersSuccess = exports.companyPassportCreateCompanyOfficers = exports.companyPassportUpdateCompanyOfficerFailure = exports.companyPassportUpdateCompanyOfficerSuccess = exports.companyPassportUpdateCompanyOfficer = exports.companyPassportUpdatePrimaryContactFailure = exports.companyPassportUpdatePrimaryContactSuccess = exports.companyPassportUpdatePrimaryContact = exports.companyPassportUpdateCompanyDetailsFailure = exports.companyPassportUpdateCompanyDetailsSuccess = exports.companyPassportUpdateCompanyDetails = exports.companyPassportClearDataInLocalStore = exports.deleteCompanyOfficerInLocalStore = exports.companyPassportSaveDataInLocalStore = exports.updateCompanyManagementUIState = exports.updateCompanyPortfolioUIState = exports.clearCompanyView = exports.updateZeniUsersOnFailure = exports.updateZeniUsersOnSuccess = exports.fetchZeniUsers = exports.fetchCompanyPortfolioView = exports.updateCompanyViewOnFailure = exports.updateCompanyViewOnSuccess = exports.companyManagementSaveUpdatesFailure = exports.companyManagementSaveUpdatesSuccess = exports.companyManagementDiscardUpdates = exports.companyManagementSavePendingUpdates = exports.companyManagementSaveUpdates = exports.fetchCompanyManagementView = exports.fetchPortfolioView = exports.fetchSubscriptionView = exports.fetchManagementView = exports.fetchOnboardingView = exports.fetchAllCockpitViews = exports.fetchCompanyPassportView = exports.initialState = void 0;
|
|
6
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
7
6
|
const parentSubsidiaryViewState_1 = require("./parentSubsidiaryView/parentSubsidiaryViewState");
|
|
8
7
|
const companyManagementViewState_1 = require("./types/companyManagementViewState");
|
|
@@ -289,31 +288,6 @@ const companyView = (0, toolkit_1.createSlice)({
|
|
|
289
288
|
error: status,
|
|
290
289
|
};
|
|
291
290
|
},
|
|
292
|
-
updateAccountingClassesEnabled: {
|
|
293
|
-
reducer(draft,
|
|
294
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
295
|
-
_action) {
|
|
296
|
-
draft.passportView.accountingClassesUpdateStatus = {
|
|
297
|
-
fetchState: 'In-Progress',
|
|
298
|
-
error: undefined,
|
|
299
|
-
};
|
|
300
|
-
},
|
|
301
|
-
prepare(companyId, enabled) {
|
|
302
|
-
return { payload: { companyId, enabled } };
|
|
303
|
-
},
|
|
304
|
-
},
|
|
305
|
-
updateAccountingClassesEnabledSuccess(draft) {
|
|
306
|
-
draft.passportView.accountingClassesUpdateStatus = {
|
|
307
|
-
fetchState: 'Completed',
|
|
308
|
-
error: undefined,
|
|
309
|
-
};
|
|
310
|
-
},
|
|
311
|
-
updateAccountingClassesEnabledFailure(draft, action) {
|
|
312
|
-
draft.passportView.accountingClassesUpdateStatus = {
|
|
313
|
-
fetchState: 'Error',
|
|
314
|
-
error: action.payload.status,
|
|
315
|
-
};
|
|
316
|
-
},
|
|
317
291
|
companyPassportUpdatePrimaryContact: {
|
|
318
292
|
reducer(draft, action) {
|
|
319
293
|
const { primaryContact } = action.payload;
|
|
@@ -587,5 +561,5 @@ const companyView = (0, toolkit_1.createSlice)({
|
|
|
587
561
|
},
|
|
588
562
|
},
|
|
589
563
|
});
|
|
590
|
-
_a = companyView.actions, exports.fetchCompanyPassportView = _a.fetchCompanyPassportView, exports.fetchAllCockpitViews = _a.fetchAllCockpitViews, exports.fetchOnboardingView = _a.fetchOnboardingView, exports.fetchManagementView = _a.fetchManagementView, exports.fetchSubscriptionView = _a.fetchSubscriptionView, exports.fetchPortfolioView = _a.fetchPortfolioView, exports.fetchCompanyManagementView = _a.fetchCompanyManagementView, exports.companyManagementSaveUpdates = _a.companyManagementSaveUpdates, exports.companyManagementSavePendingUpdates = _a.companyManagementSavePendingUpdates, exports.companyManagementDiscardUpdates = _a.companyManagementDiscardUpdates, exports.companyManagementSaveUpdatesSuccess = _a.companyManagementSaveUpdatesSuccess, exports.companyManagementSaveUpdatesFailure = _a.companyManagementSaveUpdatesFailure, exports.updateCompanyViewOnSuccess = _a.updateCompanyViewOnSuccess, exports.updateCompanyViewOnFailure = _a.updateCompanyViewOnFailure, exports.fetchCompanyPortfolioView = _a.fetchCompanyPortfolioView, exports.fetchZeniUsers = _a.fetchZeniUsers, exports.updateZeniUsersOnSuccess = _a.updateZeniUsersOnSuccess, exports.updateZeniUsersOnFailure = _a.updateZeniUsersOnFailure, exports.clearCompanyView = _a.clearCompanyView, exports.updateCompanyPortfolioUIState = _a.updateCompanyPortfolioUIState, exports.updateCompanyManagementUIState = _a.updateCompanyManagementUIState, exports.companyPassportSaveDataInLocalStore = _a.companyPassportSaveDataInLocalStore, exports.deleteCompanyOfficerInLocalStore = _a.deleteCompanyOfficerInLocalStore, exports.companyPassportClearDataInLocalStore = _a.companyPassportClearDataInLocalStore, exports.companyPassportUpdateCompanyDetails = _a.companyPassportUpdateCompanyDetails, exports.companyPassportUpdateCompanyDetailsSuccess = _a.companyPassportUpdateCompanyDetailsSuccess, exports.companyPassportUpdateCompanyDetailsFailure = _a.companyPassportUpdateCompanyDetailsFailure, exports.
|
|
564
|
+
_a = companyView.actions, exports.fetchCompanyPassportView = _a.fetchCompanyPassportView, exports.fetchAllCockpitViews = _a.fetchAllCockpitViews, exports.fetchOnboardingView = _a.fetchOnboardingView, exports.fetchManagementView = _a.fetchManagementView, exports.fetchSubscriptionView = _a.fetchSubscriptionView, exports.fetchPortfolioView = _a.fetchPortfolioView, exports.fetchCompanyManagementView = _a.fetchCompanyManagementView, exports.companyManagementSaveUpdates = _a.companyManagementSaveUpdates, exports.companyManagementSavePendingUpdates = _a.companyManagementSavePendingUpdates, exports.companyManagementDiscardUpdates = _a.companyManagementDiscardUpdates, exports.companyManagementSaveUpdatesSuccess = _a.companyManagementSaveUpdatesSuccess, exports.companyManagementSaveUpdatesFailure = _a.companyManagementSaveUpdatesFailure, exports.updateCompanyViewOnSuccess = _a.updateCompanyViewOnSuccess, exports.updateCompanyViewOnFailure = _a.updateCompanyViewOnFailure, exports.fetchCompanyPortfolioView = _a.fetchCompanyPortfolioView, exports.fetchZeniUsers = _a.fetchZeniUsers, exports.updateZeniUsersOnSuccess = _a.updateZeniUsersOnSuccess, exports.updateZeniUsersOnFailure = _a.updateZeniUsersOnFailure, exports.clearCompanyView = _a.clearCompanyView, exports.updateCompanyPortfolioUIState = _a.updateCompanyPortfolioUIState, exports.updateCompanyManagementUIState = _a.updateCompanyManagementUIState, exports.companyPassportSaveDataInLocalStore = _a.companyPassportSaveDataInLocalStore, exports.deleteCompanyOfficerInLocalStore = _a.deleteCompanyOfficerInLocalStore, exports.companyPassportClearDataInLocalStore = _a.companyPassportClearDataInLocalStore, exports.companyPassportUpdateCompanyDetails = _a.companyPassportUpdateCompanyDetails, exports.companyPassportUpdateCompanyDetailsSuccess = _a.companyPassportUpdateCompanyDetailsSuccess, exports.companyPassportUpdateCompanyDetailsFailure = _a.companyPassportUpdateCompanyDetailsFailure, exports.companyPassportUpdatePrimaryContact = _a.companyPassportUpdatePrimaryContact, exports.companyPassportUpdatePrimaryContactSuccess = _a.companyPassportUpdatePrimaryContactSuccess, exports.companyPassportUpdatePrimaryContactFailure = _a.companyPassportUpdatePrimaryContactFailure, exports.companyPassportUpdateCompanyOfficer = _a.companyPassportUpdateCompanyOfficer, exports.companyPassportUpdateCompanyOfficerSuccess = _a.companyPassportUpdateCompanyOfficerSuccess, exports.companyPassportUpdateCompanyOfficerFailure = _a.companyPassportUpdateCompanyOfficerFailure, exports.companyPassportCreateCompanyOfficers = _a.companyPassportCreateCompanyOfficers, exports.companyPassportCreateCompanyOfficersSuccess = _a.companyPassportCreateCompanyOfficersSuccess, exports.companyPassportCreateCompanyOfficersFailure = _a.companyPassportCreateCompanyOfficersFailure, exports.updateCompanyPassportLocalStoreData = _a.updateCompanyPassportLocalStoreData, exports.saveIndustryAndIncDateInCompanyPassportLocalStore = _a.saveIndustryAndIncDateInCompanyPassportLocalStore, exports.saveCompanyPassportDetails = _a.saveCompanyPassportDetails, exports.fetchParentSubsidiaryManagementView = _a.fetchParentSubsidiaryManagementView, exports.updateParentSubsidiaryView = _a.updateParentSubsidiaryView, exports.updateParentSubsidiaryViewOnFailure = _a.updateParentSubsidiaryViewOnFailure, exports.updateCompanyDownloadState = _a.updateCompanyDownloadState, exports.fetchCompanyMetaData = _a.fetchCompanyMetaData, exports.updateCompanyMetaDataOnSuccess = _a.updateCompanyMetaDataOnSuccess, exports.updateCompanyMetaDataOnFailure = _a.updateCompanyMetaDataOnFailure, exports.updateMetaDataOnSendMonthEndReport = _a.updateMetaDataOnSendMonthEndReport;
|
|
591
565
|
exports.default = companyView.reducer;
|
|
@@ -4,7 +4,6 @@ import { CompanyDetailsLocalData } from '../companyPassport/companyDetailsLocalD
|
|
|
4
4
|
import { CompanyOfficerLocalData, CompanyOfficerType, PrimaryContactLocalData } from '../companyPassport/companyUsersLocalData';
|
|
5
5
|
export type UpdateActionType = 'company_update' | 'user_create' | 'user_update';
|
|
6
6
|
export interface CompanyPassportViewState extends CommonState, FetchedState {
|
|
7
|
-
accountingClassesUpdateStatus: FetchStateAndError;
|
|
8
7
|
companyDetails: {
|
|
9
8
|
updateStatus: FetchStateAndError;
|
|
10
9
|
localData?: CompanyDetailsLocalData;
|
|
@@ -4,10 +4,6 @@ exports.initialCompanyPassportView = void 0;
|
|
|
4
4
|
const commonState_1 = require("../commonState");
|
|
5
5
|
exports.initialCompanyPassportView = {
|
|
6
6
|
...commonState_1.initialCommonState,
|
|
7
|
-
accountingClassesUpdateStatus: {
|
|
8
|
-
fetchState: 'Not-Started',
|
|
9
|
-
error: undefined,
|
|
10
|
-
},
|
|
11
7
|
companyDetails: {
|
|
12
8
|
localData: undefined,
|
|
13
9
|
updateStatus: {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { DashboardState } from './dashboardState';
|
|
2
2
|
export declare const initialState: DashboardState;
|
|
3
|
-
export declare const fetchDashboard: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[userId: string, companyId: string, tenantId: string, fetchFullReport?: any, cacheOverride?: any, excludeResources?: ("cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card"
|
|
3
|
+
export declare const fetchDashboard: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[userId: string, companyId: string, tenantId: string, fetchFullReport?: any, cacheOverride?: any, excludeResources?: ("cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card")[] | undefined], {
|
|
4
4
|
userId: string;
|
|
5
5
|
companyId: string;
|
|
6
6
|
tenantId: string;
|
|
7
7
|
fetchFullReport: any;
|
|
8
8
|
cacheOverride: any;
|
|
9
|
-
excludeResources: ("cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card"
|
|
9
|
+
excludeResources: ("cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card")[];
|
|
10
10
|
}, "dashboard/fetchDashboard", never, never>, updateTreasuryVideoClosed: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"dashboard/updateTreasuryVideoClosed">, clearDashboard: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"dashboard/clearDashboard">;
|
|
11
11
|
declare const _default: import("redux").Reducer<DashboardState>;
|
|
12
12
|
export default _default;
|
|
@@ -56,17 +56,22 @@ const fetchReconciliationViewEpic = (actions$, state$, zeniAPI) => actions$.pipe
|
|
|
56
56
|
return zeniAPI.getJSON(apiUrl).pipe((0, operators_1.mergeMap)((response) => {
|
|
57
57
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
58
58
|
const updateActions = [];
|
|
59
|
-
|
|
60
|
-
updateActions.push((0,
|
|
59
|
+
updateActions.push((0, accountReducer_1.updateAccounts)(response.data.accounts, 'account_reconciliation'));
|
|
60
|
+
updateActions.push((0, userReducer_1.updateAllUsers)({
|
|
61
61
|
users: response.data.users ?? [],
|
|
62
62
|
updateType: 'merge',
|
|
63
|
-
})
|
|
63
|
+
}));
|
|
64
|
+
updateActions.push((0, fileReducer_1.updateFiles)({ files: response.data.files ?? [] }));
|
|
65
|
+
const allTransactionsPerRecon = (0, reconciliationHelpers_1.getAllReviewTransactionsFromReconcilePayload)(response.data.reconciliation);
|
|
66
|
+
updateActions.push((0, transactionReducer_1.updateMultipleReconcileTransactions)(allTransactionsPerRecon, 'merge'));
|
|
67
|
+
updateActions.push((0, accountReconReducer_1.updateAccountRecon)(selectedPeriod, response.data.reconciliation));
|
|
64
68
|
const reviewTabLocalData = (0, exports.prepareReviewTabLocalData)(response.data.reconciliation[0]?.transactions?.review ?? []);
|
|
65
69
|
if (accountId != null) {
|
|
66
70
|
const selectedTransactionIds = (0, saveReconciliationDetailEpic_1.getTransactionIdFromCheckedMatchedTransactionPayload)(response.data.reconciliation[0].transactions.reconcile);
|
|
67
71
|
updateActions.push((0, reconciliationViewReducer_1.updateReconcileTabLocalData)({
|
|
68
72
|
selectedTransactionIds: selectedTransactionIds,
|
|
69
|
-
})
|
|
73
|
+
}));
|
|
74
|
+
updateActions.push((0, reconciliationViewReducer_1.initializeReconciliationReviewTabLocalData)(reviewTabLocalData));
|
|
70
75
|
}
|
|
71
76
|
updateActions.push((0, reconciliationViewReducer_1.fetchReconciliationSuccess)(selectedPeriod, response.data, refreshViewInBackground, accountId));
|
|
72
77
|
return (0, rxjs_1.from)(updateActions);
|
package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ export declare const getLineItemsByTransactionsIdsFromResponse: (transactions: S
|
|
|
37
37
|
export declare const getLineItemsByTransactionIdsFromLocalData: (transactionLocalData: TransactionReviewLocalDataSelectorView[], selectedTab: TransactionsTab) => Record<ID, string[]>;
|
|
38
38
|
export declare const mergeTabSpecificLineItems: (currentTabSpecificLineItems: TabSpecificLineItems, selectedTab: TransactionsTab, newLineItems: TabSpecificLineItems) => TabSpecificLineItems;
|
|
39
39
|
export declare const getSnackbarMessageForTransactionReview: (updatedCount: number, failedCount: number, categorizedCount: number) => {
|
|
40
|
-
messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipt_match" | "receipts_upload" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "reconcile" | "save_reconcile_for_later" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "auto_transfer_rule_create" | "auto_transfer_rule_update" | "auto_transfer_rule_delete" | "auto_transfer_rule_pause" | "auto_transfer_rule_resume" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "reports_resync" | "invalid_phone_number" | "transactions_categorized_updated_failed" | "transaction_categorized_updated_failed" | "transactionsCategorized_transactionsUpdated" | "transactionsCategorized_transactionUpdated" | "transactionCategorized_transactionsUpdated" | "transactionCategorized_transactionUpdated" | "transactionsCategorized_transactionsFailed" | "transactionsCategorized_transactionFailed" | "transactionCategorized_transactionsFailed" | "transactionCategorized_transactionFailed" | "transactionsUpdated_transactionsFailed" | "transactionsUpdated_transactionFailed" | "transactionUpdated_transactionsFailed" | "transactionUpdated_transactionFailed" | "transactionsCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionsUpdated_transactionFailed" | "transactionsCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionUpdated_transactionFailed" | "transactionCategorized_transactionsUpdated_transactionFailed" | "transactionCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionUpdated_transactionFailed"
|
|
40
|
+
messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipt_match" | "receipts_upload" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "reconcile" | "save_reconcile_for_later" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "auto_transfer_rule_create" | "auto_transfer_rule_update" | "auto_transfer_rule_delete" | "auto_transfer_rule_pause" | "auto_transfer_rule_resume" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "reports_resync" | "invalid_phone_number" | "transactions_categorized_updated_failed" | "transaction_categorized_updated_failed" | "transactionsCategorized_transactionsUpdated" | "transactionsCategorized_transactionUpdated" | "transactionCategorized_transactionsUpdated" | "transactionCategorized_transactionUpdated" | "transactionsCategorized_transactionsFailed" | "transactionsCategorized_transactionFailed" | "transactionCategorized_transactionsFailed" | "transactionCategorized_transactionFailed" | "transactionsUpdated_transactionsFailed" | "transactionsUpdated_transactionFailed" | "transactionUpdated_transactionsFailed" | "transactionUpdated_transactionFailed" | "transactionsCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionsUpdated_transactionFailed" | "transactionsCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionUpdated_transactionFailed" | "transactionCategorized_transactionsUpdated_transactionFailed" | "transactionCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionUpdated_transactionFailed";
|
|
41
41
|
messageText: "notification" | "success" | "failed";
|
|
42
42
|
type: "error" | "success" | "info";
|
|
43
43
|
variables: {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { StatusCodeWithLabelPayload } from '../../../commonPayloadTypes/statusPayload';
|
|
2
|
-
import { ID } from '../../../commonStateTypes/common';
|
|
3
2
|
import { MonthYearPeriod } from '../../../commonStateTypes/timePeriod';
|
|
4
3
|
import { AccountPayload } from '../../../entity/account/accountPayload';
|
|
5
4
|
import { ReconciliationDataPayload, StatementMetaDataPayload, TransactionsToReviewPayload } from '../../../entity/accountRecon/accountReconPayload';
|
|
@@ -10,35 +9,14 @@ import { UserPayload } from '../../../entity/user/userPayload';
|
|
|
10
9
|
import { RootState } from '../../../reducer';
|
|
11
10
|
import { ZeniAPIResponse } from '../../../responsePayload';
|
|
12
11
|
import { BalancesLocalData, SaveReconcileDetailActionPayload } from '../types/reconciliationViewState';
|
|
13
|
-
export interface DetectionInfoPayload {
|
|
14
|
-
account_id: string;
|
|
15
|
-
bank_balance: number | null;
|
|
16
|
-
cleared_balance: number | null;
|
|
17
|
-
variance: number | null;
|
|
18
|
-
currency_code?: string;
|
|
19
|
-
currency_symbol?: string;
|
|
20
|
-
}
|
|
21
12
|
export interface AccountAndPaymentAccountPayload extends AccountPayload {
|
|
22
13
|
payment_account_id: string | null;
|
|
23
|
-
detection_info?: DetectionInfoPayload;
|
|
24
|
-
detection_reason?: string;
|
|
25
|
-
}
|
|
26
|
-
interface ExclusionInfoPayload {
|
|
27
|
-
bank_balance: number | null;
|
|
28
|
-
cleared_balance: number | null;
|
|
29
|
-
variance: number | null;
|
|
30
|
-
}
|
|
31
|
-
export interface ExcludedAccountPayload extends AccountAndPaymentAccountPayload {
|
|
32
|
-
exclusion_info: ExclusionInfoPayload;
|
|
33
14
|
}
|
|
34
15
|
export interface ReconciliationPayload {
|
|
35
16
|
accounts: AccountAndPaymentAccountPayload[];
|
|
36
17
|
files: FilePayload[];
|
|
37
18
|
reconciliation: ReconciliationDataPayload[];
|
|
38
19
|
users: UserPayload[];
|
|
39
|
-
detection_info?: DetectionInfoPayload;
|
|
40
|
-
detection_reason?: string;
|
|
41
|
-
excluded_accounts?: ExcludedAccountPayload[];
|
|
42
20
|
}
|
|
43
21
|
export type ReconciliationResponse = ZeniAPIResponse<ReconciliationPayload>;
|
|
44
22
|
export interface SaveReconciliationReviewPayload {
|
|
@@ -51,28 +29,6 @@ export declare function createSaveReconciliationPayloadBasedOnActionAndMethod(st
|
|
|
51
29
|
review: TransactionsToReviewPayload[];
|
|
52
30
|
};
|
|
53
31
|
};
|
|
54
|
-
export interface ExcludeAccountFromReconciliationRequestPayload {
|
|
55
|
-
account_id: ID;
|
|
56
|
-
bank_balance: number;
|
|
57
|
-
cleared_balance: number;
|
|
58
|
-
variance: number;
|
|
59
|
-
}
|
|
60
|
-
export interface ExcludedAccountFromReconciliationPayload {
|
|
61
|
-
account_id: ID;
|
|
62
|
-
bank_balance: number | null;
|
|
63
|
-
cleared_balance: number | null;
|
|
64
|
-
variance: number | null;
|
|
65
|
-
currency_code?: string;
|
|
66
|
-
currency_symbol?: string;
|
|
67
|
-
}
|
|
68
|
-
export interface ExcludeAccountFromReconciliationResponsePayload {
|
|
69
|
-
excluded_account: ExcludedAccountFromReconciliationPayload;
|
|
70
|
-
}
|
|
71
|
-
export type ExcludeAccountFromReconciliationResponse = ZeniAPIResponse<ExcludeAccountFromReconciliationResponsePayload>;
|
|
72
|
-
export interface IncludeAccountInReconciliationResponsePayload {
|
|
73
|
-
reconciliation: ReconciliationDataPayload;
|
|
74
|
-
}
|
|
75
|
-
export type IncludeAccountInReconciliationResponse = ZeniAPIResponse<IncludeAccountInReconciliationResponsePayload>;
|
|
76
32
|
export interface DeleteStatementResponsePayload {
|
|
77
33
|
statement_upload: {
|
|
78
34
|
statement_data_status: StatusCodeWithLabelPayload;
|
|
@@ -98,4 +54,3 @@ export interface UploadStatementResponsePayload {
|
|
|
98
54
|
};
|
|
99
55
|
}
|
|
100
56
|
export type UploadStatementResponse = ZeniAPIResponse<UploadStatementResponsePayload>;
|
|
101
|
-
export {};
|
|
@@ -48,8 +48,7 @@ exports.initialState = {
|
|
|
48
48
|
uiState: {
|
|
49
49
|
searchString: '',
|
|
50
50
|
scrollPosition: { scrollTop: 0, scrollLeft: undefined },
|
|
51
|
-
|
|
52
|
-
sortKey: 'transactionDate',
|
|
51
|
+
sortKey: 'startMonth',
|
|
53
52
|
sortOrder: 'descending',
|
|
54
53
|
totalCount: 0,
|
|
55
54
|
limit: 10,
|
|
@@ -385,9 +384,6 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
|
|
|
385
384
|
if (action.payload.scrollPosition != null) {
|
|
386
385
|
draft.uiState.scrollPosition = action.payload.scrollPosition;
|
|
387
386
|
}
|
|
388
|
-
if (action.payload.selectedMainTab != null) {
|
|
389
|
-
draft.uiState.selectedMainTab = action.payload.selectedMainTab;
|
|
390
|
-
}
|
|
391
387
|
},
|
|
392
388
|
clearExpenseAutomationJESchedulesView(draft) {
|
|
393
389
|
Object.assign(draft, exports.initialState);
|
|
@@ -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;
|
|
@@ -110,9 +99,6 @@ export declare const fetchReconciliation: import("@reduxjs/toolkit").ActionCreat
|
|
|
110
99
|
selectedPeriod: MonthYearPeriod;
|
|
111
100
|
}, "expenseAutomationReconciliationView/uploadAccountStatementFailure">, updateStatementUploadChosen: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
112
101
|
statementUploadChosen: boolean;
|
|
113
|
-
}, "expenseAutomationReconciliationView/updateStatementUploadChosen"
|
|
114
|
-
collapsed: boolean;
|
|
115
|
-
nodeId: ID;
|
|
116
|
-
}, "expenseAutomationReconciliationView/updateNodeCollapseState">;
|
|
102
|
+
}, "expenseAutomationReconciliationView/updateStatementUploadChosen">;
|
|
117
103
|
declare const _default: import("redux").Reducer<ReconciliationViewState>;
|
|
118
104
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
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',
|
|
@@ -73,12 +64,10 @@ exports.initialState = {
|
|
|
73
64
|
selectedAccountId: undefined,
|
|
74
65
|
statementUploadChosen: false,
|
|
75
66
|
reconListUIState: {
|
|
76
|
-
nodeCollapseState: {},
|
|
77
67
|
scrollPosition: {
|
|
78
68
|
scrollTop: 0,
|
|
79
69
|
},
|
|
80
70
|
},
|
|
81
|
-
excludedAccountIDs: [],
|
|
82
71
|
};
|
|
83
72
|
// Create slice with reducers
|
|
84
73
|
const expenseAutomationReconciliationView = (0, toolkit_1.createSlice)({
|
|
@@ -147,7 +136,7 @@ const expenseAutomationReconciliationView = (0, toolkit_1.createSlice)({
|
|
|
147
136
|
fetchReconciliationSuccess: {
|
|
148
137
|
reducer(draft, action) {
|
|
149
138
|
if (action.payload.accountId == null) {
|
|
150
|
-
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);
|
|
151
140
|
}
|
|
152
141
|
else if (action.payload.reconciliation.reconciliation.length > 0 &&
|
|
153
142
|
action.payload.reconciliation.accounts.length > 0) {
|
|
@@ -359,10 +348,6 @@ const expenseAutomationReconciliationView = (0, toolkit_1.createSlice)({
|
|
|
359
348
|
updateReconListScrollPosition: (draft, action) => {
|
|
360
349
|
draft.reconListUIState.scrollPosition = action.payload.scrollPosition;
|
|
361
350
|
},
|
|
362
|
-
updateNodeCollapseState: (draft, action) => {
|
|
363
|
-
draft.reconListUIState.nodeCollapseState[action.payload.nodeId] =
|
|
364
|
-
action.payload.collapsed;
|
|
365
|
-
},
|
|
366
351
|
setConnectionInProgressForAccount: (draft, action) => {
|
|
367
352
|
if (draft.accountConnectionStatusByAccountID[action.payload.accountId] ==
|
|
368
353
|
null) {
|
|
@@ -440,85 +425,6 @@ const expenseAutomationReconciliationView = (0, toolkit_1.createSlice)({
|
|
|
440
425
|
...localData,
|
|
441
426
|
};
|
|
442
427
|
},
|
|
443
|
-
excludeAccountFromReconciliation: {
|
|
444
|
-
reducer(draft) {
|
|
445
|
-
draft.actionFetchState.excludeAccountFetch = {
|
|
446
|
-
fetchState: 'In-Progress',
|
|
447
|
-
error: undefined,
|
|
448
|
-
};
|
|
449
|
-
},
|
|
450
|
-
prepare(payload) {
|
|
451
|
-
return { payload };
|
|
452
|
-
},
|
|
453
|
-
},
|
|
454
|
-
excludeAccountFromReconciliationSuccess: (draft, action) => {
|
|
455
|
-
draft.actionFetchState.excludeAccountFetch = {
|
|
456
|
-
fetchState: 'Completed',
|
|
457
|
-
error: undefined,
|
|
458
|
-
};
|
|
459
|
-
const { account, selectedPeriod } = action.payload;
|
|
460
|
-
if (account != null) {
|
|
461
|
-
if (!draft.excludedAccountIDs.includes(account.account_id)) {
|
|
462
|
-
draft.excludedAccountIDs.push(account.account_id);
|
|
463
|
-
}
|
|
464
|
-
updateExcludedAccountExclusionInfo(draft, account);
|
|
465
|
-
const monthYearPeriodId = (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod);
|
|
466
|
-
if (draft.accountReconciliationRecordsBySelectedPeriod[monthYearPeriodId]
|
|
467
|
-
?.accountIDs != null) {
|
|
468
|
-
draft.accountReconciliationRecordsBySelectedPeriod[monthYearPeriodId].accountIDs = draft.accountReconciliationRecordsBySelectedPeriod[monthYearPeriodId].accountIDs.filter((id) => id !== account.account_id);
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
},
|
|
472
|
-
excludeAccountFromReconciliationFailure: (draft, action) => {
|
|
473
|
-
draft.actionFetchState.excludeAccountFetch = {
|
|
474
|
-
fetchState: 'Error',
|
|
475
|
-
error: action.payload.error,
|
|
476
|
-
};
|
|
477
|
-
},
|
|
478
|
-
includeAccountInReconciliation: {
|
|
479
|
-
reducer(draft) {
|
|
480
|
-
draft.actionFetchState.includeAccountFetch = {
|
|
481
|
-
fetchState: 'In-Progress',
|
|
482
|
-
error: undefined,
|
|
483
|
-
};
|
|
484
|
-
},
|
|
485
|
-
prepare(payload) {
|
|
486
|
-
return { payload };
|
|
487
|
-
},
|
|
488
|
-
},
|
|
489
|
-
includeAccountInReconciliationSuccess: (draft, action) => {
|
|
490
|
-
draft.actionFetchState.includeAccountFetch = {
|
|
491
|
-
fetchState: 'Completed',
|
|
492
|
-
error: undefined,
|
|
493
|
-
};
|
|
494
|
-
const { reconciliation, selectedPeriod } = action.payload;
|
|
495
|
-
if (reconciliation == null) {
|
|
496
|
-
return;
|
|
497
|
-
}
|
|
498
|
-
const accountId = reconciliation.account_id;
|
|
499
|
-
draft.excludedAccountIDs = draft.excludedAccountIDs.filter((id) => id !== accountId);
|
|
500
|
-
delete draft.excludedAccountExclusionInfo[accountId];
|
|
501
|
-
const monthYearPeriodId = (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod);
|
|
502
|
-
const accountReconciliationRecords = draft.accountReconciliationRecordsBySelectedPeriod[monthYearPeriodId];
|
|
503
|
-
if (accountReconciliationRecords != null) {
|
|
504
|
-
if (!accountReconciliationRecords.accountIDs.includes(accountId)) {
|
|
505
|
-
accountReconciliationRecords.accountIDs.push(accountId);
|
|
506
|
-
}
|
|
507
|
-
// put this in a function
|
|
508
|
-
updateReconciliationByAccountIDOnIncludeAccount(draft, accountId, reconciliation, monthYearPeriodId);
|
|
509
|
-
}
|
|
510
|
-
draft.accountConnectionStatusByAccountID[accountId] = {
|
|
511
|
-
status: (0, accountReconState_1.toBankStatusCodeType)(reconciliation.bank_status.code),
|
|
512
|
-
connectionInProgress: false,
|
|
513
|
-
paymentAccountId: undefined,
|
|
514
|
-
};
|
|
515
|
-
},
|
|
516
|
-
includeAccountInReconciliationFailure: (draft, action) => {
|
|
517
|
-
draft.actionFetchState.includeAccountFetch = {
|
|
518
|
-
fetchState: 'Error',
|
|
519
|
-
error: action.payload.error,
|
|
520
|
-
};
|
|
521
|
-
},
|
|
522
428
|
updateStatementUploadChosen: (draft, action) => {
|
|
523
429
|
draft.statementUploadChosen = action.payload.statementUploadChosen;
|
|
524
430
|
},
|
|
@@ -528,38 +434,10 @@ const expenseAutomationReconciliationView = (0, toolkit_1.createSlice)({
|
|
|
528
434
|
},
|
|
529
435
|
});
|
|
530
436
|
// Export actions
|
|
531
|
-
_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;
|
|
532
438
|
// Export reducer
|
|
533
439
|
exports.default = expenseAutomationReconciliationView.reducer;
|
|
534
|
-
function updateAllReconciliation(draft, accounts, selectedPeriod, reconciliationData, refreshViewInBackground
|
|
535
|
-
draft.excludedAccountIDs = excludedAccounts.map((ea) => ea.account_id);
|
|
536
|
-
draft.excludedAccountExclusionInfo = {};
|
|
537
|
-
excludedAccounts.forEach((ea) => {
|
|
538
|
-
const { exclusion_info } = ea;
|
|
539
|
-
draft.excludedAccountExclusionInfo[ea.account_id] = {
|
|
540
|
-
bankBalance: exclusion_info.bank_balance != null
|
|
541
|
-
? {
|
|
542
|
-
amount: exclusion_info.bank_balance,
|
|
543
|
-
currencyCode: ea.currency_code ?? 'USD',
|
|
544
|
-
currencySymbol: ea.currency_symbol ?? '$',
|
|
545
|
-
}
|
|
546
|
-
: undefined,
|
|
547
|
-
clearedBalance: exclusion_info.cleared_balance != null
|
|
548
|
-
? {
|
|
549
|
-
amount: exclusion_info.cleared_balance,
|
|
550
|
-
currencyCode: ea.currency_code ?? 'USD',
|
|
551
|
-
currencySymbol: ea.currency_symbol ?? '$',
|
|
552
|
-
}
|
|
553
|
-
: undefined,
|
|
554
|
-
variance: exclusion_info.variance != null
|
|
555
|
-
? {
|
|
556
|
-
amount: exclusion_info.variance,
|
|
557
|
-
currencyCode: ea.currency_code ?? 'USD',
|
|
558
|
-
currencySymbol: ea.currency_symbol ?? '$',
|
|
559
|
-
}
|
|
560
|
-
: undefined,
|
|
561
|
-
};
|
|
562
|
-
});
|
|
440
|
+
function updateAllReconciliation(draft, accounts, selectedPeriod, reconciliationData, refreshViewInBackground) {
|
|
563
441
|
draft.accountReconciliationRecordsBySelectedPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = {
|
|
564
442
|
accountIDs: [],
|
|
565
443
|
reconciliationByAccountID: {},
|
|
@@ -597,9 +475,6 @@ function updateAllReconciliation(draft, accounts, selectedPeriod, reconciliation
|
|
|
597
475
|
? (0, accountState_1.toReconciliationAccountSource)(account.reconciliation_source)
|
|
598
476
|
: undefined,
|
|
599
477
|
},
|
|
600
|
-
accountDetectionReason: account?.detection_info != null && account.detection_reason != null
|
|
601
|
-
? account.detection_reason
|
|
602
|
-
: undefined,
|
|
603
478
|
};
|
|
604
479
|
accountReconciliationRecords.accountIDs.push(reconciliation.account_id);
|
|
605
480
|
});
|
|
@@ -645,42 +520,3 @@ function updateReconciliationByAccountID(draft, accounts, selectedPeriod, accoun
|
|
|
645
520
|
};
|
|
646
521
|
}
|
|
647
522
|
}
|
|
648
|
-
const updateExcludedAccountExclusionInfo = (draft, account) => {
|
|
649
|
-
draft.excludedAccountExclusionInfo[account.account_id] = {
|
|
650
|
-
bankBalance: account.bank_balance != null
|
|
651
|
-
? {
|
|
652
|
-
amount: account.bank_balance,
|
|
653
|
-
currencyCode: account.currency_code ?? 'USD',
|
|
654
|
-
currencySymbol: account.currency_symbol ?? '$',
|
|
655
|
-
}
|
|
656
|
-
: undefined,
|
|
657
|
-
clearedBalance: account.cleared_balance != null
|
|
658
|
-
? {
|
|
659
|
-
amount: account.cleared_balance,
|
|
660
|
-
currencyCode: account.currency_code ?? 'USD',
|
|
661
|
-
currencySymbol: account.currency_symbol ?? '$',
|
|
662
|
-
}
|
|
663
|
-
: undefined,
|
|
664
|
-
variance: account.variance != null
|
|
665
|
-
? {
|
|
666
|
-
amount: account.variance,
|
|
667
|
-
currencyCode: account.currency_code ?? 'USD',
|
|
668
|
-
currencySymbol: account.currency_symbol ?? '$',
|
|
669
|
-
}
|
|
670
|
-
: undefined,
|
|
671
|
-
};
|
|
672
|
-
};
|
|
673
|
-
const updateReconciliationByAccountIDOnIncludeAccount = (draft, accountId, reconciliation, monthYearPeriodId) => {
|
|
674
|
-
draft.accountReconciliationRecordsBySelectedPeriod[monthYearPeriodId].reconciliationByAccountID[accountId] = {
|
|
675
|
-
accountId,
|
|
676
|
-
reconciliationId: reconciliation.reconciliation_id ?? undefined,
|
|
677
|
-
transactionFetchState: { fetchState: 'Not-Started', error: undefined },
|
|
678
|
-
refreshStatus: { fetchState: 'Not-Started', error: undefined },
|
|
679
|
-
statementDeleteStatus: { fetchState: 'Not-Started', error: undefined },
|
|
680
|
-
statementUploadStatus: { fetchState: 'Not-Started', error: undefined },
|
|
681
|
-
statementUpdateStatus: { fetchState: 'Not-Started', error: undefined },
|
|
682
|
-
statementParseInProgress: reconciliation.bank_status.code === 'parsing',
|
|
683
|
-
localData: {},
|
|
684
|
-
accountDetectionReason: undefined,
|
|
685
|
-
};
|
|
686
|
-
};
|