feat: module toggles in POS config and Instance Manager
- Add GET/PUT /pos/api/config/modules endpoints in POS config_bp.py - Update sidebar.js to filter nav items based on enabled modules - Add Modules section to POS config.html with toggles for WhatsApp, Marketplace, MercadoLibre - Add module load/save logic to POS config.js - Preload modules in app-init.js for sidebar caching - Add tenant module management to Instance Manager - get_tenant_modules / update_tenant_modules in tenant_service.py - GET/PUT /api/tenants/<id>/modules endpoints in tenants_bp.py - Add modules modal to manager index.html - Add module editing UI and logic to manager.js - Add toggle-switch CSS to manager.css
This commit is contained in:
@@ -179,7 +179,7 @@ function cacheFirst(request) {
|
||||
return caches.match(request).then(function (cached) {
|
||||
if (cached) {
|
||||
fetch(request).then(function (response) {
|
||||
if (response && response.status === 200) {
|
||||
if (response && response.status === 200 && request.method === 'GET') {
|
||||
caches.open(CACHE_NAME).then(function (cache) {
|
||||
cache.put(request, response);
|
||||
});
|
||||
@@ -188,7 +188,7 @@ function cacheFirst(request) {
|
||||
return cached;
|
||||
}
|
||||
return fetch(request).then(function (response) {
|
||||
if (response && response.status === 200) {
|
||||
if (response && response.status === 200 && request.method === 'GET') {
|
||||
var clone = response.clone();
|
||||
caches.open(CACHE_NAME).then(function (cache) {
|
||||
cache.put(request, clone);
|
||||
@@ -201,7 +201,7 @@ function cacheFirst(request) {
|
||||
|
||||
function networkFirst(request) {
|
||||
return fetch(request).then(function (response) {
|
||||
if (response && response.status === 200) {
|
||||
if (response && response.status === 200 && request.method === 'GET') {
|
||||
var clone = response.clone();
|
||||
caches.open(CACHE_NAME).then(function (cache) {
|
||||
cache.put(request, clone);
|
||||
|
||||
Reference in New Issue
Block a user