@zeniai/client-epic-state 4.13.92 → 4.13.94
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.
|
@@ -12,11 +12,13 @@ const tenantSelector_1 = require("../../entity/tenant/tenantSelector");
|
|
|
12
12
|
const timePeriod_1 = require("../../commonStateTypes/timePeriod");
|
|
13
13
|
const monthEndCloseChecksViewSelector_1 = require("../monthEndCloseChecksView/monthEndCloseChecksViewSelector");
|
|
14
14
|
const transactionCategorizationSelector_1 = require("./selectors/transactionCategorizationSelector");
|
|
15
|
-
const isPreviousStepDisabled = (allSteps, stepIndex, currentTenant, selectedPeriod, userAllowedToAccessMonthEndInsights, reportEmailSentDate, auditSummary) => {
|
|
15
|
+
const isPreviousStepDisabled = (selectedTransactionCategorizationTab, allSteps, stepIndex, currentTenant, selectedPeriod, userAllowedToAccessMonthEndInsights, reportEmailSentDate, auditSummary) => {
|
|
16
16
|
if (stepIndex === 0) {
|
|
17
|
-
return
|
|
18
|
-
?
|
|
19
|
-
:
|
|
17
|
+
return selectedTransactionCategorizationTab === 'autoCategorized'
|
|
18
|
+
? false
|
|
19
|
+
: reportEmailSentDate == null
|
|
20
|
+
? (0, monthEndCloseChecksViewSelector_1.isMonthEndInsightDisabled)(currentTenant, selectedPeriod, userAllowedToAccessMonthEndInsights, auditSummary)
|
|
21
|
+
: true;
|
|
20
22
|
}
|
|
21
23
|
return allSteps[stepIndex - 1].isDisabled;
|
|
22
24
|
};
|
|
@@ -117,7 +119,7 @@ function getExpenseAutomationView(state) {
|
|
|
117
119
|
case 'month_end_insights':
|
|
118
120
|
allStepsOriginal[index] = Object.assign(Object.assign({}, stepDetail), { isDisabled: reportEmailSentDate == null
|
|
119
121
|
? (0, monthEndCloseChecksViewSelector_1.isMonthEndInsightDisabled)(currentTenant, selectedPeriod, userAllowedToAccessMonthEndInsights, auditSummary)
|
|
120
|
-
:
|
|
122
|
+
: true });
|
|
121
123
|
return;
|
|
122
124
|
case 'flux_analysis':
|
|
123
125
|
default:
|
|
@@ -128,7 +130,7 @@ function getExpenseAutomationView(state) {
|
|
|
128
130
|
allSteps.forEach((stepDetail, index, allStepsOriginal) => {
|
|
129
131
|
allStepsOriginal[index] = Object.assign(Object.assign({}, stepDetail), { isNextDisabled: index === allStepsOriginal.length - 1
|
|
130
132
|
? allStepsOriginal[0].isDisabled
|
|
131
|
-
: allStepsOriginal[index + 1].isDisabled, isPrevDisabled: isPreviousStepDisabled(allStepsOriginal, index, currentTenant, selectedPeriod, userAllowedToAccessMonthEndInsights, reportEmailSentDate, auditSummary) });
|
|
133
|
+
: allStepsOriginal[index + 1].isDisabled, isPrevDisabled: isPreviousStepDisabled(selectedTransactionCategorizationTab, allStepsOriginal, index, currentTenant, selectedPeriod, userAllowedToAccessMonthEndInsights, reportEmailSentDate, auditSummary) });
|
|
132
134
|
});
|
|
133
135
|
}
|
|
134
136
|
const reducedFetchStatus = (0, reduceFetchState_1.reduceAnyFetchState)(fetchStateVariables); // Add more states
|
|
@@ -254,7 +254,8 @@ const getEntityDetails = (entity, lineItemLocalData, vendorUpdates) => {
|
|
|
254
254
|
};
|
|
255
255
|
const isTransactionMiscategorized = (transaction, isExpenseAutomationEnabled) => {
|
|
256
256
|
const lines = transaction.lines;
|
|
257
|
-
if (isExpenseAutomationEnabled === true &&
|
|
257
|
+
if (isExpenseAutomationEnabled === true &&
|
|
258
|
+
((0, vendorTransaction_1.isVendorTransaction)(transaction) || transaction.type === 'journal_entry')) {
|
|
258
259
|
return true;
|
|
259
260
|
}
|
|
260
261
|
let isTransactionMisCategorized = false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.13.
|
|
3
|
+
"version": "4.13.94",
|
|
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
|
"types": "lib/index.d.ts",
|