@zeniai/client-epic-state 5.2.26 → 5.2.27-betaRD0
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/aiCfo/aiCfoPayload.d.ts +21 -0
- package/lib/entity/aiCfo/aiCfoReducer.js +73 -1
- package/lib/entity/aiCfo/aiCfoState.d.ts +24 -0
- package/lib/entity/file/fileState.d.ts +3 -3
- package/lib/entity/file/fileState.js +2 -0
- package/lib/entity/invoicing/creditNote/creditNotePayload.d.ts +0 -1
- package/lib/entity/invoicing/creditNote/creditNotePayload.js +0 -1
- package/lib/entity/invoicing/creditNote/creditNoteState.d.ts +0 -1
- package/lib/entity/invoicing/invoice/invoicePayload.d.ts +0 -1
- package/lib/entity/invoicing/invoice/invoicePayload.js +0 -1
- package/lib/entity/invoicing/invoice/invoiceState.d.ts +0 -1
- package/lib/entity/invoicing/invoicingCommonPayload.d.ts +2 -0
- package/lib/entity/invoicing/invoicingCustomer/invoicingCustomerPayload.d.ts +0 -1
- package/lib/entity/invoicing/invoicingCustomer/invoicingCustomerPayload.js +0 -1
- package/lib/entity/invoicing/invoicingCustomer/invoicingCustomerState.d.ts +0 -1
- package/lib/entity/invoicing/invoicingSubscription/invoicingSubscriptionPayload.d.ts +1 -2
- package/lib/entity/invoicing/invoicingSubscription/invoicingSubscriptionPayload.js +1 -2
- package/lib/entity/invoicing/invoicingSubscription/invoicingSubscriptionState.d.ts +1 -2
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +7 -0
- package/lib/epic.d.ts +2 -1
- package/lib/epic.js +2 -0
- package/lib/esm/entity/aiCfo/aiCfoReducer.js +73 -1
- package/lib/esm/entity/file/fileState.js +2 -0
- package/lib/esm/entity/invoicing/creditNote/creditNotePayload.js +0 -1
- package/lib/esm/entity/invoicing/invoice/invoicePayload.js +0 -1
- package/lib/esm/entity/invoicing/invoicingCustomer/invoicingCustomerPayload.js +0 -1
- package/lib/esm/entity/invoicing/invoicingSubscription/invoicingSubscriptionPayload.js +1 -2
- package/lib/esm/epic.js +2 -0
- package/lib/esm/index.js +2 -2
- package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +5 -0
- package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +1 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.js +22 -0
- package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +4 -2
- package/lib/esm/view/invoicing/dataImportView/dataImportViewSelector.js +2 -0
- package/lib/esm/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.js +2 -0
- package/lib/esm/view/invoicing/invoicingOverview/invoicingOverviewPayload.js +0 -1
- package/lib/esm/view/invoicing/invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewSelector.js +2 -1
- package/lib/esm/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewSelector.js +1 -0
- package/lib/esm/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewState.js +0 -2
- package/lib/esm/view/invoicing/settingsView/invoicingBrandingFormConfig.js +5 -0
- package/lib/esm/view/invoicing/settingsView/settingsViewSelector.js +5 -1
- package/lib/esm/view/recommendation/recommendationReducer.js +13 -1
- package/lib/esm/view/recommendation/submitRecommendationFeedbackEpic.js +52 -0
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPaySetupApproverViewEpic.js +18 -2
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/initializeBillPaySetupApproverViewUpdateDataEpic.js +0 -1
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.js +0 -3
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/fetchRemiSetupApproverViewEpic.js +18 -2
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/initializeRemiSetupApproverViewUpdateDataEpic.js +0 -1
- package/lib/index.d.ts +7 -5
- package/lib/index.js +24 -23
- package/lib/view/aiCfoView/aiCfoViewReducer.js +5 -0
- package/lib/view/aiCfoView/aiCfoViewSelector.js +1 -0
- package/lib/view/aiCfoView/aiCfoViewState.d.ts +7 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.js +22 -0
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +2 -0
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +5 -3
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.d.ts +2 -5
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +4 -2
- package/lib/view/invoicing/dataImportView/dataImportViewSelector.d.ts +2 -0
- package/lib/view/invoicing/dataImportView/dataImportViewSelector.js +2 -0
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewPayload.d.ts +1 -0
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.d.ts +1 -1
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.js +2 -0
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewState.d.ts +1 -0
- package/lib/view/invoicing/invoicingOverview/invoicingOverviewPayload.d.ts +0 -1
- package/lib/view/invoicing/invoicingOverview/invoicingOverviewPayload.js +0 -1
- package/lib/view/invoicing/invoicingOverview/invoicingOverviewState.d.ts +0 -1
- package/lib/view/invoicing/invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewSelector.d.ts +3 -1
- package/lib/view/invoicing/invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewSelector.js +1 -0
- package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewSelector.d.ts +2 -0
- package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewSelector.js +1 -0
- package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewState.d.ts +2 -2
- package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewState.js +0 -2
- package/lib/view/invoicing/issueCreditNote/issueCreditNotePayload.d.ts +0 -1
- package/lib/view/invoicing/settingsView/invoicingBrandingFormConfig.d.ts +1 -0
- package/lib/view/invoicing/settingsView/invoicingBrandingFormConfig.js +5 -0
- package/lib/view/invoicing/settingsView/settingsViewSelector.d.ts +5 -1
- package/lib/view/invoicing/settingsView/settingsViewSelector.js +4 -0
- package/lib/view/invoicing/subscriptionAction/subscriptionActionRequestPayload.d.ts +8 -0
- package/lib/view/recommendation/recommendationPayload.d.ts +34 -0
- package/lib/view/recommendation/recommendationReducer.d.ts +2 -1
- package/lib/view/recommendation/recommendationReducer.js +14 -2
- package/lib/view/recommendation/submitRecommendationFeedbackEpic.d.ts +7 -0
- package/lib/view/recommendation/submitRecommendationFeedbackEpic.js +56 -0
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPaySetupApproverViewEpic.d.ts +2 -1
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPaySetupApproverViewEpic.js +18 -2
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/initializeBillPaySetupApproverViewUpdateDataEpic.js +0 -1
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.d.ts +0 -1
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.js +0 -3
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonState.d.ts +0 -1
- package/lib/view/spendManagement/commonHistoryView/commonHistory.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/fetchRemiSetupApproverViewEpic.d.ts +2 -1
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/fetchRemiSetupApproverViewEpic.js +18 -2
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/initializeRemiSetupApproverViewUpdateDataEpic.js +0 -1
- package/package.json +1 -1
|
@@ -5,13 +5,20 @@ const rxjs_1 = require("rxjs");
|
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
6
|
const approvalRuleReducer_1 = require("../../../../../entity/approvalRule/approvalRuleReducer");
|
|
7
7
|
const approvalRuleSelector_1 = require("../../../../../entity/approvalRule/approvalRuleSelector");
|
|
8
|
+
const tenantSelector_1 = require("../../../../../entity/tenant/tenantSelector");
|
|
8
9
|
const userReducer_1 = require("../../../../../entity/user/userReducer");
|
|
9
10
|
const responsePayload_1 = require("../../../../../responsePayload");
|
|
11
|
+
const classListReducer_1 = require("../../../../classList/classListReducer");
|
|
10
12
|
const remiSetupApproverViewReducer_1 = require("../remiSetupApproverViewReducer");
|
|
11
13
|
const fetchRemiSetupApproverViewEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(remiSetupApproverViewReducer_1.fetchRemiSetupApproverView.match), (0, operators_1.switchMap)((action) => {
|
|
12
14
|
const { cacheOverride, resolveAttributeToUser, includeImplicitActors, useV3, } = action.payload;
|
|
13
|
-
const { remiSetupApproverViewState, approvalRuleState } = state$.value;
|
|
15
|
+
const { remiSetupApproverViewState, approvalRuleState, classListState } = state$.value;
|
|
16
|
+
const isAccountingClassesEnabled = (0, tenantSelector_1.getIsAccountingClassesEnabled)(state$.value);
|
|
14
17
|
const approvalRules = (0, approvalRuleSelector_1.getApprovalRulesByIds)(approvalRuleState, remiSetupApproverViewState.approvalRuleIds);
|
|
18
|
+
const shouldFetchClassList = isAccountingClassesEnabled &&
|
|
19
|
+
(cacheOverride === true ||
|
|
20
|
+
(classListState.hasValidState() === false &&
|
|
21
|
+
classListState.fetchState !== 'In-Progress'));
|
|
15
22
|
if (cacheOverride === true ||
|
|
16
23
|
approvalRules.length !==
|
|
17
24
|
remiSetupApproverViewState.approvalRuleIds.length ||
|
|
@@ -33,6 +40,9 @@ const fetchRemiSetupApproverViewEpic = (actions$, state$, zeniAPI) => actions$.p
|
|
|
33
40
|
(0, approvalRuleReducer_1.updateApprovalRules)(response.data.approval_rules),
|
|
34
41
|
(0, remiSetupApproverViewReducer_1.fetchRemiSetupApproverViewSuccess)(approvalRuleIds),
|
|
35
42
|
];
|
|
43
|
+
if (shouldFetchClassList) {
|
|
44
|
+
actions.push((0, classListReducer_1.fetchClassList)());
|
|
45
|
+
}
|
|
36
46
|
return (0, rxjs_1.from)(actions);
|
|
37
47
|
}
|
|
38
48
|
else {
|
|
@@ -42,7 +52,13 @@ const fetchRemiSetupApproverViewEpic = (actions$, state$, zeniAPI) => actions$.p
|
|
|
42
52
|
}
|
|
43
53
|
else {
|
|
44
54
|
const { approvalRuleIds } = remiSetupApproverViewState;
|
|
45
|
-
|
|
55
|
+
const actions = [
|
|
56
|
+
(0, remiSetupApproverViewReducer_1.fetchRemiSetupApproverViewSuccess)(approvalRuleIds),
|
|
57
|
+
];
|
|
58
|
+
if (shouldFetchClassList) {
|
|
59
|
+
actions.push((0, classListReducer_1.fetchClassList)());
|
|
60
|
+
}
|
|
61
|
+
return (0, rxjs_1.from)(actions);
|
|
46
62
|
}
|
|
47
63
|
}));
|
|
48
64
|
exports.fetchRemiSetupApproverViewEpic = fetchRemiSetupApproverViewEpic;
|
|
@@ -24,7 +24,6 @@ const initializeRemiSetupApproverViewUpdateDataEpic = (actions$, state$) => acti
|
|
|
24
24
|
name: approvalRule.name,
|
|
25
25
|
description: approvalRule.description,
|
|
26
26
|
separationOfDuties: approvalRule.separationOfDuties,
|
|
27
|
-
isFallback: approvalRule.isFallback,
|
|
28
27
|
};
|
|
29
28
|
fetchActions.push((0, remiSetupApproverViewReducer_1.clearRemiSetupApproverViewUpdateData)(), (0, remiSetupApproverViewReducer_1.saveRemiSetupApproverViewUpdateData)(remiSetupApproverViewUpdateData));
|
|
30
29
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.27-betaRD0",
|
|
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",
|