editar responsable

This commit is contained in:
xXpuma99Xx
2021-11-23 18:38:37 -06:00
parent 58ca512bab
commit c3ab1107cd
3 changed files with 13 additions and 16 deletions
@@ -36,7 +36,7 @@
type="is-link"
class="my-5"
tag="router-link"
to="/admin/responsables/responsable/modificar"
to="/admin/responsables/responsable/editar"
>
Editar información
</b-button>
@@ -7,8 +7,7 @@
type="text"
:placeholder="responsable.nombre"
v-model="nuevo.nombre"
>
</b-input>
/>
</b-field>
<b-field label="Correo eletrónico">
@@ -16,8 +15,7 @@
type="email"
:placeholder="responsable.usuario"
v-model="nuevo.correo"
>
</b-input>
/>
</b-field>
<!-- <b-field label="Estado:">
@@ -57,22 +55,22 @@
</template>
<script>
import validator from 'validator'
import axios from 'axios'
import validator from 'validator'
export default {
data() {
return {
responsable: {},
idResponsable: null,
nuevo: {},
responsable: {},
}
},
props: {
admin: { type: Object, required: true },
imprimirError: { type: Function, required: true },
imprimirMensaje: { type: Function, required: true },
imprimirWarning: { type: Function, required: true },
imprimirError: { type: Function, required: true },
updateIsLoading: { type: Function, required: true },
},
methods: {
@@ -146,9 +144,8 @@ export default {
},
},
created() {
this.idResponsable = localStorage.getItem('idResponsable')
if (this.admin.idTipoUsuario === 1 && this.idResponsable)
this.obtenerResponsable()
this.idResponsable = Number(localStorage.getItem('idResponsable'))
if (this.admin.idTipoUsuario === 1) this.obtenerResponsable()
},
}
</script>