From 3e426d088d2b30aa8897c54720abdf6c5ea710ad Mon Sep 17 00:00:00 2001 From: Ale Date: Mon, 24 Oct 2022 22:40:30 -0300 Subject: [PATCH] =?UTF-8?q?Agregado=20boton=20para=20mostrar=20contrase?= =?UTF-8?q?=C3=B1a=20en=20login=20de=20admin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/js/app.js | 100 +++++++++++++++++-------- resources/js/components/LoginAdmin.vue | 28 +++++-- 2 files changed, 91 insertions(+), 37 deletions(-) diff --git a/public/js/app.js b/public/js/app.js index 1552c6b..a0dba5b 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -2211,6 +2211,7 @@ __webpack_require__.r(__webpack_exports__); // // /* harmony default export */ __webpack_exports__["default"] = ({ + name: 'Login', data: function data() { return { visible: false, @@ -2263,12 +2264,21 @@ __webpack_require__.r(__webpack_exports__); // // // +// +// +// +// +// +// +// /* harmony default export */ __webpack_exports__["default"] = ({ - name: "LoginAdmin.vue", + name: "LoginAdmin", data: function data() { return { visible: false, - gdc: null + gdc: null, + passwordVisible: false, + passwordType: "password" }; }, mounted: function mounted() { @@ -2278,6 +2288,12 @@ __webpack_require__.r(__webpack_exports__); _this.gdc = gdc; _this.visible = true; }); + }, + methods: { + togglePassword: function togglePassword() { + if (this.passwordVisible) this.passwordType = "password";else this.passwordType = "text"; + this.passwordVisible = !this.passwordVisible; + } } }); @@ -4525,8 +4541,9 @@ var render = function () { [_vm._v("Seleccionar")] ), _vm._v(" "), - _vm._l(_vm.gdcs, function (gdc) { + _vm._l(_vm.gdcs, function (gdc, index) { return _c("option", { + key: index, attrs: { name: gdc.nombre + (_vm.isAdmin ? "_admin" : "") }, domProps: { textContent: _vm._s( @@ -4953,36 +4970,56 @@ var render = function () { ], staticClass: "block", }, - [_vm._m(0), _vm._v(" "), _vm._m(1)] + [ + _c("div", { staticClass: "field" }, [ + _c("label", { staticClass: "label has-text-white" }, [ + _vm._v("Contraseña de administración del barrio"), + ]), + _vm._v(" "), + _c("div", { staticClass: "field has-addons" }, [ + _c("div", { staticClass: "control" }, [ + _c("input", { + staticClass: "input", + attrs: { + required: "", + type: this.passwordType, + name: "password", + placeholder: "Contraseña de admin del barrio", + }, + }), + ]), + _vm._v(" "), + _c("div", { staticClass: "control" }, [ + _c( + "a", + { + staticClass: "button is-warning", + on: { click: _vm.togglePassword }, + }, + [ + _vm._v( + "\n\t\t\t\t\t\t" + + _vm._s( + (_vm.passwordVisible ? "Ocultar" : "Mostrar") + + " contraseña" + ) + + " \n\t\t\t\t\t" + ), + ] + ), + ]), + ]), + _vm._v(" "), + _c("p", { staticClass: "help has-text-white" }, [ + _vm._v("Si no la sabés, consultá a la comisión informática."), + ]), + ]), + _vm._v(" "), + _vm._m(0), + ] ) } var staticRenderFns = [ - function () { - var _vm = this - var _h = _vm.$createElement - var _c = _vm._self._c || _h - return _c("div", { staticClass: "field" }, [ - _c("label", { staticClass: "label has-text-white" }, [ - _vm._v("Contraseña de administración del barrio"), - ]), - _vm._v(" "), - _c("p", { staticClass: "control" }, [ - _c("input", { - staticClass: "input", - attrs: { - required: "", - type: "password", - name: "password", - placeholder: "Contraseña de admin del barrio", - }, - }), - ]), - _vm._v(" "), - _c("p", { staticClass: "help has-text-white" }, [ - _vm._v("Si no la sabés, consultá a la comisión informática."), - ]), - ]) - }, function () { var _vm = this var _h = _vm.$createElement @@ -5688,8 +5725,9 @@ var render = function () { [_vm._v("Seleccionar")] ), _vm._v(" "), - _vm._l(_vm.regiones, function (region) { + _vm._l(_vm.regiones, function (region, index) { return _c("option", { + key: index, attrs: { name: region }, domProps: { textContent: _vm._s(region) }, }) diff --git a/resources/js/components/LoginAdmin.vue b/resources/js/components/LoginAdmin.vue index d4afee6..a4b1b88 100644 --- a/resources/js/components/LoginAdmin.vue +++ b/resources/js/components/LoginAdmin.vue @@ -2,9 +2,16 @@
-

- -

+

Si no la sabés, consultá a la comisión informática.

@@ -17,11 +24,13 @@