Agregados métodos para obtener textos y estilos de las diferentes pantallas de login
This commit is contained in:
parent
9e93b914ac
commit
af8879eadd
1 changed files with 56 additions and 1 deletions
57
resources/js/store/modules/login.js
vendored
57
resources/js/store/modules/login.js
vendored
|
@ -69,7 +69,62 @@ const getters = {
|
||||||
throw new Error("Url inválida");
|
throw new Error("Url inválida");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
textos() {
|
||||||
|
let rol = getters.urlRol();
|
||||||
|
switch (rol) {
|
||||||
|
case 'admin':
|
||||||
|
return {
|
||||||
|
titulo: "Administración de Pedidos MPS",
|
||||||
|
subtitlo: "administración de pedidos",
|
||||||
|
password: "Contraseña de administración del barrio",
|
||||||
|
ayuda: "Si no la sabés, consultá a la comisión informática",
|
||||||
|
label: "Seleccioná tu región"
|
||||||
|
};
|
||||||
|
case 'compras':
|
||||||
|
return {
|
||||||
|
titulo: "Comisiones MPS",
|
||||||
|
subtitlo: "página de comisiones",
|
||||||
|
password: "Contraseña del barrio",
|
||||||
|
ayuda: "Si no la sabés, consultá a tus compañerxs",
|
||||||
|
label: "Usuario"
|
||||||
|
};
|
||||||
|
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"
|
||||||
|
};
|
||||||
|
default:
|
||||||
|
throw new Error("Url inválida");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
estilos() {
|
||||||
|
let rol = getters.urlRol();
|
||||||
|
switch (rol) {
|
||||||
|
case 'admin':
|
||||||
|
return {
|
||||||
|
fondo: "has-background-danger",
|
||||||
|
texto: "has-text-white",
|
||||||
|
botones: "is-warning",
|
||||||
|
};
|
||||||
|
case 'compras':
|
||||||
|
return {
|
||||||
|
fondo: "has-background-danger",
|
||||||
|
texto: "has-text-white",
|
||||||
|
botones: "is-dark"
|
||||||
|
};
|
||||||
|
case 'pedido':
|
||||||
|
return {
|
||||||
|
fondo: "",
|
||||||
|
texto: "",
|
||||||
|
botones: "is-danger"
|
||||||
|
};
|
||||||
|
default:
|
||||||
|
throw new Error("Url inválida");
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
Loading…
Add table
Reference in a new issue