activar y desactivar dia
This commit is contained in:
parent
8a7d92935d
commit
fdf9357a0a
@ -24,6 +24,15 @@
|
|||||||
</b-button>
|
</b-button>
|
||||||
</b-table-column>
|
</b-table-column>
|
||||||
|
|
||||||
|
<b-table-column field="activar" label="Activar" centered v-slot="props">
|
||||||
|
<BotonDesactivar
|
||||||
|
:admin="admin"
|
||||||
|
:data="props.row"
|
||||||
|
tipo="día"
|
||||||
|
:cambiarStatus="cambiarStatus"
|
||||||
|
/>
|
||||||
|
</b-table-column>
|
||||||
|
|
||||||
<template #detail="props">
|
<template #detail="props">
|
||||||
<HorasExcepcion
|
<HorasExcepcion
|
||||||
:horasExcepcion="props.row"
|
:horasExcepcion="props.row"
|
||||||
@ -46,11 +55,13 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
|
import BotonDesactivar from '@/components/operador/BotonDesactivar'
|
||||||
import HorasExcepcion from '@/components/admin/HorasExcepcion'
|
import HorasExcepcion from '@/components/admin/HorasExcepcion'
|
||||||
import Relog from '@/components/admin/Relog'
|
import Relog from '@/components/admin/Relog'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
BotonDesactivar,
|
||||||
HorasExcepcion,
|
HorasExcepcion,
|
||||||
Relog,
|
Relog,
|
||||||
},
|
},
|
||||||
@ -68,6 +79,24 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
cambiarStatus(dataSelect, status) {
|
||||||
|
const data = {
|
||||||
|
id_institucion_dia: dataSelect.id_institucion_dia,
|
||||||
|
activo: status,
|
||||||
|
}
|
||||||
|
this.updateIsLoading(true)
|
||||||
|
axios
|
||||||
|
.put(`${process.env.api}/institucion-dia/`, data)
|
||||||
|
.then((res) => {
|
||||||
|
this.obtenerDias()
|
||||||
|
this.updateIsLoading(false)
|
||||||
|
this.$alertsGenericos.imprimirMensaje(this.$buefy, res.data.message)
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
this.updateIsLoading(false)
|
||||||
|
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data)
|
||||||
|
})
|
||||||
|
},
|
||||||
obtenerDias() {
|
obtenerDias() {
|
||||||
this.updateIsLoading(true)
|
this.updateIsLoading(true)
|
||||||
axios
|
axios
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="columns is-align-items-flex-end pl-0 pb-4">
|
<div class="columns is-align-items-flex-end pl-0 pb-4">
|
||||||
<b-field class="column pb-0" field="modulo" label="Módulo">
|
<b-field class="column mb-0 pb-0" field="modulo" label="Módulo">
|
||||||
<b-select v-model="idModulo" icon="storefront-outline" rounded expanded>
|
<b-select v-model="idModulo" icon="storefront-outline" rounded expanded>
|
||||||
<option disabled>Módulo</option>
|
<option disabled>Módulo</option>
|
||||||
<option
|
<option
|
||||||
|
Loading…
Reference in New Issue
Block a user