@zeniai/client-epic-state 5.1.37-betaRD1 → 5.1.37-betaRD2
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.
|
@@ -188,15 +188,28 @@ export function getExpenseAutomationTransactionView(state) {
|
|
|
188
188
|
};
|
|
189
189
|
// Parent-tab badge counts. Sourced from `parent_tab_total_count` in the
|
|
190
190
|
// listing response and used exclusively by the navbar / tab strip badges.
|
|
191
|
-
//
|
|
192
|
-
//
|
|
191
|
+
// When a search or filter is active the badge switches to the filtered count
|
|
192
|
+
// so the number tracks what the user is looking at.
|
|
193
|
+
const autoCatTabView = expenseAutomationTransactionsViewState.transactionCategorizationView
|
|
194
|
+
.autoCategorized;
|
|
195
|
+
const reviewTabView = expenseAutomationTransactionsViewState.transactionCategorizationView.review;
|
|
196
|
+
const autoCatSubTabCache = expenseAutomationTransactionsViewState.autoCategorizedSubTabCache;
|
|
197
|
+
const autoCatFilterActive = autoCatTabView.uiState.searchString !== '' ||
|
|
198
|
+
autoCatTabView.filters.categories.length > 0;
|
|
199
|
+
const reviewFilterActive = reviewTabView.uiState.searchString !== '' ||
|
|
200
|
+
reviewTabView.filters.categories.length > 0;
|
|
193
201
|
const parentTotalCountByTab = expenseAutomationTransactionsViewState.parentTotalCountByTab;
|
|
194
202
|
const parentTabTotalCountByTab = {
|
|
195
203
|
review: monthYearPeriodId != null
|
|
196
|
-
?
|
|
204
|
+
? reviewFilterActive
|
|
205
|
+
? totalCountByReview[monthYearPeriodId]
|
|
206
|
+
: (parentTotalCountByTab.review[monthYearPeriodId] ?? 0)
|
|
197
207
|
: 0,
|
|
198
208
|
autoCategorized: monthYearPeriodId != null
|
|
199
|
-
?
|
|
209
|
+
? autoCatFilterActive
|
|
210
|
+
? (autoCatSubTabCache['all']?.totalCount[monthYearPeriodId] ??
|
|
211
|
+
totalCountByAutoCat[monthYearPeriodId])
|
|
212
|
+
: (parentTotalCountByTab.autoCategorized[monthYearPeriodId] ?? 0)
|
|
200
213
|
: 0,
|
|
201
214
|
};
|
|
202
215
|
const fetchStateByTab = {
|
|
@@ -198,15 +198,28 @@ function getExpenseAutomationTransactionView(state) {
|
|
|
198
198
|
};
|
|
199
199
|
// Parent-tab badge counts. Sourced from `parent_tab_total_count` in the
|
|
200
200
|
// listing response and used exclusively by the navbar / tab strip badges.
|
|
201
|
-
//
|
|
202
|
-
//
|
|
201
|
+
// When a search or filter is active the badge switches to the filtered count
|
|
202
|
+
// so the number tracks what the user is looking at.
|
|
203
|
+
const autoCatTabView = expenseAutomationTransactionsViewState.transactionCategorizationView
|
|
204
|
+
.autoCategorized;
|
|
205
|
+
const reviewTabView = expenseAutomationTransactionsViewState.transactionCategorizationView.review;
|
|
206
|
+
const autoCatSubTabCache = expenseAutomationTransactionsViewState.autoCategorizedSubTabCache;
|
|
207
|
+
const autoCatFilterActive = autoCatTabView.uiState.searchString !== '' ||
|
|
208
|
+
autoCatTabView.filters.categories.length > 0;
|
|
209
|
+
const reviewFilterActive = reviewTabView.uiState.searchString !== '' ||
|
|
210
|
+
reviewTabView.filters.categories.length > 0;
|
|
203
211
|
const parentTotalCountByTab = expenseAutomationTransactionsViewState.parentTotalCountByTab;
|
|
204
212
|
const parentTabTotalCountByTab = {
|
|
205
213
|
review: monthYearPeriodId != null
|
|
206
|
-
?
|
|
214
|
+
? reviewFilterActive
|
|
215
|
+
? totalCountByReview[monthYearPeriodId]
|
|
216
|
+
: (parentTotalCountByTab.review[monthYearPeriodId] ?? 0)
|
|
207
217
|
: 0,
|
|
208
218
|
autoCategorized: monthYearPeriodId != null
|
|
209
|
-
?
|
|
219
|
+
? autoCatFilterActive
|
|
220
|
+
? (autoCatSubTabCache['all']?.totalCount[monthYearPeriodId] ??
|
|
221
|
+
totalCountByAutoCat[monthYearPeriodId])
|
|
222
|
+
: (parentTotalCountByTab.autoCategorized[monthYearPeriodId] ?? 0)
|
|
210
223
|
: 0,
|
|
211
224
|
};
|
|
212
225
|
const fetchStateByTab = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.1.37-
|
|
3
|
+
"version": "5.1.37-betaRD2",
|
|
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",
|