cambios en caliente

This commit is contained in:
xXpuma99Xx 2022-07-13 18:30:48 -05:00
parent e22b1b531f
commit a6ce687e0c
8 changed files with 45 additions and 25 deletions

View File

@ -78,7 +78,7 @@
@keyup.enter.native="actualizarDatos()"
:placeholder="institucion.dias_multa_retraso"
:disabled="!institucion.id_institucion"
v-model="dias_multa_retraso"
v-model="diasMultaRetraso"
/>
</b-field>
@ -91,7 +91,7 @@
@keyup.enter.native="actualizarDatos()"
:placeholder="institucion.tiempo_recoger"
:disabled="!institucion.id_institucion"
v-model="tiempo_recoger"
v-model="tiempoRecoger"
/>
</b-field>
@ -104,7 +104,20 @@
@keyup.enter.native="actualizarDatos()"
:placeholder="institucion.tiempo_entrega"
:disabled="!institucion.id_institucion"
v-model="tiempo_entrega"
v-model="tiempoEntrega"
/>
</b-field>
<b-field
label="Tiempo de prestamo"
v-show="admin.tipoUsuario.id_tipo_usuario === 3"
>
<b-input
type="number"
@keyup.enter.native="actualizarDatos()"
:placeholder="institucion.tiempo_prestamo"
:disabled="!institucion.id_institucion"
v-model="tiempoPrestamo"
/>
</b-field>
@ -117,9 +130,10 @@
telefono ||
ubicacion ||
dominio ||
dias_multa_retraso ||
tiempo_recoger ||
tiempo_entrega
diasMultaRetraso ||
tiempoPrestamo ||
tiempoRecoger ||
tiempoEntrega
? false
: true
"
@ -151,9 +165,10 @@ export default {
telefono: '',
ubicacion: '',
dominio: '',
dias_multa_retraso: '',
tiempo_recoger: '',
tiempo_entrega: '',
diasMultaRetraso: '',
tiempoRecoger: '',
tiempoEntrega: '',
tiempoPrestamo: '',
}
},
methods: {
@ -169,10 +184,11 @@ export default {
data.email_institucional = true
data.dominio = this.dominio
}
if (this.dias_multa_retraso) this.data.dias_multa_retraso = ''
if (this.tiempo_recoger) this.data.tiempo_recoger = ''
if (this.tiempo_entrega) this.data.tiempo_entrega = ''
if (this.diasMultaRetraso)
this.data.dias_multa_retraso = this.diasMultaRetraso
if (this.tiempoRecoger) this.data.tiempo_recoger = this.tiempoRecoger
if (this.tiempoEntrega) this.data.tiempo_entrega = this.tiempoEntrega
if (this.tiempoPrestamo) this.data.tiempo_prestamo = this.tiempoPrestamo
axios
.put(`${process.env.api}/institucion`, data)
.then((res) => {
@ -181,9 +197,10 @@ export default {
if (this.telefono) this.telefono = ''
if (this.dominio) this.dominio = ''
if (this.ubicacion) this.ubicacion = ''
if (this.dias_multa_retraso) this.dias_multa_retraso = ''
if (this.tiempo_recoger) this.tiempo_recoger = ''
if (this.tiempo_entrega) this.tiempo_entrega = ''
if (this.diasMultaRetraso) this.diasMultaRetraso = ''
if (this.tiempoRecoger) this.tiempoRecoger = ''
if (this.tiempoEntrega) this.tiempoEntrega = ''
if (this.tiempoPrestamo) this.tiempoPrestamo = ''
this.updateIsLoading(false)
this.buscar()
this.$alertsGenericos.imprimirMensaje(this.$buefy, res.data.message)

View File

@ -51,6 +51,13 @@
<p class="input">{{ institucion.tiempo_entrega }}</p>
</b-field>
<b-field
label="Tiempo de préstamo"
v-if="admin.tipoUsuario.id_tipo_usuario === 3"
>
<p class="input">{{ institucion.tiempo_prestamo }}</p>
</b-field>
<b-field label="Activo/Inactivo">
<p
class="input"

View File

@ -1,7 +1,7 @@
<template>
<div>
<b-table :data="data">
<b-table-column field="programa" label="Programa" centered v-slot="props">
<b-table-column field="tipoEntrada" label="Tipo de entrada" centered v-slot="props">
{{ props.row.tipoEntrada.tipo_entrada }}
</b-table-column>

View File

@ -58,9 +58,6 @@ export default {
})
},
},
created() {
console.log(this.operador)
},
}
</script>

View File

@ -124,8 +124,6 @@ export default {
.then((res) => {
let prestamo = res.data
console.log(prestamo)
if (prestamo.activo) {
if (prestamo.equipo.status.id_status === 2)
this.$alertsGenericos.imprimirWarning(

View File

@ -102,7 +102,6 @@ export default {
if (this.idTipoCarrito != 0)
id_tipo_carrito = '&id_tipo_carrito=' + this.idTipoCarrito
if (this.idModulo != 0) id_modulo = '&id_modulo=' + this.idModulo
console.log(this.idTipoCarrito)
this.isLoadingTable = true
axios
.get(

View File

@ -114,14 +114,12 @@ export default {
},
methods: {
obtenerCatalogoInfracciones() {
console.log(this.operador)
axios
.get(
`${process.env.api}/institucion-infraccion/infracciones?id_institucion=${this.operador.institucion.id_institucion}`,
this.operador.token
)
.then((res) => {
console.log(res.data)
this.infracciones = res.data
})
.catch((err) => {

View File

@ -28,6 +28,10 @@
<b-table-column field="status" label="Status" v-slot="props" centered>
<span>{{ props.row.status.status }}</span>
</b-table-column>
<b-table-column field="operador" label="Operador" v-slot="props" centered>
<span>{{ props.row.operador.operador }}</span>
</b-table-column>
</b-table>
</template>