funcion/pedido-ollas #47

Merged
rho merged 92 commits from funcion/pedido-ollas into master 2025-07-15 11:27:30 -03:00
2 changed files with 64 additions and 24 deletions
Showing only changes of commit 7526ab300c - Show all commits

View file

@ -50,6 +50,14 @@ const getters = {
textos() {
let rol = getters.urlRol();
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':
return {
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",
label: "Usuario"
};
case 'pedido':
case 'ollas':
return {
titulo: "Pedidos MPS",
subtitlo: "aplicación de pedidos",
password: "Contraseña",
titulo: "Ollas MPS",
subtitlo: "aplicación de pedidos de ollas",
password: "Contraseña de ollas del barrio",
ayuda: "Si no la sabés, consultá a la comisión informática",
label: "Seleccioná tu región"
};
@ -81,23 +89,29 @@ const getters = {
estilos() {
let rol = getters.urlRol();
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':
return {
fondo: "",
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:
throw new Error("Url inválida");
@ -106,27 +120,48 @@ const getters = {
opcionesLogin() {
let rol = getters.urlRol();
switch (rol) {
case 'pedido':
return [
{ nombre: "Administración", href: "/admin" },
{ nombre: "Ollas", href: "/ollas" },
{ nombre: "Comisiones", href: "/comisiones" },
];
case 'admin':
return [
{ nombre: "Pedidos", href: "/" },
{ nombre: "Comisiones", href: "/comisiones" }
{ nombre: "Ollas", href: "/ollas" },
{ nombre: "Comisiones", href: "/comisiones" },
];
case 'comisiones':
return [
{ nombre: "Pedidos", href: "/" },
{ nombre: "Administración", href: "/admin" }
];
case 'pedido':
return [
{ nombre: "Ollas", href: "/ollas" },
{ 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:
throw new Error("Url inválida");
}
},
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;
}
.danger-dark-button {
background-color: $danger-dark;
border-color: transparent;
color: #fff;
}
/*
Author: Aseem Lalfakawma <alalfakawma.github.io>
This SCSS mixin will allow sizing of table columns in Bulma CSS Framework.