funcion/pedido-ollas #47
2 changed files with 64 additions and 24 deletions
83
resources/js/store/modules/login.js
vendored
83
resources/js/store/modules/login.js
vendored
|
@ -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");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
5
resources/sass/app.scss
vendored
5
resources/sass/app.scss
vendored
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue