@zeniai/client-epic-state 4.12.97 → 4.12.99
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonStateTypes/common.d.ts +2 -0
- package/lib/commonStateTypes/common.js +5 -1
- package/lib/commonStateTypes/fiscalYearHelpers/formatZeniDateFY.d.ts +1 -0
- package/lib/commonStateTypes/fiscalYearHelpers/formatZeniDateFY.js +2 -1
- package/lib/commonStateTypes/timePeriod.d.ts +16 -0
- package/lib/commonStateTypes/timePeriod.js +31 -1
- package/lib/commonStateTypes/viewAndReport/reportIDHelper.d.ts +1 -0
- package/lib/commonStateTypes/viewAndReport/reportIDHelper.js +3 -1
- package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +2 -0
- package/lib/entity/account/accountState.d.ts +1 -1
- package/lib/entity/accountGroup/accountGroupState.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/companyStateTypes.d.ts +1 -1
- package/lib/entity/forecast/forecastState.d.ts +1 -1
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +1 -0
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +7 -1
- package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +2 -2
- package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +3 -1
- package/lib/entity/jeSchedules/jeSchedulesSelector.js +2 -1
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +3 -1
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +2 -0
- package/lib/entity/jeSchedules/jeSchedulesTypes.js +12 -1
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.d.ts +32 -0
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.js +53 -0
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksReducer.d.ts +12 -0
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksReducer.js +25 -0
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksSelector.d.ts +7 -0
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksSelector.js +36 -0
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +38 -0
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.js +10 -0
- package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
- package/lib/entity/tenant/clearAllEpic.d.ts +9 -2
- package/lib/entity/tenant/clearAllEpic.js +14 -0
- package/lib/entity/tenant/epic/fetchAllTenantsEpic.d.ts +4 -1
- package/lib/entity/tenant/epic/fetchAllTenantsEpic.js +32 -2
- package/lib/entity/tenant/tenantPayload.d.ts +1 -0
- package/lib/entity/tenant/tenantReducer.js +3 -0
- package/lib/entity/tenant/tenantState.d.ts +1 -0
- package/lib/entity/transaction/payloadTypes/attachmentPayload.d.ts +1 -1
- package/lib/entity/transaction/payloadTypes/attachmentPayload.js +3 -3
- package/lib/entity/transaction/stateTypes/transactionType.d.ts +2 -2
- package/lib/entity/transaction/transactionSelector.d.ts +1 -0
- package/lib/entity/transaction/transactionSelector.js +7 -1
- package/lib/entity/vendor/__mocks__/vendorStateMocks.d.ts +1 -0
- package/lib/entity/vendor/__mocks__/vendorStateMocks.js +35 -1
- package/lib/entity/vendor/vendorPayload.js +3 -2
- package/lib/entity/vendor/vendorState.d.ts +3 -3
- package/lib/entity/vendor/vendorType.d.ts +0 -2
- package/lib/entity/vendor/vendorType.js +1 -4
- package/lib/epic.d.ts +10 -1
- package/lib/epic.js +10 -1
- package/lib/index.d.ts +40 -8
- package/lib/index.js +74 -25
- package/lib/reducer.d.ts +22 -1
- package/lib/reducer.js +22 -1
- package/lib/view/auditReportView/auditReportViewState.d.ts +2 -2
- package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
- package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
- package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
- package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
- package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewReducer.d.ts +10 -5
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewReducer.js +10 -7
- package/lib/view/companyMonthEndReportView/epics/fetchCompanyMonthEndReportTemplatesEpic.js +4 -4
- package/lib/view/companyMonthEndReportView/epics/fetchCompanyMonthEndReportViewEpic.js +4 -4
- package/lib/view/companyMonthEndReportView/epics/improveUsingZeniGPTEpic.js +5 -3
- package/lib/view/companyMonthEndReportView/epics/saveCompanyMonthEndReportEpic.js +3 -3
- package/lib/view/companyMonthEndReportView/epics/sendCompanyMonthEndReportEpic.js +3 -3
- package/lib/view/companyView/types/cockpitTypes.d.ts +2 -2
- package/lib/view/dashboard/dashboardEpic.d.ts +2 -1
- package/lib/view/dashboard/dashboardEpic.js +22 -2
- package/lib/view/dashboard/dashboardReducer.d.ts +3 -2
- package/lib/view/dashboard/dashboardReducer.js +2 -1
- package/lib/view/dashboard/dashboardSelector.d.ts +2 -0
- package/lib/view/dashboard/dashboardSelector.js +10 -2
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.d.ts +10 -0
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +72 -0
- package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.d.ts +11 -0
- package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +53 -0
- package/lib/view/expenseAutomationView/epics/fluxAnalysis/fetchFluxAnalysisViewEpic.d.ts +11 -0
- package/lib/view/expenseAutomationView/epics/fluxAnalysis/fetchFluxAnalysisViewEpic.js +66 -0
- package/lib/view/expenseAutomationView/epics/fluxAnalysis/reviewFluxAnalysisEpic.d.ts +7 -0
- package/lib/view/expenseAutomationView/epics/fluxAnalysis/reviewFluxAnalysisEpic.js +39 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.d.ts +7 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +22 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +59 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.d.ts +7 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.js +44 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic.d.ts +6 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic.js +28 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.js +44 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMissingReceiptsEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMissingReceiptsEpic.js +58 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.d.ts +10 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js +12 -0
- package/lib/view/expenseAutomationView/expenseAutomationViewPayload.d.ts +3 -0
- package/lib/view/expenseAutomationView/expenseAutomationViewPayload.js +2 -0
- package/lib/view/expenseAutomationView/expenseAutomationViewReducer.d.ts +17 -0
- package/lib/view/expenseAutomationView/expenseAutomationViewReducer.js +66 -0
- package/lib/view/expenseAutomationView/expenseAutomationViewSelector.d.ts +3 -0
- package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +97 -0
- package/lib/view/expenseAutomationView/expenseAutomationViewState.d.ts +11 -0
- package/lib/view/expenseAutomationView/expenseAutomationViewState.js +14 -0
- package/lib/view/expenseAutomationView/helpers/helpers.d.ts +7 -0
- package/lib/view/expenseAutomationView/helpers/helpers.js +67 -0
- package/lib/view/expenseAutomationView/payload/fluxAnalysisPayload.d.ts +76 -0
- package/lib/view/expenseAutomationView/payload/fluxAnalysisPayload.js +9 -0
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +36 -0
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.js +58 -0
- package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.d.ts +16 -0
- package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.js +2 -0
- package/lib/view/expenseAutomationView/reducers/fluxAnalysisViewReducer.d.ts +34 -0
- package/lib/view/expenseAutomationView/reducers/fluxAnalysisViewReducer.js +205 -0
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +53 -0
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +245 -0
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +31 -0
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +130 -0
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +5 -0
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +45 -0
- package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.d.ts +35 -0
- package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.js +47 -0
- package/lib/view/expenseAutomationView/selectorTypes/fluxAnalysisViewSelectorTypes.d.ts +32 -0
- package/lib/view/expenseAutomationView/selectorTypes/fluxAnalysisViewSelectorTypes.js +2 -0
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +28 -0
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.js +2 -0
- package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +11 -0
- package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.js +2 -0
- package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.d.ts +3 -0
- package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +55 -0
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.d.ts +7 -0
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +95 -0
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.d.ts +3 -0
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +61 -0
- package/lib/view/expenseAutomationView/types/fluxAnalysisViewState.d.ts +53 -0
- package/lib/view/expenseAutomationView/types/fluxAnalysisViewState.js +5 -0
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +31 -0
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +2 -0
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +20 -0
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.js +13 -0
- package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +28 -0
- package/lib/view/expenseAutomationView/types/transactionsViewState.js +15 -0
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/monthEndCloseChecksView/epics/fetchMonthEndCloseChecksEpic.d.ts +8 -0
- package/lib/view/monthEndCloseChecksView/epics/fetchMonthEndCloseChecksEpic.js +58 -0
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewPayload.d.ts +3 -0
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewPayload.js +2 -0
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewReducer.d.ts +16 -0
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewReducer.js +36 -0
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewSelector.d.ts +10 -0
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewSelector.js +27 -0
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewState.d.ts +5 -0
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewState.js +2 -0
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/reviewCompanyView/reviewCompanyViewState.d.ts +1 -1
- package/lib/view/scheduleView/scheduleAccruedDetailView/LinkBillExpenseView/linkBillExpense.d.ts +1 -1
- package/lib/view/scheduleView/scheduleDetailView/epics/fetchScheduleDetailsEpic.js +3 -2
- package/lib/view/scheduleView/scheduleDetailView/epics/fetchScheduleDetailsPageEpic.js +1 -1
- package/lib/view/scheduleView/scheduleDetailView/epics/saveScheduleDetailsEpic.js +2 -2
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailLocalDataHelper.js +19 -5
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailPayload.d.ts +8 -3
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailPayload.js +39 -57
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailReducer.d.ts +13 -8
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailReducer.js +19 -12
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailSelector.d.ts +1 -0
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailSelector.js +4 -3
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailState.d.ts +2 -0
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
- package/lib/view/spendManagement/billPay/editBillView/epics/parseInvoiceToBillEpic.js +2 -2
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/editRemiView/epics/parseReceiptsToRemiEpic.js +2 -2
- package/lib/view/subscriptionView/types/subscriptionTypes.d.ts +1 -1
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/lib/view/transactionDetail/epics/uploadMissingReceiptSuccessEpic.js +2 -2
- package/lib/view/transactionDetail/transactionDetailState.d.ts +2 -2
- package/lib/view/vendorReviewView/common/state/commonTypes.d.ts +1 -1
- package/lib/view/zeniAccStatementList/zeniAccStatementList.d.ts +2 -5
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardReducer.js +3 -1
- package/package.json +1 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { FetchedState, FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
2
|
+
import { MonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
|
|
3
|
+
import { JEScheduleTransactionKey, ScheduleTypes } from '../../../entity/jeSchedules/jeSchedulesTypes';
|
|
4
|
+
import { VendorBase } from '../../../entity/vendor/vendorState';
|
|
5
|
+
export interface JESchedulesViewUIState {
|
|
6
|
+
searchString: string;
|
|
7
|
+
scrollPosition: {
|
|
8
|
+
scrollTop: number;
|
|
9
|
+
scrollLeft?: number;
|
|
10
|
+
} | undefined;
|
|
11
|
+
limit?: number;
|
|
12
|
+
totalCount: number;
|
|
13
|
+
}
|
|
14
|
+
export interface JEScheduleLocalData {
|
|
15
|
+
jeScheduleID: ID;
|
|
16
|
+
scheduledJournalEntryID: ID;
|
|
17
|
+
jeScheduleType?: ScheduleTypes;
|
|
18
|
+
updatedVendor?: VendorBase;
|
|
19
|
+
updatedCategoryId?: ID;
|
|
20
|
+
updatedAccumulatedDepreciationCategoryID?: ID;
|
|
21
|
+
updatedClassId?: ID;
|
|
22
|
+
}
|
|
23
|
+
export interface JESchedulesViewState extends FetchedState {
|
|
24
|
+
jeScheduleTransactionKeysByPeriod: Record<MonthYearPeriodId, JEScheduleTransactionKey[]>;
|
|
25
|
+
failedJeScheduleTransactionKeysByPeriod: Record<MonthYearPeriodId, JEScheduleTransactionKey[]>;
|
|
26
|
+
jeScheduleLocalDataById: Record<ID, JEScheduleLocalData>;
|
|
27
|
+
postStatusById: Record<ID, FetchStateAndError>;
|
|
28
|
+
ignoreStatusById: Record<JEScheduleTransactionKey, FetchStateAndError>;
|
|
29
|
+
refreshStatus: FetchStateAndError;
|
|
30
|
+
uiState: JESchedulesViewUIState;
|
|
31
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FetchedState, FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
2
|
+
import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
3
|
+
import { MonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
|
|
4
|
+
export declare const toMissingReceiptsSortKey: (v: string) => "date" | "amount" | "vendor" | "category" | "class";
|
|
5
|
+
export declare type MissingReceiptsSortKey = ReturnType<typeof toMissingReceiptsSortKey>;
|
|
6
|
+
export interface MissingReceiptsViewUIState {
|
|
7
|
+
searchString: string;
|
|
8
|
+
sortKey: MissingReceiptsSortKey;
|
|
9
|
+
sortOrder: SortOrder;
|
|
10
|
+
scrollPosition: {
|
|
11
|
+
scrollTop: number;
|
|
12
|
+
scrollLeft?: number;
|
|
13
|
+
} | undefined;
|
|
14
|
+
}
|
|
15
|
+
export interface MissingReceiptsViewState extends FetchedState {
|
|
16
|
+
transactionIdsBySelectedPeriod: Record<MonthYearPeriodId, ID[]>;
|
|
17
|
+
uploadReceiptStatusById: Record<ID, FetchStateAndError>;
|
|
18
|
+
refreshStatus: FetchStateAndError;
|
|
19
|
+
uiState: MissingReceiptsViewUIState;
|
|
20
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toMissingReceiptsSortKey = void 0;
|
|
4
|
+
const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
|
|
5
|
+
const MISSING_RECEIPTS_SORT_KEYS = [
|
|
6
|
+
'vendor',
|
|
7
|
+
'date',
|
|
8
|
+
'category',
|
|
9
|
+
'class',
|
|
10
|
+
'amount',
|
|
11
|
+
];
|
|
12
|
+
const toMissingReceiptsSortKey = (v) => (0, stringToUnion_1.stringToUnion)(v, MISSING_RECEIPTS_SORT_KEYS);
|
|
13
|
+
exports.toMissingReceiptsSortKey = toMissingReceiptsSortKey;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { FetchedState, FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
2
|
+
import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
3
|
+
import { PageToken } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
4
|
+
declare const toTransactionsSortKey: (v: string) => "name" | "date" | "vendor" | "category" | "class";
|
|
5
|
+
export declare type TransactionsSortKey = ReturnType<typeof toTransactionsSortKey>;
|
|
6
|
+
export declare const toTransactionsTabKey: (v: string) => "review" | "autoCategorized";
|
|
7
|
+
export declare type TransactionsTab = ReturnType<typeof toTransactionsTabKey>;
|
|
8
|
+
interface TransactionsViewUIState {
|
|
9
|
+
searchString: string;
|
|
10
|
+
sortKey: TransactionsSortKey;
|
|
11
|
+
sortOrder: SortOrder;
|
|
12
|
+
nodeCollapseState: Record<ID, boolean>;
|
|
13
|
+
scrollPosition: {
|
|
14
|
+
scrollTop: number;
|
|
15
|
+
scrollLeft?: number;
|
|
16
|
+
} | undefined;
|
|
17
|
+
pageToken: PageToken;
|
|
18
|
+
limit?: number;
|
|
19
|
+
totalCount: number;
|
|
20
|
+
}
|
|
21
|
+
export interface TransactionsViewState extends FetchedState {
|
|
22
|
+
saveStatus: FetchStateAndError;
|
|
23
|
+
updateStatus: FetchStateAndError;
|
|
24
|
+
refreshStatus: FetchStateAndError;
|
|
25
|
+
uiState: TransactionsViewUIState;
|
|
26
|
+
selectedTab: TransactionsTab;
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toTransactionsTabKey = void 0;
|
|
4
|
+
const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
|
|
5
|
+
const TRANSACTIONS_SORT_KEYS = [
|
|
6
|
+
'vendor',
|
|
7
|
+
'name',
|
|
8
|
+
'date',
|
|
9
|
+
'category',
|
|
10
|
+
'class',
|
|
11
|
+
];
|
|
12
|
+
const toTransactionsSortKey = (v) => (0, stringToUnion_1.stringToUnion)(v, TRANSACTIONS_SORT_KEYS);
|
|
13
|
+
const TRANSACTIONS_TABS = ['review', 'autoCategorized'];
|
|
14
|
+
const toTransactionsTabKey = (v) => (0, stringToUnion_1.stringToUnion)(v, TRANSACTIONS_TABS);
|
|
15
|
+
exports.toTransactionsTabKey = toTransactionsTabKey;
|
|
@@ -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
|
-
}, string>, updateCOABalancesRange: import("@reduxjs/toolkit").ActionCreatorWithPayload<COABalancesRange, string>, updateSelectedReportId: import("@reduxjs/toolkit").ActionCreatorWithPayload<"cash_balance" | "card_balance" | "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", string>, updateFinanceStatementAdditionalBalancesSelection: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
20
|
+
}, string>, updateCOABalancesRange: import("@reduxjs/toolkit").ActionCreatorWithPayload<COABalancesRange, string>, 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", string>, updateFinanceStatementAdditionalBalancesSelection: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
21
21
|
firstMonthOfFY: Month;
|
|
22
22
|
isCompareModeOn: boolean;
|
|
23
23
|
additionalBalances: COABalanceType[];
|
|
@@ -4,9 +4,9 @@ import { ID } from '../../commonStateTypes/common';
|
|
|
4
4
|
import { ZeniAPIStatus } from '../../responsePayload';
|
|
5
5
|
import { VendorReviewViewAllRecommendationsPayload } from '../vendorReviewView/common/payload/commonTypes';
|
|
6
6
|
export declare const initialState: GlobalMerchantViewState;
|
|
7
|
-
export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId?: string | undefined, context?: "cash_balance" | "card_balance" | "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" | undefined], {
|
|
7
|
+
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" | undefined], {
|
|
8
8
|
merchantId: string | undefined;
|
|
9
|
-
context: "cash_balance" | "card_balance" | "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" | undefined;
|
|
9
|
+
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" | undefined;
|
|
10
10
|
}, string, never, never>, createGlobalMerchantSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
11
11
|
merchantId: ID;
|
|
12
12
|
}, string>, createGlobalMerchantFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { RootState } from '../../../reducer';
|
|
4
|
+
import { ZeniAPI } from '../../../zeniAPI';
|
|
5
|
+
import { fetchMonthEndCloseChecks, updateMonthEndCloseChecksView } from '../monthEndCloseChecksViewReducer';
|
|
6
|
+
import { updateMonthEndCloseChecks } from '../../../entity/monthEndCloseChecks/monthEndCloseChecksReducer';
|
|
7
|
+
export declare type ActionType = ReturnType<typeof fetchMonthEndCloseChecks> | ReturnType<typeof updateMonthEndCloseChecksView> | ReturnType<typeof updateMonthEndCloseChecks>;
|
|
8
|
+
export declare const fetchMonthEndCloseChecksEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchMonthEndCloseChecksEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const responsePayload_1 = require("../../../responsePayload");
|
|
7
|
+
const monthEndCloseChecksViewReducer_1 = require("../monthEndCloseChecksViewReducer");
|
|
8
|
+
const monthEndCloseChecksReducer_1 = require("../../../entity/monthEndCloseChecks/monthEndCloseChecksReducer");
|
|
9
|
+
const fetchMonthEndCloseChecksEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(monthEndCloseChecksViewReducer_1.fetchMonthEndCloseChecks.match), (0, operators_1.switchMap)((action) => {
|
|
10
|
+
const { period, tenantId } = action.payload;
|
|
11
|
+
const month = period.month < 10 ? `0${period.month}` : period.month;
|
|
12
|
+
const queryParam = {
|
|
13
|
+
month_and_year: `${month}-${period.year}`,
|
|
14
|
+
history_month_and_year_flag: true,
|
|
15
|
+
};
|
|
16
|
+
return zeniAPI
|
|
17
|
+
.getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/month-close/checks?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
18
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
19
|
+
if (response.data != null) {
|
|
20
|
+
const actions = [
|
|
21
|
+
(0, monthEndCloseChecksReducer_1.updateMonthEndCloseChecks)({
|
|
22
|
+
monthEndCloseChecksPayload: response.data,
|
|
23
|
+
tenantId,
|
|
24
|
+
period,
|
|
25
|
+
}),
|
|
26
|
+
(0, monthEndCloseChecksViewReducer_1.updateMonthEndCloseChecksView)({
|
|
27
|
+
tenantId,
|
|
28
|
+
period,
|
|
29
|
+
fetchState: 'Completed',
|
|
30
|
+
}),
|
|
31
|
+
];
|
|
32
|
+
return (0, rxjs_1.from)(actions);
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
const actions = [
|
|
36
|
+
(0, monthEndCloseChecksViewReducer_1.updateMonthEndCloseChecksView)({
|
|
37
|
+
tenantId,
|
|
38
|
+
period,
|
|
39
|
+
fetchState: 'Error',
|
|
40
|
+
error: response.status,
|
|
41
|
+
}),
|
|
42
|
+
];
|
|
43
|
+
return (0, rxjs_1.from)(actions);
|
|
44
|
+
}
|
|
45
|
+
}), (0, operators_1.catchError)((error) => {
|
|
46
|
+
const actions = [
|
|
47
|
+
(0, monthEndCloseChecksViewReducer_1.updateMonthEndCloseChecksView)({
|
|
48
|
+
tenantId,
|
|
49
|
+
period,
|
|
50
|
+
fetchState: 'Error',
|
|
51
|
+
error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'Fetch Month end close checks REST API call errored out' +
|
|
52
|
+
JSON.stringify(error)),
|
|
53
|
+
}),
|
|
54
|
+
];
|
|
55
|
+
return (0, rxjs_1.from)(actions);
|
|
56
|
+
}));
|
|
57
|
+
}));
|
|
58
|
+
exports.fetchMonthEndCloseChecksEpic = fetchMonthEndCloseChecksEpic;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FetchState, ID } from '../../commonStateTypes/common';
|
|
2
|
+
import { MonthEndCloseChecksViewState } from './monthEndCloseChecksViewState';
|
|
3
|
+
import { ZeniAPIStatus } from '../../responsePayload';
|
|
4
|
+
import { MonthYearPeriod } from '../../commonStateTypes/timePeriod';
|
|
5
|
+
export declare const initialState: MonthEndCloseChecksViewState;
|
|
6
|
+
export declare const fetchMonthEndCloseChecks: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
7
|
+
tenantId: ID;
|
|
8
|
+
period: MonthYearPeriod;
|
|
9
|
+
}, string>, updateMonthEndCloseChecksView: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
10
|
+
tenantId: ID;
|
|
11
|
+
period: MonthYearPeriod;
|
|
12
|
+
fetchState: FetchState;
|
|
13
|
+
error?: ZeniAPIStatus<Record<string, unknown>> | undefined;
|
|
14
|
+
}, string>, clearAllMonthEndCloseChecksView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
15
|
+
declare const _default: import("@reduxjs/toolkit").Reducer<MonthEndCloseChecksViewState, import("@reduxjs/toolkit").AnyAction>;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.clearAllMonthEndCloseChecksView = exports.updateMonthEndCloseChecksView = exports.fetchMonthEndCloseChecks = exports.initialState = void 0;
|
|
5
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
+
const timePeriod_1 = require("../../commonStateTypes/timePeriod");
|
|
7
|
+
exports.initialState = {
|
|
8
|
+
monthEndCloseChecksViewByTenantId: {},
|
|
9
|
+
};
|
|
10
|
+
const monthEndCloseChecksView = (0, toolkit_1.createSlice)({
|
|
11
|
+
name: 'monthEndCloseChecksView',
|
|
12
|
+
initialState: exports.initialState,
|
|
13
|
+
reducers: {
|
|
14
|
+
fetchMonthEndCloseChecks(draft, action) {
|
|
15
|
+
const { tenantId, period } = action.payload;
|
|
16
|
+
const monthYearId = (0, timePeriod_1.toMonthYearPeriodId)(period);
|
|
17
|
+
draft.monthEndCloseChecksViewByTenantId = Object.assign(Object.assign({}, draft.monthEndCloseChecksViewByTenantId), { [tenantId]: Object.assign(Object.assign({}, draft.monthEndCloseChecksViewByTenantId[tenantId]), { [monthYearId]: {
|
|
18
|
+
fetchState: 'In-Progress',
|
|
19
|
+
error: undefined,
|
|
20
|
+
} }) });
|
|
21
|
+
},
|
|
22
|
+
updateMonthEndCloseChecksView(draft, action) {
|
|
23
|
+
const { tenantId, period, error, fetchState } = action.payload;
|
|
24
|
+
const monthYearId = (0, timePeriod_1.toMonthYearPeriodId)(period);
|
|
25
|
+
draft.monthEndCloseChecksViewByTenantId = Object.assign(Object.assign({}, draft.monthEndCloseChecksViewByTenantId), { [tenantId]: Object.assign(Object.assign({}, draft.monthEndCloseChecksViewByTenantId[tenantId]), { [monthYearId]: {
|
|
26
|
+
fetchState,
|
|
27
|
+
error: error,
|
|
28
|
+
} }) });
|
|
29
|
+
},
|
|
30
|
+
clearAllMonthEndCloseChecksView(draft) {
|
|
31
|
+
draft.monthEndCloseChecksViewByTenantId = {};
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
_a = monthEndCloseChecksView.actions, exports.fetchMonthEndCloseChecks = _a.fetchMonthEndCloseChecks, exports.updateMonthEndCloseChecksView = _a.updateMonthEndCloseChecksView, exports.clearAllMonthEndCloseChecksView = _a.clearAllMonthEndCloseChecksView;
|
|
36
|
+
exports.default = monthEndCloseChecksView.reducer;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ID } from '../../commonStateTypes/common';
|
|
2
|
+
import { SelectorView } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
|
+
import { RootState } from '../../reducer';
|
|
4
|
+
import { MonthEndCloseChecksInfo } from '../../entity/monthEndCloseChecks/monthEndCloseChecksState';
|
|
5
|
+
import { MonthYearPeriod } from '../../commonStateTypes/timePeriod';
|
|
6
|
+
export interface MonthEndCloseChecksView extends SelectorView {
|
|
7
|
+
monthEndCloseChecks?: MonthEndCloseChecksInfo;
|
|
8
|
+
selectedPeriod: MonthYearPeriod;
|
|
9
|
+
}
|
|
10
|
+
export declare const getMonthEndCloseChecksViewByTenantId: (state: RootState, tenantId: ID) => MonthEndCloseChecksView;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getMonthEndCloseChecksViewByTenantId = void 0;
|
|
4
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
5
|
+
const monthEndCloseChecksSelector_1 = require("../../entity/monthEndCloseChecks/monthEndCloseChecksSelector");
|
|
6
|
+
const timePeriod_1 = require("../../commonStateTypes/timePeriod");
|
|
7
|
+
exports.getMonthEndCloseChecksViewByTenantId = (0, toolkit_1.createSelector)((state) => state.monthEndCloseChecksState, (state) => state.monthEndCloseChecksViewState, (state) => state.expenseAutomationViewState, (_state, tenantId) => tenantId, (monthEndCloseChecksState, monthEndCloseChecksViewState, expenseAutomationViewState, tenantId) => {
|
|
8
|
+
var _a;
|
|
9
|
+
const selectedPeriod = expenseAutomationViewState.selectedPeriodByTenantId[tenantId];
|
|
10
|
+
const { monthEndCloseChecksViewByTenantId } = monthEndCloseChecksViewState;
|
|
11
|
+
const monthYearPeriodId = selectedPeriod != null ? (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod) : null;
|
|
12
|
+
const monthEndCloseChecksView = monthYearPeriodId != null
|
|
13
|
+
? (_a = monthEndCloseChecksViewByTenantId[tenantId]) === null || _a === void 0 ? void 0 : _a[monthYearPeriodId]
|
|
14
|
+
: undefined;
|
|
15
|
+
const monthEndCloseChecks = monthYearPeriodId != null
|
|
16
|
+
? (0, monthEndCloseChecksSelector_1.getMonthEndCloseChecksByTenantId)(monthEndCloseChecksState, tenantId, monthYearPeriodId)
|
|
17
|
+
: undefined;
|
|
18
|
+
if (monthEndCloseChecksView != null && monthEndCloseChecks != null) {
|
|
19
|
+
return Object.assign(Object.assign({}, monthEndCloseChecksView), { monthEndCloseChecks, reportId: 'expense_automation_card', selectedPeriod });
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
fetchState: 'Not-Started',
|
|
23
|
+
error: undefined,
|
|
24
|
+
reportId: 'expense_automation_card',
|
|
25
|
+
selectedPeriod,
|
|
26
|
+
};
|
|
27
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FetchStateAndError, ID } from '../../commonStateTypes/common';
|
|
2
|
+
import { MonthYearPeriodId } from '../../commonStateTypes/timePeriod';
|
|
3
|
+
export interface MonthEndCloseChecksViewState {
|
|
4
|
+
monthEndCloseChecksViewByTenantId: Record<ID, Record<MonthYearPeriodId, FetchStateAndError>>;
|
|
5
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RootState } from '../../reducer';
|
|
2
2
|
export declare const getReimbursementCardReport: (state: RootState) => {
|
|
3
|
-
reportId: "cash_balance" | "card_balance" | "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";
|
|
3
|
+
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" | "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";
|
|
4
4
|
reportTitle: string;
|
|
5
5
|
version: string | number | undefined;
|
|
6
6
|
fetchState: import("../..").FetchState;
|
|
@@ -3,7 +3,7 @@ import { SortOrder } from '../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
|
3
3
|
import { OnboardingInfo } from '../../entity/company/companyStateTypes';
|
|
4
4
|
import { ZeniDate } from '../../zeniDayJS';
|
|
5
5
|
import { AuditSummaryPayload, ReviewCompanyPayload } from './reviewCompanyPayload';
|
|
6
|
-
export declare const toReviewColumnKeyType: (v: string) => "companyName" | "
|
|
6
|
+
export declare const toReviewColumnKeyType: (v: string) => "companyName" | "auditScore" | "miscategorized" | "notes" | "uncategorized" | "warnings" | "vendorReview" | "reviewVendor";
|
|
7
7
|
export declare type ReviewCompanyColumnKey = ReturnType<typeof toReviewColumnKeyType>;
|
|
8
8
|
export declare type ReviewTransactionsType = 'income' | 'expense';
|
|
9
9
|
export interface AuditSummary {
|
package/lib/view/scheduleView/scheduleAccruedDetailView/LinkBillExpenseView/linkBillExpense.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare const toLinkBillExpenseKeysType: (v: string) => "attachment" | "name" | "amount" | "
|
|
1
|
+
declare const toLinkBillExpenseKeysType: (v: string) => "attachment" | "name" | "amount" | "transactionType" | "memo" | "creationDate";
|
|
2
2
|
export declare type LinkBillExpenseKey = ReturnType<typeof toLinkBillExpenseKeysType>;
|
|
3
3
|
export {};
|
|
@@ -11,11 +11,12 @@ const transactionDetailState_1 = require("../../../transactionDetail/transaction
|
|
|
11
11
|
const fetchScheduleDetailsEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(scheduleDetailReducer_1.fetchScheduleDetails.match), (0, operators_1.mergeMap)((action) => {
|
|
12
12
|
var _a;
|
|
13
13
|
const updateActions = [];
|
|
14
|
-
const { scheduleType, selectedJeScheduleDetailId } = action.payload;
|
|
14
|
+
const { scheduleType, selectedJeScheduleDetailId, cacheOverride } = action.payload;
|
|
15
15
|
const { scheduleDetailState } = state$.value;
|
|
16
16
|
if (selectedJeScheduleDetailId != null) {
|
|
17
17
|
if (((_a = scheduleDetailState.editScheduleStateByDetailId[scheduleType][selectedJeScheduleDetailId]) === null || _a === void 0 ? void 0 : _a.jeScheduleDetails.length) > 0 &&
|
|
18
|
-
scheduleDetailState.selectedJEScheduleKey != null
|
|
18
|
+
scheduleDetailState.selectedJEScheduleKey != null &&
|
|
19
|
+
cacheOverride !== true) {
|
|
19
20
|
updateActions.push((0, scheduleDetailReducer_1.initializeScheduleDetailLocalData)(scheduleType, scheduleDetailState.selectedJEScheduleKey, selectedJeScheduleDetailId));
|
|
20
21
|
updateActions.push((0, scheduleDetailReducer_1.updateScheduleDetailsSuccess)());
|
|
21
22
|
return (0, rxjs_1.from)(updateActions);
|
|
@@ -21,7 +21,7 @@ const fetchScheduleDetailsPageEpic = (actions$, state$) => actions$.pipe((0, ope
|
|
|
21
21
|
scheduleDetailsActions.push((0, classListReducer_1.fetchClassList)());
|
|
22
22
|
}
|
|
23
23
|
if (action.payload.selectedJeScheduleDetailId != null) {
|
|
24
|
-
scheduleDetailsActions.push((0, scheduleDetailReducer_1.fetchScheduleDetails)(action.payload.scheduleType, action.payload.selectedJeScheduleDetailId));
|
|
24
|
+
scheduleDetailsActions.push((0, scheduleDetailReducer_1.fetchScheduleDetails)(action.payload.scheduleType, action.payload.selectedJeScheduleDetailId, action.payload.cacheOverride));
|
|
25
25
|
}
|
|
26
26
|
return (0, rxjs_1.concat)((0, rxjs_1.from)(scheduleDetailsActions));
|
|
27
27
|
}));
|
|
@@ -13,7 +13,7 @@ const saveScheduleDetailsEpic = (actions$, state$, zeniAPI) => actions$.pipe((0,
|
|
|
13
13
|
var _a;
|
|
14
14
|
const state = state$.value;
|
|
15
15
|
const { scheduleDetailState } = state;
|
|
16
|
-
const { selectedJeScheduleDetailId, scheduleType } = action.payload;
|
|
16
|
+
const { selectedJeScheduleDetailId, scheduleType, isUpdatingVendorCategoryOrClass, } = action.payload;
|
|
17
17
|
const selectedJEScheduleKey = scheduleDetailState.selectedJEScheduleKey;
|
|
18
18
|
const actions = [];
|
|
19
19
|
if (selectedJEScheduleKey == null) {
|
|
@@ -25,7 +25,7 @@ const saveScheduleDetailsEpic = (actions$, state$, zeniAPI) => actions$.pipe((0,
|
|
|
25
25
|
const scheduleDetailsUpdated = scheduleDetailId != null
|
|
26
26
|
? state.scheduleDetailState.editScheduleStateByDetailId[scheduleType][scheduleDetailId]
|
|
27
27
|
: state.scheduleDetailState.newScheduleState[scheduleType];
|
|
28
|
-
const payload = Object.assign({}, (0, scheduleDetailPayload_1.prepareScheduleDetailPayload)(state, scheduleDetailsUpdated, selectedJEScheduleKey, scheduleType));
|
|
28
|
+
const payload = Object.assign({}, (0, scheduleDetailPayload_1.prepareScheduleDetailPayload)(state, scheduleDetailsUpdated, selectedJEScheduleKey, scheduleType, undefined, undefined, isUpdatingVendorCategoryOrClass));
|
|
29
29
|
const queryParam = {
|
|
30
30
|
je_schedule_type: scheduleType,
|
|
31
31
|
};
|
|
@@ -81,16 +81,22 @@ const getInitializedJEScheduleDetailsLocalData = (scheduleType, jeScheduleTransa
|
|
|
81
81
|
jeLink: (0, exports.getJETransactionLinkFromThirdPartyId)(schedule.thirdPartyID, schedule.transactionID, schedule.recommendedTransactionID),
|
|
82
82
|
};
|
|
83
83
|
});
|
|
84
|
-
const
|
|
84
|
+
const errors = scheduleJournalEntryData
|
|
85
|
+
.flatMap((journalEntry) => journalEntry.error)
|
|
86
|
+
.filter((error) => !!error);
|
|
87
|
+
const { startDate, period, jeDebit, dayOfPostingDate, lastDayOfMonth, vendor } = jeScheduleTransactionState;
|
|
85
88
|
return {
|
|
86
89
|
scheduleType,
|
|
87
90
|
jeScheduleDetails: jeScheduleDetailsLocalData,
|
|
88
91
|
selectedDate: startDate,
|
|
89
92
|
selectedMonths: period,
|
|
90
|
-
selectedAccount: (
|
|
93
|
+
selectedAccount: errors.includes('debit_category_deleted')
|
|
94
|
+
? undefined
|
|
95
|
+
: (_a = jeDebit.account) === null || _a === void 0 ? void 0 : _a.accountId,
|
|
91
96
|
selectedClass: (_b = jeDebit.accountingClass) === null || _b === void 0 ? void 0 : _b.classId,
|
|
92
97
|
selectedDayOfMonth: dayOfPostingDate,
|
|
93
98
|
lastDayOfMonth: lastDayOfMonth,
|
|
99
|
+
selectedVendor: errors.includes('vendor_deleted') ? undefined : vendor,
|
|
94
100
|
};
|
|
95
101
|
};
|
|
96
102
|
exports.getInitializedJEScheduleDetailsLocalData = getInitializedJEScheduleDetailsLocalData;
|
|
@@ -107,18 +113,26 @@ const getInitializedFixedAssetsJEScheduleDetailsLocalData = (jeScheduleTransacti
|
|
|
107
113
|
jeLink: (0, exports.getJETransactionLinkFromThirdPartyId)(schedule.thirdPartyID, schedule.transactionID, schedule.recommendedTransactionID),
|
|
108
114
|
};
|
|
109
115
|
});
|
|
110
|
-
const
|
|
116
|
+
const errors = scheduleJournalEntryData
|
|
117
|
+
.flatMap((journalEntry) => journalEntry.error)
|
|
118
|
+
.filter((error) => !!error);
|
|
119
|
+
const { startDate, period, jeDebit, dayOfPostingDate, lastDayOfMonth, jeCredit, otherAttributes, vendor, } = jeScheduleTransactionState;
|
|
111
120
|
return {
|
|
112
121
|
scheduleType: 'fixed_assets',
|
|
113
122
|
jeScheduleDetails: jeScheduleDetailsLocalData,
|
|
114
123
|
selectedDate: startDate,
|
|
115
124
|
selectedMonths: period,
|
|
116
|
-
selectedAccount: (
|
|
125
|
+
selectedAccount: errors.includes('debit_category_deleted')
|
|
126
|
+
? undefined
|
|
127
|
+
: (_a = jeDebit.account) === null || _a === void 0 ? void 0 : _a.accountId,
|
|
117
128
|
selectedClass: (_b = jeDebit.accountingClass) === null || _b === void 0 ? void 0 : _b.classId,
|
|
118
|
-
selectedAccumulatedDepreciationCategory: (
|
|
129
|
+
selectedAccumulatedDepreciationCategory: errors.includes('credit_category_deleted')
|
|
130
|
+
? undefined
|
|
131
|
+
: (_c = jeCredit.account) === null || _c === void 0 ? void 0 : _c.accountId,
|
|
119
132
|
selectedDayOfMonth: dayOfPostingDate,
|
|
120
133
|
assetId: (_d = otherAttributes.assetId) !== null && _d !== void 0 ? _d : undefined,
|
|
121
134
|
lastDayOfMonth: lastDayOfMonth,
|
|
135
|
+
selectedVendor: errors.includes('vendor_deleted') ? undefined : vendor,
|
|
122
136
|
};
|
|
123
137
|
};
|
|
124
138
|
exports.getInitializedFixedAssetsJEScheduleDetailsLocalData = getInitializedFixedAssetsJEScheduleDetailsLocalData;
|
|
@@ -3,14 +3,15 @@ import { ScheduleDetailsLocalData, ScheduleDetailsLocalDataFixedAssets } from '.
|
|
|
3
3
|
import { JEScheduleTransactionKey, ScheduleTypes } from '../../../entity/jeSchedules/jeSchedulesTypes';
|
|
4
4
|
import { VendorBasePayload } from '../../../entity/vendor/vendorPayload';
|
|
5
5
|
import { JEScheduledTransaction } from '../../../entity/jeSchedules/jeSchedulesSelector';
|
|
6
|
-
import { VendorState } from '../../../entity/vendor/vendorState';
|
|
6
|
+
import { Vendor, VendorState } from '../../../entity/vendor/vendorState';
|
|
7
|
+
import { ScheduleTransaction } from '../../../entity/transaction/stateTypes/scheduleTransaction';
|
|
7
8
|
import { AccountBasePayload } from '../../../entity/account/accountPayload';
|
|
8
9
|
import { ClassBasePayload } from '../../../entity/class/classPayload';
|
|
9
10
|
import { TransactionIDPayload } from '../../../entity/transaction/payloadTypes/transactionIDPayload';
|
|
10
11
|
import { StatusCodeWithLabelPayload } from '../../../commonPayloadTypes/statusPayload';
|
|
11
12
|
import { JEScheduleOtherAttributesPayload } from '../../../entity/jeSchedules/jeSchedulesPayload';
|
|
12
13
|
declare type BaseScheduleTransactionPayload = SaveScheduleTransactionPayload;
|
|
13
|
-
interface JESchedulePayload {
|
|
14
|
+
export interface JESchedulePayload {
|
|
14
15
|
status: StatusCodeWithLabelPayload;
|
|
15
16
|
vendor: VendorBasePayload;
|
|
16
17
|
currency_code: string;
|
|
@@ -28,7 +29,9 @@ interface JESchedulePayload {
|
|
|
28
29
|
je_debit_accounting_class_id: string | null;
|
|
29
30
|
other_attributes: JEScheduleOtherAttributesPayload;
|
|
30
31
|
is_deleted?: boolean;
|
|
32
|
+
is_reviewed?: boolean;
|
|
31
33
|
je_schedule_id?: string;
|
|
34
|
+
is_update_vendor_category_or_class?: boolean;
|
|
32
35
|
}
|
|
33
36
|
export interface SaveJESchedulePayload {
|
|
34
37
|
status: StatusCodeWithLabelPayload;
|
|
@@ -59,6 +62,8 @@ interface SaveScheduleDetailPayload {
|
|
|
59
62
|
je_schedules: JESchedulePayload[];
|
|
60
63
|
scheduled_journal_entries: SaveJESchedulePayload[];
|
|
61
64
|
}
|
|
65
|
+
export declare const mapVendorToVendorPayload: (payload: Vendor) => VendorBasePayload;
|
|
66
|
+
export declare const mapScheduleTransactionToBaseScheduleTransactionPayload: (payload: ScheduleTransaction) => BaseScheduleTransactionPayload;
|
|
62
67
|
export declare const mapAccruedExpenseJEScheduleTransactionToPayload: (jeScheduleTransactionState: JEScheduledTransaction, vendorState: VendorState, scheduleDetailsLocalData: ScheduleDetailsLocalDataFixedAssets, isDelete?: boolean | undefined, isMarkAsComplete?: boolean | undefined) => JESchedulePayload;
|
|
63
|
-
export declare const prepareScheduleDetailPayload: (state: RootState, scheduleDetailsLocalData: ScheduleDetailsLocalData, selectedJEScheduleKey: JEScheduleTransactionKey, jeScheduleType: ScheduleTypes, isDelete?: boolean | undefined, isMarkAsComplete?: boolean | undefined) => SaveScheduleDetailPayload;
|
|
68
|
+
export declare const prepareScheduleDetailPayload: (state: RootState, scheduleDetailsLocalData: ScheduleDetailsLocalData, selectedJEScheduleKey: JEScheduleTransactionKey, jeScheduleType: ScheduleTypes, isDelete?: boolean | undefined, isMarkAsComplete?: boolean | undefined, isUpdatingVendorCategoryOrClass?: boolean | undefined) => SaveScheduleDetailPayload;
|
|
64
69
|
export {};
|