feat: add catalog module toggle
- Add catalog module to POS config endpoints, sidebar filter, config UI - Add catalog toggle to Instance Manager tenant modules modal
This commit is contained in:
@@ -700,9 +700,11 @@ const Config = (() => {
|
||||
var cbWa = document.getElementById('cfg-module-whatsapp');
|
||||
var cbMp = document.getElementById('cfg-module-marketplace');
|
||||
var cbMeli = document.getElementById('cfg-module-meli');
|
||||
var cbCat = document.getElementById('cfg-module-catalog');
|
||||
if (cbWa) cbWa.checked = data.whatsapp !== false;
|
||||
if (cbMp) cbMp.checked = data.marketplace !== false;
|
||||
if (cbMeli) cbMeli.checked = data.meli !== false;
|
||||
if (cbCat) cbCat.checked = data.catalog !== false;
|
||||
localStorage.setItem('pos_modules', JSON.stringify(data));
|
||||
} catch (e) {
|
||||
console.error('Config.loadModules:', e);
|
||||
@@ -717,6 +719,7 @@ const Config = (() => {
|
||||
whatsapp: document.getElementById('cfg-module-whatsapp').checked,
|
||||
marketplace: document.getElementById('cfg-module-marketplace').checked,
|
||||
meli: document.getElementById('cfg-module-meli').checked,
|
||||
catalog: document.getElementById('cfg-module-catalog').checked,
|
||||
};
|
||||
var res = await fetch(API + '/modules', {
|
||||
method: 'PUT',
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
{ label: _t('nav_main'), items: [
|
||||
{ name: _t('dashboard'), href: '/pos/dashboard', icon: '<rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/>' },
|
||||
{ name: _t('pos'), href: '/pos/sale', icon: '<rect x="2" y="3" width="20" height="14" rx="2"/><path d="M8 21h8M12 17v4"/>' },
|
||||
{ name: _t('catalog'), href: '/pos/catalog', icon: '<path d="M4 6h16M4 10h16M4 14h16M4 18h16"/>' },
|
||||
moduleEnabled('catalog') ? { name: _t('catalog'), href: '/pos/catalog', icon: '<path d="M4 6h16M4 10h16M4 14h16M4 18h16"/>' } : null,
|
||||
{ name: _t('inventory'), href: '/pos/inventory', icon: '<path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/><polyline points="3.27 6.96 12 12.01 20.73 6.96"/><line x1="12" y1="22.08" x2="12" y2="12"/>' },
|
||||
|
||||
]},
|
||||
|
||||
Reference in New Issue
Block a user