Mejoras de estilo y logica de login de ollas

This commit is contained in:
Alejandro Tasistro 2025-06-19 22:32:16 -03:00
parent bcadd1f1ae
commit 7526ab300c
2 changed files with 64 additions and 24 deletions

View file

@ -50,6 +50,14 @@ const getters = {
textos() { textos() {
let rol = getters.urlRol(); let rol = getters.urlRol();
switch (rol) { switch (rol) {
case 'pedido':
return {
titulo: "Pedidos MPS",
subtitlo: "aplicación de pedidos",
password: "Contraseña",
ayuda: "Si no la sabés, consultá a la comisión informática",
label: "Seleccioná tu región"
};
case 'admin': case 'admin':
return { return {
titulo: "Administración de Pedidos MPS", titulo: "Administración de Pedidos MPS",
@ -66,11 +74,11 @@ const getters = {
ayuda: "Si no la sabés, consultá a la comisión informática", ayuda: "Si no la sabés, consultá a la comisión informática",
label: "Usuario" label: "Usuario"
}; };
case 'pedido': case 'ollas':
return { return {
titulo: "Pedidos MPS", titulo: "Ollas MPS",
subtitlo: "aplicación de pedidos", subtitlo: "aplicación de pedidos de ollas",
password: "Contraseña", password: "Contraseña de ollas del barrio",
ayuda: "Si no la sabés, consultá a la comisión informática", ayuda: "Si no la sabés, consultá a la comisión informática",
label: "Seleccioná tu región" label: "Seleccioná tu región"
}; };
@ -81,23 +89,29 @@ const getters = {
estilos() { estilos() {
let rol = getters.urlRol(); let rol = getters.urlRol();
switch (rol) { switch (rol) {
case 'admin':
return {
fondo: "has-background-danger",
texto: "has-text-white",
botones: "is-warning",
};
case 'comisiones':
return {
fondo: "has-background-warning",
texto: "",
botones: "is-dark"
};
case 'pedido': case 'pedido':
return { return {
fondo: "", fondo: "",
texto: "", texto: "",
botones: "is-danger" botones: "danger-dark-button"
};
case 'admin':
return {
fondo: "has-background-danger-dark",
texto: "has-text-white",
botones: "is-dark",
};
case 'comisiones':
return {
fondo: "has-background-grey-light",
texto: "",
botones: "is-dark"
};
case 'ollas':
return {
fondo: "has-background-dark",
texto: "has-text-white",
botones: "danger-dark-button",
}; };
default: default:
throw new Error("Url inválida"); throw new Error("Url inválida");
@ -106,27 +120,48 @@ const getters = {
opcionesLogin() { opcionesLogin() {
let rol = getters.urlRol(); let rol = getters.urlRol();
switch (rol) { switch (rol) {
case 'pedido':
return [
{ nombre: "Administración", href: "/admin" },
{ nombre: "Ollas", href: "/ollas" },
{ nombre: "Comisiones", href: "/comisiones" },
];
case 'admin': case 'admin':
return [ return [
{ nombre: "Pedidos", href: "/" }, { nombre: "Pedidos", href: "/" },
{ nombre: "Comisiones", href: "/comisiones" } { nombre: "Ollas", href: "/ollas" },
{ nombre: "Comisiones", href: "/comisiones" },
]; ];
case 'comisiones': case 'comisiones':
return [ return [
{ nombre: "Pedidos", href: "/" }, { nombre: "Pedidos", href: "/" },
{ nombre: "Administración", href: "/admin" } { nombre: "Ollas", href: "/ollas" },
];
case 'pedido':
return [
{ nombre: "Administración", href: "/admin" }, { nombre: "Administración", href: "/admin" },
{ nombre: "Comisiones", href: "/comisiones" } ];
case 'ollas':
return [
{ nombre: "Pedidos", href: "/" },
{ nombre: "Administración", href: "/admin" },
{ nombre: "Comisiones", href: "/comisiones" },
]; ];
default: default:
throw new Error("Url inválida"); throw new Error("Url inválida");
} }
}, },
nombre() { nombre() {
return `${state.grupo_de_compra_elegido}${ getters.urlRol() === 'admin' ? '_admin' : ''}`; let rol = getters.urlRol();
switch (rol) {
case 'pedido':
return state.grupo_de_compra_elegido;
case 'admin':
return `${state.grupo_de_compra_elegido}_admin`;
case 'ollas':
return `${state.grupo_de_compra_elegido}_ollas`;
case 'comisiones':
return "";
default:
throw new Error("Url inválida");
}
} }
}; };

View file

@ -43,6 +43,11 @@ table.table td {
max-height: 100% !important; max-height: 100% !important;
} }
.danger-dark-button {
background-color: $danger-dark;
border-color: transparent;
color: #fff;
}
/* /*
Author: Aseem Lalfakawma <alalfakawma.github.io> Author: Aseem Lalfakawma <alalfakawma.github.io>
This SCSS mixin will allow sizing of table columns in Bulma CSS Framework. This SCSS mixin will allow sizing of table columns in Bulma CSS Framework.