@zeniai/client-epic-state 5.0.61-betaAR1 → 5.0.61-betaML1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +2 -0
- package/lib/entity/account/accountSelector.d.ts +9 -0
- package/lib/entity/account/accountSelector.js +14 -1
- package/lib/entity/account/accountState.d.ts +1 -1
- package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
- package/lib/entity/approvalRule/approvalRulePayload.d.ts +5 -27
- package/lib/entity/approvalRule/approvalRulePayload.js +10 -131
- package/lib/entity/approvalRule/approvalRuleSelector.d.ts +1 -25
- package/lib/entity/approvalRule/approvalRuleSelector.js +0 -40
- package/lib/entity/approvalRule/approvalRuleState.d.ts +7 -48
- package/lib/entity/class/classReducer.d.ts +4 -4
- package/lib/entity/class/classState.d.ts +1 -1
- package/lib/entity/forecast/forecastState.d.ts +1 -1
- package/lib/entity/project/projectPayload.d.ts +1 -1
- package/lib/entity/project/projectPayload.js +1 -1
- package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
- package/lib/entity/sectionProjectView/sectionProjectView.d.ts +1 -1
- package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +2 -2
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +2 -0
- package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +4 -0
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +10 -0
- package/lib/entity/transaction/stateTypes/transaction.d.ts +3 -0
- package/lib/epic.d.ts +3 -1
- package/lib/epic.js +3 -1
- package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +2 -0
- package/lib/esm/entity/account/accountSelector.js +11 -0
- package/lib/esm/entity/approvalRule/approvalRulePayload.js +10 -131
- package/lib/esm/entity/approvalRule/approvalRuleSelector.js +0 -35
- package/lib/esm/entity/project/projectPayload.js +1 -1
- package/lib/esm/entity/snackbar/snackbarTypes.js +2 -0
- package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +10 -0
- package/lib/esm/epic.js +3 -1
- package/lib/esm/index.js +5 -6
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/createTransferEntryEpic.js +81 -0
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +8 -1
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransferAccountsEpic.js +30 -0
- package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +79 -1
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +30 -0
- package/lib/esm/view/expenseAutomationView/types/transactionsViewState.js +5 -0
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/initializeBillPaySetupApproverViewUpdateDataEpic.js +7 -11
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.js +16 -61
- package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +2 -7
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/initializeRemiSetupApproverViewUpdateDataEpic.js +7 -11
- package/lib/esm/view/transactionDetail/epics/transactionDetailEpic.js +10 -0
- package/lib/esm/view/transactionDetail/transactionDetailSelector.js +24 -2
- package/lib/index.d.ts +6 -7
- package/lib/index.js +42 -39
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
- package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
- package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
- package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
- package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
- package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
- package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
- package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.d.ts +2 -2
- package/lib/view/companyView/types/cockpitTypes.d.ts +1 -1
- package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/transactionCategorization/createTransferEntryEpic.d.ts +9 -0
- package/lib/view/expenseAutomationView/epics/transactionCategorization/createTransferEntryEpic.js +85 -0
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +7 -0
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransferAccountsEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransferAccountsEpic.js +34 -0
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +21 -2
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +80 -2
- package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +4 -1
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.d.ts +2 -0
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +31 -0
- package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +18 -1
- package/lib/view/expenseAutomationView/types/transactionsViewState.js +6 -1
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/people/peopleTypes.d.ts +1 -1
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/initializeBillPaySetupApproverViewUpdateDataEpic.js +6 -10
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.d.ts +1 -9
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.js +16 -61
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonState.d.ts +5 -31
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +2 -7
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/initializeRemiSetupApproverViewUpdateDataEpic.js +6 -10
- package/lib/view/taskManager/taskListView/taskList.d.ts +3 -3
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/lib/view/transactionDetail/epics/transactionDetailEpic.d.ts +2 -1
- package/lib/view/transactionDetail/epics/transactionDetailEpic.js +10 -0
- package/lib/view/transactionDetail/transactionDetailPayload.d.ts +1 -1
- package/lib/view/transactionDetail/transactionDetailSelector.d.ts +6 -1
- package/lib/view/transactionDetail/transactionDetailSelector.js +23 -1
- package/package.json +1 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { NestedAccountHierarchyForReport } from '../../commonStateTypes/accountView/nestedAccountID';
|
|
2
2
|
import { NestedClassHierarchyForReport } from '../../commonStateTypes/classesView/nestedClassID';
|
|
3
|
-
import { FetchStateAndError } from '../../commonStateTypes/common';
|
|
3
|
+
import { FetchState, FetchStateAndError } from '../../commonStateTypes/common';
|
|
4
4
|
import { SelectorView } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
5
|
+
import { AccountBase } from '../../entity/account/accountState';
|
|
5
6
|
import { TransactionID } from '../../entity/transaction/stateTypes/transaction';
|
|
6
7
|
import { SupportedTransactionWithCOT } from '../../entity/transaction/transactionState';
|
|
7
8
|
import { Vendor } from '../../entity/vendor/vendorState';
|
|
@@ -17,6 +18,9 @@ export interface TransactionDetailReport extends SelectorView {
|
|
|
17
18
|
allVendors: Vendor[];
|
|
18
19
|
classHierarchyList: NestedClassHierarchyForReport[];
|
|
19
20
|
classList: ClassListSelectorView;
|
|
21
|
+
createTransferEntryStatus: FetchState;
|
|
22
|
+
/** Resolved credit-card pool for credit_card_payment transfer drawer. */
|
|
23
|
+
creditCardAccountsForTransferList: AccountBase[];
|
|
20
24
|
deleteStatusByAttachmentName: Record<string, FetchStateAndError>;
|
|
21
25
|
isAccountingClassesEnabled: boolean;
|
|
22
26
|
isAccountingProjectsEnabled: boolean;
|
|
@@ -24,6 +28,7 @@ export interface TransactionDetailReport extends SelectorView {
|
|
|
24
28
|
projectList: ProjectListSelectorView;
|
|
25
29
|
transactionDetailLocalData: TransactionDetailLocalData;
|
|
26
30
|
transactionDetailUpdateStatus: FetchStateAndError;
|
|
31
|
+
transferAccounts: AccountBase[];
|
|
27
32
|
isUpdateNotAllowed?: boolean;
|
|
28
33
|
transaction?: SupportedTransactionWithCOT;
|
|
29
34
|
}
|
|
@@ -7,6 +7,7 @@ exports.getInitialUpdatablePeriodsForTransactionRecommendations = exports.getTra
|
|
|
7
7
|
exports.getTransactionDetailForTransaction = getTransactionDetailForTransaction;
|
|
8
8
|
const get_1 = __importDefault(require("lodash/get"));
|
|
9
9
|
const reduceFetchState_1 = require("../../commonStateTypes/reduceFetchState");
|
|
10
|
+
const accountSelector_1 = require("../../entity/account/accountSelector");
|
|
10
11
|
const tenantSelector_1 = require("../../entity/tenant/tenantSelector");
|
|
11
12
|
const transactionType_1 = require("../../entity/transaction/stateTypes/transactionType");
|
|
12
13
|
const transactionHelper_1 = require("../../entity/transaction/transactionHelper");
|
|
@@ -18,7 +19,7 @@ const classListSelector_1 = require("../classList/classListSelector");
|
|
|
18
19
|
const projectListSelector_1 = require("../projectList/projectListSelector");
|
|
19
20
|
const transactionDetailState_1 = require("./transactionDetailState");
|
|
20
21
|
const getTransactionDetail = (state, transactionId, fetchLinkedTransactions = true) => {
|
|
21
|
-
const { transactionDetailState, transactionState, vendorState, vendorListState, accountState, classState, classListState, accountListState, projectState, projectListState, } = state;
|
|
22
|
+
const { transactionDetailState, transactionState, vendorState, vendorListState, accountState, classState, classListState, accountListState, expenseAutomationTransactionsViewState, projectState, projectListState, } = state;
|
|
22
23
|
const detailKey = (0, transactionDetailState_1.getTransactionDetailKey)(transactionId);
|
|
23
24
|
const transactionDetail = (0, get_1.default)(transactionDetailState.transactionDetailById, detailKey);
|
|
24
25
|
let fetchState = {
|
|
@@ -79,6 +80,24 @@ const getTransactionDetail = (state, transactionId, fetchLinkedTransactions = tr
|
|
|
79
80
|
: [];
|
|
80
81
|
const transactionDetailAnyUpdateStatus = reduceUpdateFetchStates(transactionDetail);
|
|
81
82
|
const vendors = (0, vendorSelector_1.getVendorsByVendorIds)(vendorState, vendorListState.vendorIds);
|
|
83
|
+
const transferAccountsFromApi = expenseAutomationTransactionsViewState.transferAccounts.accountIds
|
|
84
|
+
.map((id) => (0, accountSelector_1.getAccountBaseForTransferAccounts)(accountState, id))
|
|
85
|
+
.filter((account) => account != null);
|
|
86
|
+
const transferAccountsList = transferAccountsFromApi.length > 0
|
|
87
|
+
? transferAccountsFromApi
|
|
88
|
+
: accountsList.accounts
|
|
89
|
+
.map((a) => (0, accountSelector_1.getAccountBase)(accountState, a.accountId, 'account_list'))
|
|
90
|
+
.filter((account) => account != null);
|
|
91
|
+
const creditCardAccountsFromApi = expenseAutomationTransactionsViewState.creditCardAccountsForTransfer.accountIds
|
|
92
|
+
.map((id) => (0, accountSelector_1.getAccountBaseForCreditCardTransferAccounts)(accountState, id))
|
|
93
|
+
.filter((account) => account != null);
|
|
94
|
+
const coaCreditCardsFallback = accountsList.accounts
|
|
95
|
+
.map((a) => (0, accountSelector_1.getAccountBase)(accountState, a.accountId, 'account_list'))
|
|
96
|
+
.filter((account) => account != null)
|
|
97
|
+
.filter((a) => a.accountType === 'credit_card');
|
|
98
|
+
const creditCardAccountsForTransferList = creditCardAccountsFromApi.length > 0
|
|
99
|
+
? creditCardAccountsFromApi
|
|
100
|
+
: coaCreditCardsFallback;
|
|
82
101
|
return {
|
|
83
102
|
reportId: 'transaction_detail',
|
|
84
103
|
reportTitle: 'Transaction Detail',
|
|
@@ -95,6 +114,9 @@ const getTransactionDetail = (state, transactionId, fetchLinkedTransactions = tr
|
|
|
95
114
|
accountsHierarchyList,
|
|
96
115
|
classList: classList,
|
|
97
116
|
isAccountingClassesEnabled,
|
|
117
|
+
createTransferEntryStatus: expenseAutomationTransactionsViewState.createTransferEntryStatus,
|
|
118
|
+
creditCardAccountsForTransferList,
|
|
119
|
+
transferAccounts: transferAccountsList,
|
|
98
120
|
isAccountingProjectsEnabled,
|
|
99
121
|
projectList,
|
|
100
122
|
isUpdateNotAllowed: transactionDetail?.isUpdateNotAllowed,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.0.61-
|
|
3
|
+
"version": "5.0.61-betaML1",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|