fix(roles): restringe usuarios Taller y Mecanico a solo la seccion de Taller y oculta precios
- sidebar.js: itemAllowed incluye mechanic junto a workshop -> solo muestra Taller - app-init.js: redirige a /pos/workshop si el rol es workshop/mechanic - config_bp.py: remueve customers.view y fleet.view de los permisos por defecto de workshop/mechanic - workshop.js: hidePrices ahora tambien aplica para mechanic; oculta columnas/inputs de precio - app-init.js/config.js: agrega etiquetas de rol para workshop y mechanic - workshop.html: marca columnas de precio con price-col y oculta input catRate Tests: 35 passed
This commit is contained in:
@@ -41,7 +41,7 @@ window.renderSidebar = function(modulesOverride) {
|
||||
// only the sections relevant to their job.
|
||||
function itemAllowed(id) {
|
||||
if (role === 'owner' || role === 'admin') return true;
|
||||
if (role === 'workshop') {
|
||||
if (role === 'workshop' || role === 'mechanic') {
|
||||
return id === 'workshop';
|
||||
}
|
||||
if (role === 'cashier') {
|
||||
|
||||
Reference in New Issue
Block a user