inputs
This commit is contained in:
parent
6e450d336a
commit
2f078806f3
@ -32,7 +32,7 @@
|
||||
msjWarning="¿Estás segur@ de querer guardar estos cambios?"
|
||||
:guardar="guardar"
|
||||
:disabled="false"
|
||||
:column="true"
|
||||
column
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -44,8 +44,8 @@
|
||||
|
||||
<TablaOpcionesCreadas
|
||||
:data="infracciones"
|
||||
:columnaInfraccion="true"
|
||||
v-if="activo"
|
||||
columnaInfraccion
|
||||
/>
|
||||
</b-collapse>
|
||||
</div>
|
||||
|
@ -37,11 +37,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<TablaOpcionesCreadas
|
||||
v-if="activo"
|
||||
:data="marcas"
|
||||
:columnaMarcaC="true"
|
||||
/>
|
||||
<TablaOpcionesCreadas v-if="activo" :data="marcas" columnaMarcaC />
|
||||
</b-collapse>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -37,11 +37,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<TablaOpcionesCreadas
|
||||
v-if="activo"
|
||||
:data="modelos"
|
||||
:columnaModeloC="true"
|
||||
/>
|
||||
<TablaOpcionesCreadas v-if="activo" :data="modelos" columnaModeloC />
|
||||
</b-collapse>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -4,16 +4,12 @@
|
||||
|
||||
<div class="box">
|
||||
<div class="columns is-align-items-flex-end pl-0 pb-4">
|
||||
<b-field class="column mb-0 pb-0" label="Módulo">
|
||||
<b-input
|
||||
icon="store"
|
||||
placeholder="Nombre del módulo"
|
||||
type="text"
|
||||
@keyup.enter.native="warning()"
|
||||
v-model="modulo"
|
||||
rounded
|
||||
/>
|
||||
</b-field>
|
||||
<InputModulo
|
||||
:moduloPadre="modulo"
|
||||
:ejecutar="warning"
|
||||
@modulo="(moduloNuevo) => (modulo = moduloNuevo)"
|
||||
column
|
||||
/>
|
||||
|
||||
<BotonCrear columnSize="is-3" :disabled="!modulo" :crear="warning" />
|
||||
</div>
|
||||
@ -23,10 +19,11 @@
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
import InputModulo from '@/components/inputs/InputModulo'
|
||||
import BotonCrear from '@/components/botones/BotonCrear'
|
||||
|
||||
export default {
|
||||
components: { BotonCrear },
|
||||
components: { BotonCrear, InputModulo },
|
||||
props: {
|
||||
updateActualizarTabla: { type: Function, required: true },
|
||||
updateIsLoading: { type: Function, required: true },
|
||||
|
@ -4,44 +4,24 @@
|
||||
|
||||
<div class="box">
|
||||
<div class="columns is-align-items-flex-end pl-0 pb-4">
|
||||
<b-field class="column mb-0 pb-0" label="Nombre completo">
|
||||
<b-input
|
||||
icon="account"
|
||||
placeholder="Nombres/Apellidos"
|
||||
type="text"
|
||||
:has-counter="false"
|
||||
:maxlength="100"
|
||||
@keyup.enter.native="warning()"
|
||||
v-model="nombre"
|
||||
rounded
|
||||
/>
|
||||
</b-field>
|
||||
<InputNombre
|
||||
:ejecutar="warning"
|
||||
:nombrePadre="nombre"
|
||||
@nombre="(nombreNuevo) => (nombre = nombreNuevo)"
|
||||
/>
|
||||
|
||||
<b-field class="column mb-0 pb-0" label="Usuario">
|
||||
<b-input
|
||||
icon="account-circle"
|
||||
placeholder="Usuario"
|
||||
type="text"
|
||||
:has-counter="false"
|
||||
:maxlength="40"
|
||||
@keyup.enter.native="warning()"
|
||||
v-model="operador"
|
||||
rounded
|
||||
/>
|
||||
</b-field>
|
||||
<InputOperador
|
||||
campo="operador"
|
||||
:ejecutar="warning"
|
||||
:operadorPadre="operador"
|
||||
@operador="(operadorNuevo) => (operador = operadorNuevo)"
|
||||
/>
|
||||
|
||||
<b-field class="column mb-0 pb-0" label="Correo">
|
||||
<b-input
|
||||
icon="email"
|
||||
placeholder="Correo"
|
||||
type="email"
|
||||
:has-counter="false"
|
||||
:maxlength="80"
|
||||
@keyup.enter.native="warning()"
|
||||
v-model="correo"
|
||||
rounded
|
||||
/>
|
||||
</b-field>
|
||||
<InputCorreo
|
||||
:ejecutar="warning"
|
||||
:correoPadre="correo"
|
||||
@correo="(correoNuevo) => (correo = correoNuevo)"
|
||||
/>
|
||||
|
||||
<b-field class="column mb-0 pb-0" label="Contraseña">
|
||||
<b-input
|
||||
@ -67,9 +47,12 @@
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
import BotonCrear from '@/components/botones/BotonCrear'
|
||||
import InputCorreo from '@/components/inputs/InputCorreo'
|
||||
import InputNombre from '@/components/inputs/InputNombre'
|
||||
import InputOperador from '@/components/inputs/InputOperador'
|
||||
|
||||
export default {
|
||||
components: { BotonCrear },
|
||||
components: { BotonCrear, InputCorreo, InputNombre, InputOperador },
|
||||
props: {
|
||||
updateActualizarTabla: { type: Function, required: true },
|
||||
updateIsLoading: { type: Function, required: true },
|
||||
|
@ -38,11 +38,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<TablaOpcionesCreadas
|
||||
v-if="activo"
|
||||
:data="programas"
|
||||
:columnaPrograma="true"
|
||||
/>
|
||||
<TablaOpcionesCreadas v-if="activo" :data="programas" columnaPrograma />
|
||||
</b-collapse>
|
||||
</div>
|
||||
</section>
|
||||
|
@ -57,8 +57,8 @@
|
||||
<TablaOpcionesCreadas
|
||||
v-if="activo"
|
||||
:data="tipoCarritos"
|
||||
:columnaTipoCarrito="true"
|
||||
:columnaLetra="true"
|
||||
columnaTipoCarrito
|
||||
columnaLetra
|
||||
/>
|
||||
</b-collapse>
|
||||
</div>
|
||||
|
@ -45,7 +45,7 @@
|
||||
<TablaOpcionesCreadas
|
||||
v-if="activo"
|
||||
:data="tipoEntradas"
|
||||
:columnaTipoEntrada="true"
|
||||
columnaTipoEntrada
|
||||
/>
|
||||
</b-collapse>
|
||||
</div>
|
||||
|
@ -45,7 +45,7 @@
|
||||
<TablaOpcionesCreadas
|
||||
v-if="activo"
|
||||
:data="tipoUsuarios"
|
||||
:columnaTipoUsuario="true"
|
||||
columnaTipoUsuario
|
||||
/>
|
||||
</b-collapse>
|
||||
</div>
|
||||
|
37
components/inputs/InputCarrito.vue
Normal file
37
components/inputs/InputCarrito.vue
Normal file
@ -0,0 +1,37 @@
|
||||
<template>
|
||||
<b-field class="column mb-0 pb-0" label="Carrito" :class="columnSize">
|
||||
<b-input
|
||||
icon="cart"
|
||||
maxlength="3"
|
||||
placeholder="Carrito"
|
||||
type="text"
|
||||
:has-counter="false"
|
||||
@keyup.enter.native="ejecutar()"
|
||||
v-model="carrito"
|
||||
rounded
|
||||
/>
|
||||
</b-field>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
ejecutar: { typeof: Function, required: true, default: () => {} },
|
||||
carritoPadre: { typeof: String, required: true, default: '' },
|
||||
columnSize: { typeof: String, required: false, default: '' },
|
||||
},
|
||||
data: () => {
|
||||
return { carrito: '' }
|
||||
},
|
||||
watch: {
|
||||
carrito() {
|
||||
this.$emit('carrito', this.carrito)
|
||||
},
|
||||
carritoPadre() {
|
||||
this.carrito = this.carritoPadre
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
35
components/inputs/InputCorreo.vue
Normal file
35
components/inputs/InputCorreo.vue
Normal file
@ -0,0 +1,35 @@
|
||||
<template>
|
||||
<b-field class="column mb-0 pb-0" label="Correo" :class="columnSize">
|
||||
<b-input
|
||||
icon="email"
|
||||
placeholder="Correo"
|
||||
type="text"
|
||||
@keyup.enter.native="ejecutar()"
|
||||
v-model="correo"
|
||||
rounded
|
||||
/>
|
||||
</b-field>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
ejecutar: { typeof: Function, required: true, default: () => {} },
|
||||
correoPadre: { typeof: String, required: true, default: '' },
|
||||
columnSize: { typeof: String, required: false, default: '' },
|
||||
},
|
||||
data: () => {
|
||||
return { correo: '' }
|
||||
},
|
||||
watch: {
|
||||
correo() {
|
||||
this.$emit('correo', this.correo)
|
||||
},
|
||||
correoPadre() {
|
||||
this.correo = this.correoPadre
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
35
components/inputs/InputEquipo.vue
Normal file
35
components/inputs/InputEquipo.vue
Normal file
@ -0,0 +1,35 @@
|
||||
<template>
|
||||
<b-field class="column mb-0 pb-0" label="Equipo" :class="columnSize">
|
||||
<b-input
|
||||
icon="laptop"
|
||||
placeholder="Equipo"
|
||||
type="text"
|
||||
@keyup.enter.native="ejecutar()"
|
||||
v-model="equipo"
|
||||
rounded
|
||||
/>
|
||||
</b-field>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
ejecutar: { typeof: Function, required: true, default: () => {} },
|
||||
equipoPadre: { typeof: String, required: true, default: '' },
|
||||
columnSize: { typeof: String, required: false, default: '' },
|
||||
},
|
||||
data: () => {
|
||||
return { equipo: '' }
|
||||
},
|
||||
watch: {
|
||||
equipo() {
|
||||
this.$emit('equipo', this.equipo)
|
||||
},
|
||||
equipoPadre() {
|
||||
this.equipo = this.equipoPadre
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
35
components/inputs/InputIdPrestamo.vue
Normal file
35
components/inputs/InputIdPrestamo.vue
Normal file
@ -0,0 +1,35 @@
|
||||
<template>
|
||||
<b-field class="column mb-0 pb-0" label="Id préstamo" :class="columnSize">
|
||||
<b-input
|
||||
icon="numeric"
|
||||
placeholder="Id préstamo"
|
||||
type="text"
|
||||
@keyup.enter.native="ejecutar()"
|
||||
v-model="idPrestamo"
|
||||
rounded
|
||||
/>
|
||||
</b-field>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
ejecutar: { typeof: Function, required: true, default: () => {} },
|
||||
idPrestamoPadre: { typeof: String, required: true, default: '' },
|
||||
columnSize: { typeof: String, required: false, default: '' },
|
||||
},
|
||||
data: () => {
|
||||
return { idPrestamo: '' }
|
||||
},
|
||||
watch: {
|
||||
idPrestamo() {
|
||||
this.$emit('id-prestamo', this.idPrestamo)
|
||||
},
|
||||
idPrestamoPadre() {
|
||||
this.idPrestamo = this.idPrestamoPadre
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
43
components/inputs/InputModulo.vue
Normal file
43
components/inputs/InputModulo.vue
Normal file
@ -0,0 +1,43 @@
|
||||
<template>
|
||||
<b-field
|
||||
class=""
|
||||
:class="column ? `column ${columnSize} mb-0 pb-0` : ''"
|
||||
:label="label || 'Módulo'"
|
||||
>
|
||||
<b-input
|
||||
icon="store"
|
||||
placeholder="Nombre del módulo"
|
||||
type="text"
|
||||
:disabled="disabled"
|
||||
@keyup.enter.native="ejecutar()"
|
||||
v-model="modulo"
|
||||
rounded
|
||||
/>
|
||||
</b-field>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
column: { type: Boolean, required: false, default: false },
|
||||
disabled: { type: Boolean, required: false, default: false },
|
||||
ejecutar: { typeof: Function, required: true, default: () => {} },
|
||||
columnSize: { typeof: String, required: false, default: '' },
|
||||
moduloPadre: { typeof: String, required: true, default: '' },
|
||||
label: { typeof: String, required: false, default: '' },
|
||||
},
|
||||
data: () => {
|
||||
return { modulo: '' }
|
||||
},
|
||||
watch: {
|
||||
modulo() {
|
||||
this.$emit('modulo', this.modulo)
|
||||
},
|
||||
moduloPadre() {
|
||||
this.modulo = this.moduloPadre
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
35
components/inputs/InputNombre.vue
Normal file
35
components/inputs/InputNombre.vue
Normal file
@ -0,0 +1,35 @@
|
||||
<template>
|
||||
<b-field class="column mb-0 pb-0" label="Nombre completo" :class="columnSize">
|
||||
<b-input
|
||||
icon="account-box"
|
||||
placeholder="Nombre(s)/apellidos"
|
||||
type="text"
|
||||
@keyup.enter.native="ejecutar()"
|
||||
v-model="nombre"
|
||||
rounded
|
||||
/>
|
||||
</b-field>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
ejecutar: { typeof: Function, required: true, default: () => {} },
|
||||
nombrePadre: { typeof: String, required: true, default: '' },
|
||||
columnSize: { typeof: String, required: false, default: '' },
|
||||
},
|
||||
data: () => {
|
||||
return { nombre: '' }
|
||||
},
|
||||
watch: {
|
||||
nombre() {
|
||||
this.$emit('nombre', this.nombre)
|
||||
},
|
||||
nombrePadre() {
|
||||
this.nombre = this.nombrePadre
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
39
components/inputs/InputNumeroCuenta.vue
Normal file
39
components/inputs/InputNumeroCuenta.vue
Normal file
@ -0,0 +1,39 @@
|
||||
<template>
|
||||
<b-field
|
||||
class="column mb-0 pb-0"
|
||||
label="Número de cuenta/trabajador"
|
||||
:class="columnSize"
|
||||
>
|
||||
<b-input
|
||||
icon="account"
|
||||
placeholder="Número de cuenta/trabajador"
|
||||
type="text"
|
||||
@keyup.enter.native="ejecutar()"
|
||||
v-model="numeroCuenta"
|
||||
rounded
|
||||
/>
|
||||
</b-field>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
ejecutar: { typeof: Function, required: true, default: () => {} },
|
||||
numeroCuentaPadre: { typeof: String, required: true, default: '' },
|
||||
columnSize: { typeof: String, required: false, default: '' },
|
||||
},
|
||||
data: () => {
|
||||
return { numeroCuenta: '' }
|
||||
},
|
||||
watch: {
|
||||
numeroCuenta() {
|
||||
this.$emit('numero-cuenta', this.numeroCuenta)
|
||||
},
|
||||
numeroCuentaPadre() {
|
||||
this.numeroCuenta = this.numeroCuentaPadre
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
39
components/inputs/InputNumeroInventario.vue
Normal file
39
components/inputs/InputNumeroInventario.vue
Normal file
@ -0,0 +1,39 @@
|
||||
<template>
|
||||
<b-field
|
||||
class="column mb-0 pb-0"
|
||||
label="Número de inventario"
|
||||
:class="columnSize"
|
||||
>
|
||||
<b-input
|
||||
icon="clipboard-list-outline"
|
||||
placeholder="Número de inventario"
|
||||
type="text"
|
||||
@keyup.enter.native="ejecutar()"
|
||||
v-model="numeroInventario"
|
||||
rounded
|
||||
/>
|
||||
</b-field>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
ejecutar: { typeof: Function, required: true, default: () => {} },
|
||||
numeroInventarioPadre: { typeof: String, required: true, default: '' },
|
||||
columnSize: { typeof: String, required: false, default: '' },
|
||||
},
|
||||
data: () => {
|
||||
return { numeroInventario: '' }
|
||||
},
|
||||
watch: {
|
||||
numeroInventario() {
|
||||
this.$emit('numero-inventario', this.numeroInventario)
|
||||
},
|
||||
numeroInventarioPadre() {
|
||||
this.numeroInventario = this.numeroInventarioPadre
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
40
components/inputs/InputOperador.vue
Normal file
40
components/inputs/InputOperador.vue
Normal file
@ -0,0 +1,40 @@
|
||||
<template>
|
||||
<b-field
|
||||
class="column mb-0 pb-0"
|
||||
:label="`Usuario ${campo}`"
|
||||
:class="columnSize"
|
||||
>
|
||||
<b-input
|
||||
icon="account-plus"
|
||||
:placeholder="`Usuario ${campo}`"
|
||||
type="text"
|
||||
@keyup.enter.native="ejecutar()"
|
||||
v-model="operador"
|
||||
rounded
|
||||
/>
|
||||
</b-field>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
ejecutar: { typeof: Function, required: true, default: () => {} },
|
||||
campo: { typeof: String, required: true, default: '' },
|
||||
operadorPadre: { typeof: String, required: true, default: '' },
|
||||
columnSize: { typeof: String, required: false, default: '' },
|
||||
},
|
||||
data: () => {
|
||||
return { operador: '' }
|
||||
},
|
||||
watch: {
|
||||
operador() {
|
||||
this.$emit('operador', this.operador)
|
||||
},
|
||||
operadorPadre() {
|
||||
this.operador = this.operadorPadre
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<section>
|
||||
<b-tabs type="is-toggle" :destroy-on-hide="true" v-model="tab" expanded>
|
||||
<b-tabs type="is-toggle" v-model="tab" destroy-on-hide expanded>
|
||||
<b-tab-item label="Manual" icon="lead-pencil" value="0">
|
||||
<div class="columns">
|
||||
<ManualIdPrestamo :prestamoIdPrestamo="prestamoIdPrestamo" />
|
||||
|
@ -23,21 +23,21 @@
|
||||
</b-field>
|
||||
|
||||
<SelectInstitucion
|
||||
:activas="true"
|
||||
:column="false"
|
||||
:idInstitucionPadre="idInstitucion"
|
||||
:column="false"
|
||||
@institucion-seleccionada="
|
||||
(nuevaInstitucion) => (idInstitucion = nuevaInstitucion)
|
||||
"
|
||||
activas
|
||||
/>
|
||||
|
||||
<SelectModulo
|
||||
:activos="true"
|
||||
:column="false"
|
||||
:deshabilitarOptVacia="false"
|
||||
:idInstitucion="idInstitucion"
|
||||
:idModuloPadre="idModulo"
|
||||
@modulo-seleccionado="(nuevoModulo) => (idModulo = nuevoModulo)"
|
||||
activos
|
||||
/>
|
||||
|
||||
<b-field class="mt-2">
|
||||
|
@ -6,13 +6,13 @@
|
||||
:page="page"
|
||||
:onPageChange="onPageChange"
|
||||
:total="total"
|
||||
:columnaNumeroCuenta="true"
|
||||
:columnaIdPrestamo="true"
|
||||
:columnaHoraRegreso="true"
|
||||
:columnaCanceladoOperador="true"
|
||||
:columnaCanceladoUsuario="true"
|
||||
:columnaOperadores="true"
|
||||
:filaActivo="true"
|
||||
columnaNumeroCuenta
|
||||
columnaIdPrestamo
|
||||
columnaHoraRegreso
|
||||
columnaCanceladoOperador
|
||||
columnaCanceladoUsuario
|
||||
columnaOperadores
|
||||
filaActivo
|
||||
/>
|
||||
</b-tab-item>
|
||||
</template>
|
||||
|
@ -2,15 +2,13 @@
|
||||
<div class="column is-4">
|
||||
<h3 class="is-size-4 mb-4">Administrador</h3>
|
||||
|
||||
<b-field label="Cambiar nombre del módulo">
|
||||
<b-input
|
||||
icon="list-status"
|
||||
placeholder="Nuevo nombre del módulo"
|
||||
:disabled="!modulo.id_modulo"
|
||||
v-model="nuevoNombreModulo"
|
||||
rounded
|
||||
/>
|
||||
</b-field>
|
||||
<InputModulo
|
||||
label="Cambiar nombre del módulo"
|
||||
:disabled="!modulo.id_modulo"
|
||||
:ejecutar="actualizarDatos"
|
||||
:moduloPadre="nuevoNombreModulo"
|
||||
@modulo="(moduloNuevo) => (nuevoNombreModulo = moduloNuevo)"
|
||||
/>
|
||||
|
||||
<BotonGuardar
|
||||
:disabled="!nuevoNombreModulo"
|
||||
@ -23,9 +21,10 @@
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
import BotonGuardar from '@/components/botones/BotonGuardar'
|
||||
import InputModulo from '@/components/inputs/InputModulo'
|
||||
|
||||
export default {
|
||||
components: { BotonGuardar },
|
||||
components: { BotonGuardar, InputModulo },
|
||||
props: {
|
||||
buscar: { type: Function, required: true, default: () => {} },
|
||||
updateIsLoading: { type: Function, required: true, default: () => {} },
|
||||
@ -37,28 +36,30 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
actualizarDatos() {
|
||||
const data = {
|
||||
id_modulo: this.modulo.id_modulo,
|
||||
modulo: this.nuevoNombreModulo,
|
||||
}
|
||||
if (this.nuevoNombreModulo) {
|
||||
const data = {
|
||||
id_modulo: this.modulo.id_modulo,
|
||||
modulo: this.nuevoNombreModulo,
|
||||
}
|
||||
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.put(`${process.env.api}/modulo`, data, this.$getToken.token())
|
||||
.then((res) => {
|
||||
this.nuevoNombreModulo = ''
|
||||
this.buscar()
|
||||
this.updateIsLoading(false)
|
||||
this.$alertsGenericos.imprimirMensaje(this.$buefy, res.data.message)
|
||||
})
|
||||
.catch((err) => {
|
||||
this.updateIsLoading(false)
|
||||
this.$alertsGenericos.imprimirError(
|
||||
this.$buefy,
|
||||
this.$router,
|
||||
err.response.data
|
||||
)
|
||||
})
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.put(`${process.env.api}/modulo`, data, this.$getToken.token())
|
||||
.then((res) => {
|
||||
this.nuevoNombreModulo = ''
|
||||
this.buscar()
|
||||
this.updateIsLoading(false)
|
||||
this.$alertsGenericos.imprimirMensaje(this.$buefy, res.data.message)
|
||||
})
|
||||
.catch((err) => {
|
||||
this.updateIsLoading(false)
|
||||
this.$alertsGenericos.imprimirError(
|
||||
this.$buefy,
|
||||
this.$router,
|
||||
err.response.data
|
||||
)
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -49,16 +49,12 @@
|
||||
@modelo-seleccionado="(nuevoModelo) => (idModelo = nuevoModelo)"
|
||||
/>
|
||||
|
||||
<b-field class="column is-3 mb-0 pb-0" label="Carrito">
|
||||
<b-input
|
||||
icon="cart"
|
||||
placeholder="Carrito"
|
||||
type="text"
|
||||
@keyup.enter.native="obtenerCarritos()"
|
||||
v-model="carrito"
|
||||
rounded
|
||||
/>
|
||||
</b-field>
|
||||
<InputCarrito
|
||||
columnSize="is-3"
|
||||
:carritoPadre="carrito"
|
||||
:ejecutar="obtenerCarritos"
|
||||
@carrito="(carritoNuevo) => (carrito = carritoNuevo)"
|
||||
/>
|
||||
|
||||
<BotonBuscar
|
||||
columnSize="is-3"
|
||||
@ -83,6 +79,7 @@
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
import BotonBuscar from '@/components/botones/BotonBuscar'
|
||||
import InputCarrito from '@/components/inputs/InputCarrito'
|
||||
import SelectMarca from '@/components/selects/SelectMarca'
|
||||
import SelectModelo from '@/components/selects/SelectModelo'
|
||||
import SelectInstitucion from '@/components/selects/SelectInstitucion'
|
||||
@ -93,6 +90,7 @@ import TablaCarritos from '@/components/tablas/TablaCarritos'
|
||||
export default {
|
||||
components: {
|
||||
BotonBuscar,
|
||||
InputCarrito,
|
||||
SelectInstitucion,
|
||||
SelectMarca,
|
||||
SelectModelo,
|
||||
|
@ -49,27 +49,19 @@
|
||||
@modelo-seleccionado="(nuevoModelo) => (idModelo = nuevoModelo)"
|
||||
/>
|
||||
|
||||
<b-field class="column is-3 mb-0 pb-0" label="Carrito">
|
||||
<b-input
|
||||
icon="cart"
|
||||
placeholder="Carrito"
|
||||
type="text"
|
||||
@keyup.enter.native="obtenerEquipos()"
|
||||
v-model="carrito"
|
||||
rounded
|
||||
/>
|
||||
</b-field>
|
||||
<InputCarrito
|
||||
columnSize="is-3"
|
||||
:carritoPadre="carrito"
|
||||
:ejecutar="obtenerEquipos"
|
||||
@carrito="(carritoNuevo) => (carrito = carritoNuevo)"
|
||||
/>
|
||||
|
||||
<b-field class="column is-3 mb-0 pb-0" label="Equipo">
|
||||
<b-input
|
||||
icon="laptop"
|
||||
placeholder="Equipo"
|
||||
type="text"
|
||||
@keyup.enter.native="obtenerEquipos()"
|
||||
v-model="equipo"
|
||||
rounded
|
||||
/>
|
||||
</b-field>
|
||||
<InputEquipo
|
||||
columnSize="is-3"
|
||||
:equipoPadre="equipo"
|
||||
:ejecutar="obtenerEquipos"
|
||||
@equipo="(equipoNuevo) => (equipo = equipoNuevo)"
|
||||
/>
|
||||
|
||||
<BotonBuscar
|
||||
columnSize="is-3"
|
||||
@ -94,6 +86,8 @@
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
import BotonBuscar from '@/components/botones/BotonBuscar'
|
||||
import InputCarrito from '@/components/inputs/InputCarrito'
|
||||
import InputEquipo from '@/components/inputs/InputEquipo'
|
||||
import SelectInstitucion from '@/components/selects/SelectInstitucion'
|
||||
import SelectMarca from '@/components/selects/SelectMarca'
|
||||
import SelectModelo from '@/components/selects/SelectModelo'
|
||||
@ -104,6 +98,8 @@ import TablaEquipos from '@/components/tablas/TablaEquipos'
|
||||
export default {
|
||||
components: {
|
||||
BotonBuscar,
|
||||
InputCarrito,
|
||||
InputEquipo,
|
||||
SelectInstitucion,
|
||||
SelectMarca,
|
||||
SelectModelo,
|
||||
|
@ -10,12 +10,12 @@
|
||||
:disabled="institucionInfraccion.dias_multa == diasMulta"
|
||||
:guardar="guardar"
|
||||
msjWarning="¿Estás seguro de querer actualizar los días de multa de esta infracción?"
|
||||
:column="true"
|
||||
column
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<BotonEditar :editar="editar" :columnSize="'is-3'" :column="true" />
|
||||
<BotonEditar :editar="editar" :columnSize="'is-3'" column />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -44,8 +44,8 @@ export default {
|
||||
},
|
||||
guardar() {
|
||||
const data = {
|
||||
id_institucion_infraccion: this.institucionInfraccion
|
||||
.id_institucion_infraccion,
|
||||
id_institucion_infraccion:
|
||||
this.institucionInfraccion.id_institucion_infraccion,
|
||||
dias_multa: Number(this.diasMulta),
|
||||
}
|
||||
|
||||
|
@ -48,6 +48,7 @@
|
||||
centered
|
||||
>
|
||||
<BotonUpdatePassword
|
||||
campo="operador"
|
||||
:operador="props.row"
|
||||
:updateIsLoading="updateIsLoading"
|
||||
/>
|
||||
|
@ -17,7 +17,7 @@
|
||||
</b-button>
|
||||
</div>
|
||||
|
||||
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
|
||||
<b-loading :can-cancel="false" v-model="isLoading" is-full-page />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<Admins :admin="admin" :updateIsLoading="updateIsLoading" />
|
||||
|
||||
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
|
||||
<b-loading :can-cancel="false" v-model="isLoading" is-full-page />
|
||||
</section>
|
||||
</template>
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<CargaMasivaEquipos :admin="admin" :updateIsLoading="updateIsLoading" />
|
||||
|
||||
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
|
||||
<b-loading :can-cancel="false" v-model="isLoading" is-full-page />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<CargaMasivaUsuarios :admin="admin" :updateIsLoading="updateIsLoading" />
|
||||
|
||||
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
|
||||
<b-loading :can-cancel="false" v-model="isLoading" is-full-page />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<Modulo :admin="admin" :updateIsLoading="updateIsLoading" />
|
||||
|
||||
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
|
||||
<b-loading :can-cancel="false" v-model="isLoading" is-full-page />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<Modulos :admin="admin" :updateIsLoading="updateIsLoading" />
|
||||
|
||||
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
|
||||
<b-loading :can-cancel="false" v-model="isLoading" is-full-page />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<Operadores :admin="admin" :updateIsLoading="updateIsLoading" />
|
||||
|
||||
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
|
||||
<b-loading :can-cancel="false" v-model="isLoading" is-full-page />
|
||||
</section>
|
||||
</template>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
:updateIsLoading="updateIsLoading"
|
||||
/>
|
||||
|
||||
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
|
||||
<b-loading :can-cancel="false" v-model="isLoading" is-full-page />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<CrearCatalogos :admin="admin" :updateIsLoading="updateIsLoading" />
|
||||
|
||||
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
|
||||
<b-loading :can-cancel="false" v-model="isLoading" is-full-page />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
:updateIsLoading="updateIsLoading"
|
||||
/>
|
||||
|
||||
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
|
||||
<b-loading :can-cancel="false" v-model="isLoading" is-full-page />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
:updateIsLoading="updateIsLoading"
|
||||
/>
|
||||
|
||||
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
|
||||
<b-loading :can-cancel="false" v-model="isLoading" is-full-page />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
:updateIsLoading="updateIsLoading"
|
||||
/>
|
||||
|
||||
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
|
||||
<b-loading :can-cancel="false" v-model="isLoading" is-full-page />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
:updateIsLoading="updateIsLoading"
|
||||
/>
|
||||
|
||||
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
|
||||
<b-loading :can-cancel="false" v-model="isLoading" is-full-page />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
:updateIsLoading="updateIsLoading"
|
||||
/>
|
||||
|
||||
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
|
||||
<b-loading :can-cancel="false" v-model="isLoading" is-full-page />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
<Institucion :admin="admin" :updateIsLoading="updateIsLoading" />
|
||||
|
||||
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
|
||||
<b-loading :can-cancel="false" v-model="isLoading" is-full-page />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
<section>
|
||||
<Login :updateIsLoading="updateIsLoading" />
|
||||
|
||||
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
|
||||
<b-loading :can-cancel="false" v-model="isLoading" is-full-page />
|
||||
</section>
|
||||
</template>
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<Carrito :operador="operador" :updateIsLoading="updateIsLoading" />
|
||||
|
||||
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
|
||||
<b-loading :can-cancel="false" v-model="isLoading" is-full-page />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<Carritos :operador="operador" :updateIsLoading="updateIsLoading" />
|
||||
|
||||
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
|
||||
<b-loading :can-cancel="false" v-model="isLoading" is-full-page />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<Equipo :operador="operador" :updateIsLoading="updateIsLoading" />
|
||||
|
||||
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
|
||||
<b-loading :can-cancel="false" v-model="isLoading" is-full-page />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<Historial :operador="operador" :updateIsLoading="updateIsLoading" />
|
||||
|
||||
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
|
||||
<b-loading :can-cancel="false" v-model="isLoading" is-full-page />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
<section>
|
||||
<Login :updateIsLoading="updateIsLoading" />
|
||||
|
||||
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
|
||||
<b-loading :can-cancel="false" v-model="isLoading" is-full-page />
|
||||
</section>
|
||||
</template>
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<Activos :operador="operador" :updateIsLoading="updateIsLoading" />
|
||||
|
||||
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
|
||||
<b-loading :can-cancel="false" v-model="isLoading" is-full-page />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<Usuario :operador="operador" :updateIsLoading="updateIsLoading" />
|
||||
|
||||
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
|
||||
<b-loading :can-cancel="false" v-model="isLoading" is-full-page />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user