@zeniai/client-epic-state 5.2.38 → 5.2.39-betaRD1
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.
|
@@ -37,9 +37,18 @@ const financeStatement = (0, toolkit_1.createSlice)({
|
|
|
37
37
|
},
|
|
38
38
|
},
|
|
39
39
|
updateFinanceStatementTimeframe(draft, action) {
|
|
40
|
+
// Unrelated UI re-dispatches the *current* timeframe as a side effect (the
|
|
41
|
+
// reports page hangs its table scroll reset off that callback); dropping the
|
|
42
|
+
// anchor there would silently reset the user's period to the latest one.
|
|
43
|
+
if (draft.timeframe === action.payload) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
40
46
|
draft.timeframe = action.payload;
|
|
47
|
+
// A month anchor is meaningless once the timeframe becomes quarter/year, so
|
|
48
|
+
// a real change drops it and returns the width to the default — 12 months
|
|
49
|
+
// must not become 12 quarters. Order is the user's, so it survives.
|
|
41
50
|
draft.selectedCOABalancesRange = {
|
|
42
|
-
numberOfPeriods:
|
|
51
|
+
numberOfPeriods: exports.initialFinanceStatementState.selectedCOABalancesRange.numberOfPeriods,
|
|
43
52
|
orderBy: draft.selectedCOABalancesRange.orderBy,
|
|
44
53
|
};
|
|
45
54
|
},
|
|
@@ -81,8 +90,7 @@ const financeStatement = (0, toolkit_1.createSlice)({
|
|
|
81
90
|
draft.selectedReportId = action.payload;
|
|
82
91
|
},
|
|
83
92
|
updateFinanceStatementAdditionalBalancesSelection(draft, action) {
|
|
84
|
-
const {
|
|
85
|
-
const safeCoaBalances = coaBalances != null ? coaBalances : [];
|
|
93
|
+
const { additionalBalances: additionalBalancesPayload, maxNumOfPeriodsToHighlight, } = action.payload;
|
|
86
94
|
const additionalBalances = additionalBalancesPayload ?? [];
|
|
87
95
|
let tempAdditionalBalances = [...additionalBalances];
|
|
88
96
|
if (additionalBalances.includes('this_period_vs_last_period') ||
|
|
@@ -98,30 +106,12 @@ const financeStatement = (0, toolkit_1.createSlice)({
|
|
|
98
106
|
draft.maxNumOfPeriodsToHighlight = maxNumOfPeriodsToHighlight;
|
|
99
107
|
draft.isAdditionalBalancesShown =
|
|
100
108
|
additionalBalances.length != 0 ? true : false;
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
thisPeriod,
|
|
108
|
-
};
|
|
109
|
-
const selectionRanges = (0, getSelectedAndHighlightedRanges_1.getSelectedAndHighlightedRangesForThisPeriod)({
|
|
110
|
-
firstMonthOfFY,
|
|
111
|
-
thisPeriod: thisPeriod,
|
|
112
|
-
coaBalances: safeCoaBalances,
|
|
113
|
-
timeframe,
|
|
114
|
-
maxNumOfPeriodsToHighlight: maxNumOfPeriodsToHighlight,
|
|
115
|
-
currentSelection: {
|
|
116
|
-
selectedCOABalancesRange: selectedCoaBalancesRangeWithThisPeriod,
|
|
117
|
-
},
|
|
118
|
-
orderBy: 'ascending_date',
|
|
119
|
-
maxNumOfPeriodsToSelect: maxNumOfPeriodsToHighlight,
|
|
120
|
-
});
|
|
121
|
-
draft.selectedCOABalancesRange =
|
|
122
|
-
selectionRanges.selectedCOABalancesRange;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
109
|
+
// Column metadata only — must not touch selectedCOABalancesRange. The
|
|
110
|
+
// reports page fires this on load, on resize and on every fetch-state
|
|
111
|
+
// transition (so also on report switch and on remount after a drill-down)
|
|
112
|
+
// with a viewport-derived period count that knows nothing about the range
|
|
113
|
+
// the user picked. The width default comes from initial state, and from
|
|
114
|
+
// updateFinanceStatementTimeframe on a real timeframe change.
|
|
125
115
|
},
|
|
126
116
|
updateDownloadState(draft, action) {
|
|
127
117
|
draft.downloadState = action.payload;
|
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.39-betaRD1",
|
|
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",
|