responsable info
This commit is contained in:
+9
-11
@@ -13,6 +13,7 @@
|
||||
<b-field label="Clave de programa:">
|
||||
<b-select v-model="programaSelected" expanded>
|
||||
<option value="" disabled>Elija una clave de programa:</option>
|
||||
|
||||
<option v-for="(p, i) in programas" :key="i" :value="i">
|
||||
{{ p.clavePrograma }}
|
||||
</option>
|
||||
@@ -35,7 +36,7 @@
|
||||
type="is-link"
|
||||
class="my-5"
|
||||
tag="router-link"
|
||||
to="/admin/responsables/infoResponsable/modificar"
|
||||
to="/admin/responsables/responsable/modificar"
|
||||
>
|
||||
Editar información
|
||||
</b-button>
|
||||
@@ -49,16 +50,14 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
idResponsable: null,
|
||||
responsable: {},
|
||||
programaSelected: null,
|
||||
programas: [],
|
||||
programa: {},
|
||||
programaSelected: '',
|
||||
responsable: {},
|
||||
}
|
||||
},
|
||||
props: {
|
||||
admin: { type: Object, required: true },
|
||||
imprimirMensaje: { type: Function, required: true },
|
||||
imprimirWarning: { type: Function, required: true },
|
||||
imprimirError: { type: Function, required: true },
|
||||
updateIsLoading: { type: Function, required: true },
|
||||
},
|
||||
@@ -72,11 +71,12 @@ export default {
|
||||
)
|
||||
.then((res) => {
|
||||
this.responsable = res.data
|
||||
this.obtenerProgramas()
|
||||
this.updateIsLoading(false)
|
||||
})
|
||||
.catch((err) => {
|
||||
this.updateIsLoading(false)
|
||||
this.error(err.response.data.message)
|
||||
this.imprimirError(err.response.data)
|
||||
})
|
||||
},
|
||||
obtenerProgramas() {
|
||||
@@ -89,7 +89,7 @@ export default {
|
||||
this.programas = res.data
|
||||
})
|
||||
.catch((err) => {
|
||||
this.error(err.response.data.message)
|
||||
this.imprimirError(err.response.data)
|
||||
})
|
||||
},
|
||||
},
|
||||
@@ -99,11 +99,9 @@ export default {
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.idResponsable = localStorage.getItem('idResponsable')
|
||||
if (this.admin.idTipoUsuario === 1 && this.idResponsable) {
|
||||
this.idResponsable = Number(localStorage.getItem('idResponsable'))
|
||||
if (this.admin.idTipoUsuario === 1 && this.idResponsable)
|
||||
this.obtenerResponsable()
|
||||
this.obtenerProgramas()
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -138,7 +138,7 @@ export default {
|
||||
watch: {
|
||||
responsableSelected() {
|
||||
localStorage.setItem('idResponsable', this.responsableSelected.idUsuario)
|
||||
this.$router.push(`/admin/responsables/infoResponsable`)
|
||||
this.$router.push(`/admin/responsables/responsable`)
|
||||
},
|
||||
},
|
||||
created() {
|
||||
|
||||
+4
-6
@@ -5,10 +5,8 @@
|
||||
:deleteFromLocalStorage="['idResponsable']"
|
||||
/>
|
||||
|
||||
<Responsable
|
||||
<Informacion
|
||||
:admin="admin"
|
||||
:imprimirMensaje="imprimirMensaje"
|
||||
:imprimirWarning="imprimirWarning"
|
||||
:imprimirError="imprimirError"
|
||||
:updateIsLoading="updateIsLoading"
|
||||
/>
|
||||
@@ -24,17 +22,17 @@
|
||||
|
||||
<script>
|
||||
import BotonRegresar from '@/components/botonRegresar'
|
||||
import Responsable from '@/components/admin/responsables/infoResponsable/responsable'
|
||||
import Informacion from '@/components/admin/responsables/responsable/Informacion'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
BotonRegresar,
|
||||
Responsable,
|
||||
Informacion,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
admin: {},
|
||||
isLoading: false,
|
||||
admin: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
|
||||
<script>
|
||||
import BotonRegresar from '@/components/botonRegresar'
|
||||
import UpdateResponsable from '@/components/admin/responsables/infoResponsable/modificar/updateResponsable'
|
||||
import UpdateResponsable from '@/components/admin/responsables/responsable/modificar/updateResponsable'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Reference in New Issue
Block a user