correcciones
This commit is contained in:
parent
a48c79be3c
commit
63f40d70af
@ -73,13 +73,14 @@ export default {
|
|||||||
axios
|
axios
|
||||||
.put(`${process.env.api}/modulo`, data)
|
.put(`${process.env.api}/modulo`, data)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.obtenerCatalogoModulo(this.data[0].institucion.id_institucion)
|
this.buscar()
|
||||||
|
// this.obtenerCatalogoModulo(this.data[0].institucion.id_institucion)
|
||||||
this.updateIsLoading(false)
|
this.updateIsLoading(false)
|
||||||
this.$alertsGenericos.imprimirMensaje(this.$buefy, res.data.message)
|
this.$alertsGenericos.imprimirMensaje(this.$buefy, res.data.message)
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
this.updateIsLoading(false)
|
this.updateIsLoading(false)
|
||||||
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data)
|
this.$alertsGenericos.imprimirError(this.$buefy, err)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
updateCarrito() {
|
updateCarrito() {
|
||||||
|
@ -6,15 +6,24 @@
|
|||||||
:updateIsLoading="updateIsLoading"
|
:updateIsLoading="updateIsLoading"
|
||||||
:updateModulo="updateModulo"
|
:updateModulo="updateModulo"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<TablaCarritos
|
||||||
|
:operador="admin"
|
||||||
|
:carritos="carritos"
|
||||||
|
:isLoadingTable="isLoadingTable"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import axios from 'axios'
|
||||||
import BuscarModulo from '@/components/admin/BuscarModulo'
|
import BuscarModulo from '@/components/admin/BuscarModulo'
|
||||||
|
import TablaCarritos from '@/components/operador/TablaCarritos'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
BuscarModulo,
|
BuscarModulo,
|
||||||
|
TablaCarritos,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
admin: { type: Object, required: true },
|
admin: { type: Object, required: true },
|
||||||
@ -23,11 +32,29 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
modulo: { institucion: {} },
|
modulo: { institucion: {} },
|
||||||
|
carritos: [],
|
||||||
|
isLoadingTable: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
updateModulo(valorObject) {
|
updateModulo(valorObject) {
|
||||||
this.modulo = 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>
|
<span>{{ props.row.modulo }}</span>
|
||||||
</b-table-column>
|
</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>
|
<template #detail>
|
||||||
<TablaCarritos
|
<TablaCarritos
|
||||||
:operador="admin"
|
:operador="admin"
|
||||||
|
@ -30,7 +30,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
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() {
|
llamarCambiarStatus() {
|
||||||
if (this.data.activo || this.data.mostrar)
|
if (this.data.activo || this.data.mostrar)
|
||||||
this.cambiarStatus(this.data, false)
|
this.cambiarStatus(this.data, false)
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import axios from 'axios'
|
|
||||||
import BuscarCarrito from '@/components/operador/BuscarCarrito'
|
import BuscarCarrito from '@/components/operador/BuscarCarrito'
|
||||||
import TablaPrestamos from '@/components/operador/TablaPrestamos'
|
import TablaPrestamos from '@/components/operador/TablaPrestamos'
|
||||||
import TablaReportes from '@/components/operador/TablaReportes'
|
import TablaReportes from '@/components/operador/TablaReportes'
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
export default {
|
export default {
|
||||||
props: { equipo: { type: Object, require: true } },
|
props: { equipo: { type: Object, required: true } },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isLoadingTable: false,
|
isLoadingTable: false,
|
||||||
|
Loading…
Reference in New Issue
Block a user