correcciones
This commit is contained in:
parent
a48c79be3c
commit
63f40d70af
@ -73,13 +73,14 @@ export default {
|
||||
axios
|
||||
.put(`${process.env.api}/modulo`, data)
|
||||
.then((res) => {
|
||||
this.obtenerCatalogoModulo(this.data[0].institucion.id_institucion)
|
||||
this.buscar()
|
||||
// this.obtenerCatalogoModulo(this.data[0].institucion.id_institucion)
|
||||
this.updateIsLoading(false)
|
||||
this.$alertsGenericos.imprimirMensaje(this.$buefy, res.data.message)
|
||||
})
|
||||
.catch((err) => {
|
||||
this.updateIsLoading(false)
|
||||
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data)
|
||||
this.$alertsGenericos.imprimirError(this.$buefy, err)
|
||||
})
|
||||
},
|
||||
updateCarrito() {
|
||||
|
@ -6,15 +6,24 @@
|
||||
:updateIsLoading="updateIsLoading"
|
||||
:updateModulo="updateModulo"
|
||||
/>
|
||||
|
||||
<TablaCarritos
|
||||
:operador="admin"
|
||||
:carritos="carritos"
|
||||
:isLoadingTable="isLoadingTable"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
import BuscarModulo from '@/components/admin/BuscarModulo'
|
||||
import TablaCarritos from '@/components/operador/TablaCarritos'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
BuscarModulo,
|
||||
TablaCarritos,
|
||||
},
|
||||
props: {
|
||||
admin: { type: Object, required: true },
|
||||
@ -23,11 +32,29 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
modulo: { institucion: {} },
|
||||
carritos: [],
|
||||
isLoadingTable: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
updateModulo(valorObject) {
|
||||
this.modulo = valorObject
|
||||
this.obtenerCarritos()
|
||||
},
|
||||
obtenerCarritos() {
|
||||
this.isLoadingTable = true
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/carrito/carritos?pagina=1&id_institucion=${this.admin.institucion.id_institucion}&id_modulo=${this.modulo.id_modulo}`
|
||||
)
|
||||
.then(async (res) => {
|
||||
this.carritos = res.data[0]
|
||||
this.isLoadingTable = false
|
||||
})
|
||||
.catch((err) => {
|
||||
this.isLoadingTable = false
|
||||
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data)
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -13,6 +13,10 @@
|
||||
<span>{{ props.row.modulo }}</span>
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column field="activo" label="Activo" v-slot="props" centered>
|
||||
<span>{{ props.row.activo ? 'Activo' : 'Inactivo' }}</span>
|
||||
</b-table-column>
|
||||
|
||||
<template #detail>
|
||||
<TablaCarritos
|
||||
:operador="admin"
|
||||
|
@ -30,7 +30,7 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//Al tener un componente global, la data hace referencia ya sea al módulo, carrito, equipo o programa"
|
||||
//Al tener un componente global, la data hace referencia ya sea al módulo, carrito o equipo"
|
||||
llamarCambiarStatus() {
|
||||
if (this.data.activo || this.data.mostrar)
|
||||
this.cambiarStatus(this.data, false)
|
||||
|
@ -10,7 +10,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
import BuscarCarrito from '@/components/operador/BuscarCarrito'
|
||||
import TablaPrestamos from '@/components/operador/TablaPrestamos'
|
||||
import TablaReportes from '@/components/operador/TablaReportes'
|
||||
|
@ -47,7 +47,7 @@
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
export default {
|
||||
props: { equipo: { type: Object, require: true } },
|
||||
props: { equipo: { type: Object, required: true } },
|
||||
data() {
|
||||
return {
|
||||
isLoadingTable: false,
|
||||
|
Loading…
Reference in New Issue
Block a user