fix: re-render sidebar when module config loads

- Convert sidebar.js IIFE to window.renderSidebar() so it can be re-rendered
- Call window.renderSidebar(data) from app-init.js after fetching modules
- Ensures sidebar reflects actual tenant module config, not stale localStorage
This commit is contained in:
2026-05-28 00:36:07 +00:00
parent 9f04bfe0bb
commit 77541e4c52
2 changed files with 14 additions and 9 deletions

View File

@@ -190,6 +190,9 @@
if (data) {
localStorage.setItem('pos_modules', JSON.stringify(data));
window.POS_USER.modules = data;
if (typeof window.renderSidebar === 'function') {
window.renderSidebar(data);
}
}
}).catch(function() {});
} catch(e) {}