@zeniai/client-epic-state 5.2.14-betaRD1 → 5.2.14
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/entity/approvalRule/approvalRuleConflict.d.ts +0 -13
- package/lib/entity/approvalRule/approvalRuleConflict.js +1 -16
- package/lib/entity/jeSchedules/jeScheduleHelper.d.ts +0 -1
- package/lib/entity/jeSchedules/jeScheduleHelper.js +0 -7
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +1 -78
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +4 -183
- package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +2 -4
- package/lib/entity/jeSchedules/jeSchedulesReducer.js +2 -30
- package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +2 -11
- package/lib/entity/jeSchedules/jeSchedulesSelector.js +3 -38
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +1 -123
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -24
- package/lib/entity/jeSchedules/jeSchedulesTypes.js +1 -96
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +0 -3
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +0 -2
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -2
- package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +0 -2
- package/lib/epic.d.ts +1 -9
- package/lib/epic.js +0 -16
- package/lib/esm/entity/approvalRule/approvalRuleConflict.js +1 -16
- package/lib/esm/entity/jeSchedules/jeScheduleHelper.js +0 -6
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +5 -183
- package/lib/esm/entity/jeSchedules/jeSchedulesReducer.js +2 -30
- package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +2 -36
- package/lib/esm/entity/jeSchedules/jeSchedulesTypes.js +0 -86
- package/lib/esm/entity/snackbar/snackbarTypes.js +0 -3
- package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -2
- package/lib/esm/epic.js +0 -16
- package/lib/esm/index.js +8 -14
- package/lib/esm/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +3 -6
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +1 -9
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +5 -41
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.js +2 -14
- package/lib/esm/view/expenseAutomationView/payload/jeSchedulesPayload.js +0 -55
- package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +29 -319
- package/lib/esm/view/expenseAutomationView/selectors/jeAccountSettingsViewSelector.js +0 -1
- package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +22 -327
- package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +6 -5
- package/lib/esm/view/scheduleView/scheduleListView/epics/fetchAccruedScheduleListEpic.js +1 -1
- package/lib/esm/view/scheduleView/scheduleListView/epics/fetchDownloadSchedulesEpic.js +2 -7
- package/lib/esm/view/scheduleView/scheduleListView/scheduleListReducer.js +3 -5
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +1 -20
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewSelector.js +1 -20
- package/lib/index.d.ts +12 -17
- package/lib/index.js +47 -91
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +3 -6
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +1 -9
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.d.ts +2 -3
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +3 -39
- package/lib/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.js +2 -14
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +3 -86
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.js +1 -58
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +12 -93
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +29 -321
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +1 -1
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/selectorTypes/jeAccountSettingsViewSelectorTypes.d.ts +0 -1
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +7 -41
- package/lib/view/expenseAutomationView/selectors/jeAccountSettingsViewSelector.js +0 -1
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.d.ts +0 -34
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +21 -335
- package/lib/view/expenseAutomationView/types/completedSubTab.d.ts +1 -1
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +8 -83
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +8 -8
- package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +1 -1
- package/lib/view/scheduleView/scheduleListView/epics/fetchAccruedScheduleListEpic.js +1 -1
- package/lib/view/scheduleView/scheduleListView/epics/fetchDownloadSchedulesEpic.js +2 -7
- package/lib/view/scheduleView/scheduleListView/scheduleListReducer.d.ts +2 -4
- package/lib/view/scheduleView/scheduleListView/scheduleListReducer.js +3 -5
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +1 -20
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelectorTypes.d.ts +0 -3
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewSelector.js +1 -20
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewSelectorTypes.d.ts +0 -3
- package/package.json +1 -1
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic.js +0 -45
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.js +0 -104
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +0 -25
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +0 -138
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +0 -79
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.js +0 -180
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/revertJeScheduleEpic.js +0 -111
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +0 -28
- package/lib/esm/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +0 -140
- package/lib/esm/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js +0 -1
- package/lib/esm/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +0 -106
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic.d.ts +0 -21
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic.js +0 -49
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.d.ts +0 -9
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.js +0 -108
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.d.ts +0 -8
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +0 -29
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.d.ts +0 -9
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +0 -142
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.d.ts +0 -8
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +0 -83
- package/lib/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.d.ts +0 -13
- package/lib/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.js +0 -187
- package/lib/view/expenseAutomationView/epics/jeSchedule/revertJeScheduleEpic.d.ts +0 -65
- package/lib/view/expenseAutomationView/epics/jeSchedule/revertJeScheduleEpic.js +0 -115
- package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.d.ts +0 -6
- package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +0 -32
- package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.d.ts +0 -36
- package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +0 -145
- package/lib/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.d.ts +0 -42
- package/lib/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js +0 -2
- package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.d.ts +0 -21
- package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +0 -112
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { RootState } from '../../../reducer';
|
|
2
|
-
import { NewAccrualAccountsView, NewScheduleSearchTransactionsView, NewScheduleView } from '../selectorTypes/jeNewScheduleViewSelectorTypes';
|
|
3
|
-
/**
|
|
4
|
-
* The Base Transaction search is shared across schedule types (one search
|
|
5
|
-
* box, not one per prepaid_expenses/fixed_assets) — split out from
|
|
6
|
-
* getNewScheduleView so a consumer can read it without supplying an
|
|
7
|
-
* otherwise-irrelevant scheduleType.
|
|
8
|
-
*/
|
|
9
|
-
export declare const getNewScheduleSearchTransactionsView: (state: RootState) => NewScheduleSearchTransactionsView;
|
|
10
|
-
/**
|
|
11
|
-
* Account + class options and request status shared by both accrual creation forms — the one-time
|
|
12
|
-
* accrual and the recurring accrued schedule.
|
|
13
|
-
*
|
|
14
|
-
* getAccountsTypesForScheduleDetails('accrued_expenses') deliberately includes
|
|
15
|
-
* other_current_liabilities, because the accrued liability accounts live there —
|
|
16
|
-
* so the debit list has to subtract them back out, and the credit list keeps only
|
|
17
|
-
* them. Mirrors getScheduleAccruedDetailView, which is the form this one is
|
|
18
|
-
* modelled on.
|
|
19
|
-
*/
|
|
20
|
-
export declare const getNewAccrualAccountsView: (state: RootState) => NewAccrualAccountsView;
|
|
21
|
-
export declare const getNewScheduleView: (state: RootState, scheduleType: "fixed_assets" | "prepaid_expenses") => NewScheduleView;
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getNewScheduleView = exports.getNewAccrualAccountsView = exports.getNewScheduleSearchTransactionsView = void 0;
|
|
4
|
-
const accountSelector_1 = require("../../../entity/account/accountSelector");
|
|
5
|
-
const transactionSelector_1 = require("../../../entity/transaction/transactionSelector");
|
|
6
|
-
const accountListSelector_1 = require("../../accountList/accountListSelector");
|
|
7
|
-
const classListSelector_1 = require("../../classList/classListSelector");
|
|
8
|
-
const scheduleDetailLocalDataHelper_1 = require("../../scheduleView/scheduleDetailView/scheduleDetailLocalDataHelper");
|
|
9
|
-
const scheduleDetailSelector_1 = require("../../scheduleView/scheduleDetailView/scheduleDetailSelector");
|
|
10
|
-
const scheduleListHelper_1 = require("../../scheduleView/scheduleListView/scheduleListHelper");
|
|
11
|
-
/**
|
|
12
|
-
* The Base Transaction search is shared across schedule types (one search
|
|
13
|
-
* box, not one per prepaid_expenses/fixed_assets) — split out from
|
|
14
|
-
* getNewScheduleView so a consumer can read it without supplying an
|
|
15
|
-
* otherwise-irrelevant scheduleType.
|
|
16
|
-
*/
|
|
17
|
-
const getNewScheduleSearchTransactionsView = (state) => {
|
|
18
|
-
const { searchTransactions } = state.expenseAutomationJESchedulesViewState.newSchedule;
|
|
19
|
-
const searchTransactionsResults = searchTransactions.searchResults
|
|
20
|
-
.map((key) => (0, transactionSelector_1.getScheduleTransactionById)(state.transactionState, key))
|
|
21
|
-
.filter((transaction) => transaction != null);
|
|
22
|
-
return {
|
|
23
|
-
searchTransactionsResults,
|
|
24
|
-
searchTransactionsFetchState: {
|
|
25
|
-
fetchState: searchTransactions.fetchState,
|
|
26
|
-
error: searchTransactions.error,
|
|
27
|
-
},
|
|
28
|
-
searchTransactionsString: searchTransactions.searchString,
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
exports.getNewScheduleSearchTransactionsView = getNewScheduleSearchTransactionsView;
|
|
32
|
-
const ACCRUED_EXPENSE_ACCOUNT_LABELS = ['accrued_expenses'];
|
|
33
|
-
/**
|
|
34
|
-
* Account + class options and request status shared by both accrual creation forms — the one-time
|
|
35
|
-
* accrual and the recurring accrued schedule.
|
|
36
|
-
*
|
|
37
|
-
* getAccountsTypesForScheduleDetails('accrued_expenses') deliberately includes
|
|
38
|
-
* other_current_liabilities, because the accrued liability accounts live there —
|
|
39
|
-
* so the debit list has to subtract them back out, and the credit list keeps only
|
|
40
|
-
* them. Mirrors getScheduleAccruedDetailView, which is the form this one is
|
|
41
|
-
* modelled on.
|
|
42
|
-
*/
|
|
43
|
-
const getNewAccrualAccountsView = (state) => {
|
|
44
|
-
const { accountState, accountListState, classState, classListState } = state;
|
|
45
|
-
const { newSchedule } = state.expenseAutomationJESchedulesViewState;
|
|
46
|
-
const accountType = (0, scheduleListHelper_1.getAccountsTypesForScheduleEpics)();
|
|
47
|
-
const accrualAccountIds = (0, accountSelector_1.getAccountIdsForTypes)(accountState, (0, scheduleDetailLocalDataHelper_1.getAccountsTypesForScheduleDetails)('accrued_expenses'));
|
|
48
|
-
const accruedCategoryIds = (0, accountSelector_1.getAccountIdsForLabels)(accountState, ACCRUED_EXPENSE_ACCOUNT_LABELS);
|
|
49
|
-
const allAccountList = (0, accountListSelector_1.getAccountList)(accountState, accountListState, accountType.accountListKey);
|
|
50
|
-
const nestedAccountHierarchy = (0, accountListSelector_1.getNestedAccountListHierarchy)(accountListState, accountType.accountListKey);
|
|
51
|
-
const debitAccounts = allAccountList.accounts.filter((account) => accrualAccountIds.includes(account.accountId) &&
|
|
52
|
-
!accruedCategoryIds.includes(account.accountId));
|
|
53
|
-
const creditAccounts = allAccountList.accounts.filter((account) => accruedCategoryIds.includes(account.accountId));
|
|
54
|
-
const allClassList = (0, classListSelector_1.getClassList)(classState, classListState);
|
|
55
|
-
return {
|
|
56
|
-
accountListNestedAccountHierarchy: (0, scheduleDetailSelector_1.filterNestedAccountHierarchyById)(nestedAccountHierarchy, debitAccounts.map((account) => account.accountId)),
|
|
57
|
-
accruedAccountListNestedAccountHierarchy: (0, scheduleDetailSelector_1.filterNestedAccountHierarchyById)(nestedAccountHierarchy, creditAccounts.map((account) => account.accountId)),
|
|
58
|
-
allAccountList: debitAccounts,
|
|
59
|
-
allAccruedExpenseList: creditAccounts,
|
|
60
|
-
allClassList: allClassList.classes,
|
|
61
|
-
classListNestedAccountHierarchy: (0, classListSelector_1.getNestedClassListHierarchy)(classListState),
|
|
62
|
-
createStatus: newSchedule.createOneTimeAccrualStatus,
|
|
63
|
-
// The recurring accrued schedule saves through the accrued detail epics that the Vendor tab
|
|
64
|
-
// already uses, so its status is that slice's updateStatus rather than anything new here.
|
|
65
|
-
accruedScheduleSaveStatus: state.scheduleAccruedDetailState.updateStatus,
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
exports.getNewAccrualAccountsView = getNewAccrualAccountsView;
|
|
69
|
-
const getNewScheduleView = (state, scheduleType) => {
|
|
70
|
-
const { accountState, accountListState, classState, classListState } = state;
|
|
71
|
-
const { newSchedule } = state.expenseAutomationJESchedulesViewState;
|
|
72
|
-
const searchTransactionsView = (0, exports.getNewScheduleSearchTransactionsView)(state);
|
|
73
|
-
const accountType = (0, scheduleListHelper_1.getAccountsTypesForScheduleEpics)();
|
|
74
|
-
const newScheduleAccountTypes = (0, scheduleDetailLocalDataHelper_1.getAccountsTypesForScheduleDetails)(scheduleType);
|
|
75
|
-
const newScheduleAccountIds = (0, accountSelector_1.getAccountIdsForTypes)(accountState, newScheduleAccountTypes);
|
|
76
|
-
const allAccountList = (0, accountListSelector_1.getAccountList)(accountState, accountListState, accountType.accountListKey);
|
|
77
|
-
const filteredAccounts = allAccountList.accounts.filter((account) => newScheduleAccountIds.includes(account.accountId));
|
|
78
|
-
const accountListNestedAccountHierarchy = (0, scheduleDetailSelector_1.filterNestedAccountHierarchyById)((0, accountListSelector_1.getNestedAccountListHierarchy)(accountListState, accountType.accountListKey), filteredAccounts.map((account) => account.accountId));
|
|
79
|
-
const allClassList = (0, classListSelector_1.getClassList)(classState, classListState);
|
|
80
|
-
const classListNestedAccountHierarchy = (0, classListSelector_1.getNestedClassListHierarchy)(classListState);
|
|
81
|
-
let allDepreciationAccountList;
|
|
82
|
-
let allDepreciationAccountListNestedAccountHierarchy;
|
|
83
|
-
if (scheduleType === 'fixed_assets') {
|
|
84
|
-
const depreciationCategoryIds = (0, accountSelector_1.getAccountIdsForTypes)(accountState, [
|
|
85
|
-
'fixed_assets',
|
|
86
|
-
'other_assets',
|
|
87
|
-
]);
|
|
88
|
-
const accountLabel = (0, scheduleListHelper_1.getAccountLabelForScheduleType)('fixed_assets');
|
|
89
|
-
const fixedAssetLabelAccountIds = accountLabel != null
|
|
90
|
-
? (0, accountListSelector_1.getAccountIdsForLabel)(accountListState, accountType.accountListKey, accountLabel)
|
|
91
|
-
: [];
|
|
92
|
-
allDepreciationAccountList = allAccountList.accounts.filter((account) => depreciationCategoryIds.includes(account.accountId) &&
|
|
93
|
-
!fixedAssetLabelAccountIds.includes(account.accountId));
|
|
94
|
-
allDepreciationAccountListNestedAccountHierarchy =
|
|
95
|
-
(0, scheduleDetailSelector_1.filterNestedAccountHierarchyById)((0, accountListSelector_1.getNestedAccountListHierarchy)(accountListState, accountType.accountListKey), allDepreciationAccountList.map((account) => account.accountId));
|
|
96
|
-
}
|
|
97
|
-
return {
|
|
98
|
-
scheduleType,
|
|
99
|
-
accountListNestedAccountHierarchy,
|
|
100
|
-
allAccountList: filteredAccounts,
|
|
101
|
-
allClassList: allClassList.classes,
|
|
102
|
-
allDepreciationAccountList,
|
|
103
|
-
allDepreciationAccountListNestedAccountHierarchy,
|
|
104
|
-
classListNestedAccountHierarchy,
|
|
105
|
-
newScheduleLocalData: newSchedule.newScheduleState[scheduleType],
|
|
106
|
-
saveStatus: newSchedule.saveStatus,
|
|
107
|
-
...searchTransactionsView,
|
|
108
|
-
fetchState: newSchedule.fetchState,
|
|
109
|
-
error: newSchedule.error,
|
|
110
|
-
};
|
|
111
|
-
};
|
|
112
|
-
exports.getNewScheduleView = getNewScheduleView;
|