From 3baf3d2545ba6ece6b74a64c0def59bd0774cf54 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Wed, 10 Jun 2026 16:34:12 +0000
Subject: [PATCH] =Laid the groundwork for an improved DashboardManager.php setup. Have to put it aside so I can get the dang Northeh done though.
---
assets/js/concise/DataStore.js | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/assets/js/concise/DataStore.js b/assets/js/concise/DataStore.js
index 45019e1..539c82b 100644
--- a/assets/js/concise/DataStore.js
+++ b/assets/js/concise/DataStore.js
@@ -48,7 +48,6 @@
register(name, configs = [], version = 1.25) {
if (!Array.isArray(configs)) configs = [configs];
if (configs.length === 0) return;
-
if (!this.dbConfig.has(name)) {
this.dbConfig.set(name, {
dbName: `${jvbBase.base}${name}`,
@@ -127,6 +126,7 @@
}
});
+
// Initialize database asynchronously
this.initDB(name).catch(error => {
console.error(`Failed to initialize store "${name}":`, error);
@@ -1127,7 +1127,12 @@
// Handle other filters
for (const [key, value] of Object.entries(store.filters)) {
- if (key === 'taxonomy') continue;
+ if (key === 'taxonomy') {
+ if (typeof value === 'string' && !value.includes(',')) {
+ filterPredicates.push(item => item.taxonomy === value);
+ }
+ continue;
+ }
if (store.ignoreFilters.has(key)) {
continue;
}
@@ -1285,14 +1290,9 @@
}
if (store.lastResponse.has_more === false) {
- // Check if new filters are a subset of what we have
- const isSubsetFilter = Object.entries(updates).every(([key, value]) => {
- if (store.ignoreFilters.has(key)) return true;
- if (key === 'page') return true; // Handle pagination locally
- return true; // We have all data, can filter locally
- });
-
- if (isSubsetFilter) return false;
+ if (this.hasCompleteData(store, store.filters)) {
+ return false;
+ }
}
if ('page' in updates) {
--
Gitblit v1.10.0