fix: corretto tempo di visualizzazione che non considerava la variabile. style: aggiunto pulsante per eliminare precedenti env.

This commit is contained in:
Gabriele Cimaschi committed 2026-09-09 11:21:58 +02:00
1 parent cf500aabb3
commit ec1fb25d4e
5 files changed
+101 -4

No files matched your search

+11 -1
View File
@@ -508,7 +508,13 @@ const App = {
/** Ensure lookup data is loaded (cached) */
async ensureLookups(forceRefresh = false) {
if (this.lookupsLoaded && !forceRefresh) return;
if (this.lookupsLoaded && !forceRefresh) {
const freshConfig = await this.api('/api/config').catch(() => null);
if (freshConfig && this.lookups) {
this.lookups.config = freshConfig;
}
return;
}
// Check localStorage cache first if not forcing refresh
if (!forceRefresh) {
@@ -519,6 +525,10 @@ const App = {
if (!this.lookups.config || this.lookups.config.autoTimeMinHour === undefined || !this.lookups.customerUsers || !this.lookups.customer_users_version_1) {
throw new Error('Outdated config cache (missing autoTimeMinHour or customerUsers)');
}
const freshConfig = await this.api('/api/config').catch(() => null);
if (freshConfig) {
this.lookups.config = freshConfig;
}
this.lookupsLoaded = true;
return;
} catch (e) {