2022-07-26 16:49:26 +00:00
|
|
|
<template>
|
|
|
|
<TablaDias
|
|
|
|
:dias="dias"
|
|
|
|
:isLoadingTable="isLoadingTable"
|
|
|
|
:obtenerDias="obtenerDias"
|
|
|
|
:updateIsLoading="updateIsLoading"
|
|
|
|
/>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import axios from 'axios'
|
2022-08-05 12:45:31 +00:00
|
|
|
import TablaDias from '@/components/tablas/TablaDias'
|
2022-07-26 16:49:26 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
components: { TablaDias },
|
|
|
|
props: {
|
|
|
|
updateIsLoading: { type: Function, required: true },
|
|
|
|
idInstitucion: { type: Number, required: true, default: false },
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
dias: [],
|
|
|
|
isLoadingTable: false,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
obtenerDias() {
|
|
|
|
this.isLoadingTable = true
|
|
|
|
axios
|
|
|
|
.get(
|
|
|
|
`${process.env.api}/institucion-dia?id_institucion=${this.idInstitucion}`,
|
|
|
|
this.$getToken.token()
|
|
|
|
)
|
|
|
|
.then((res) => {
|
|
|
|
this.dias = 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 16:49:26 +00:00
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
this.obtenerDias()
|
|
|
|
},
|
|
|
|
}
|
|
|
|
</script>
|