From af8879eaddb2e10568d78cb13e57d0bd01e37d8e Mon Sep 17 00:00:00 2001 From: ale Date: Fri, 13 Jun 2025 18:33:55 -0300 Subject: [PATCH] =?UTF-8?q?Agregados=20m=C3=A9todos=20para=20obtener=20tex?= =?UTF-8?q?tos=20y=20estilos=20de=20las=20diferentes=20pantallas=20de=20lo?= =?UTF-8?q?gin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/js/store/modules/login.js | 57 ++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/resources/js/store/modules/login.js b/resources/js/store/modules/login.js index 0f78351..2a5f0ef 100644 --- a/resources/js/store/modules/login.js +++ b/resources/js/store/modules/login.js @@ -69,7 +69,62 @@ const getters = { 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 {