@zeniai/client-epic-state 4.20.2-betaRD2 → 4.20.2
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/animations.d.ts +1 -1
- package/lib/entity/aiCfo/aiCfoSelector.d.ts +2 -1
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +2 -2
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +0 -38
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +0 -78
- package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +1 -4
- package/lib/entity/jeSchedules/jeSchedulesSelector.js +1 -5
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +0 -37
- package/lib/entity/tenant/tenantPayload.d.ts +0 -1
- package/lib/entity/tenant/tenantReducer.js +0 -1
- package/lib/entity/tenant/tenantSelector.d.ts +0 -1
- package/lib/entity/tenant/tenantSelector.js +1 -9
- package/lib/entity/tenant/tenantState.d.ts +0 -1
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +1 -4
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -1
- package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +0 -3
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +1 -17
- package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +0 -1
- package/lib/entity/transaction/stateTypes/transaction.d.ts +0 -5
- package/lib/entity/transaction/stateTypes/transactionLine.d.ts +1 -1
- package/lib/epic.d.ts +1 -2
- package/lib/epic.js +1 -2
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +0 -78
- package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +1 -5
- package/lib/esm/entity/tenant/tenantReducer.js +0 -1
- package/lib/esm/entity/tenant/tenantSelector.js +0 -7
- package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -1
- package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +1 -17
- package/lib/esm/epic.js +1 -2
- package/lib/esm/index.js +7 -8
- package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +1 -82
- package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +2 -8
- package/lib/esm/view/classList/fetchClassListEpic.js +2 -9
- package/lib/esm/view/commonVendorView/vendorView/vendorViewSelector.js +5 -18
- package/lib/esm/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +2 -6
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +2 -2
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +3 -4
- package/lib/esm/view/expenseAutomationView/expenseAutomationViewSelector.js +1 -0
- package/lib/esm/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
- package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
- package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +1 -17
- package/lib/esm/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +2 -10
- package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +6 -63
- package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +4 -12
- package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +9 -22
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +6 -12
- package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +1 -18
- package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +0 -3
- package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +0 -10
- package/lib/esm/view/spendManagement/billPay/billList/billListState.js +0 -1
- package/lib/esm/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +3 -7
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +2 -7
- package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +6 -13
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
- package/lib/esm/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +4 -7
- package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
- package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
- package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
- package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
- package/lib/esm/view/transactionDetail/transactionDetailLocalDataHelper.js +14 -16
- package/lib/esm/view/transactionDetail/transactionDetailSelector.js +2 -9
- package/lib/index.d.ts +10 -13
- package/lib/index.js +32 -42
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
- package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +0 -7
- package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +1 -15
- package/lib/view/aiCfoView/aiCfoViewReducer.js +2 -83
- package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +1 -4
- package/lib/view/aiCfoView/aiCfoViewSelector.js +2 -9
- package/lib/view/aiCfoView/aiCfoViewState.d.ts +1 -15
- package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
- package/lib/view/classList/fetchClassListEpic.d.ts +1 -1
- package/lib/view/classList/fetchClassListEpic.js +1 -8
- package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +0 -1
- package/lib/view/commonVendorView/vendorView/vendorViewSelector.js +5 -18
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +0 -1
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +2 -6
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
- package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +1 -1
- package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +3 -4
- package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +1 -0
- package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +1 -1
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +2 -18
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +0 -2
- package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +2 -10
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +6 -63
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +4 -12
- package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +9 -22
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +5 -11
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +0 -5
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +0 -20
- package/lib/view/onboardingView/cockpitView/types/onboardingCockpitViewTypes.d.ts +1 -1
- package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +0 -3
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListSelector.js +0 -10
- package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListState.js +0 -1
- package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +3 -7
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +2 -7
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +6 -13
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
- package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +3 -6
- package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.d.ts +0 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
- package/lib/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
- package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +14 -16
- package/lib/view/transactionDetail/transactionDetailSelector.d.ts +0 -1
- package/lib/view/transactionDetail/transactionDetailSelector.js +2 -9
- package/package.json +1 -1
- package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.d.ts +0 -19
- package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.js +0 -2
- package/lib/esm/common/aiCfo/aiCfoSuggestedQuestionsPageContext.js +0 -1
- package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +0 -29
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +0 -8
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +0 -33
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.updateRecommendationForAccountSettingsFailure = exports.updateRecommendationForAccountSettings = exports.updateJeScheduleTransactionKeys = exports.updateJeScheduleLocalDataById = exports.
|
|
4
|
+
exports.updateRecommendationForAccountSettingsFailure = exports.updateRecommendationForAccountSettings = exports.updateJeScheduleTransactionKeys = exports.updateJeScheduleLocalDataById = exports.updateAccountSettingsListForAccountTypesFailure = exports.updateAccountSettingsListForAccountTypes = exports.saveAccountSettingsSuccess = exports.saveAccountSettingsLocalData = exports.saveAccountSettingsFailure = exports.saveAccountSettings = exports.retryJeScheduleSuccess = exports.retryJeScheduleFailure = exports.retryJeSchedule = exports.removeJeScheduleTransactionKey = exports.removeJeScheduleLocalDataById = exports.removeFailedJeScheduleTransactionKey = exports.initializeJeScheduleLocalData = exports.initializeAccountSettingsView = exports.ignoreRecommendedJeScheduleSuccess = exports.ignoreRecommendedJeScheduleFailure = exports.ignoreRecommendedJeSchedule = exports.fetchRecommendationForAccountSettings = exports.fetchJeSchedulesSuccess = exports.fetchJeSchedulesPage = exports.fetchJeSchedulesFailure = exports.fetchJeSchedules = exports.fetchAccountSettingsListForAccountTypes = exports.clearJeScheduleLocalData = exports.clearJeAccountSettingsLocalData = exports.clearExpenseAutomationJESchedulesView = exports.initialState = exports.accountSettingsInitialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const getNestedAccountIDHierarchyForReport_1 = require("../../../commonStateTypes/accountView/getNestedAccountIDHierarchyForReport");
|
|
7
7
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
@@ -48,8 +48,6 @@ exports.initialState = {
|
|
|
48
48
|
uiState: {
|
|
49
49
|
searchString: '',
|
|
50
50
|
scrollPosition: { scrollTop: 0, scrollLeft: undefined },
|
|
51
|
-
sortKey: 'startMonth',
|
|
52
|
-
sortOrder: 'descending',
|
|
53
51
|
totalCount: 0,
|
|
54
52
|
limit: 10,
|
|
55
53
|
},
|
|
@@ -371,26 +369,12 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
|
|
|
371
369
|
clearJeAccountSettingsLocalData(draft) {
|
|
372
370
|
draft.accountSettings.localData = exports.accountSettingsInitialState.localData;
|
|
373
371
|
},
|
|
374
|
-
updateJESchedulesUIState(draft, action) {
|
|
375
|
-
if (action.payload.sortKey != null) {
|
|
376
|
-
draft.uiState.sortKey = action.payload.sortKey;
|
|
377
|
-
}
|
|
378
|
-
if (action.payload.sortOrder != null) {
|
|
379
|
-
draft.uiState.sortOrder = action.payload.sortOrder;
|
|
380
|
-
}
|
|
381
|
-
if (action.payload.searchString != null) {
|
|
382
|
-
draft.uiState.searchString = action.payload.searchString;
|
|
383
|
-
}
|
|
384
|
-
if (action.payload.scrollPosition != null) {
|
|
385
|
-
draft.uiState.scrollPosition = action.payload.scrollPosition;
|
|
386
|
-
}
|
|
387
|
-
},
|
|
388
372
|
clearExpenseAutomationJESchedulesView(draft) {
|
|
389
373
|
Object.assign(draft, exports.initialState);
|
|
390
374
|
},
|
|
391
375
|
},
|
|
392
376
|
});
|
|
393
|
-
_a = expenseAutomationJESchedulesView.actions, exports.clearExpenseAutomationJESchedulesView = _a.clearExpenseAutomationJESchedulesView, exports.clearJeAccountSettingsLocalData = _a.clearJeAccountSettingsLocalData, exports.clearJeScheduleLocalData = _a.clearJeScheduleLocalData, exports.fetchAccountSettingsListForAccountTypes = _a.fetchAccountSettingsListForAccountTypes, exports.fetchJeSchedules = _a.fetchJeSchedules, exports.fetchJeSchedulesFailure = _a.fetchJeSchedulesFailure, exports.fetchJeSchedulesPage = _a.fetchJeSchedulesPage, exports.fetchJeSchedulesSuccess = _a.fetchJeSchedulesSuccess, exports.fetchRecommendationForAccountSettings = _a.fetchRecommendationForAccountSettings, exports.ignoreRecommendedJeSchedule = _a.ignoreRecommendedJeSchedule, exports.ignoreRecommendedJeScheduleFailure = _a.ignoreRecommendedJeScheduleFailure, exports.ignoreRecommendedJeScheduleSuccess = _a.ignoreRecommendedJeScheduleSuccess, exports.initializeAccountSettingsView = _a.initializeAccountSettingsView, exports.initializeJeScheduleLocalData = _a.initializeJeScheduleLocalData, exports.removeFailedJeScheduleTransactionKey = _a.removeFailedJeScheduleTransactionKey, exports.removeJeScheduleLocalDataById = _a.removeJeScheduleLocalDataById, exports.removeJeScheduleTransactionKey = _a.removeJeScheduleTransactionKey, exports.retryJeSchedule = _a.retryJeSchedule, exports.retryJeScheduleFailure = _a.retryJeScheduleFailure, exports.retryJeScheduleSuccess = _a.retryJeScheduleSuccess, exports.saveAccountSettings = _a.saveAccountSettings, exports.saveAccountSettingsFailure = _a.saveAccountSettingsFailure, exports.saveAccountSettingsLocalData = _a.saveAccountSettingsLocalData, exports.saveAccountSettingsSuccess = _a.saveAccountSettingsSuccess, exports.updateAccountSettingsListForAccountTypes = _a.updateAccountSettingsListForAccountTypes, exports.updateAccountSettingsListForAccountTypesFailure = _a.updateAccountSettingsListForAccountTypesFailure, exports.
|
|
377
|
+
_a = expenseAutomationJESchedulesView.actions, exports.clearExpenseAutomationJESchedulesView = _a.clearExpenseAutomationJESchedulesView, exports.clearJeAccountSettingsLocalData = _a.clearJeAccountSettingsLocalData, exports.clearJeScheduleLocalData = _a.clearJeScheduleLocalData, exports.fetchAccountSettingsListForAccountTypes = _a.fetchAccountSettingsListForAccountTypes, exports.fetchJeSchedules = _a.fetchJeSchedules, exports.fetchJeSchedulesFailure = _a.fetchJeSchedulesFailure, exports.fetchJeSchedulesPage = _a.fetchJeSchedulesPage, exports.fetchJeSchedulesSuccess = _a.fetchJeSchedulesSuccess, exports.fetchRecommendationForAccountSettings = _a.fetchRecommendationForAccountSettings, exports.ignoreRecommendedJeSchedule = _a.ignoreRecommendedJeSchedule, exports.ignoreRecommendedJeScheduleFailure = _a.ignoreRecommendedJeScheduleFailure, exports.ignoreRecommendedJeScheduleSuccess = _a.ignoreRecommendedJeScheduleSuccess, exports.initializeAccountSettingsView = _a.initializeAccountSettingsView, exports.initializeJeScheduleLocalData = _a.initializeJeScheduleLocalData, exports.removeFailedJeScheduleTransactionKey = _a.removeFailedJeScheduleTransactionKey, exports.removeJeScheduleLocalDataById = _a.removeJeScheduleLocalDataById, exports.removeJeScheduleTransactionKey = _a.removeJeScheduleTransactionKey, exports.retryJeSchedule = _a.retryJeSchedule, exports.retryJeScheduleFailure = _a.retryJeScheduleFailure, exports.retryJeScheduleSuccess = _a.retryJeScheduleSuccess, exports.saveAccountSettings = _a.saveAccountSettings, exports.saveAccountSettingsFailure = _a.saveAccountSettingsFailure, exports.saveAccountSettingsLocalData = _a.saveAccountSettingsLocalData, exports.saveAccountSettingsSuccess = _a.saveAccountSettingsSuccess, exports.updateAccountSettingsListForAccountTypes = _a.updateAccountSettingsListForAccountTypes, exports.updateAccountSettingsListForAccountTypesFailure = _a.updateAccountSettingsListForAccountTypesFailure, exports.updateJeScheduleLocalDataById = _a.updateJeScheduleLocalDataById, exports.updateJeScheduleTransactionKeys = _a.updateJeScheduleTransactionKeys, exports.updateRecommendationForAccountSettings = _a.updateRecommendationForAccountSettings, exports.updateRecommendationForAccountSettingsFailure = _a.updateRecommendationForAccountSettingsFailure;
|
|
394
378
|
exports.default = expenseAutomationJESchedulesView.reducer;
|
|
395
379
|
const doUpdateRecommendationForAccountSettings = (draft, payload) => {
|
|
396
380
|
const { prepaidExpensesRecommendations, fixedAssetsRecommendations, accruedExpensesRecommendations, } = (0, accountTypeRecommendationPayload_1.mapAccountTypeRecommendationPayloadToAccountRecommendationByType)(payload);
|
|
@@ -18,12 +18,10 @@ export interface ExpenseAutomationJESchedulesViewSelector extends SelectorView {
|
|
|
18
18
|
allDepreciationAccountList: AccountBase[];
|
|
19
19
|
allDepreciationAccountListNestedAccountHierarchy: NestedAccountHierarchyForReport[];
|
|
20
20
|
classListNestedAccountHierarchy: NestedClassHierarchyForReport[];
|
|
21
|
-
completedSchedules: JEScheduledTransaction[];
|
|
22
21
|
completionStatus: CompletionStatusType;
|
|
23
22
|
draftSchedules: JEScheduledTransaction[];
|
|
24
23
|
ignoreStatusById: Record<JEScheduleTransactionKey, FetchStateAndError>;
|
|
25
24
|
jeScheduleLocalDataById: Record<ID, JEScheduleLocalData>;
|
|
26
|
-
ongoingSchedules: JEScheduledTransaction[];
|
|
27
25
|
postStatusById: Record<ID, FetchStateAndError>;
|
|
28
26
|
refreshStatus: FetchStateAndError;
|
|
29
27
|
resolveSchedules: JEScheduledTransactionWithFailedEntries[];
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getExpenseAutomationFluxAnalysisView = getExpenseAutomationFluxAnalysisView;
|
|
4
|
-
const reduceFetchState_1 = require("../../../commonStateTypes/reduceFetchState");
|
|
5
4
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
6
5
|
const accountSelector_1 = require("../../../entity/account/accountSelector");
|
|
7
6
|
const classSelector_1 = require("../../../entity/class/classSelector");
|
|
@@ -10,7 +9,7 @@ const userSelector_1 = require("../../../entity/user/userSelector");
|
|
|
10
9
|
const vendorSelector_1 = require("../../../entity/vendor/vendorSelector");
|
|
11
10
|
const expenseAutomationViewSelectorTypes_1 = require("../selectorTypes/expenseAutomationViewSelectorTypes");
|
|
12
11
|
function getExpenseAutomationFluxAnalysisView(state) {
|
|
13
|
-
const { expenseAutomationFluxAnalysisViewState, monthEndCloseChecksState
|
|
12
|
+
const { expenseAutomationFluxAnalysisViewState, monthEndCloseChecksState } = state;
|
|
14
13
|
const { fetchState, error, refreshStatus, uiState, reviewOperatingExpenseIdsByPeriod, selectedSectionIdsByPeriod, groupsBySelectedPeriod, fluxAnalysisEntities, bulkReviewStatus, currency, totalBalancesAndVariance, } = expenseAutomationFluxAnalysisViewState;
|
|
15
14
|
const fetchStateAndError = {
|
|
16
15
|
fetchState,
|
|
@@ -95,17 +94,10 @@ function getExpenseAutomationFluxAnalysisView(state) {
|
|
|
95
94
|
},
|
|
96
95
|
};
|
|
97
96
|
const completionStatus = fluxCompletionStatus != null ? fluxCompletionStatus : 'incomplete';
|
|
98
|
-
const monthEndFetchState = monthYearPeriodId != null
|
|
99
|
-
? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? { fetchState: 'Not-Started', error: undefined })
|
|
100
|
-
: { fetchState: 'Not-Started', error: undefined };
|
|
101
|
-
const reducedFetchStatus = (0, reduceFetchState_1.reduceAnyFetchState)([
|
|
102
|
-
fetchStateAndError,
|
|
103
|
-
monthEndFetchState,
|
|
104
|
-
]);
|
|
105
97
|
return {
|
|
106
98
|
sections,
|
|
107
99
|
totalBalancesAndVariance,
|
|
108
|
-
fetchStatus:
|
|
100
|
+
fetchStatus: fetchStateAndError,
|
|
109
101
|
bulkReviewStatus,
|
|
110
102
|
reviewOperatingExpensesIds,
|
|
111
103
|
selectedSectionIds,
|
|
@@ -5,8 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getExpenseAutomationJESchedulesView = getExpenseAutomationJESchedulesView;
|
|
7
7
|
const omit_1 = __importDefault(require("lodash/omit"));
|
|
8
|
-
const orderBy_1 = __importDefault(require("lodash/orderBy"));
|
|
9
|
-
const reduceFetchState_1 = require("../../../commonStateTypes/reduceFetchState");
|
|
10
8
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
11
9
|
const accountSelector_1 = require("../../../entity/account/accountSelector");
|
|
12
10
|
const jeSchedulesSelector_1 = require("../../../entity/jeSchedules/jeSchedulesSelector");
|
|
@@ -18,48 +16,10 @@ const scheduleDetailSelector_1 = require("../../scheduleView/scheduleDetailView/
|
|
|
18
16
|
const scheduleListHelper_1 = require("../../scheduleView/scheduleListView/scheduleListHelper");
|
|
19
17
|
const expenseAutomationViewSelectorTypes_1 = require("../selectorTypes/expenseAutomationViewSelectorTypes");
|
|
20
18
|
const jeAccountSettingsViewSelector_1 = require("./jeAccountSettingsViewSelector");
|
|
21
|
-
function getJEScheduleSortAccessor(sortKey) {
|
|
22
|
-
switch (sortKey) {
|
|
23
|
-
case 'vendor':
|
|
24
|
-
return (s) => s.vendor.name?.toLowerCase();
|
|
25
|
-
case 'category':
|
|
26
|
-
return (s) => s.jeDebit.account?.accountName?.toLowerCase();
|
|
27
|
-
case 'class':
|
|
28
|
-
return (s) => s.jeDebit.accountingClass?.className?.toLowerCase();
|
|
29
|
-
case 'depCategory':
|
|
30
|
-
return (s) => s.jeCredit.account?.accountName?.toLowerCase();
|
|
31
|
-
case 'scheduleCategory':
|
|
32
|
-
return (s) => s.jeScheduleType;
|
|
33
|
-
case 'startMonth':
|
|
34
|
-
return (s) => s.startDate?.valueOf();
|
|
35
|
-
case 'type':
|
|
36
|
-
return (s) => s.baseTransaction.typeOfTransaction;
|
|
37
|
-
case 'amortizationPeriod':
|
|
38
|
-
return (s) => s.period;
|
|
39
|
-
case 'jePostingDate':
|
|
40
|
-
return (s) => s.dayOfPostingDate;
|
|
41
|
-
case 'remainingMonths':
|
|
42
|
-
return (s) => s.period;
|
|
43
|
-
case 'runningBalance':
|
|
44
|
-
return (s) => s.balanceAsOfToday?.amount;
|
|
45
|
-
case 'totalAmount':
|
|
46
|
-
return (s) => s.baseTransaction.amount.amount;
|
|
47
|
-
case 'transactionDate':
|
|
48
|
-
return (s) => s.baseTransaction.date.valueOf();
|
|
49
|
-
case 'memo':
|
|
50
|
-
return (s) => s.baseTransaction.memo?.toLowerCase();
|
|
51
|
-
default:
|
|
52
|
-
return (s) => s.startDate?.valueOf();
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
function sortJEScheduledTransactions(transactions, sortKey, sortOrder) {
|
|
56
|
-
const accessor = getJEScheduleSortAccessor(sortKey);
|
|
57
|
-
return (0, orderBy_1.default)(transactions, [accessor], [sortOrder === 'ascending' ? 'asc' : 'desc']);
|
|
58
|
-
}
|
|
59
19
|
function getExpenseAutomationJESchedulesView(state) {
|
|
60
20
|
const jeScheduledTransaction = [];
|
|
61
21
|
const failedJeScheduledTransaction = [];
|
|
62
|
-
const { accountState, accountListState, classState, classListState, expenseAutomationJESchedulesViewState, expenseAutomationViewState, monthEndCloseChecksState,
|
|
22
|
+
const { accountState, accountListState, classState, classListState, expenseAutomationJESchedulesViewState, expenseAutomationViewState, monthEndCloseChecksState, } = state;
|
|
63
23
|
const { jeScheduleTransactionKeysByPeriod, failedJeScheduleTransactionKeysByPeriod, jeScheduleLocalDataById, postStatusById, ignoreStatusById, uiState, error, fetchState, refreshStatus, } = expenseAutomationJESchedulesViewState;
|
|
64
24
|
const accountSettingsView = (0, jeAccountSettingsViewSelector_1.getJEAccountSettingsView)(state);
|
|
65
25
|
const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
|
|
@@ -105,33 +65,18 @@ function getExpenseAutomationJESchedulesView(state) {
|
|
|
105
65
|
const jeScheduleDetails = (0, jeSchedulesSelector_1.getJEScheduledTransactionByJEScheduleTransactionKey)(jeScheduleKey, state);
|
|
106
66
|
failedJeScheduledTransaction.push(jeScheduleDetails);
|
|
107
67
|
});
|
|
108
|
-
const
|
|
109
|
-
const
|
|
110
|
-
const ongoingSchedules = sortJEScheduledTransactions(jeScheduledTransaction.filter((schedule) => schedule.status.code === 'ongoing'), sortKey, sortOrder);
|
|
111
|
-
const completedSchedules = sortJEScheduledTransactions(jeScheduledTransaction.filter((schedule) => schedule.status.code === 'completed' ||
|
|
112
|
-
schedule.status.code === 'marked_as_completed'), sortKey, sortOrder);
|
|
113
|
-
const unsortedResolveSchedules = [];
|
|
68
|
+
const draftSchedules = jeScheduledTransaction.filter((schedule) => schedule.status.code === 'draft');
|
|
69
|
+
const resolveSchedules = [];
|
|
114
70
|
failedJeScheduledTransaction.forEach((schedule) => {
|
|
115
71
|
schedule.scheduledJournalEntry.forEach((journalEntry) => {
|
|
116
|
-
|
|
117
|
-
...schedule,
|
|
118
|
-
scheduledJournalEntry: journalEntry,
|
|
119
|
-
});
|
|
72
|
+
resolveSchedules.push({ ...schedule, scheduledJournalEntry: journalEntry });
|
|
120
73
|
});
|
|
121
74
|
});
|
|
122
|
-
const resolveSchedules = sortJEScheduledTransactions(unsortedResolveSchedules, sortKey, sortOrder);
|
|
123
75
|
const allSteps = monthYearPeriodId != null
|
|
124
76
|
? (0, expenseAutomationViewSelectorTypes_1.getAllSteps)(monthEndCloseChecksState, monthYearPeriodId, currentTenant.tenantId)
|
|
125
77
|
: [];
|
|
126
78
|
const jeCompletionStatus = allSteps.find((step) => step.step === 'je_schedules')?.completionStatus;
|
|
127
79
|
const completionStatus = jeCompletionStatus != null ? jeCompletionStatus : 'incomplete';
|
|
128
|
-
const monthEndFetchState = monthYearPeriodId != null
|
|
129
|
-
? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? { fetchState: 'Not-Started', error: undefined })
|
|
130
|
-
: { fetchState: 'Not-Started', error: undefined };
|
|
131
|
-
const reducedFetchStatus = (0, reduceFetchState_1.reduceAnyFetchState)([
|
|
132
|
-
{ fetchState, error },
|
|
133
|
-
monthEndFetchState,
|
|
134
|
-
]);
|
|
135
80
|
return {
|
|
136
81
|
uncategorizedAccounts,
|
|
137
82
|
allDepreciationAccountList: filteredDepAccounts,
|
|
@@ -140,17 +85,15 @@ function getExpenseAutomationJESchedulesView(state) {
|
|
|
140
85
|
allAccountList: filteredAccounts,
|
|
141
86
|
accountListNestedAccountHierarchy,
|
|
142
87
|
allClassList: allClasses,
|
|
143
|
-
completedSchedules,
|
|
144
88
|
draftSchedules,
|
|
145
|
-
ongoingSchedules,
|
|
146
89
|
resolveSchedules: resolveSchedules,
|
|
147
90
|
accountSettingsView,
|
|
148
91
|
postStatusById: postStatusById,
|
|
149
92
|
ignoreStatusById: ignoreStatusById,
|
|
150
|
-
fetchState:
|
|
93
|
+
fetchState: fetchState,
|
|
151
94
|
jeScheduleLocalDataById: jeScheduleLocalDataById,
|
|
152
95
|
uiState: uiState,
|
|
153
|
-
error:
|
|
96
|
+
error: error,
|
|
154
97
|
refreshStatus,
|
|
155
98
|
completionStatus,
|
|
156
99
|
};
|
|
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getExpenseAutomationMissingReceiptsView = getExpenseAutomationMissingReceiptsView;
|
|
7
7
|
const orderBy_1 = __importDefault(require("lodash/orderBy"));
|
|
8
|
-
const reduceFetchState_1 = require("../../../commonStateTypes/reduceFetchState");
|
|
9
8
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
10
9
|
const tenantSelector_1 = require("../../../entity/tenant/tenantSelector");
|
|
11
10
|
const transactionSelector_1 = require("../../../entity/transaction/transactionSelector");
|
|
@@ -14,7 +13,7 @@ const missingReceiptsViewReducer_1 = require("../reducers/missingReceiptsViewRed
|
|
|
14
13
|
const expenseAutomationViewSelectorTypes_1 = require("../selectorTypes/expenseAutomationViewSelectorTypes");
|
|
15
14
|
const missingReceiptsViewState_1 = require("../types/missingReceiptsViewState");
|
|
16
15
|
function getExpenseAutomationMissingReceiptsView(state) {
|
|
17
|
-
const { expenseAutomationMissingReceiptsViewState, expenseAutomationViewState, transactionState, monthEndCloseChecksState,
|
|
16
|
+
const { expenseAutomationMissingReceiptsViewState, expenseAutomationViewState, transactionState, monthEndCloseChecksState, } = state;
|
|
18
17
|
const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
|
|
19
18
|
const { selectedPeriodByTenantId } = expenseAutomationViewState;
|
|
20
19
|
const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
|
|
@@ -43,7 +42,7 @@ function getExpenseAutomationMissingReceiptsView(state) {
|
|
|
43
42
|
transaction.lines.length > 0 &&
|
|
44
43
|
transaction.lines[0]
|
|
45
44
|
?.class != null
|
|
46
|
-
? transaction.lines[0].class
|
|
45
|
+
? transaction.lines[0].class.className.toLowerCase()
|
|
47
46
|
: null;
|
|
48
47
|
case 'vendor':
|
|
49
48
|
default:
|
|
@@ -182,16 +181,9 @@ function getExpenseAutomationMissingReceiptsView(state) {
|
|
|
182
181
|
vendorLogo: result.vendorLogo ?? transaction?.logo?.href,
|
|
183
182
|
};
|
|
184
183
|
});
|
|
185
|
-
const monthEndFetchState = monthYearPeriodId != null
|
|
186
|
-
? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? { fetchState: 'Not-Started', error: undefined })
|
|
187
|
-
: { fetchState: 'Not-Started', error: undefined };
|
|
188
|
-
const reducedFetchStatus = (0, reduceFetchState_1.reduceAnyFetchState)([
|
|
189
|
-
{ fetchState, error },
|
|
190
|
-
monthEndFetchState,
|
|
191
|
-
]);
|
|
192
184
|
return {
|
|
193
|
-
fetchState
|
|
194
|
-
error
|
|
185
|
+
fetchState,
|
|
186
|
+
error,
|
|
195
187
|
uploadReceiptStatusById,
|
|
196
188
|
uiState,
|
|
197
189
|
refreshStatus,
|
|
@@ -19,7 +19,7 @@ const accountListSelector_1 = require("../../accountList/accountListSelector");
|
|
|
19
19
|
const classListSelector_1 = require("../../classList/classListSelector");
|
|
20
20
|
const reconciliationViewReducer_1 = require("../reducers/reconciliationViewReducer");
|
|
21
21
|
const expenseAutomationViewSelectorTypes_1 = require("../selectorTypes/expenseAutomationViewSelectorTypes");
|
|
22
|
-
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) => state.vendorState, (state
|
|
22
|
+
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) => state.vendorState, (state, currentTenant, reconciliationViewState, expenseAutomationViewState, plaidAccountViewState, accountListState, accountState, classListState, classState, monthEndCloseChecksState, vendorState) => {
|
|
23
23
|
const { selectedPeriodByTenantId } = expenseAutomationViewState;
|
|
24
24
|
const reconcileTabUiState = reconciliationViewState.reconTabsState.reconcile.uiState;
|
|
25
25
|
const reviewTabUiState = reconciliationViewState.reconTabsState.review.uiState;
|
|
@@ -41,13 +41,6 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
|
|
|
41
41
|
}
|
|
42
42
|
return acc;
|
|
43
43
|
}, []);
|
|
44
|
-
const monthYearPeriodId = selectedPeriod != null ? (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod) : null;
|
|
45
|
-
const monthEndFetchState = monthYearPeriodId != null
|
|
46
|
-
? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? {
|
|
47
|
-
fetchState: 'Not-Started',
|
|
48
|
-
error: undefined,
|
|
49
|
-
})
|
|
50
|
-
: { fetchState: 'Not-Started', error: undefined };
|
|
51
44
|
if (accountReconForMonthYearPeriod == null) {
|
|
52
45
|
return {
|
|
53
46
|
bankAccounts: [],
|
|
@@ -57,13 +50,10 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
|
|
|
57
50
|
classListNestedAccountHierarchy: [],
|
|
58
51
|
allAccountList: [],
|
|
59
52
|
allClassList: [],
|
|
60
|
-
fetchStatus:
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
monthEndFetchState,
|
|
66
|
-
]),
|
|
53
|
+
fetchStatus: {
|
|
54
|
+
fetchState: reconciliationViewState.fetchState,
|
|
55
|
+
error: reconciliationViewState.error,
|
|
56
|
+
},
|
|
67
57
|
plaidConnectionDetails: plaidAccountViewState['expense_automation_reconcile']
|
|
68
58
|
.plaidConnectionDetails,
|
|
69
59
|
completionStatus: 'incomplete',
|
|
@@ -286,13 +276,10 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
|
|
|
286
276
|
bankAccounts: uniqueBankAccounts,
|
|
287
277
|
creditCards: uniqueCreditCards,
|
|
288
278
|
accountReconciliationsByAccountID: reconList,
|
|
289
|
-
fetchStatus:
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
},
|
|
294
|
-
monthEndFetchState,
|
|
295
|
-
]),
|
|
279
|
+
fetchStatus: {
|
|
280
|
+
fetchState: reconciliationViewState.fetchState,
|
|
281
|
+
error: reconciliationViewState.error,
|
|
282
|
+
},
|
|
296
283
|
plaidConnectionDetails: plaidAccountViewState['expense_automation_reconcile']
|
|
297
284
|
.plaidConnectionDetails,
|
|
298
285
|
reconciliationTabsState: reconciliationViewState.reconTabsState,
|
|
@@ -14,7 +14,7 @@ const accountListSelector_1 = require("../../accountList/accountListSelector");
|
|
|
14
14
|
const classListSelector_1 = require("../../classList/classListSelector");
|
|
15
15
|
const expenseAutomationViewSelectorTypes_1 = require("../selectorTypes/expenseAutomationViewSelectorTypes");
|
|
16
16
|
function getExpenseAutomationTransactionView(state) {
|
|
17
|
-
const { accountState, classState, classListState, accountListState, expenseAutomationTransactionsViewState, expenseAutomationViewState, transactionState, monthEndCloseChecksState,
|
|
17
|
+
const { accountState, classState, classListState, accountListState, expenseAutomationTransactionsViewState, expenseAutomationViewState, transactionState, monthEndCloseChecksState, } = state;
|
|
18
18
|
const { selectedTransactionCategorizationTab } = expenseAutomationTransactionsViewState;
|
|
19
19
|
const { uiState, refreshStatus, saveStatus, markAsNotMiscategorizedStatus, transactionIdsBySelectedPeriod, transactionReviewLocalDataById, selectedCheckBoxTransactionIds, transactionIdsWithUnsavedData, uploadReceiptStatusById, selectedTransactionId, selectedTransactionLineId, } = expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab];
|
|
20
20
|
const uncategorizedIncomeExpense = (0, accountListSelector_1.getUncategorizedAccounts)(accountState, accountListState, 'accountList');
|
|
@@ -47,16 +47,10 @@ function getExpenseAutomationTransactionView(state) {
|
|
|
47
47
|
.filter((transaction) => transaction != null);
|
|
48
48
|
const transactions = (0, transactionSelector_1.getSupportedTransactionsByIds)(transactionState, transactionIds);
|
|
49
49
|
const transactionsWithCOT = transactions.map((transaction) => (0, transactionHelper_1.getTransactionWithCOT)(transaction));
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
(0, reduceFetchState_1.reduceAllFetchState)([
|
|
55
|
-
accountList,
|
|
56
|
-
classList,
|
|
57
|
-
expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab],
|
|
58
|
-
]),
|
|
59
|
-
monthEndFetchState,
|
|
50
|
+
const fetchStatus = (0, reduceFetchState_1.reduceAllFetchState)([
|
|
51
|
+
accountList,
|
|
52
|
+
classList,
|
|
53
|
+
expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab],
|
|
60
54
|
]);
|
|
61
55
|
const totalCountByReview = expenseAutomationTransactionsViewState.transactionCategorizationView.review
|
|
62
56
|
.uiState.totalCount;
|
|
@@ -1,21 +1,16 @@
|
|
|
1
1
|
import { NestedAccountHierarchyForReport } from '../../../commonStateTypes/accountView/nestedAccountID';
|
|
2
2
|
import { FetchStateAndError, FetchedState, ID } from '../../../commonStateTypes/common';
|
|
3
3
|
import { Recommendation } from '../../../commonStateTypes/recommendationBase';
|
|
4
|
-
import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
5
4
|
import { MonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
|
|
6
5
|
import { AccountBase } from '../../../entity/account/accountState';
|
|
7
6
|
import { JEScheduleTransactionKey, ScheduleTypes } from '../../../entity/jeSchedules/jeSchedulesTypes';
|
|
8
7
|
import { VendorBase } from '../../../entity/vendor/vendorState';
|
|
9
|
-
export declare const toJEScheduleSortKey: (v: string) => "vendor" | "type" | "category" | "class" | "memo" | "transactionDate" | "totalAmount" | "runningBalance" | "depCategory" | "scheduleCategory" | "startMonth" | "amortizationPeriod" | "jePostingDate" | "remainingMonths";
|
|
10
|
-
export type JEScheduleSortKey = ReturnType<typeof toJEScheduleSortKey>;
|
|
11
8
|
export interface JESchedulesViewUIState {
|
|
12
9
|
scrollPosition: {
|
|
13
10
|
scrollTop: number;
|
|
14
11
|
scrollLeft?: number;
|
|
15
12
|
} | undefined;
|
|
16
13
|
searchString: string;
|
|
17
|
-
sortKey: JEScheduleSortKey;
|
|
18
|
-
sortOrder: SortOrder;
|
|
19
14
|
totalCount: number;
|
|
20
15
|
limit?: number;
|
|
21
16
|
}
|
|
@@ -1,22 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toJEScheduleSortKey = void 0;
|
|
4
|
-
const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
|
|
5
|
-
const JE_SCHEDULE_SORT_KEYS = [
|
|
6
|
-
'vendor',
|
|
7
|
-
'category',
|
|
8
|
-
'class',
|
|
9
|
-
'depCategory',
|
|
10
|
-
'scheduleCategory',
|
|
11
|
-
'startMonth',
|
|
12
|
-
'type',
|
|
13
|
-
'amortizationPeriod',
|
|
14
|
-
'jePostingDate',
|
|
15
|
-
'remainingMonths',
|
|
16
|
-
'runningBalance',
|
|
17
|
-
'totalAmount',
|
|
18
|
-
'transactionDate',
|
|
19
|
-
'memo',
|
|
20
|
-
];
|
|
21
|
-
const toJEScheduleSortKey = (v) => (0, stringToUnion_1.stringToUnion)(v, JE_SCHEDULE_SORT_KEYS);
|
|
22
|
-
exports.toJEScheduleSortKey = toJEScheduleSortKey;
|
|
@@ -3,7 +3,7 @@ import { CompanyWithSchema } from '../../../../entity/company/companySelector';
|
|
|
3
3
|
import { OnboardingCustomerInfo } from '../../../../entity/onboardingCustomer/onboardingCustomerState';
|
|
4
4
|
import { Tenant } from '../../../../entity/tenant/tenantState';
|
|
5
5
|
import { CompanyDetailsLocalData, PrimaryContactLocalData } from '../../../spendManagement/commonSetup/setupViewState';
|
|
6
|
-
declare const toProductGroupType: (v: string) => "
|
|
6
|
+
declare const toProductGroupType: (v: string) => "other" | "bookkeeping" | "banking" | "spend_management" | "cards";
|
|
7
7
|
export type ProductGroupType = ReturnType<typeof toProductGroupType>;
|
|
8
8
|
export declare const toProductType: (v: string) => "zeni_treasury" | "other" | "bookkeeping" | "zeni_checking" | "zeni_bill_pay" | "zeni_reimbursements" | "zeni_cards" | "zeni_payroll" | "zeni_cfo" | "zeni_tax";
|
|
9
9
|
export declare const toProductTypeStrict: (v: string) => "zeni_treasury" | "other" | "bookkeeping" | "zeni_checking" | "zeni_bill_pay" | "zeni_reimbursements" | "zeni_cards" | "zeni_payroll" | "zeni_cfo" | "zeni_tax" | undefined;
|
|
@@ -6,7 +6,6 @@ const getSummationBalance_1 = require("../../commonStateTypes/coaBalance/additio
|
|
|
6
6
|
const currencyHelper_1 = require("../../commonStateTypes/currencyHelper");
|
|
7
7
|
const reduceFetchState_1 = require("../../commonStateTypes/reduceFetchState");
|
|
8
8
|
const sectionClassesViewSelector_1 = require("../../entity/sectionClassesViewV2/sectionClassesViewSelector");
|
|
9
|
-
const profitAndLossClassesByClassHorizontalSelectorTypes_1 = require("./profitAndLossClassesByClassHorizontalSelectorTypes");
|
|
10
9
|
const profitAndLossHorizontalEnrichment_1 = require("./profitAndLossHorizontalEnrichment");
|
|
11
10
|
exports.profitAndLossHorizontalIdsInOrder = [
|
|
12
11
|
'income',
|
|
@@ -308,7 +307,6 @@ function buildHeaderBalances(classColumns, timeframe, selectedPeriod, currency)
|
|
|
308
307
|
startDate,
|
|
309
308
|
type: 'default',
|
|
310
309
|
label: col.className,
|
|
311
|
-
id: col.classId,
|
|
312
310
|
}));
|
|
313
311
|
// Add a "Total" column
|
|
314
312
|
balances.push({
|
|
@@ -318,7 +316,6 @@ function buildHeaderBalances(classColumns, timeframe, selectedPeriod, currency)
|
|
|
318
316
|
startDate,
|
|
319
317
|
type: 'default',
|
|
320
318
|
label: 'Total',
|
|
321
|
-
id: profitAndLossClassesByClassHorizontalSelectorTypes_1.HORIZONTAL_CLASS_TOTAL_BALANCE_ID,
|
|
322
319
|
});
|
|
323
320
|
return balances;
|
|
324
321
|
}
|
|
@@ -7,7 +7,7 @@ export declare const getScheduleListKey: (selectedCategory: ID, selectedTimefram
|
|
|
7
7
|
export type ScheduleListKey = ReturnType<typeof getScheduleListKey>;
|
|
8
8
|
export declare const toScheduleSubTabType: (v: string) => "completed" | "new" | "ongoing" | "all";
|
|
9
9
|
export type ScheduleSubTabType = ReturnType<typeof toScheduleSubTabType>;
|
|
10
|
-
declare const toScheduleSortKeyType: (v: string) => "months" | "amount" | "vendor" | "status" | "user" | "createTime" | "class" | "memo" | "balanceAsOfToday" | "transactionDate" | "transactionType" | "assetId" | "
|
|
10
|
+
declare const toScheduleSortKeyType: (v: string) => "months" | "amount" | "vendor" | "status" | "user" | "createTime" | "class" | "memo" | "balanceAsOfToday" | "transactionDate" | "transactionType" | "assetId" | "accruedExpenseCategory" | "scheduleCategory" | "expenseCategory" | "accumulatedDepreciationCategory" | "startMonth" | "endMonth";
|
|
11
11
|
export declare type ScheduleListSortKey = ReturnType<typeof toScheduleSortKeyType>;
|
|
12
12
|
export interface DownloadJEScheduleTabOptions {
|
|
13
13
|
categoryId: ID;
|
|
@@ -424,14 +424,6 @@ const getBillListOnSort = (sortKey, sortOrder, currentTab, transactions) => {
|
|
|
424
424
|
transactionsWithNoSortKeyValue.push(transaction);
|
|
425
425
|
}
|
|
426
426
|
break;
|
|
427
|
-
case 'invoiceNumber':
|
|
428
|
-
if (transaction.documentId != null) {
|
|
429
|
-
transactionsWithSortKeyValue.push(transaction);
|
|
430
|
-
}
|
|
431
|
-
else {
|
|
432
|
-
transactionsWithNoSortKeyValue.push(transaction);
|
|
433
|
-
}
|
|
434
|
-
break;
|
|
435
427
|
case 'dueDate':
|
|
436
428
|
if (currentTab === 'draft') {
|
|
437
429
|
if (Boolean(transaction.dueDate) === true) {
|
|
@@ -534,8 +526,6 @@ const getBillListOnSort = (sortKey, sortOrder, currentTab, transactions) => {
|
|
|
534
526
|
return transaction.totalAmountInUSD?.amount ?? 0;
|
|
535
527
|
case 'paymentMethod':
|
|
536
528
|
return transaction.billPayInfo.billPaymentMethodType.name;
|
|
537
|
-
case 'invoiceNumber':
|
|
538
|
-
return transaction.documentId;
|
|
539
529
|
}
|
|
540
530
|
}, getColumnWiseSortOrder(sortOrder));
|
|
541
531
|
return [
|
|
@@ -37,7 +37,7 @@ declare const toBillTabType: (v: string) => "paid" | "pending_approval" | "sched
|
|
|
37
37
|
export type BillTab = ReturnType<typeof toBillTabType>;
|
|
38
38
|
declare const toBillsSubTabType: (v: string) => "rejected" | "failed" | "ach" | "wire" | "cancelled" | "deleted" | "overdue" | "all" | "awaiting_approval" | "awaiting_my_approval" | "offline";
|
|
39
39
|
export type BillsSubTabType = ReturnType<typeof toBillsSubTabType>;
|
|
40
|
-
declare const toBillPaySortKeyType: (v: string) => "amount" | "status" | "name" | "dueDate" | "paymentMethod" | "
|
|
40
|
+
declare const toBillPaySortKeyType: (v: string) => "amount" | "status" | "name" | "dueDate" | "paymentMethod" | "invoiceDate";
|
|
41
41
|
export declare type BillPayViewSortKey = ReturnType<typeof toBillPaySortKeyType>;
|
|
42
42
|
export interface BillPayFilters {
|
|
43
43
|
categories: BillPayFilterCategory[];
|
|
@@ -47,7 +47,6 @@ const ALL_BILL_PAY_SORT_KEYS = [
|
|
|
47
47
|
'invoiceDate',
|
|
48
48
|
'name',
|
|
49
49
|
'paymentMethod',
|
|
50
|
-
'invoiceNumber',
|
|
51
50
|
];
|
|
52
51
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
53
52
|
const toBillPaySortKeyType = (v) => (0, stringToUnion_1.stringToUnion)(v, ALL_BILL_PAY_SORT_KEYS);
|
|
@@ -8,7 +8,6 @@ const get_1 = __importDefault(require("lodash/get"));
|
|
|
8
8
|
const reduceFetchState_1 = require("../../../../commonStateTypes/reduceFetchState");
|
|
9
9
|
const contactSelector_1 = require("../../../../entity/billPay/contact/contactSelector");
|
|
10
10
|
const paymentAccountSelector_1 = require("../../../../entity/paymentAccount/paymentAccountSelector");
|
|
11
|
-
const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
|
|
12
11
|
const vendorSelector_1 = require("../../../../entity/vendor/vendorSelector");
|
|
13
12
|
const accountListSelector_1 = require("../../../accountList/accountListSelector");
|
|
14
13
|
const setupViewSelector_1 = require("../../commonSetup/setupViewSelector");
|
|
@@ -81,14 +80,11 @@ const getReviewPageBillDetail = (state, billId) => {
|
|
|
81
80
|
}
|
|
82
81
|
}
|
|
83
82
|
if (sourceBillDetail != null) {
|
|
84
|
-
|
|
83
|
+
sourceBillDetailFetchState = (0, reduceFetchState_1.reduceFetchState)([
|
|
85
84
|
sourceBillDetail.fetchStatus,
|
|
86
85
|
accountListState.byReportId['billPayAccountList'],
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
fetchStateList.push(classListState);
|
|
90
|
-
}
|
|
91
|
-
sourceBillDetailFetchState = (0, reduceFetchState_1.reduceFetchState)(fetchStateList).fetchState;
|
|
86
|
+
classListState,
|
|
87
|
+
]).fetchState;
|
|
92
88
|
}
|
|
93
89
|
}
|
|
94
90
|
else {
|
|
@@ -9,7 +9,6 @@ const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
|
|
|
9
9
|
const reduceFetchState_1 = require("../../../../commonStateTypes/reduceFetchState");
|
|
10
10
|
const approvalRuleSelector_1 = require("../../../../entity/approvalRule/approvalRuleSelector");
|
|
11
11
|
const classSelector_1 = require("../../../../entity/class/classSelector");
|
|
12
|
-
const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
|
|
13
12
|
const userSelector_1 = require("../../../../entity/user/userSelector");
|
|
14
13
|
const userRoleSelector_1 = require("../../../../entity/userRole/userRoleSelector");
|
|
15
14
|
exports.getBillPaySetupApproverView = (0, toolkit_1.createSelector)((state) => state.billPaySetupApproverViewState, (state) => state.approvalRuleState, (state) => state.userState, (billPaySetupApproverViewState, approvalRuleState, userState) => {
|
|
@@ -51,7 +50,7 @@ exports.getBillPaySetupApproverView = (0, toolkit_1.createSelector)((state) => s
|
|
|
51
50
|
newApprovalRuleId,
|
|
52
51
|
};
|
|
53
52
|
});
|
|
54
|
-
exports.getBillPaySetupApproverUpdateDataView = (0, toolkit_1.createSelector)((state) => state.billPaySetupApproverViewState, (state) => state.approvalRuleState, (state) => state.userState, (state) => state.classState, (state) => state.classListState, (state) => state.userRoleState, (
|
|
53
|
+
exports.getBillPaySetupApproverUpdateDataView = (0, toolkit_1.createSelector)((state) => state.billPaySetupApproverViewState, (state) => state.approvalRuleState, (state) => state.userState, (state) => state.classState, (state) => state.classListState, (state) => state.userRoleState, (billPaySetupApproverViewState, approvalRuleState, userState, classState, classListState, userRoleState) => {
|
|
55
54
|
const { affectedEntityIds, approvalRuleIds, approverListState, billPaySetupApproverViewUpdateData, fetchState, error, listeningToPusherEvent, } = billPaySetupApproverViewState;
|
|
56
55
|
const { approverIds, attributes } = approverListState;
|
|
57
56
|
const allApprovalRules = (0, approvalRuleSelector_1.getApprovalRulesByIds)(approvalRuleState, approvalRuleIds);
|
|
@@ -99,9 +98,10 @@ exports.getBillPaySetupApproverUpdateDataView = (0, toolkit_1.createSelector)((s
|
|
|
99
98
|
allAttributes,
|
|
100
99
|
filteredAttributes,
|
|
101
100
|
billPaySetupApproverViewUpdateData,
|
|
102
|
-
approverListFetchStatus:
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
approverListFetchStatus: (0, reduceFetchState_1.reduceAllFetchState)([
|
|
102
|
+
approverListState.fetchStatus,
|
|
103
|
+
classListState,
|
|
104
|
+
]),
|
|
105
105
|
fetchState,
|
|
106
106
|
allAccountingClasses,
|
|
107
107
|
error,
|
|
@@ -3,28 +3,23 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.fetchBillPayApproversDetailsEpic = void 0;
|
|
4
4
|
const rxjs_1 = require("rxjs");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const tenantSelector_1 = require("../../../../../entity/tenant/tenantSelector");
|
|
7
6
|
const classListReducer_1 = require("../../../../classList/classListReducer");
|
|
8
7
|
const billPaySetupApproverViewReducer_1 = require("../billPaySetupApproverViewReducer");
|
|
9
8
|
const fetchBillPayApproversDetailsEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(billPaySetupApproverViewReducer_1.fetchBillPayApproversDetails.match), (0, operators_1.mergeMap)((action) => {
|
|
10
9
|
const { cacheOverride, includeUserRoles } = action.payload;
|
|
11
10
|
const { billPaySetupApproverViewState, classListState } = state$.value;
|
|
12
11
|
const { approverListState } = billPaySetupApproverViewState;
|
|
13
|
-
const isAccountingClassesEnabled = (0, tenantSelector_1.getIsAccountingClassesEnabled)(state$.value);
|
|
14
12
|
const actions = [];
|
|
15
13
|
if (cacheOverride === true) {
|
|
16
14
|
actions.push((0, billPaySetupApproverViewReducer_1.fetchBillPayApproversList)(cacheOverride, includeUserRoles));
|
|
17
|
-
|
|
18
|
-
actions.push((0, classListReducer_1.fetchClassList)());
|
|
19
|
-
}
|
|
15
|
+
actions.push((0, classListReducer_1.fetchClassList)());
|
|
20
16
|
}
|
|
21
17
|
else {
|
|
22
18
|
if (billPaySetupApproverViewState.hasValidState() === false &&
|
|
23
19
|
approverListState.fetchStatus.fetchState !== 'In-Progress') {
|
|
24
20
|
actions.push((0, billPaySetupApproverViewReducer_1.fetchBillPayApproversList)(true, includeUserRoles));
|
|
25
21
|
}
|
|
26
|
-
if (
|
|
27
|
-
classListState.hasValidState() === false &&
|
|
22
|
+
if (classListState.hasValidState() === false &&
|
|
28
23
|
classListState.fetchState !== 'In-Progress') {
|
|
29
24
|
actions.push((0, classListReducer_1.fetchClassList)());
|
|
30
25
|
}
|