@zeniai/client-epic-state 4.15.42 → 4.15.44
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/README.md +19 -1
- package/lib/commonPayloadTypes/recommendationPayload.d.ts +1 -0
- package/lib/commonStateTypes/common.d.ts +1 -1
- package/lib/commonStateTypes/fiscalYearHelpers/getFYMonths.d.ts +2 -2
- package/lib/commonStateTypes/fiscalYearHelpers/getFYQuarterAndYear.d.ts +2 -2
- package/lib/commonStateTypes/timePeriod.d.ts +7 -7
- package/lib/commonStateTypes/timePeriod.js +2 -2
- package/lib/commonStateTypes/viewAndReport/agingReportStateTypes.d.ts +1 -1
- package/lib/commonStateTypes/viewAndReport/agingReportStateTypes.js +1 -1
- package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
- package/lib/configureStore.js +2 -1
- package/lib/entity/account/accountSelector.d.ts +3 -3
- package/lib/entity/account/accountState.d.ts +1 -1
- package/lib/entity/account/pickAndMergeForecastAccountReport.d.ts +1 -1
- package/lib/entity/accountGroup/accountGroupSelector.d.ts +22 -22
- package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
- package/lib/entity/accountRecon/accountReconPayload.d.ts +70 -0
- package/lib/entity/accountRecon/accountReconPayload.js +125 -0
- package/lib/entity/accountRecon/accountReconReducer.d.ts +16 -0
- package/lib/entity/accountRecon/accountReconReducer.js +71 -0
- package/lib/entity/accountRecon/accountReconSelector.d.ts +28 -0
- package/lib/entity/accountRecon/accountReconSelector.js +44 -0
- package/lib/entity/accountRecon/accountReconState.d.ts +70 -0
- package/lib/entity/accountRecon/accountReconState.js +28 -0
- package/lib/entity/approvalRule/approvalRuleState.d.ts +2 -2
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +4 -4
- package/lib/entity/chargeCard/chargeCard.d.ts +1 -1
- package/lib/entity/chargeCardTransaction/chargeCardTransaction.d.ts +1 -1
- package/lib/entity/class/classReducer.d.ts +4 -4
- package/lib/entity/class/classState.d.ts +1 -1
- package/lib/entity/company/companyReducer.js +0 -1
- package/lib/entity/customer/customerPayload.d.ts +1 -1
- package/lib/entity/customer/customerPayload.js +16 -6
- package/lib/entity/depositAccountTransaction/depositAccountTransaction.d.ts +1 -1
- package/lib/entity/entityApprovalStatus/entityApprovalStatusState.d.ts +2 -2
- package/lib/entity/file/fileState.d.ts +3 -3
- package/lib/entity/forecast/forecastState.d.ts +1 -1
- package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +2 -2
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +2 -2
- package/lib/entity/notification/types/notificationTypes.d.ts +2 -2
- 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 +2 -2
- package/lib/entity/snackbar/snackbarTypes.js +4 -0
- package/lib/entity/task/taskState.d.ts +3 -3
- package/lib/entity/tenant/clearAllEpic.d.ts +4 -2
- package/lib/entity/tenant/clearAllEpic.js +4 -0
- package/lib/entity/tenant/tenantReducer.d.ts +2 -2
- package/lib/entity/tenant/tenantReducer.js +0 -1
- package/lib/entity/transaction/payloadTypes/customerTransactionPayload.d.ts +1 -1
- package/lib/entity/transaction/payloadTypes/customerTransactionPayload.js +1 -2
- package/lib/entity/transaction/payloadTypes/reconciliationTransactionPayloads.d.ts +35 -0
- package/lib/entity/transaction/payloadTypes/reconciliationTransactionPayloads.js +53 -0
- package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +2 -0
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +9 -6
- package/lib/entity/transaction/payloadTypes/vendorTransactionPayload.d.ts +9 -1
- package/lib/entity/transaction/payloadTypes/vendorTransactionPayload.js +24 -2
- package/lib/entity/transaction/stateTypes/attachment.d.ts +2 -2
- package/lib/entity/transaction/stateTypes/reconciliationTransaction.d.ts +32 -0
- package/lib/entity/transaction/stateTypes/reconciliationTransaction.js +10 -0
- package/lib/entity/transaction/stateTypes/transaction.d.ts +3 -1
- package/lib/entity/transaction/stateTypes/transactionType.d.ts +1 -1
- package/lib/entity/transaction/stateTypes/transactionType.js +1 -1
- package/lib/entity/transaction/stateTypes/vendorTransaction.d.ts +5 -0
- package/lib/entity/transaction/stateTypes/vendorTransaction.js +5 -1
- package/lib/entity/transaction/toSupportedTransaction.js +6 -1
- package/lib/entity/transaction/transactionReducer.d.ts +17 -0
- package/lib/entity/transaction/transactionReducer.js +47 -2
- package/lib/entity/transaction/transactionSelector.d.ts +2 -0
- package/lib/entity/transaction/transactionSelector.js +5 -0
- package/lib/entity/transaction/transactionState.d.ts +6 -4
- package/lib/entity/vendorExpense/vendorExpenseReducer.js +0 -1
- package/lib/entity/vendorExpense/vendorExpenseSelector.d.ts +2 -2
- package/lib/epic.d.ts +6 -1
- package/lib/epic.js +6 -1
- package/lib/index.d.ts +22 -13
- package/lib/index.js +56 -27
- package/lib/init.d.ts +2 -1
- package/lib/init.js +9 -2
- package/lib/reducer.d.ts +7 -1
- package/lib/reducer.js +6 -0
- package/lib/view/accountList/accountListReducer.js +1 -3
- package/lib/view/accountMappingView/accountMappingReducer.js +0 -1
- package/lib/view/apAgingView/apAgingDetail/apAgingDetailReducer.js +1 -2
- package/lib/view/auditReportView/auditReportViewReducer.d.ts +2 -2
- package/lib/view/auditReportView/auditReportViewState.d.ts +2 -2
- package/lib/view/balanceSheet/balanceSheetReducer.js +1 -6
- package/lib/view/bankAccountView/bankAccountViewReducer.js +0 -1
- package/lib/view/billPayCard/billPayCardSelector.d.ts +2 -2
- package/lib/view/cardBalance/cardBalanceSelector.d.ts +3 -3
- package/lib/view/cashBalance/cashBalanceSelector.d.ts +3 -3
- package/lib/view/cashFlow/cashFlowReducer.js +1 -4
- package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +2 -2
- package/lib/view/cashPosition/cashPositionReducer.js +0 -1
- package/lib/view/cashPosition/cashPositionSelector.d.ts +2 -2
- package/lib/view/common/reportsHelpers.d.ts +1 -1
- package/lib/view/commonVendorView/transactionVendorView/epics/saveTransactionVendorEpic.js +7 -0
- package/lib/view/commonVendorView/vendorView/epics/fetchAndUpdateVendorRecommendationsEpic.js +1 -3
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewReducer.d.ts +2 -2
- package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.d.ts +2 -2
- package/lib/view/companyView/companyViewReducer.d.ts +1 -1
- package/lib/view/companyView/companyViewReducer.js +1 -10
- package/lib/view/companyView/types/cockpitTypes.d.ts +3 -3
- package/lib/view/companyView/types/companyPassport/companyUsersLocalData.d.ts +1 -1
- package/lib/view/dashboard/dashboardEpic.js +0 -2
- package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.d.ts +15 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +118 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/initialiseLocalDataForSelectedAccountIdEpic.d.ts +10 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/initialiseLocalDataForSelectedAccountIdEpic.js +49 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationDetailEpic.d.ts +14 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationDetailEpic.js +169 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationReviewEpic.d.ts +9 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationReviewEpic.js +154 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/updateReconcileTabLocalDataEpic.d.ts +6 -0
- package/lib/view/expenseAutomationView/epics/accountRecon/updateReconcileTabLocalDataEpic.js +110 -0
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.d.ts +2 -1
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +24 -10
- package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.d.ts +2 -1
- package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +14 -0
- package/lib/view/expenseAutomationView/epics/transactionCategorization/updateTransactionCategorizationEpic.js +30 -7
- package/lib/view/expenseAutomationView/expenseAutomationViewReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/expenseAutomationViewReducer.js +1 -5
- package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +17 -2
- package/lib/view/expenseAutomationView/expenseAutomationViewState.d.ts +2 -2
- package/lib/view/expenseAutomationView/expenseAutomationViewState.js +1 -1
- package/lib/view/expenseAutomationView/helpers/reconciliationHelpers.d.ts +7 -0
- package/lib/view/expenseAutomationView/helpers/reconciliationHelpers.js +18 -0
- package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +98 -42
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +86 -10
- package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +28 -0
- package/lib/view/expenseAutomationView/payload/reconciliationPayload.js +51 -0
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +11 -11
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +66 -0
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +384 -0
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +12 -1
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +66 -7
- package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.d.ts +2 -0
- package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.js +1 -1
- package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +51 -0
- package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +7 -0
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +5 -2
- package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.d.ts +5 -0
- package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +254 -0
- package/lib/view/expenseAutomationView/types/fluxAnalysisViewState.d.ts +1 -1
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +1 -1
- package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +103 -0
- package/lib/view/expenseAutomationView/types/reconciliationViewState.js +37 -0
- package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +12 -2
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/financeStatement/financeStatementReducer.js +1 -4
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +4 -4
- package/lib/view/netBurnOrIncome/netBurnOrIncomeReducer.js +3 -10
- package/lib/view/netBurnOrIncomeClassesView/netBurnOrIncomeClassesViewReducer.js +1 -6
- package/lib/view/netBurnOrIncomeStoryCard/netBurnOrIncomeStoryCardReducer.js +0 -1
- package/lib/view/netBurnOrIncomeStoryCard/netBurnOrIncomeStoryCardState.d.ts +1 -1
- package/lib/view/notificationView/notificationViewReducer.d.ts +8 -8
- package/lib/view/notificationView/notificationViewState.d.ts +2 -2
- package/lib/view/onboardingView/cockpitView/onboardingCockpitViewReducer.js +0 -3
- package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.d.ts +2 -2
- package/lib/view/opEx/opExForTimeFrameEpic.js +1 -1
- package/lib/view/opEx/opExReducer.js +4 -14
- package/lib/view/opExByVendor/opExByVendorReducer.js +1 -3
- package/lib/view/opExByVendor/opExByVendorState.d.ts +1 -1
- package/lib/view/opExClassesView/opExClassesViewReducer.js +1 -6
- package/lib/view/people/fetchPeopleEpic.js +1 -3
- package/lib/view/people/invitePeopleEpic.js +1 -3
- package/lib/view/people/inviteZeniPeopleEpic.js +1 -3
- package/lib/view/people/peopleReducer.js +0 -1
- package/lib/view/people/peopleSaveUpdatesEpic.js +1 -1
- package/lib/view/profitAndLoss/profitAndLossReducer.js +1 -6
- package/lib/view/profitAndLossClassesView/profitAndLossClassesViewReducer.js +1 -6
- package/lib/view/recommendation/recommendationReducer.js +1 -4
- package/lib/view/referralView/referralState.d.ts +1 -1
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +2 -2
- package/lib/view/reportUIOptions/reportUIOptionsReducer.d.ts +8 -8
- package/lib/view/reportUIOptions/updateReportUIOptionThisPeriodEpic.js +1 -3
- package/lib/view/revenue/revenueReducer.js +3 -10
- package/lib/view/revenueClassesView/revenueClassesViewReducer.js +1 -6
- package/lib/view/scheduleView/scheduleAccruedDetailView/LinkBillExpenseView/linkBillExpense.d.ts +1 -1
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailReducer.d.ts +4 -4
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +2 -2
- package/lib/view/settingsView/settingsViewReducer.js +0 -1
- package/lib/view/settingsView/settingsViewState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListReducer.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListReducer.js +0 -1
- package/lib/view/spendManagement/billPay/billList/billListState.d.ts +2 -2
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigPayload.d.ts +5 -1
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.js +0 -6
- package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewReducer.d.ts +2 -2
- package/lib/view/spendManagement/billPay/billsBulkActionView/epics/validateBillsBulkActionEpic.ts.js +4 -3
- package/lib/view/spendManagement/billPay/editBillView/epics/fetchBillAndInitializeLocalStoreEpic.js +1 -3
- package/lib/view/spendManagement/billPay/editBillView/epics/saveBillDetailEpic.d.ts +2 -1
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +2 -2
- package/lib/view/spendManagement/commonHistoryView/commonHistory.d.ts +1 -1
- package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +7 -7
- package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +1 -1
- package/lib/view/spendManagement/plaidAccount/epic/plaidConnection/establishPlaidConnectionEpic.js +11 -3
- package/lib/view/spendManagement/plaidAccount/plaidAccountViewReducer.d.ts +11 -10
- package/lib/view/spendManagement/plaidAccount/plaidAccountViewReducer.js +3 -1
- package/lib/view/spendManagement/plaidAccount/plaidAccountViewState.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/editRemiView/epics/fetchRecommendationsAndUpdateMerchantRecommendationsEpic.js +2 -6
- package/lib/view/spendManagement/reimbursement/editRemiView/epics/fetchRemiAndInitializeLocalStoreEpic.js +1 -3
- package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.js +0 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +4 -4
- package/lib/view/spendManagement/reimbursement/remisBulkActionView/remisBulkActionViewReducer.d.ts +2 -2
- package/lib/view/spendManagement/zeniAccounts/expressPay/epics/fetchExpressPayInitialDetailsEpic.d.ts +2 -2
- package/lib/view/spendManagement/zeniAccounts/expressPay/epics/fetchExpressPayInitialDetailsEpic.js +7 -7
- package/lib/view/spendManagement/zeniAccounts/expressPay/expressPaySelector.d.ts +2 -2
- package/lib/view/spendManagement/zeniAccounts/expressPay/expressPaySelector.js +5 -4
- package/lib/view/spendManagement/zeniAccounts/expressPay/expressPayState.d.ts +2 -2
- package/lib/view/spendManagement/zeniAccounts/zeniAccountsConfig/zeniAccountsConfigPayload.d.ts +14 -0
- package/lib/view/spendManagement/zeniAccounts/zeniAccountsConfig/zeniAccountsConfigPayload.js +78 -1
- package/lib/view/spendManagement/zeniAccounts/zeniAccountsConfig/zeniAccountsConfigReducer.js +3 -1
- package/lib/view/spendManagement/zeniAccounts/zeniAccountsConfig/zeniAccountsConfigSelector.d.ts +2 -1
- package/lib/view/spendManagement/zeniAccounts/zeniAccountsConfig/zeniAccountsConfigSelector.js +2 -1
- package/lib/view/spendManagement/zeniAccounts/zeniAccountsConfig/zeniAccountsConfigState.d.ts +9 -0
- package/lib/view/subscriptionView/subscriptionViewReducer.js +0 -1
- package/lib/view/subscriptionView/types/subscriptionTypes.js +0 -1
- package/lib/view/taskManager/taskListView/epics/dragNDropTasksEpic.js +1 -3
- package/lib/view/taskManager/taskListView/taskList.d.ts +3 -3
- package/lib/view/taskManager/taskListView/taskListSelector.d.ts +1 -1
- package/lib/view/tasksCard/fetchTasksCardEpic.js +1 -2
- package/lib/view/tasksCard/tasksCardSelector.d.ts +2 -2
- package/lib/view/tasksCard/tasksCardSelector.js +1 -1
- package/lib/view/topEx/topExSelector.d.ts +3 -3
- package/lib/view/transactionDetail/epics/saveTransactionHelper.js +30 -52
- package/lib/view/transactionDetail/epics/updateTransactionDetailEpic.js +22 -4
- package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +66 -13
- package/lib/view/transactionDetail/transactionDetailReducer.d.ts +13 -4
- package/lib/view/transactionDetail/transactionDetailReducer.js +51 -21
- package/lib/view/transactionDetail/transactionDetailState.d.ts +3 -2
- package/lib/view/transactionDetail/transactionDetailTypes.d.ts +8 -0
- package/lib/view/transactionList/transactionListByEntitySelector.js +0 -2
- package/lib/view/transactionList/transactionListReducer.js +4 -6
- package/lib/view/trendWithTransactions/trendWithTransactionsReducer.js +0 -1
- package/lib/view/userFinancialAccount/userFinancialAccountReducer.js +1 -3
- package/lib/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListState.d.ts +1 -1
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewState.d.ts +1 -1
- package/lib/view/vendorReviewView/vendorGlobalReviewView/vendorGlobalReviewViewState.d.ts +1 -1
- package/lib/zeniAPI.d.ts +1 -0
- package/lib/zeniUrl.d.ts +1 -1
- package/package.json +14 -12
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.getExpenseAutomationJESchedulesView = getExpenseAutomationJESchedulesView;
|
|
4
|
-
const
|
|
7
|
+
const omit_1 = __importDefault(require("lodash/omit"));
|
|
5
8
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
6
9
|
const accountSelector_1 = require("../../../entity/account/accountSelector");
|
|
7
10
|
const jeSchedulesSelector_1 = require("../../../entity/jeSchedules/jeSchedulesSelector");
|
|
@@ -39,7 +42,7 @@ function getExpenseAutomationJESchedulesView(state) {
|
|
|
39
42
|
!fixedAssetLabelAccountIds.includes(account.accountId));
|
|
40
43
|
const allClassList = (0, classListSelector_1.getClassList)(classState, classListState);
|
|
41
44
|
const allClasses = allClassList.classes.map((classData) => {
|
|
42
|
-
return (0,
|
|
45
|
+
return (0, omit_1.default)(classData, ['accountIds', 'key']);
|
|
43
46
|
});
|
|
44
47
|
const accountListNestedAccountHierarchy = (0, accountListSelector_1.getNestedAccountListHierarchy)(accountListState, accountTypes.accountListKey).filter((account) => account.accountId[0] != null &&
|
|
45
48
|
scheduleDetailAccountIds.includes(account.accountId[0]));
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ReportIDPlusForecastID } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
2
|
+
import { RootState } from '../../../reducer';
|
|
3
|
+
import { ExpenseAutomationReconciliationViewSelector } from '../selectorTypes/reconciliationViewSelectorTypes';
|
|
4
|
+
export declare const getExpenseAutomationReconciliationView: (state: RootState) => ExpenseAutomationReconciliationViewSelector;
|
|
5
|
+
export declare const isAccountReconReport: (reportId: ReportIDPlusForecastID) => boolean;
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.isAccountReconReport = exports.getExpenseAutomationReconciliationView = void 0;
|
|
7
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
8
|
+
const omit_1 = __importDefault(require("lodash/omit"));
|
|
9
|
+
const orderBy_1 = __importDefault(require("lodash/orderBy"));
|
|
10
|
+
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
11
|
+
const accountReconSelector_1 = require("../../../entity/accountRecon/accountReconSelector");
|
|
12
|
+
const tenantSelector_1 = require("../../../entity/tenant/tenantSelector");
|
|
13
|
+
const accountListSelector_1 = require("../../accountList/accountListSelector");
|
|
14
|
+
const classListSelector_1 = require("../../classList/classListSelector");
|
|
15
|
+
const reconciliationViewReducer_1 = require("../reducers/reconciliationViewReducer");
|
|
16
|
+
const expenseAutomationViewSelectorTypes_1 = require("../selectorTypes/expenseAutomationViewSelectorTypes");
|
|
17
|
+
exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((state) => state, (state) => (0, tenantSelector_1.getCurrentTenant)(state), (state) => state.expenseAutomationReconciliationViewState, (state) => state.expenseAutomationViewState, (state) => state.plaidAccountViewState, (state) => state.accountListState, (state) => state.accountState, (state) => state.classListState, (state) => state.classState, (state) => state.monthEndCloseChecksState, (state, currentTenant, reconciliationViewState, expenseAutomationViewState, plaidAccountViewState, accountListState, accountState, classListState, classState, monthEndCloseChecksState) => {
|
|
18
|
+
var _a;
|
|
19
|
+
const { selectedPeriodByTenantId } = expenseAutomationViewState;
|
|
20
|
+
const reconcileTabUiState = reconciliationViewState.reconTabsState.reconcile.uiState;
|
|
21
|
+
const reviewTabUiState = reconciliationViewState.reconTabsState.review.uiState;
|
|
22
|
+
const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
|
|
23
|
+
const accountReconForMonthYearPeriod = selectedPeriod != null
|
|
24
|
+
? reconciliationViewState.accountReconciliationRecordsBySelectedPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)]
|
|
25
|
+
: undefined;
|
|
26
|
+
if (accountReconForMonthYearPeriod == null) {
|
|
27
|
+
return {
|
|
28
|
+
accountListNestedAccountHierarchy: [],
|
|
29
|
+
classListNestedAccountHierarchy: [],
|
|
30
|
+
allAccountList: [],
|
|
31
|
+
allClassList: [],
|
|
32
|
+
fetchStatus: {
|
|
33
|
+
fetchState: reconciliationViewState.fetchState,
|
|
34
|
+
error: reconciliationViewState.error,
|
|
35
|
+
},
|
|
36
|
+
plaidConnectionDetails: plaidAccountViewState['expense_automation_reconcile']
|
|
37
|
+
.plaidConnectionDetails,
|
|
38
|
+
completionStatus: 'incomplete',
|
|
39
|
+
refreshStatus: reconciliationViewState.refreshStatus,
|
|
40
|
+
selectedTab: reconciliationViewState.selectedTab,
|
|
41
|
+
monthYearPeriod: selectedPeriod,
|
|
42
|
+
selectedAccountId: reconciliationViewState.selectedAccountId,
|
|
43
|
+
accountReconciliationsByAccountID: {},
|
|
44
|
+
reconciliationTabsState: reconciliationViewReducer_1.initialReconciliationTabsState,
|
|
45
|
+
actionFetchStates: reconciliationViewReducer_1.initialActionFetchState,
|
|
46
|
+
accountReconciliationBySectionID: {
|
|
47
|
+
assets: {
|
|
48
|
+
sectionId: 'assets',
|
|
49
|
+
accountIDs: [],
|
|
50
|
+
totalBankBalance: undefined,
|
|
51
|
+
totalClearedBalance: undefined,
|
|
52
|
+
totalReconciledBalance: undefined,
|
|
53
|
+
totalVariance: undefined,
|
|
54
|
+
totalVariancePercentage: undefined,
|
|
55
|
+
},
|
|
56
|
+
liabilities: {
|
|
57
|
+
sectionId: 'liabilities',
|
|
58
|
+
accountIDs: [],
|
|
59
|
+
totalBankBalance: undefined,
|
|
60
|
+
totalClearedBalance: undefined,
|
|
61
|
+
totalReconciledBalance: undefined,
|
|
62
|
+
totalVariance: undefined,
|
|
63
|
+
totalVariancePercentage: undefined,
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
const allAccountIDs = accountReconForMonthYearPeriod.accountIDs;
|
|
69
|
+
const reconList = {};
|
|
70
|
+
const assetAccountIDs = [];
|
|
71
|
+
const liabilityAccountIDs = [];
|
|
72
|
+
const assetTotals = {};
|
|
73
|
+
const liabilityTotals = {};
|
|
74
|
+
allAccountIDs.forEach((accountID) => {
|
|
75
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
76
|
+
const accountRecon = (0, accountReconSelector_1.getAccountReconByAccountIdAndSelectedPeriod)(state, accountID, selectedPeriod);
|
|
77
|
+
if (accountRecon == null) {
|
|
78
|
+
console.error(`Account reconciliation not found for account ${accountID} in period ${selectedPeriod.toString()}`);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
const accountConnectionStatus = reconciliationViewState.accountConnectionStatusByAccountID[accountID];
|
|
82
|
+
if (accountConnectionStatus == null) {
|
|
83
|
+
console.error(`Account connection status not found for account ${accountID} in period ${selectedPeriod.toString()}`);
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
const account = accountRecon.account;
|
|
87
|
+
const sortedReconcileTransactions = sortReconcileTransactions(accountRecon.transactionsToReconcile, reconcileTabUiState);
|
|
88
|
+
accountRecon.transactionsToReconcile = sortedReconcileTransactions;
|
|
89
|
+
const sortedReviewTabTransactions = sortReviewTabTransactions(accountRecon.transactionsToReview, reviewTabUiState);
|
|
90
|
+
accountRecon.transactionsToReview = sortedReviewTabTransactions;
|
|
91
|
+
if (accountConnectionStatus.status === 'connected') {
|
|
92
|
+
if ((account === null || account === void 0 ? void 0 : account.accountType) === 'bank') {
|
|
93
|
+
if (accountRecon.balance != null &&
|
|
94
|
+
accountRecon.clearedBalance != null &&
|
|
95
|
+
accountRecon.variance != null) {
|
|
96
|
+
assetTotals.balanceTotal = Object.assign(Object.assign({}, accountRecon.balance), { amount: ((_b = (_a = assetTotals.balanceTotal) === null || _a === void 0 ? void 0 : _a.amount) !== null && _b !== void 0 ? _b : 0) +
|
|
97
|
+
accountRecon.balance.amount });
|
|
98
|
+
assetTotals.clearedTotal = Object.assign(Object.assign({}, accountRecon.clearedBalance), { amount: ((_d = (_c = assetTotals.clearedTotal) === null || _c === void 0 ? void 0 : _c.amount) !== null && _d !== void 0 ? _d : 0) +
|
|
99
|
+
accountRecon.clearedBalance.amount });
|
|
100
|
+
assetTotals.varianceTotal = Object.assign(Object.assign({}, accountRecon.variance), { amount: ((_f = (_e = assetTotals.varianceTotal) === null || _e === void 0 ? void 0 : _e.amount) !== null && _f !== void 0 ? _f : 0) +
|
|
101
|
+
accountRecon.variance.amount });
|
|
102
|
+
assetTotals.variancePercentage =
|
|
103
|
+
assetTotals.varianceTotal.amount != null
|
|
104
|
+
? (assetTotals.varianceTotal.amount /
|
|
105
|
+
assetTotals.clearedTotal.amount) *
|
|
106
|
+
100
|
|
107
|
+
: undefined;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
else if (account.accountType === 'credit_card') {
|
|
111
|
+
if (accountRecon.balance != null &&
|
|
112
|
+
accountRecon.clearedBalance != null &&
|
|
113
|
+
accountRecon.variance != null) {
|
|
114
|
+
liabilityTotals.balanceTotal = Object.assign(Object.assign({}, accountRecon.balance), { amount: ((_h = (_g = liabilityTotals.balanceTotal) === null || _g === void 0 ? void 0 : _g.amount) !== null && _h !== void 0 ? _h : 0) +
|
|
115
|
+
accountRecon.balance.amount });
|
|
116
|
+
liabilityTotals.clearedTotal = Object.assign(Object.assign({}, accountRecon.clearedBalance), { amount: ((_k = (_j = liabilityTotals.clearedTotal) === null || _j === void 0 ? void 0 : _j.amount) !== null && _k !== void 0 ? _k : 0) +
|
|
117
|
+
accountRecon.clearedBalance.amount });
|
|
118
|
+
liabilityTotals.varianceTotal = Object.assign(Object.assign({}, accountRecon.variance), { amount: ((_m = (_l = liabilityTotals.varianceTotal) === null || _l === void 0 ? void 0 : _l.amount) !== null && _m !== void 0 ? _m : 0) +
|
|
119
|
+
accountRecon.variance.amount });
|
|
120
|
+
liabilityTotals.variancePercentage =
|
|
121
|
+
liabilityTotals.varianceTotal.amount != null
|
|
122
|
+
? (liabilityTotals.varianceTotal.amount /
|
|
123
|
+
liabilityTotals.clearedTotal.amount) *
|
|
124
|
+
100
|
|
125
|
+
: undefined;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
if ((account === null || account === void 0 ? void 0 : account.accountType) === 'bank') {
|
|
130
|
+
assetAccountIDs.push(accountID);
|
|
131
|
+
}
|
|
132
|
+
else if (account.accountType === 'credit_card') {
|
|
133
|
+
liabilityAccountIDs.push(accountID);
|
|
134
|
+
}
|
|
135
|
+
reconList[accountID] = {
|
|
136
|
+
accountConnectionStatus: accountConnectionStatus.status,
|
|
137
|
+
paymentAccountId: accountConnectionStatus.paymentAccountId,
|
|
138
|
+
connectionInProgress: accountConnectionStatus.connectionInProgress,
|
|
139
|
+
accountReconEntity: accountRecon,
|
|
140
|
+
refreshStatus: accountReconForMonthYearPeriod.reconciliationByAccountID[accountID]
|
|
141
|
+
.refreshStatus,
|
|
142
|
+
transactionFetchState: accountReconForMonthYearPeriod.reconciliationByAccountID[accountID]
|
|
143
|
+
.transactionFetchState, // transaction fetch state
|
|
144
|
+
};
|
|
145
|
+
});
|
|
146
|
+
const accountReconciliationBySectionID = {
|
|
147
|
+
assets: {
|
|
148
|
+
sectionId: 'assets',
|
|
149
|
+
accountIDs: assetAccountIDs,
|
|
150
|
+
totalBankBalance: assetTotals.balanceTotal,
|
|
151
|
+
totalClearedBalance: assetTotals.clearedTotal,
|
|
152
|
+
totalReconciledBalance: assetTotals.varianceTotal,
|
|
153
|
+
totalVariance: assetTotals.varianceTotal,
|
|
154
|
+
totalVariancePercentage: assetTotals.variancePercentage,
|
|
155
|
+
},
|
|
156
|
+
liabilities: {
|
|
157
|
+
sectionId: 'liabilities',
|
|
158
|
+
accountIDs: liabilityAccountIDs,
|
|
159
|
+
totalBankBalance: liabilityTotals.balanceTotal,
|
|
160
|
+
totalClearedBalance: liabilityTotals.clearedTotal,
|
|
161
|
+
totalReconciledBalance: liabilityTotals.varianceTotal,
|
|
162
|
+
totalVariance: liabilityTotals.varianceTotal,
|
|
163
|
+
totalVariancePercentage: liabilityTotals.variancePercentage,
|
|
164
|
+
},
|
|
165
|
+
};
|
|
166
|
+
const accountListNestedAccountHierarchy = (0, accountListSelector_1.getNestedAccountListHierarchy)(accountListState, 'accountList');
|
|
167
|
+
const classListNestedAccountHierarchy = (0, classListSelector_1.getNestedClassListHierarchy)(classListState);
|
|
168
|
+
const accountsList = (0, accountListSelector_1.getAccountList)(accountState, accountListState, 'accountList');
|
|
169
|
+
const classList = (0, classListSelector_1.getClassList)(classState, classListState);
|
|
170
|
+
const allClasses = classList.classes.map((classData) => {
|
|
171
|
+
return (0, omit_1.default)(classData, ['accountIds', 'key']);
|
|
172
|
+
});
|
|
173
|
+
const allSteps = selectedPeriod != null
|
|
174
|
+
? (0, expenseAutomationViewSelectorTypes_1.getAllSteps)(monthEndCloseChecksState, (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod), currentTenant.tenantId)
|
|
175
|
+
: [];
|
|
176
|
+
const reconciliationCompletionStatus = (_a = allSteps.find((step) => step.step === 'reconciliation')) === null || _a === void 0 ? void 0 : _a.completionStatus;
|
|
177
|
+
const completionStatus = reconciliationCompletionStatus !== null && reconciliationCompletionStatus !== void 0 ? reconciliationCompletionStatus : 'incomplete';
|
|
178
|
+
return {
|
|
179
|
+
accountReconciliationsByAccountID: reconList,
|
|
180
|
+
fetchStatus: {
|
|
181
|
+
fetchState: reconciliationViewState.fetchState,
|
|
182
|
+
error: reconciliationViewState.error,
|
|
183
|
+
},
|
|
184
|
+
plaidConnectionDetails: plaidAccountViewState['expense_automation_reconcile']
|
|
185
|
+
.plaidConnectionDetails,
|
|
186
|
+
reconciliationTabsState: reconciliationViewState.reconTabsState,
|
|
187
|
+
completionStatus,
|
|
188
|
+
refreshStatus: reconciliationViewState.refreshStatus,
|
|
189
|
+
selectedTab: reconciliationViewState.selectedTab,
|
|
190
|
+
selectedDrawerAccountId: reconciliationViewState.selectedDrawerAccountId,
|
|
191
|
+
monthYearPeriod: selectedPeriod,
|
|
192
|
+
accountReconciliationBySectionID,
|
|
193
|
+
selectedAccountId: reconciliationViewState.selectedAccountId,
|
|
194
|
+
selectedReconAccount: reconciliationViewState.selectedAccountId != null &&
|
|
195
|
+
reconList[reconciliationViewState.selectedAccountId] != null
|
|
196
|
+
? reconList[reconciliationViewState.selectedAccountId]
|
|
197
|
+
: undefined, // Selects the reconciliation account based on the selectedAccountId
|
|
198
|
+
accountListNestedAccountHierarchy,
|
|
199
|
+
actionFetchStates: reconciliationViewState.actionFetchState,
|
|
200
|
+
classListNestedAccountHierarchy,
|
|
201
|
+
allAccountList: accountsList.accounts,
|
|
202
|
+
allClassList: allClasses,
|
|
203
|
+
};
|
|
204
|
+
});
|
|
205
|
+
const isAccountReconReport = (reportId) => {
|
|
206
|
+
return reportId.endsWith('reconciliation');
|
|
207
|
+
};
|
|
208
|
+
exports.isAccountReconReport = isAccountReconReport;
|
|
209
|
+
function sortReconcileTransactions(transactions, uiState) {
|
|
210
|
+
const { sortKey, sortOrder } = uiState;
|
|
211
|
+
return (0, orderBy_1.default)(transactions, (transaction) => {
|
|
212
|
+
var _a, _b, _c, _d, _e, _f;
|
|
213
|
+
switch (sortKey) {
|
|
214
|
+
case 'clearedDate':
|
|
215
|
+
return (_b = (_a = transaction.clearedDate) === null || _a === void 0 ? void 0 : _a.valueOf()) !== null && _b !== void 0 ? _b : null;
|
|
216
|
+
case 'type':
|
|
217
|
+
return transaction.type.toLowerCase();
|
|
218
|
+
case 'payee':
|
|
219
|
+
return (_d = (_c = transaction.merchantName) === null || _c === void 0 ? void 0 : _c.toLowerCase()) !== null && _d !== void 0 ? _d : null;
|
|
220
|
+
case 'account':
|
|
221
|
+
return (_f = (_e = transaction.accountName) === null || _e === void 0 ? void 0 : _e.toLowerCase()) !== null && _f !== void 0 ? _f : null;
|
|
222
|
+
case 'transactionDirection':
|
|
223
|
+
return transaction.transactionDirection.toLowerCase();
|
|
224
|
+
case 'memo':
|
|
225
|
+
return transaction.memo.toLowerCase();
|
|
226
|
+
case 'amount':
|
|
227
|
+
return transaction.amount.amount;
|
|
228
|
+
case 'date':
|
|
229
|
+
default:
|
|
230
|
+
return transaction.date.valueOf();
|
|
231
|
+
}
|
|
232
|
+
}, sortOrder === 'ascending' ? 'asc' : 'desc');
|
|
233
|
+
}
|
|
234
|
+
function sortReviewTabTransactions(transactions, uiState) {
|
|
235
|
+
const { sortKey, sortOrder } = uiState;
|
|
236
|
+
return (0, orderBy_1.default)(transactions, (transaction) => {
|
|
237
|
+
var _a, _b, _c, _d, _e;
|
|
238
|
+
switch (sortKey) {
|
|
239
|
+
case 'match':
|
|
240
|
+
return ((_b = (_a = transaction.recommendedAction) === null || _a === void 0 ? void 0 : _a.recommendedTransactions.length) !== null && _b !== void 0 ? _b : null);
|
|
241
|
+
case 'payee':
|
|
242
|
+
return ((_e = (_d = (_c = transaction.recommendedAction.recommendedTransactions[0]) === null || _c === void 0 ? void 0 : _c.merchantName) === null || _d === void 0 ? void 0 : _d.toLowerCase()) !== null && _e !== void 0 ? _e : null);
|
|
243
|
+
case 'direction':
|
|
244
|
+
return transaction.transactionDirection.toLowerCase();
|
|
245
|
+
case 'memo':
|
|
246
|
+
return transaction.memo.toLowerCase();
|
|
247
|
+
case 'amount':
|
|
248
|
+
return transaction.amount.amount;
|
|
249
|
+
case 'date':
|
|
250
|
+
default:
|
|
251
|
+
return transaction.transactionDate.valueOf();
|
|
252
|
+
}
|
|
253
|
+
}, sortOrder === 'ascending' ? 'asc' : 'desc');
|
|
254
|
+
}
|
|
@@ -4,7 +4,7 @@ import { FetchStateAndError, FetchedState, ID } from '../../../commonStateTypes/
|
|
|
4
4
|
import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
5
5
|
import { MonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
|
|
6
6
|
import { PageToken } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
7
|
-
declare const toFluxAnalysisSortKey: (v: string) => "
|
|
7
|
+
declare const toFluxAnalysisSortKey: (v: string) => "vendor" | "class" | "category";
|
|
8
8
|
export type FluxAnalysisSortKey = ReturnType<typeof toFluxAnalysisSortKey>;
|
|
9
9
|
export type FluxAnalysisActionType = 'review' | 'unreview';
|
|
10
10
|
export type FluxAnalysisReviewStatus = 'Pending Review' | 'Reviewed';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FetchStateAndError, FetchedState, ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
3
3
|
import { MonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
|
|
4
|
-
export declare const toMissingReceiptsSortKey: (v: string) => "
|
|
4
|
+
export declare const toMissingReceiptsSortKey: (v: string) => "date" | "vendor" | "amount" | "class" | "category";
|
|
5
5
|
export type MissingReceiptsSortKey = ReturnType<typeof toMissingReceiptsSortKey>;
|
|
6
6
|
export interface MissingReceiptsViewUIState {
|
|
7
7
|
searchString: string;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { Amount } from '../../../commonStateTypes/amount';
|
|
2
|
+
import { FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
3
|
+
import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
4
|
+
import { MonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
|
|
5
|
+
import { BankStatusCodeType } from '../../../entity/accountRecon/accountReconState';
|
|
6
|
+
import { VendorBase } from '../../../entity/vendor/vendorState';
|
|
7
|
+
import { ZeniAPIStatus } from '../../../responsePayload';
|
|
8
|
+
export declare const RECONCILE_ACTIONS: readonly ["reconcile", "save_reconcile_for_later", "exclude"];
|
|
9
|
+
export declare const toReconcileActions: (v: string) => "reconcile" | "save_reconcile_for_later" | "exclude";
|
|
10
|
+
export type ReconcileActionType = ReturnType<typeof toReconcileActions>;
|
|
11
|
+
export type SaveReconcileDetailActionPayload = {
|
|
12
|
+
reconcileAction: 'exclude';
|
|
13
|
+
excludeTransactionId: ID;
|
|
14
|
+
} | {
|
|
15
|
+
reconcileAction: 'reconcile' | 'save_reconcile_for_later';
|
|
16
|
+
};
|
|
17
|
+
export interface SaveReconciliationDetailFailurePayload {
|
|
18
|
+
fetchStateByAction: SaveReconcileDetailActionPayload;
|
|
19
|
+
error: ZeniAPIStatus;
|
|
20
|
+
}
|
|
21
|
+
export declare const toReconciliationTabsType: (v: string) => "reconcile" | "review";
|
|
22
|
+
export declare type ReconciliationViewTabType = ReturnType<typeof toReconciliationTabsType>;
|
|
23
|
+
declare const toReconReconcileSortKeysType: (v: string) => "date" | "amount" | "account" | "type" | "memo" | "transactionDirection" | "clearedDate" | "payee" | "recommended";
|
|
24
|
+
export declare type ReconReconcileSortKey = ReturnType<typeof toReconReconcileSortKeysType>;
|
|
25
|
+
export interface ReconciliationReconcileTabLocalData {
|
|
26
|
+
selectedTransactionIds: ID[];
|
|
27
|
+
}
|
|
28
|
+
export interface ReconciliationReconcileTabViewUiState {
|
|
29
|
+
scrollYOffset?: number;
|
|
30
|
+
sortKey: ReconReconcileSortKey;
|
|
31
|
+
sortOrder: SortOrder;
|
|
32
|
+
}
|
|
33
|
+
export interface TransactionSummary {
|
|
34
|
+
count: number;
|
|
35
|
+
totalAmount: Amount;
|
|
36
|
+
}
|
|
37
|
+
export interface BalancesLocalData {
|
|
38
|
+
variance: Amount;
|
|
39
|
+
clearedBalance: Amount;
|
|
40
|
+
variancePercentage: number;
|
|
41
|
+
payments: TransactionSummary;
|
|
42
|
+
deposits: TransactionSummary;
|
|
43
|
+
}
|
|
44
|
+
export interface ReconciliationTabsState {
|
|
45
|
+
reconcile: {
|
|
46
|
+
localData: ReconciliationReconcileTabLocalData;
|
|
47
|
+
uiState: ReconciliationReconcileTabViewUiState;
|
|
48
|
+
};
|
|
49
|
+
review: {
|
|
50
|
+
localData: Record<ID, ReconciliationReviewTabLocalData>;
|
|
51
|
+
uiState: ReconciliationReviewTabViewUiState;
|
|
52
|
+
};
|
|
53
|
+
balances: BalancesLocalData;
|
|
54
|
+
}
|
|
55
|
+
declare const toReconReviewSortKey: (v: string) => "date" | "amount" | "memo" | "direction" | "match" | "payee";
|
|
56
|
+
export type ReconReviewSortKey = ReturnType<typeof toReconReviewSortKey>;
|
|
57
|
+
export interface ReconciliationReviewTabViewUiState {
|
|
58
|
+
scrollPosition: {
|
|
59
|
+
scrollLeft?: number;
|
|
60
|
+
scrollTop: number;
|
|
61
|
+
} | undefined;
|
|
62
|
+
sortKey: ReconReviewSortKey;
|
|
63
|
+
sortOrder: SortOrder;
|
|
64
|
+
}
|
|
65
|
+
export interface ReconciliationReviewTabLocalData {
|
|
66
|
+
memo: string;
|
|
67
|
+
categoryId?: ID;
|
|
68
|
+
classId?: ID;
|
|
69
|
+
vendor?: VendorBase;
|
|
70
|
+
matchedTransactionId?: ID;
|
|
71
|
+
}
|
|
72
|
+
export interface ActionFetchStates {
|
|
73
|
+
excludeFetchById: Record<ID, FetchStateAndError>;
|
|
74
|
+
saveForLaterFetch: FetchStateAndError;
|
|
75
|
+
reconcileFetch: FetchStateAndError;
|
|
76
|
+
saveReconciliationReviewFetch: Record<ID, FetchStateAndError>;
|
|
77
|
+
}
|
|
78
|
+
export interface ReconciliationViewState extends FetchStateAndError {
|
|
79
|
+
accountReconciliationRecordsBySelectedPeriod: Record<MonthYearPeriodId, AccountReconciliationRecords>;
|
|
80
|
+
refreshStatus: FetchStateAndError;
|
|
81
|
+
accountConnectionStatusByAccountID: Record<ID, BankConnectionStatus>;
|
|
82
|
+
selectedTab: ReconciliationViewTabType;
|
|
83
|
+
selectedAccountId?: ID;
|
|
84
|
+
selectedDrawerAccountId?: ID;
|
|
85
|
+
reconTabsState: ReconciliationTabsState;
|
|
86
|
+
actionFetchState: ActionFetchStates;
|
|
87
|
+
}
|
|
88
|
+
export interface BankConnectionStatus {
|
|
89
|
+
status: BankStatusCodeType;
|
|
90
|
+
connectionInProgress: boolean;
|
|
91
|
+
paymentAccountId?: ID;
|
|
92
|
+
}
|
|
93
|
+
export interface AccountReconciliationRecords {
|
|
94
|
+
accountIDs: ID[];
|
|
95
|
+
reconciliationByAccountID: Record<ID, AccountReconciliationDataWithTransactionFetchState>;
|
|
96
|
+
}
|
|
97
|
+
export interface AccountReconciliationDataWithTransactionFetchState {
|
|
98
|
+
accountId: ID;
|
|
99
|
+
reconciliationId?: ID;
|
|
100
|
+
transactionFetchState: FetchStateAndError;
|
|
101
|
+
refreshStatus: FetchStateAndError;
|
|
102
|
+
}
|
|
103
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toReconciliationTabsType = exports.toReconcileActions = exports.RECONCILE_ACTIONS = void 0;
|
|
4
|
+
const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
|
|
5
|
+
exports.RECONCILE_ACTIONS = [
|
|
6
|
+
'reconcile',
|
|
7
|
+
'save_reconcile_for_later',
|
|
8
|
+
'exclude',
|
|
9
|
+
];
|
|
10
|
+
const toReconcileActions = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.RECONCILE_ACTIONS);
|
|
11
|
+
exports.toReconcileActions = toReconcileActions;
|
|
12
|
+
const RECONCILIATION_VIEW_TABS = ['reconcile', 'review'];
|
|
13
|
+
const toReconciliationTabsType = (v) => (0, stringToUnion_1.stringToUnion)(v, RECONCILIATION_VIEW_TABS);
|
|
14
|
+
exports.toReconciliationTabsType = toReconciliationTabsType;
|
|
15
|
+
const RECON_RECONCILE_SORT_KEYS = [
|
|
16
|
+
'date',
|
|
17
|
+
'clearedDate',
|
|
18
|
+
'type',
|
|
19
|
+
'payee',
|
|
20
|
+
'account',
|
|
21
|
+
'transactionDirection',
|
|
22
|
+
'memo',
|
|
23
|
+
'amount',
|
|
24
|
+
'recommended',
|
|
25
|
+
];
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
27
|
+
const toReconReconcileSortKeysType = (v) => (0, stringToUnion_1.stringToUnion)(v, RECON_RECONCILE_SORT_KEYS);
|
|
28
|
+
const RECON_REVIEW_SORT_KEYS = [
|
|
29
|
+
'date',
|
|
30
|
+
'payee',
|
|
31
|
+
'memo',
|
|
32
|
+
'amount',
|
|
33
|
+
'direction',
|
|
34
|
+
'match',
|
|
35
|
+
];
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
37
|
+
const toReconReviewSortKey = (v) => (0, stringToUnion_1.stringToUnion)(v, RECON_REVIEW_SORT_KEYS);
|
|
@@ -15,11 +15,11 @@ import { VendorBase } from '../../../entity/vendor/vendorState';
|
|
|
15
15
|
import { ZeniDate } from '../../../zeniDayJS';
|
|
16
16
|
import { EntityRecommendationKey } from '../../recommendation/recommendationState';
|
|
17
17
|
import { TransactionDetailKey } from '../../transactionDetail/transactionDetailState';
|
|
18
|
-
export declare const toTransactionsSortKey: (v: string) => "
|
|
18
|
+
export declare const toTransactionsSortKey: (v: string) => "date" | "vendor" | "amount" | "class" | "transaction_type" | "category";
|
|
19
19
|
export type TransactionsSortKey = ReturnType<typeof toTransactionsSortKey>;
|
|
20
20
|
export declare const toTransactionsTabKey: (v: string) => "review" | "autoCategorized";
|
|
21
21
|
export type TransactionsTab = ReturnType<typeof toTransactionsTabKey>;
|
|
22
|
-
export declare const getTransactionCategorizationKey: (transactionId: TransactionID, lineId: ID) => `${string}
|
|
22
|
+
export declare const getTransactionCategorizationKey: (transactionId: TransactionID, lineId: ID) => `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_refund_${string}` | `${string}_expense_${string}` | `${string}_check_${string}` | `${string}_bill_${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}`;
|
|
23
23
|
export type TransactionCategorizationKey = ReturnType<typeof getTransactionCategorizationKey>;
|
|
24
24
|
export interface TransactionsViewUIState {
|
|
25
25
|
searchString: string;
|
|
@@ -55,21 +55,30 @@ export interface TransactionCategorizationLineItemData extends TransactionLineBa
|
|
|
55
55
|
lineEntity?: Entity;
|
|
56
56
|
isCategoryMiscategorized: boolean;
|
|
57
57
|
isClassMiscategorized: boolean;
|
|
58
|
+
selectedEntityLine?: Entity;
|
|
58
59
|
}
|
|
59
60
|
export interface TransactionReviewLocalData {
|
|
60
61
|
lineItemById: Record<ID, TransactionCategorizationLineItemData>;
|
|
61
62
|
sortedLineItems: ID[];
|
|
62
63
|
vendor?: VendorBase;
|
|
64
|
+
customer?: CustomerBase;
|
|
63
65
|
memo?: string;
|
|
64
66
|
vendorDetails?: {
|
|
65
67
|
id: ID;
|
|
66
68
|
qboId: string;
|
|
67
69
|
name: string;
|
|
68
70
|
};
|
|
71
|
+
customerDetails?: {
|
|
72
|
+
id: ID;
|
|
73
|
+
qboId: string;
|
|
74
|
+
name: string;
|
|
75
|
+
};
|
|
69
76
|
transactionDate?: ZeniDate;
|
|
70
77
|
transactionType?: TransactionType;
|
|
71
78
|
transactionTypeName?: string;
|
|
72
79
|
vendorUpdates?: TransactionVendorUpdates;
|
|
80
|
+
customerUpdates?: TransactionVendorUpdates;
|
|
81
|
+
selectedEntity?: Entity;
|
|
73
82
|
}
|
|
74
83
|
export interface SupportedTransactionCategorization {
|
|
75
84
|
transactionReviewLocalData: TransactionReviewLocalData;
|
|
@@ -103,6 +112,7 @@ export interface TransactionUpdates {
|
|
|
103
112
|
memo?: string;
|
|
104
113
|
updatesByLineId: Record<ID, TransactionLineUpdates>;
|
|
105
114
|
vendorId?: ID;
|
|
115
|
+
customerId?: ID;
|
|
106
116
|
}
|
|
107
117
|
export interface EntityRelatedRecommendationUpdates {
|
|
108
118
|
entityId: ID;
|
|
@@ -17,7 +17,7 @@ export declare const fetchFinanceStatement: import("@reduxjs/toolkit").ActionCre
|
|
|
17
17
|
thisPeriod: TimeframeTick;
|
|
18
18
|
coaBalances: COABalance[];
|
|
19
19
|
maxNumOfPeriodsToHighlight: number;
|
|
20
|
-
}, "financeStatement/updateFinanceStatementThisPeriod">, updateCOABalancesRange: import("@reduxjs/toolkit").ActionCreatorWithPayload<COABalancesRange, "financeStatement/updateCOABalancesRange">, updateSelectedReportId: import("@reduxjs/toolkit").ActionCreatorWithPayload<"
|
|
20
|
+
}, "financeStatement/updateFinanceStatementThisPeriod">, updateCOABalancesRange: import("@reduxjs/toolkit").ActionCreatorWithPayload<COABalancesRange, "financeStatement/updateCOABalancesRange">, updateSelectedReportId: import("@reduxjs/toolkit").ActionCreatorWithPayload<"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" | "charge_cards" | "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", "financeStatement/updateSelectedReportId">, updateFinanceStatementAdditionalBalancesSelection: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
21
21
|
firstMonthOfFY: Month;
|
|
22
22
|
isCompareModeOn: boolean;
|
|
23
23
|
additionalBalances: COABalanceType[];
|
|
@@ -29,10 +29,7 @@ const financeStatement = (0, toolkit_1.createSlice)({
|
|
|
29
29
|
reducer(draft) {
|
|
30
30
|
draft.lastFetchRequestTime = (0, zeniDayJS_1.dateNow)();
|
|
31
31
|
},
|
|
32
|
-
prepare(userId, fetchSelectedTab = true,
|
|
33
|
-
fetchFullReport = false, // eslint-disable-line @typescript-eslint/no-inferrable-types,
|
|
34
|
-
cacheOverride = false // eslint-disable-line @typescript-eslint/no-inferrable-types
|
|
35
|
-
) {
|
|
32
|
+
prepare(userId, fetchSelectedTab = true, fetchFullReport = false, cacheOverride = false) {
|
|
36
33
|
return {
|
|
37
34
|
payload: { userId, fetchSelectedTab, fetchFullReport, cacheOverride },
|
|
38
35
|
};
|
|
@@ -3,9 +3,9 @@ import { ZeniAPIStatus } from '../../responsePayload';
|
|
|
3
3
|
import { VendorReviewViewAllRecommendationsPayload } from '../vendorReviewView/common/payload/commonTypes';
|
|
4
4
|
import { GlobalMerchantViewState, GlobalRecommendationFetchSource, NewGlobalMerchantCurrentSelection } from './globalMerchantViewState';
|
|
5
5
|
export declare const initialState: GlobalMerchantViewState;
|
|
6
|
-
export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId?: string | undefined, context?: "
|
|
6
|
+
export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId?: string | undefined, context?: "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" | "charge_cards" | "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" | undefined], {
|
|
7
7
|
merchantId: string | undefined;
|
|
8
|
-
context: "
|
|
8
|
+
context: "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" | "charge_cards" | "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" | undefined;
|
|
9
9
|
}, "globalMerchantView/createGlobalMerchant", never, never>, createGlobalMerchantSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
10
10
|
merchantId: ID;
|
|
11
11
|
}, "globalMerchantView/createGlobalMerchantSuccess">, createGlobalMerchantFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
@@ -15,10 +15,10 @@ export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCrea
|
|
|
15
15
|
merchantName: string | undefined;
|
|
16
16
|
}, "globalMerchantView/fetchGlobalMerchantRecommendation", never, never>, fetchGlobalMerchantRecommendationSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<VendorReviewViewAllRecommendationsPayload, "globalMerchantView/fetchGlobalMerchantRecommendationSuccess">, fetchGlobalMerchantRecommendationFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
17
17
|
status: ZeniAPIStatus;
|
|
18
|
-
}, "globalMerchantView/fetchGlobalMerchantRecommendationFailure">, updateCreateGlobalMerchantLocalData: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[globalMerchantName: string, currentSelection: NewGlobalMerchantCurrentSelection, globalMerchantWebsiteUrl?: import("url-parse")<string
|
|
18
|
+
}, "globalMerchantView/fetchGlobalMerchantRecommendationFailure">, updateCreateGlobalMerchantLocalData: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[globalMerchantName: string, currentSelection: NewGlobalMerchantCurrentSelection, globalMerchantWebsiteUrl?: import("url-parse")<Record<string, string | undefined>> | import("url-parse")<string> | undefined], {
|
|
19
19
|
globalMerchantName: string;
|
|
20
20
|
currentSelection: NewGlobalMerchantCurrentSelection;
|
|
21
|
-
globalMerchantWebsiteUrl: import("url-parse")<string
|
|
21
|
+
globalMerchantWebsiteUrl: import("url-parse")<Record<string, string | undefined>> | import("url-parse")<string> | undefined;
|
|
22
22
|
}, "globalMerchantView/updateCreateGlobalMerchantLocalData", never, never>, clearGlobalMerchantView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"globalMerchantView/clearGlobalMerchantView">;
|
|
23
23
|
declare const _default: import("redux").Reducer<GlobalMerchantViewState>;
|
|
24
24
|
export default _default;
|
|
@@ -72,8 +72,7 @@ const netBurnOrIncome = (0, toolkit_1.createSlice)({
|
|
|
72
72
|
reducer(draft) {
|
|
73
73
|
draft.lastFetchRequestTime = (0, zeniDayJS_1.dateNow)();
|
|
74
74
|
},
|
|
75
|
-
prepare(cacheOverride = false,
|
|
76
|
-
forecastId) {
|
|
75
|
+
prepare(cacheOverride = false, forecastId) {
|
|
77
76
|
return {
|
|
78
77
|
payload: {
|
|
79
78
|
cacheOverride,
|
|
@@ -86,8 +85,7 @@ const netBurnOrIncome = (0, toolkit_1.createSlice)({
|
|
|
86
85
|
reducer(draft) {
|
|
87
86
|
draft.lastFetchRequestTime = (0, zeniDayJS_1.dateNow)();
|
|
88
87
|
},
|
|
89
|
-
prepare(cacheOverride = false,
|
|
90
|
-
forecastId) {
|
|
88
|
+
prepare(cacheOverride = false, forecastId) {
|
|
91
89
|
return {
|
|
92
90
|
payload: {
|
|
93
91
|
cacheOverride,
|
|
@@ -97,7 +95,6 @@ const netBurnOrIncome = (0, toolkit_1.createSlice)({
|
|
|
97
95
|
},
|
|
98
96
|
},
|
|
99
97
|
fetchNetBurnOrIncome: {
|
|
100
|
-
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
101
98
|
prepare(fetchFullReport = false, forecastId, cacheOverride = false) {
|
|
102
99
|
return { payload: { fetchFullReport, forecastId, cacheOverride } };
|
|
103
100
|
},
|
|
@@ -110,11 +107,7 @@ const netBurnOrIncome = (0, toolkit_1.createSlice)({
|
|
|
110
107
|
},
|
|
111
108
|
},
|
|
112
109
|
fetchNetBurnOrIncomeForTimeframe: {
|
|
113
|
-
prepare(timeframe, forecastId,
|
|
114
|
-
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
115
|
-
fetchFullReport = true,
|
|
116
|
-
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
117
|
-
cacheOverride = false) {
|
|
110
|
+
prepare(timeframe, forecastId, fetchFullReport = true, cacheOverride = false) {
|
|
118
111
|
return {
|
|
119
112
|
payload: { forecastId, timeframe, fetchFullReport, cacheOverride },
|
|
120
113
|
};
|
|
@@ -37,7 +37,6 @@ const netBurnOrIncomeClassesView = (0, toolkit_1.createSlice)({
|
|
|
37
37
|
initialState: exports.initialState,
|
|
38
38
|
reducers: {
|
|
39
39
|
fetchNetBurnOrIncomeClassesView: {
|
|
40
|
-
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
41
40
|
prepare(cacheOverride = false) {
|
|
42
41
|
return { payload: { cacheOverride } };
|
|
43
42
|
},
|
|
@@ -50,11 +49,7 @@ const netBurnOrIncomeClassesView = (0, toolkit_1.createSlice)({
|
|
|
50
49
|
},
|
|
51
50
|
},
|
|
52
51
|
fetchNetBurnOrIncomeForTimeframeClassesView: {
|
|
53
|
-
prepare(timeframe,
|
|
54
|
-
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
55
|
-
fetchFullReport = true,
|
|
56
|
-
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
57
|
-
cacheOverride = false) {
|
|
52
|
+
prepare(timeframe, fetchFullReport = true, cacheOverride = false) {
|
|
58
53
|
return { payload: { timeframe, fetchFullReport, cacheOverride } };
|
|
59
54
|
},
|
|
60
55
|
reducer(draft, action) {
|