2022-07-26 21:06:12 +00:00
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<CrearCarrerasProgramas
|
|
|
|
:obtenerCarrerasProgramas="obtenerCarrerasProgramas"
|
|
|
|
:updateIsLoading="updateIsLoading"
|
|
|
|
:idInstitucion="idInstitucion"
|
|
|
|
/>
|
|
|
|
|
|
|
|
<TablaCarrerasProgramas
|
|
|
|
:carrerasProgramas="carrerasProgramas"
|
|
|
|
:isLoadingTable="isLoadingTable"
|
|
|
|
:obtenerCarrerasProgramas="obtenerCarrerasProgramas"
|
|
|
|
:updateIsLoading="updateIsLoading"
|
|
|
|
:total="carrerasProgramas.length"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import axios from 'axios'
|
|
|
|
import CrearCarrerasProgramas from '@/components/crear/CrearCarreraPrograma'
|
|
|
|
import TablaCarrerasProgramas from '@/components/tablas/TablaCarrerasProgramas'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
components: { CrearCarrerasProgramas, TablaCarrerasProgramas },
|
|
|
|
props: {
|
2023-01-09 17:29:31 +00:00
|
|
|
updateIsLoading: { type: Function, required: true, default: () => {} },
|
2022-07-26 21:06:12 +00:00
|
|
|
idInstitucion: { type: Number, required: true, default: false },
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
carrerasProgramas: [],
|
|
|
|
isLoadingTable: false,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
obtenerCarrerasProgramas() {
|
|
|
|
this.isLoadingTable = true
|
2022-12-05 15:36:30 +00:00
|
|
|
return axios
|
2022-07-26 21:06:12 +00:00
|
|
|
.get(
|
|
|
|
`${process.env.api}/carrera-programa?id_institucion=${this.idInstitucion}`,
|
|
|
|
this.$getToken.token()
|
|
|
|
)
|
|
|
|
.then((res) => {
|
|
|
|
this.carrerasProgramas = res.data
|
|
|
|
this.isLoadingTable = false
|
|
|
|
})
|
|
|
|
.catch((err) => {
|
|
|
|
this.isLoadingTable = false
|
2022-08-05 23:41:37 +00:00
|
|
|
this.$alertsGenericos.imprimirError(
|
|
|
|
this.$buefy,
|
|
|
|
this.$router,
|
|
|
|
err.response.data
|
|
|
|
)
|
2022-07-26 21:06:12 +00:00
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
this.obtenerCarrerasProgramas()
|
|
|
|
},
|
|
|
|
}
|
|
|
|
</script>
|