Merge branch 'dev' of https://repositorio.acatlan.unam.mx/CIDWA/pcpuma_unam_operador into saavedra
This commit is contained in:
commit
dd6ce7cf61
@ -18,14 +18,26 @@
|
||||
</b-field>
|
||||
|
||||
<TablaModulos :admin="admin" :data="data" />
|
||||
|
||||
<!-- <TablaModulosA
|
||||
:modulos="data"
|
||||
:onPageChange="onPageChange"
|
||||
:isLoadingTable="isLoadingTable"
|
||||
:page="page"
|
||||
:total="total"
|
||||
/> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
import TablaModulos from '@/components/admin/TablaModulos'
|
||||
import TablaModulosA from '@/components/tablas/TablaModulos'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
TablaModulos,
|
||||
TablaModulosA,
|
||||
},
|
||||
props: {
|
||||
admin: { typeof: Object, require: true },
|
||||
@ -38,6 +50,9 @@ export default {
|
||||
institucion: {},
|
||||
idInstitucion: null,
|
||||
data: [],
|
||||
isLoadingTable: false,
|
||||
page: 1,
|
||||
total: 1,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -51,7 +66,7 @@ export default {
|
||||
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data)
|
||||
})
|
||||
},
|
||||
obtenerCatalogoModulo(id_institucion) {
|
||||
obtenerModulos(id_institucion) {
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/modulo/modulos?id_institucion=${id_institucion}`,
|
||||
@ -64,14 +79,18 @@ export default {
|
||||
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data)
|
||||
})
|
||||
},
|
||||
onPageChange(page) {
|
||||
this.page = page
|
||||
this.obtenerModulos()
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
idInstitucion(value) {
|
||||
this.obtenerCatalogoModulo(value)
|
||||
this.obtenerModulos(value)
|
||||
},
|
||||
actualizarTabla(value) {
|
||||
if (value) {
|
||||
this.obtenerCatalogoModulo(this.admin.institucion.id_institucion)
|
||||
this.obtenerModulos(this.admin.institucion.id_institucion)
|
||||
this.updateActualizarTabla(false)
|
||||
}
|
||||
},
|
||||
@ -79,7 +98,7 @@ export default {
|
||||
created() {
|
||||
this.admin.tipoUsuario.id_tipo_usuario === 2
|
||||
? this.obtenerCatalogoInstitucion()
|
||||
: this.obtenerCatalogoModulo(this.admin.institucion.id_institucion)
|
||||
: this.obtenerModulos(this.admin.institucion.id_institucion)
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
32
components/botones/BotonDesactivar.vue
Normal file
32
components/botones/BotonDesactivar.vue
Normal file
@ -0,0 +1,32 @@
|
||||
<template>
|
||||
<b-field>
|
||||
<b-button
|
||||
:type="row.activo || row.mostrar ? 'is-success' : 'is-danger'"
|
||||
@click="
|
||||
$alertsGenericos.imprimirWarning(
|
||||
$buefy,
|
||||
msjWarning,
|
||||
llamarActivarDesactivar
|
||||
)
|
||||
"
|
||||
expanded
|
||||
>
|
||||
{{ row.activo || row.mostrar ? 'Activo' : 'Inactivo' }}
|
||||
</b-button>
|
||||
</b-field>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
activarDesactivar: { type: Function, required: true },
|
||||
row: { type: Object, required: true, default: () => ({}) },
|
||||
msjWarning: { type: String, required: true },
|
||||
},
|
||||
methods: {
|
||||
llamarActivarDesactivar() {
|
||||
this.activarDesactivar(row)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
28
components/botones/BotonEditar.vue
Normal file
28
components/botones/BotonEditar.vue
Normal file
@ -0,0 +1,28 @@
|
||||
<template>
|
||||
<b-field>
|
||||
<b-button
|
||||
type="is-primary"
|
||||
@click="
|
||||
$alertsGenericos.imprimirWarning($buefy, msjWarning, llamarEditar)
|
||||
"
|
||||
expanded
|
||||
>
|
||||
<b-icon icon="pencil" size="is-small" />
|
||||
</b-button>
|
||||
</b-field>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
editar: { type: Function, required: true },
|
||||
row: { type: Object, required: true, default: () => ({}) },
|
||||
msjWarning: { type: String, required: true },
|
||||
},
|
||||
methods: {
|
||||
llamarEditar() {
|
||||
this.editar(row)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
29
components/botones/BotonEliminar.vue
Normal file
29
components/botones/BotonEliminar.vue
Normal file
@ -0,0 +1,29 @@
|
||||
<template>
|
||||
<b-field>
|
||||
<b-button
|
||||
type="is-danger"
|
||||
@click="
|
||||
$alertsGenericos.imprimirWarning($buefy, msjWarning, llamarEliminar)
|
||||
"
|
||||
expanded
|
||||
rounded
|
||||
>
|
||||
<b-icon icon="delete" size="is-small" />
|
||||
</b-button>
|
||||
</b-field>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
eliminar: { type: Function, required: true, default: () => {} },
|
||||
row: { type: Object, required: true, default: () => ({}) },
|
||||
msjWarning: { type: String, required: true },
|
||||
},
|
||||
methods: {
|
||||
llamarEliminar() {
|
||||
this.eliminar(row)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
28
components/botones/BotonGuardar.vue
Normal file
28
components/botones/BotonGuardar.vue
Normal file
@ -0,0 +1,28 @@
|
||||
<template>
|
||||
<b-field>
|
||||
<b-button
|
||||
type="is-link"
|
||||
@click="
|
||||
$alertsGenericos.imprimirWarning($buefy, msjWarning, llamarGuardar)
|
||||
"
|
||||
expanded
|
||||
>
|
||||
Guardar
|
||||
</b-button>
|
||||
</b-field>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
guardar: { type: Function, required: true },
|
||||
row: { type: Object, required: true, default: () => ({}) },
|
||||
msjWarning: { type: String, required: true },
|
||||
},
|
||||
methods: {
|
||||
llamarGuardar() {
|
||||
this.guardar(row)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
74
components/selects/SelectCarrera.vue
Normal file
74
components/selects/SelectCarrera.vue
Normal file
@ -0,0 +1,74 @@
|
||||
<template>
|
||||
<b-field class="column mb-0 pb-0" label="Carrera" :class="columnSize">
|
||||
<b-select
|
||||
icon="store"
|
||||
:loading="isLoadingSelect"
|
||||
v-model="carrera"
|
||||
expanded
|
||||
rounded
|
||||
>
|
||||
<option :disabled="deshabilitarOptVacia" :value="objVacio">
|
||||
Selecciona una opción
|
||||
</option>
|
||||
|
||||
<option v-for="(c, index) in carreras" :key="index" :value="c">
|
||||
{{ c.carrera.carrera }}
|
||||
</option>
|
||||
</b-select>
|
||||
</b-field>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
deshabilitarOptVacia: { typeof: Boolean, required: false, default: true },
|
||||
idInstitucion: { type: Number, required: true, default: 0 },
|
||||
carreraPadre: { type: Object, required: true, default: () => ({}) },
|
||||
columnSize: { typeof: String, required: false, default: '' },
|
||||
},
|
||||
data: () => {
|
||||
return {
|
||||
carreras: [],
|
||||
isLoadingSelect: false,
|
||||
carrera: {},
|
||||
objVacio: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
obtenerCarreras() {
|
||||
this.isLoadingSelect = true
|
||||
this.carreras = []
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/institucion-carrera?id_institucion=${this.idInstitucion}`
|
||||
)
|
||||
.then((res) => {
|
||||
this.carreras = res.data
|
||||
this.$emit('catalogo-carreras', this.carreras)
|
||||
this.isLoadingSelect = false
|
||||
})
|
||||
.catch((err) => {
|
||||
this.isLoadingSelect = false
|
||||
})
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
idInstitucion(nuevoIdInstitucion) {
|
||||
if (nuevoIdInstitucion) this.obtenerCarreras()
|
||||
},
|
||||
carrera(carreraSeleccionada) {
|
||||
this.$emit('carrera-seleccionada', carreraSeleccionada)
|
||||
},
|
||||
carreraPadre(nuevaCarrera) {
|
||||
if (this.$objIsEmpty(nuevaCarrera)) this.carrera = this.objVacio
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.carrera = this.objVacio
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
74
components/selects/SelectInfraccion.vue
Normal file
74
components/selects/SelectInfraccion.vue
Normal file
@ -0,0 +1,74 @@
|
||||
<template>
|
||||
<b-field class="column mb-0 pb-0" label="Infracción" :class="columnSize">
|
||||
<b-select
|
||||
icon="store"
|
||||
:loading="isLoadingSelect"
|
||||
v-model="infraccion"
|
||||
expanded
|
||||
rounded
|
||||
>
|
||||
<option :disabled="deshabilitarOptVacia" :value="objVacio">
|
||||
Selecciona una opción
|
||||
</option>
|
||||
|
||||
<option v-for="(i, index) in infracciones" :key="index" :value="i">
|
||||
{{ i.infraccion }}
|
||||
</option>
|
||||
</b-select>
|
||||
</b-field>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
deshabilitarOptVacia: { typeof: Boolean, required: false, default: true },
|
||||
idInstitucion: { type: Number, required: true, default: 0 },
|
||||
infraccionPadre: { type: Object, required: true, default: () => ({}) },
|
||||
columnSize: { typeof: String, required: false, default: '' },
|
||||
},
|
||||
data: () => {
|
||||
return {
|
||||
infracciones: [],
|
||||
isLoadingSelect: false,
|
||||
infraccion: {},
|
||||
objVacio: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
obtenerInfracciones() {
|
||||
this.isLoadingSelect = true
|
||||
this.infracciones = []
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/institucion-infraccion/infracciones?id_institucion=${this.idInstitucion}`
|
||||
)
|
||||
.then((res) => {
|
||||
this.infracciones = res.data
|
||||
this.$emit('catalogo-infracciones', this.infracciones)
|
||||
this.isLoadingSelect = false
|
||||
})
|
||||
.catch((err) => {
|
||||
this.isLoadingSelect = false
|
||||
})
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
idInstitucion(nuevoIdInstitucion) {
|
||||
if (nuevoIdInstitucion) this.obtenerInfracciones()
|
||||
},
|
||||
infraccion(infraccionSeleccionada) {
|
||||
this.$emit('infraccion-seleccionada', infraccionSeleccionada)
|
||||
},
|
||||
infraccionPadre(nuevaInfraccion) {
|
||||
if (this.$objIsEmpty(nuevaInfraccion)) this.infraccion = this.objVacio
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.infraccion = this.objVacio
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
67
components/selects/SelectInstitucion.vue
Normal file
67
components/selects/SelectInstitucion.vue
Normal file
@ -0,0 +1,67 @@
|
||||
<template>
|
||||
<b-field class="column mb-0 pb-0" label="Institución" :class="columnSize">
|
||||
<b-select
|
||||
icon="school-outline"
|
||||
:loading="isLoadingSelect"
|
||||
v-model="institucion"
|
||||
expanded
|
||||
rounded
|
||||
>
|
||||
<option :disabled="deshabilitarOptVacia" :value="objVacio">
|
||||
Selecciona una opción
|
||||
</option>
|
||||
|
||||
<option v-for="(i, index) in instituciones" :key="index" :value="i">
|
||||
{{ i.institucion }}
|
||||
</option>
|
||||
</b-select>
|
||||
</b-field>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
deshabilitarOptVacia: { typeof: Boolean, required: false, default: true },
|
||||
institucionPadre: { type: Object, required: true },
|
||||
columnSize: { typeof: String, required: false, default: '' },
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
instituciones: [],
|
||||
isLoadingSelect: false,
|
||||
institucion: {},
|
||||
objVacio: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
obtenerInstituciones() {
|
||||
this.isLoadingSelect = true
|
||||
this.instituciones = []
|
||||
axios
|
||||
.get(`${process.env.api}/institucion`, this.$getToken.token())
|
||||
.then((res) => {
|
||||
this.instituciones = res.data
|
||||
this.$emit('catalogo-instituciones', this.instituciones)
|
||||
this.isLoadingSelect = false
|
||||
})
|
||||
.catch((err) => {
|
||||
this.isLoadingSelect = false
|
||||
})
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
institucion(institucionSeleccionada) {
|
||||
this.$emit('institucion-seleccionada', institucionSeleccionada)
|
||||
},
|
||||
institucionPadre(nuevaInstitucion) {
|
||||
if (this.$objIsEmpty(nuevaInstitucion)) this.modulo = this.objVacio
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.institucion = this.objVacio
|
||||
this.obtenerInstituciones()
|
||||
},
|
||||
}
|
||||
</script>
|
70
components/selects/SelectMarca.vue
Normal file
70
components/selects/SelectMarca.vue
Normal file
@ -0,0 +1,70 @@
|
||||
<template>
|
||||
<b-field class="column mb-0 pb-0" label="Marca" :class="columnSize">
|
||||
<b-select
|
||||
icon="store"
|
||||
:loading="isLoadingSelect"
|
||||
v-model="marca"
|
||||
expanded
|
||||
rounded
|
||||
>
|
||||
<option :disabled="deshabilitarOptVacia" :value="objVacio">
|
||||
Selecciona una opción
|
||||
</option>
|
||||
|
||||
<option v-for="(m, index) in marcas" :key="index" :value="m">
|
||||
{{ m.marca }}
|
||||
</option>
|
||||
</b-select>
|
||||
</b-field>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
deshabilitarOptVacia: { typeof: Boolean, required: false, default: true },
|
||||
marcaPadre: { type: Object, required: true, default: () => ({}) },
|
||||
columnSize: { typeof: String, required: false, default: '' },
|
||||
tipo: { typeof: String, required: true, default: '' },
|
||||
},
|
||||
data: () => {
|
||||
return {
|
||||
marcas: [],
|
||||
isLoadingSelect: false,
|
||||
marca: {},
|
||||
objVacio: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
obtenerMarcas() {
|
||||
this.isLoadingSelect = true
|
||||
this.marcas = []
|
||||
axios
|
||||
.get(`${process.env.api}/marca?tipo=${this.tipo}`)
|
||||
.then((res) => {
|
||||
this.marcas = res.data
|
||||
this.$emit('catalogo-marcas', this.marcas)
|
||||
this.isLoadingSelect = false
|
||||
})
|
||||
.catch((err) => {
|
||||
this.isLoadingSelect = false
|
||||
})
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
marca(marcaSeleccionada) {
|
||||
this.$emit('marca-seleccionada', marcaSeleccionada)
|
||||
},
|
||||
marcaPadre(nuevaMarca) {
|
||||
if (this.$objIsEmpty(nuevaMarca)) this.marca = this.objVacio
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.marca = this.objVacio
|
||||
this.obtenerMarcas()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
70
components/selects/SelectModelo.vue
Normal file
70
components/selects/SelectModelo.vue
Normal file
@ -0,0 +1,70 @@
|
||||
<template>
|
||||
<b-field class="column mb-0 pb-0" label="Modelo" :class="columnSize">
|
||||
<b-select
|
||||
icon="store"
|
||||
:loading="isLoadingSelect"
|
||||
v-model="modelo"
|
||||
expanded
|
||||
rounded
|
||||
>
|
||||
<option :disabled="deshabilitarOptVacia" :value="objVacio">
|
||||
Selecciona una opción
|
||||
</option>
|
||||
|
||||
<option v-for="(m, index) in modelos" :key="index" :value="m">
|
||||
{{ m.modelo }}
|
||||
</option>
|
||||
</b-select>
|
||||
</b-field>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
deshabilitarOptVacia: { typeof: Boolean, required: false, default: true },
|
||||
modeloPadre: { type: Object, required: true, default: () => ({}) },
|
||||
columnSize: { typeof: String, required: false, default: '' },
|
||||
tipo: { typeof: String, required: true, default: '' },
|
||||
},
|
||||
data: () => {
|
||||
return {
|
||||
modelos: [],
|
||||
isLoadingSelect: false,
|
||||
modelo: {},
|
||||
objVacio: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
obtenerModelos() {
|
||||
this.isLoadingSelect = true
|
||||
this.modelos = []
|
||||
axios
|
||||
.get(`${process.env.api}/modelo?tipo=${this.tipo}`)
|
||||
.then((res) => {
|
||||
this.modelos = res.data
|
||||
this.$emit('catalogo-modelos', this.modelos)
|
||||
this.isLoadingSelect = false
|
||||
})
|
||||
.catch((err) => {
|
||||
this.isLoadingSelect = false
|
||||
})
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
modelo(modeloSeleccionado) {
|
||||
this.$emit('modelo-seleccionado', modeloSeleccionado)
|
||||
},
|
||||
modeloPadre(nuevoModelo) {
|
||||
if (this.$objIsEmpty(nuevoModelo)) this.modelo = this.objVacio
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.modelo = this.objVacio
|
||||
this.obtenerModelos()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
74
components/selects/SelectModulo.vue
Normal file
74
components/selects/SelectModulo.vue
Normal file
@ -0,0 +1,74 @@
|
||||
<template>
|
||||
<b-field class="column mb-0 pb-0" label="Módulo" :class="columnSize">
|
||||
<b-select
|
||||
icon="store"
|
||||
:loading="isLoadingSelect"
|
||||
v-model="modulo"
|
||||
expanded
|
||||
rounded
|
||||
>
|
||||
<option :disabled="deshabilitarOptVacia" :value="objVacio">
|
||||
Selecciona una opción
|
||||
</option>
|
||||
|
||||
<option v-for="(m, index) in modulos" :key="index" :value="m">
|
||||
{{ m.modulo }}
|
||||
</option>
|
||||
</b-select>
|
||||
</b-field>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
deshabilitarOptVacia: { typeof: Boolean, required: false, default: true },
|
||||
idInstitucion: { type: Number, required: true, default: 0 },
|
||||
moduloPadre: { type: Object, required: true, default: () => ({}) },
|
||||
columnSize: { typeof: String, required: false, default: '' },
|
||||
},
|
||||
data: () => {
|
||||
return {
|
||||
modulos: [],
|
||||
isLoadingSelect: false,
|
||||
modulo: {},
|
||||
objVacio: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
obtenerModulos() {
|
||||
this.isLoadingSelect = true
|
||||
this.modulos = []
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/modulo/modulos?id_institucion=${this.idInstitucion}`
|
||||
)
|
||||
.then((res) => {
|
||||
this.modulos = res.data
|
||||
this.$emit('catalogo-modulos', this.modulos)
|
||||
this.isLoadingSelect = false
|
||||
})
|
||||
.catch((err) => {
|
||||
this.isLoadingSelect = false
|
||||
})
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
idInstitucion(nuevoIdInstitucion) {
|
||||
if (nuevoIdInstitucion) this.obtenerModulos()
|
||||
},
|
||||
modulo(moduloSeleccionado) {
|
||||
this.$emit('modulo-seleccionado', moduloSeleccionado)
|
||||
},
|
||||
moduloPadre(nuevoModulo) {
|
||||
if (this.$objIsEmpty(nuevoModulo)) this.modulo = this.objVacio
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.modulo = this.objVacio
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
68
components/selects/SelectPrograma.vue
Normal file
68
components/selects/SelectPrograma.vue
Normal file
@ -0,0 +1,68 @@
|
||||
<template>
|
||||
<b-field class="column mb-0 pb-0" label="Software" :class="columnSize">
|
||||
<b-select
|
||||
icon="store"
|
||||
:loading="isLoadingSelect"
|
||||
v-model="programa"
|
||||
expanded
|
||||
rounded
|
||||
>
|
||||
<option :disabled="deshabilitarOptVacia" :value="objVacio">
|
||||
Selecciona una opción
|
||||
</option>
|
||||
|
||||
<option v-for="(p, index) in programas" :key="index" :value="p">
|
||||
{{ p.programa }}
|
||||
</option>
|
||||
</b-select>
|
||||
</b-field>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
deshabilitarOptVacia: { typeof: Boolean, required: false, default: true },
|
||||
programaPadre: { type: Object, required: true, default: () => ({}) },
|
||||
columnSize: { typeof: String, required: false, default: '' },
|
||||
},
|
||||
data: () => {
|
||||
return {
|
||||
programas: [],
|
||||
isLoadingSelect: false,
|
||||
programa: {},
|
||||
objVacio: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
obtenerProgramas() {
|
||||
this.isLoadingSelect = true
|
||||
this.programas = []
|
||||
axios
|
||||
.get(`${process.env.api}/institucion-programa`)
|
||||
.then((res) => {
|
||||
this.programas = res.data
|
||||
this.$emit('catalogo-programas', this.programas)
|
||||
this.isLoadingSelect = false
|
||||
})
|
||||
.catch((err) => {
|
||||
this.isLoadingSelect = false
|
||||
})
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
programa(programaSeleccionado) {
|
||||
this.$emit('programa-seleccionado', programaSeleccionado)
|
||||
},
|
||||
programaPadre(nuevoPrograma) {
|
||||
if (this.$objIsEmpty(nuevoPrograma)) this.programa = this.objVacio
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.programa = this.objVacio
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
70
components/selects/SelectStatus.vue
Normal file
70
components/selects/SelectStatus.vue
Normal file
@ -0,0 +1,70 @@
|
||||
<template>
|
||||
<b-field class="column mb-0 pb-0" label="Status" :class="columnSize">
|
||||
<b-select
|
||||
icon="store"
|
||||
:loading="isLoadingSelect"
|
||||
v-model="status"
|
||||
expanded
|
||||
rounded
|
||||
>
|
||||
<option :disabled="deshabilitarOptVacia" :value="objVacio">
|
||||
Selecciona una opción
|
||||
</option>
|
||||
|
||||
<option v-for="(s, index) in catalogoStatus" :key="index" :value="s">
|
||||
{{ s.status }}
|
||||
</option>
|
||||
</b-select>
|
||||
</b-field>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
deshabilitarOptVacia: { typeof: Boolean, required: false, default: true },
|
||||
idInstitucion: { type: Number, required: true, default: 0 },
|
||||
statusPadre: { type: Object, required: true, default: () => ({}) },
|
||||
columnSize: { typeof: String, required: false, default: '' },
|
||||
},
|
||||
data: () => {
|
||||
return {
|
||||
catalogoStatus: [],
|
||||
isLoadingSelect: false,
|
||||
status: {},
|
||||
objVacio: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
obtenerCatalogoStatus() {
|
||||
this.isLoadingSelect = true
|
||||
this.catalogoStatus = []
|
||||
axios
|
||||
.get(`${process.env.api}/status`)
|
||||
.then((res) => {
|
||||
this.catalogoStatus = res.data
|
||||
this.$emit('catalogo-status', this.catalogoStatus)
|
||||
this.isLoadingSelect = false
|
||||
})
|
||||
.catch((err) => {
|
||||
this.isLoadingSelect = false
|
||||
})
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
status(statusSeleccionado) {
|
||||
this.$emit('status-seleccionado', statusSeleccionado)
|
||||
},
|
||||
statusPadre(nuevoStatus) {
|
||||
if (this.$objIsEmpty(nuevoStatus)) this.status = this.objVacio
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.status = this.objVacio
|
||||
this.obtenerCatalogoStatus()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
69
components/selects/SelectTipoCarrito.vue
Normal file
69
components/selects/SelectTipoCarrito.vue
Normal file
@ -0,0 +1,69 @@
|
||||
<template>
|
||||
<b-field class="column mb-0 pb-0" label="Tipo de carrito" :class="columnSize">
|
||||
<b-select
|
||||
icon="store"
|
||||
:loading="isLoadingSelect"
|
||||
v-model="tipoCarrito"
|
||||
expanded
|
||||
rounded
|
||||
>
|
||||
<option :disabled="deshabilitarOptVacia" :value="objVacio">
|
||||
Selecciona una opción
|
||||
</option>
|
||||
|
||||
<option v-for="(tc, index) in tiposCarritos" :key="index" :value="tc">
|
||||
{{ tc.tipo_carrito }}
|
||||
</option>
|
||||
</b-select>
|
||||
</b-field>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
deshabilitarOptVacia: { typeof: Boolean, required: false, default: true },
|
||||
tipoCarritoPadre: { type: Object, required: true, default: () => ({}) },
|
||||
columnSize: { typeof: String, required: false, default: '' },
|
||||
},
|
||||
data: () => {
|
||||
return {
|
||||
tiposCarritos: [],
|
||||
isLoadingSelect: false,
|
||||
tipoCarrito: {},
|
||||
objVacio: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
obtenerTiposCarritos() {
|
||||
this.isLoadingSelect = true
|
||||
this.tiposCarritos = []
|
||||
axios
|
||||
.get(`${process.env.api}/institucion-tipo-carrito`)
|
||||
.then((res) => {
|
||||
this.tiposCarritos = res.data
|
||||
this.$emit('catalogo-tipos-carritos', this.tiposCarritos)
|
||||
this.isLoadingSelect = false
|
||||
})
|
||||
.catch((err) => {
|
||||
this.isLoadingSelect = false
|
||||
})
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
tipoCarrito(tipoCarritoSeleccionado) {
|
||||
this.$emit('tipo-carrito-seleccionado', tipoCarritoSeleccionado)
|
||||
},
|
||||
tipoCarritoPadre(nuevoTipoCarrito) {
|
||||
if (this.$objIsEmpty(nuevoTipoCarrito)) this.tipoCarrito = this.objVacio
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.tipoCarrito = this.objVacio
|
||||
this.obtenerTiposCarritos()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
73
components/selects/SelectTipoEntrada.vue
Normal file
73
components/selects/SelectTipoEntrada.vue
Normal file
@ -0,0 +1,73 @@
|
||||
<template>
|
||||
<b-field
|
||||
class="column mb-0 pb-0"
|
||||
label="Tipo de conector"
|
||||
:class="columnSize"
|
||||
>
|
||||
<b-select
|
||||
icon="store"
|
||||
:loading="isLoadingSelect"
|
||||
v-model="tipoEntrada"
|
||||
expanded
|
||||
rounded
|
||||
>
|
||||
<option :disabled="deshabilitarOptVacia" :value="objVacio">
|
||||
Selecciona una opción
|
||||
</option>
|
||||
|
||||
<option v-for="(te, index) in tiposEntradas" :key="index" :value="te">
|
||||
{{ te.tipo_entrada }}
|
||||
</option>
|
||||
</b-select>
|
||||
</b-field>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
deshabilitarOptVacia: { typeof: Boolean, required: false, default: true },
|
||||
tipoEntradaPadre: { type: Object, required: true, default: () => ({}) },
|
||||
columnSize: { typeof: String, required: false, default: '' },
|
||||
},
|
||||
data: () => {
|
||||
return {
|
||||
tiposEntradas: [],
|
||||
isLoadingSelect: false,
|
||||
tipoEntrada: {},
|
||||
objVacio: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
obtenerTiposEntradas() {
|
||||
this.isLoadingSelect = true
|
||||
this.tiposEntradas = []
|
||||
axios
|
||||
.get(`${process.env.api}/institucion-tipo-entrada`)
|
||||
.then((res) => {
|
||||
this.tiposEntradas = res.data
|
||||
this.$emit('catalogo-tipos-entradas', this.tiposEntradas)
|
||||
this.isLoadingSelect = false
|
||||
})
|
||||
.catch((err) => {
|
||||
this.isLoadingSelect = false
|
||||
})
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
tipoEntrada(tipoEntradaSeleccionada) {
|
||||
this.$emit('tipo-entrada-seleccionada', tipoEntradaSeleccionada)
|
||||
},
|
||||
tipoEntradaPadre(nuevoTipoEntrada) {
|
||||
if (this.$objIsEmpty(nuevoTipoEntrada)) this.tipoEntrada = this.objVacio
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.tipoEntrada = this.objVacio
|
||||
this.obtenerTiposEntradas()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
69
components/selects/SelectTipoUsuario.vue
Normal file
69
components/selects/SelectTipoUsuario.vue
Normal file
@ -0,0 +1,69 @@
|
||||
<template>
|
||||
<b-field class="column mb-0 pb-0" label="Tipo de usuario" :class="columnSize">
|
||||
<b-select
|
||||
icon="store"
|
||||
:loading="isLoadingSelect"
|
||||
v-model="tipoUsuario"
|
||||
expanded
|
||||
rounded
|
||||
>
|
||||
<option :disabled="deshabilitarOptVacia" :value="objVacio">
|
||||
Selecciona una opción
|
||||
</option>
|
||||
|
||||
<option v-for="(te, index) in tiposUsuarios" :key="index" :value="te">
|
||||
{{ te.tipo_usuario }}
|
||||
</option>
|
||||
</b-select>
|
||||
</b-field>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
deshabilitarOptVacia: { typeof: Boolean, required: false, default: true },
|
||||
tipoUsuarioPadre: { type: Object, required: true, default: () => ({}) },
|
||||
columnSize: { typeof: String, required: false, default: '' },
|
||||
},
|
||||
data: () => {
|
||||
return {
|
||||
tiposUsuarios: [],
|
||||
isLoadingSelect: false,
|
||||
tipoUsuario: {},
|
||||
objVacio: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
obtenerTiposUsuarios() {
|
||||
this.isLoadingSelect = true
|
||||
this.tiposUsuarios = []
|
||||
axios
|
||||
.get(`${process.env.api}/institucion-tipo-entrada`)
|
||||
.then((res) => {
|
||||
this.tiposUsuarios = res.data
|
||||
this.$emit('catalogo-tipos-entradas', this.tiposUsuarios)
|
||||
this.isLoadingSelect = false
|
||||
})
|
||||
.catch((err) => {
|
||||
this.isLoadingSelect = false
|
||||
})
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
tipoUsuario(tipoUsuarioSeleccionado) {
|
||||
this.$emit('tipo-usuario-seleccionado', tipoUsuarioSeleccionado)
|
||||
},
|
||||
tipoUsuarioPadre(nuevoTipoUsuario) {
|
||||
if (this.$objIsEmpty(nuevoTipoUsuario)) this.tipoUsuario = this.objVacio
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.tipoUsuario = this.objVacio
|
||||
this.obtenerTiposUsuarios()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
55
components/tablas/CarritosModulo.vue
Normal file
55
components/tablas/CarritosModulo.vue
Normal file
@ -0,0 +1,55 @@
|
||||
<template>
|
||||
<TablaCarritos
|
||||
:carritos="carritos"
|
||||
:isLoadingTable="isLoadingTable"
|
||||
:onPageChange="onPageChange"
|
||||
:page="page"
|
||||
:total="total"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
import TablaCarritos from '@/components/tablas/TablaCarritos'
|
||||
|
||||
export default {
|
||||
components: { TablaCarritos },
|
||||
props: {
|
||||
modulo: { type: Object, required: true, default: () => ({}) },
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
carritos: [],
|
||||
page: 1,
|
||||
total: 0,
|
||||
isLoadingTable: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
obtenerCarritos() {
|
||||
this.isLoadingTable = true
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/carrito/carritos?pagina=${this.page}&id_modulo=${this.modulo.id_modulo}`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then(async (res) => {
|
||||
this.carritos = res.data[0]
|
||||
this.total = res.data[1]
|
||||
this.isLoadingTable = false
|
||||
})
|
||||
.catch((err) => {
|
||||
this.isLoadingTable = false
|
||||
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data)
|
||||
})
|
||||
},
|
||||
onPageChange(page) {
|
||||
this.page = page
|
||||
this.obtenerCarritos()
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.obtenerCarritos()
|
||||
},
|
||||
}
|
||||
</script>
|
55
components/tablas/EquiposCarrito.vue
Normal file
55
components/tablas/EquiposCarrito.vue
Normal file
@ -0,0 +1,55 @@
|
||||
<template>
|
||||
<TablaEquipos
|
||||
:equipos="equipos"
|
||||
:isLoadingTable="isLoadingTable"
|
||||
:onPageChange="onPageChange"
|
||||
:page="page"
|
||||
:total="total"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
import TablaEquipos from '@/components/tablas/TablaEquipos'
|
||||
|
||||
export default {
|
||||
components: { TablaEquipos },
|
||||
props: {
|
||||
carrito: { type: Object, required: true, default: () => ({}) },
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
equipos: [],
|
||||
page: 1,
|
||||
total: 0,
|
||||
isLoadingTable: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
obtenerEquipos(page) {
|
||||
this.isLoadingTable = true
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/equipo/equipos?pagina=${this.page}&id_carrito=${this.carrito.id_carrito}`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then(async (res) => {
|
||||
this.equipos = res.data[0]
|
||||
this.total = res.data[1]
|
||||
this.isLoadingTable = false
|
||||
})
|
||||
.catch((err) => {
|
||||
this.isLoadingTable = false
|
||||
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data)
|
||||
})
|
||||
},
|
||||
onPageChange(page) {
|
||||
this.page = page
|
||||
this.obtenerEquipos()
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.obtenerEquipos()
|
||||
},
|
||||
}
|
||||
</script>
|
68
components/tablas/TablaCarreraPrograma.vue
Normal file
68
components/tablas/TablaCarreraPrograma.vue
Normal file
@ -0,0 +1,68 @@
|
||||
<template>
|
||||
<b-table
|
||||
class="mb-6"
|
||||
:data="data"
|
||||
:loading="isLoadingTable"
|
||||
:per-page="25"
|
||||
:total="total"
|
||||
hoverable
|
||||
paginated
|
||||
striped
|
||||
>
|
||||
<b-table-column field="carrera" label="Carrera" v-slot="props" centered>
|
||||
<p>{{ props.row.institucionCarrera.carrera.carrera }}</p>
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column field="programa" label="Programa" v-slot="props" centered>
|
||||
<p>{{ props.row.programa.programa }}</p>
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column field="eliminar" label="Eliminar" v-slot="props" centered>
|
||||
<BotonEliminar
|
||||
:eliminar="eliminarCarreraPrograma"
|
||||
:row="props.row"
|
||||
:msjWarning="`¿Estás segur@ de querer eliminar esta asignación de software?`"
|
||||
/>
|
||||
</b-table-column>
|
||||
</b-table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BotonEliminar from '@/components/botones/BotonEliminar'
|
||||
|
||||
export default {
|
||||
components: { BotonEliminar },
|
||||
props: {
|
||||
data: { type: Array, required: true, default: () => [] },
|
||||
isLoadingTable: { type: Boolean, required: true, default: false },
|
||||
obtenerCarrerasProgramas: {
|
||||
type: Function,
|
||||
required: true,
|
||||
default: () => {},
|
||||
},
|
||||
updateIsLoading: { type: Function, required: true, default: () => {} },
|
||||
total: { type: Number, required: true, default: 0 },
|
||||
},
|
||||
methods: {
|
||||
eliminarCarreraPrograma(carreraPrograma) {
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.delete(
|
||||
`${process.env.api}/carrera-programa`,
|
||||
this.$getToken.tokenDelete({
|
||||
id_carrera_programa: carreraPrograma.id_carrera_programa,
|
||||
})
|
||||
)
|
||||
.then((res) => {
|
||||
this.obtenerCarrerasProgramas()
|
||||
this.updateIsLoading(false)
|
||||
this.$alertsGenericos.imprimirMensaje(this.$buefy, res.data.message)
|
||||
})
|
||||
.catch((err) => {
|
||||
this.updateIsLoading(false)
|
||||
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data)
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
78
components/tablas/TablaCarritos.vue
Normal file
78
components/tablas/TablaCarritos.vue
Normal file
@ -0,0 +1,78 @@
|
||||
<template>
|
||||
<b-table
|
||||
class="mb-6"
|
||||
:current-page="page"
|
||||
:data="carritos"
|
||||
:loading="isLoadingTable"
|
||||
:per-page="25"
|
||||
:row-class="(row, index) => 'pointer'"
|
||||
:selected.sync="carritoSeleccionado"
|
||||
:total="total"
|
||||
@page-change="onPageChange"
|
||||
backend-pagination
|
||||
detailed
|
||||
hoverable
|
||||
paginated
|
||||
show-detail-icon
|
||||
striped
|
||||
>
|
||||
<b-table-column field="carrito" label="Carrito" v-slot="props" centered>
|
||||
<p>{{ props.row.carrito }}</p>
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column field="modulo" label="Módulo" v-slot="props" centered>
|
||||
<p>{{ props.row.modulo.modulo }}</p>
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column
|
||||
field="tipo"
|
||||
label="Tipo de carrito"
|
||||
v-slot="props"
|
||||
centered
|
||||
>
|
||||
<p>{{ props.row.tipoCarrito.tipo_carrito }}</p>
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column field="status" label="Status" v-slot="props" centered>
|
||||
<p class="is-size-6 tag" :class="chooseTag(props.row.activo)">
|
||||
{{ props.row.activo ? 'Activo' : 'Inactivo' }}
|
||||
</p>
|
||||
</b-table-column>
|
||||
|
||||
<template #detail="props">
|
||||
<EquiposCarrito :carrito="props.row" />
|
||||
</template>
|
||||
</b-table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import EquiposCarrito from '@/components/tablas/EquiposCarrito'
|
||||
|
||||
export default {
|
||||
components: { EquiposCarrito },
|
||||
props: {
|
||||
carritos: { type: Array, required: true, default: () => [] },
|
||||
isLoadingTable: { type: Boolean, required: true, default: false },
|
||||
onPageChange: { type: Function, required: true, default: () => {} },
|
||||
page: { type: Number, required: true, default: 1 },
|
||||
total: { type: Number, required: true, default: 0 },
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
carritoSeleccionado: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
chooseTag(activo) {
|
||||
return activo ? 'is-success' : 'is-danger'
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
carritoSeleccionado() {
|
||||
this.$router.push(
|
||||
`/operador/carritos/buscar_carrito/${this.carritoSeleccionado.id_carrito}`
|
||||
)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
65
components/tablas/TablaDias.vue
Normal file
65
components/tablas/TablaDias.vue
Normal file
@ -0,0 +1,65 @@
|
||||
<template>
|
||||
<b-table
|
||||
class="mb-6"
|
||||
:data="data"
|
||||
:loading="isLoadingTable"
|
||||
hoverable
|
||||
striped
|
||||
>
|
||||
<b-table-column field="dia" label="Día" centered v-slot="props">
|
||||
<p>{{ props.row.dia.dia }}</p>
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column
|
||||
field="hora_inicio"
|
||||
label="Hora inicio del servicio"
|
||||
centered
|
||||
v-slot="props"
|
||||
>
|
||||
<p>{{ props.row.hora_inicio }}</p>
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column
|
||||
field="hora_fin"
|
||||
label="Hora fin del servicio"
|
||||
centered
|
||||
v-slot="props"
|
||||
>
|
||||
<p>{{ props.row.hora_fin }}</p>
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column field="editar" label="Editar horas" v-slot="props">
|
||||
<b-button type="is-primary" @click="editarHora(props.row)">
|
||||
<b-icon icon="pencil" size="is-small" />
|
||||
</b-button>
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column field="activo" label="Status" v-slot="props" centered>
|
||||
<BotonDesactivar
|
||||
:activarDesactivar="activarDesactivar"
|
||||
:data="props.row"
|
||||
:msjWarning="`¿Estás segur@ de querer ${
|
||||
row.activo || row.mostrar ? 'desactivar' : 'activar'
|
||||
} este tipo de carrito?`"
|
||||
/>
|
||||
</b-table-column>
|
||||
</b-table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BotonDesactivar from '@/components/botones/BotonDesactivar'
|
||||
|
||||
export default {
|
||||
components: { BotonDesactivar },
|
||||
props: {
|
||||
data: { type: Array, required: true, default: () => [] },
|
||||
isLoadingTable: { type: Boolean, required: true, default: false },
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {},
|
||||
watch: {},
|
||||
created() {},
|
||||
}
|
||||
</script>
|
97
components/tablas/TablaEquipos.vue
Normal file
97
components/tablas/TablaEquipos.vue
Normal file
@ -0,0 +1,97 @@
|
||||
<template>
|
||||
<b-table
|
||||
class="mb-6"
|
||||
:current-page="page"
|
||||
:data="equipos"
|
||||
:loading="isLoadingTable"
|
||||
:per-page="25"
|
||||
:row-class="(row, index) => 'pointer'"
|
||||
:selected.sync="equipoSeleccionado"
|
||||
:total="total"
|
||||
@page-change="onPageChange"
|
||||
backend-pagination
|
||||
hoverable
|
||||
paginated
|
||||
striped
|
||||
>
|
||||
<b-table-column field="equipo" label="Equipo" centered v-slot="props">
|
||||
<p>{{ props.row.equipo }}</p>
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column
|
||||
field="numeroInventario"
|
||||
label="Número de Inventario"
|
||||
centered
|
||||
v-slot="props"
|
||||
>
|
||||
<p>{{ props.row.numero_inventario }}</p>
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column field="carrito" label="Carrito" centered v-slot="props">
|
||||
<p>{{ props.row.carrito.carrito }}</p>
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column field="modulo" label="Módulo" centered v-slot="props">
|
||||
<p>{{ props.row.carrito.modulo.modulo }}</p>
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column
|
||||
field="tipoCarrito"
|
||||
label="Tipo de equipo"
|
||||
centered
|
||||
v-slot="props"
|
||||
>
|
||||
<p>{{ props.row.carrito.tipoCarrito.tipo_carrito }}</p>
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column field="status" label="Status" centered v-slot="props">
|
||||
<p class="is-size-6 tag" :class="chooseTag(props.row.status.id_status)">
|
||||
{{ props.row.status.status }}
|
||||
</p>
|
||||
</b-table-column>
|
||||
</b-table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
equipos: { type: Array, required: true, default: () => [] },
|
||||
isLoadingTable: { type: Boolean, required: true, default: false },
|
||||
onPageChange: { type: Function, required: true, default: () => {} },
|
||||
page: { type: Number, required: true, default: 1 },
|
||||
total: { type: Number, required: true, default: 0 },
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
equipoSeleccionado: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
chooseTag(idStatus) {
|
||||
switch (idStatus) {
|
||||
case 1:
|
||||
return 'is-info'
|
||||
case 2:
|
||||
return 'is-link'
|
||||
case 3:
|
||||
return 'is-primary'
|
||||
case 4:
|
||||
return 'is-success'
|
||||
case 5:
|
||||
return 'is-warning'
|
||||
case 6:
|
||||
return 'is-danger'
|
||||
case 7:
|
||||
return 'is-black'
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
equipoSeleccionado() {
|
||||
this.$router.push(
|
||||
`/operador/equipos/buscar_equipo/${this.equipoSeleccionado.numero_inventario}`
|
||||
)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
70
components/tablas/TablaHoraExcepcion.vue
Normal file
70
components/tablas/TablaHoraExcepcion.vue
Normal file
@ -0,0 +1,70 @@
|
||||
<template>
|
||||
<b-table
|
||||
class="mb-6"
|
||||
:data="data"
|
||||
:loading="isLoadingTable"
|
||||
hoverable
|
||||
striped
|
||||
>
|
||||
<b-table-column
|
||||
field="horaInicio"
|
||||
label="Hora inicio"
|
||||
v-slot="props"
|
||||
centered
|
||||
>
|
||||
<p>{{ props.row.hora_inicio }}</p>
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column field="horaFin" label="Hora fin" v-slot="props" centered>
|
||||
<p>{{ props.row.hora_fin }}</p>
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column field="eliminar" label="Eliminar" v-slot="props" centered>
|
||||
<BotonEliminar
|
||||
:eliminar="eliminarHoraExcepcion"
|
||||
:row="props.row"
|
||||
:msjWarning="`¿Estás segur@ de querer eliminar esta hora excepción?`"
|
||||
/>
|
||||
</b-table-column>
|
||||
</b-table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BotonEliminar from '@/components/botones/BotonEliminar'
|
||||
|
||||
export default {
|
||||
components: { BotonEliminar },
|
||||
props: {
|
||||
data: { type: Array, required: true, default: () => [] },
|
||||
obtenerHorasExcepcion: {
|
||||
type: Function,
|
||||
required: true,
|
||||
default: () => {},
|
||||
},
|
||||
isLoadingTable: { type: Boolean, required: true, default: false },
|
||||
},
|
||||
methods: {
|
||||
eliminarHoraExcepcion() {
|
||||
const data = {
|
||||
id_hora_excepcion: this.id_hora_excepcion,
|
||||
}
|
||||
|
||||
this.updateActualizarTabla(true)
|
||||
axios
|
||||
.delete(
|
||||
`${process.env.api}/hora-excepcion`,
|
||||
this.$getToken.tokenDelete(data)
|
||||
)
|
||||
.then((res) => {
|
||||
this.obtenerHorasExcepcion()
|
||||
this.updateActualizarTabla(false)
|
||||
this.$alertsGenericos.imprimirMensaje(this.$buefy, res.data.message)
|
||||
})
|
||||
.catch((err) => {
|
||||
this.updateActualizarTabla(false)
|
||||
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data)
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
51
components/tablas/TablaInfracciones.vue
Normal file
51
components/tablas/TablaInfracciones.vue
Normal file
@ -0,0 +1,51 @@
|
||||
<template>
|
||||
<b-table
|
||||
class="mb-6"
|
||||
:data="data"
|
||||
:loading="isLoadingTable"
|
||||
hoverable
|
||||
striped
|
||||
>
|
||||
<b-table-column
|
||||
field="infraccion"
|
||||
label="Infracción"
|
||||
v-slot="props"
|
||||
centered
|
||||
>
|
||||
<p>{{ props.row.infraccion.infraccion }}</p>
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column
|
||||
field="diasMulta"
|
||||
label="Días de multa"
|
||||
v-slot="props"
|
||||
centered
|
||||
>
|
||||
<b-field>
|
||||
<b-input
|
||||
type="number"
|
||||
v-model="props.row.dias_multa"
|
||||
:disabled="
|
||||
idInstitucionInfraccion != props.row.id_institucion_infraccion
|
||||
"
|
||||
/>
|
||||
</b-field>
|
||||
</b-table-column>
|
||||
</b-table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
components: {},
|
||||
props: {
|
||||
data: { type: Array, required: true, default: () => [] },
|
||||
isLoadingTable: { type: Boolean, required: true, default: false },
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {},
|
||||
watch: {},
|
||||
created() {},
|
||||
}
|
||||
</script>
|
35
components/tablas/TablaInstituciones.vue
Normal file
35
components/tablas/TablaInstituciones.vue
Normal file
@ -0,0 +1,35 @@
|
||||
<template>
|
||||
<b-table
|
||||
class="mb-6"
|
||||
:current-page="page"
|
||||
:data="data"
|
||||
:loading="isLoadingTable"
|
||||
:per-page="25"
|
||||
:total="total"
|
||||
@page-change="onPageChange"
|
||||
backend-pagination
|
||||
hoverable
|
||||
paginated
|
||||
striped
|
||||
>
|
||||
</b-table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
components: {},
|
||||
props: {
|
||||
data: { type: Array, required: true, default: () => [] },
|
||||
isLoadingTable: { type: Boolean, required: true, default: false },
|
||||
onPageChange: { type: Function, required: true, default: () => {} },
|
||||
total: { type: Number, required: true, default: 0 },
|
||||
page: { type: Number, required: true, default: 0 },
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {},
|
||||
watch: {},
|
||||
created() {},
|
||||
}
|
||||
</script>
|
65
components/tablas/TablaModulos.vue
Normal file
65
components/tablas/TablaModulos.vue
Normal file
@ -0,0 +1,65 @@
|
||||
<template>
|
||||
<b-table
|
||||
class="mb-6"
|
||||
:current-page="page"
|
||||
:data="modulos"
|
||||
:loading="isLoadingTable"
|
||||
:per-page="25"
|
||||
:row-class="(row, index) => 'pointer'"
|
||||
:selected.sync="moduloSeleccionado"
|
||||
:total="total"
|
||||
@page-change="onPageChange"
|
||||
backend-pagination
|
||||
detailed
|
||||
hoverable
|
||||
paginated
|
||||
show-detail-icon
|
||||
striped
|
||||
>
|
||||
<b-table-column field="modulo" label="Módulo" v-slot="props" centered>
|
||||
<p>{{ props.row.modulo }}</p>
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column field="activo" label="Activo" v-slot="props" centered>
|
||||
<p class="is-size-6 tag" :class="chooseTag(props.row.activo)">
|
||||
{{ props.row.activo ? 'Activo' : 'Inactivo' }}
|
||||
</p>
|
||||
</b-table-column>
|
||||
|
||||
<template #detail="props">
|
||||
<CarritosModulo :modulo="props.row" />
|
||||
</template>
|
||||
</b-table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CarritosModulo from '@/components/tablas/CarritosModulo'
|
||||
|
||||
export default {
|
||||
components: { CarritosModulo },
|
||||
props: {
|
||||
modulos: { type: Array, required: true, default: () => [] },
|
||||
isLoadingTable: { type: Boolean, required: true, default: false },
|
||||
onPageChange: { type: Function, required: true, default: () => {} },
|
||||
page: { type: Number, required: true, default: 1 },
|
||||
total: { type: Number, required: true, default: 0 },
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
moduloSeleccionado: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
chooseTag(activo) {
|
||||
return activo ? 'is-success' : 'is-danger'
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
moduloSeleccionado() {
|
||||
this.$router.push(
|
||||
`/admin/modulos/buscar_modulo/${this.moduloSeleccionado.id_modulo}`
|
||||
)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
65
components/tablas/TablaMotivos.vue
Normal file
65
components/tablas/TablaMotivos.vue
Normal file
@ -0,0 +1,65 @@
|
||||
<template>
|
||||
<b-table
|
||||
class="mb-6"
|
||||
:current-page="page"
|
||||
:data="data"
|
||||
:loading="isLoadingTable"
|
||||
:per-page="25"
|
||||
:total="total"
|
||||
@page-change="onPageChange"
|
||||
backend-pagination
|
||||
hoverable
|
||||
paginated
|
||||
striped
|
||||
>
|
||||
<b-table-column
|
||||
field="fecha_creacion"
|
||||
label="Fecha reporte"
|
||||
v-slot="props"
|
||||
centered
|
||||
>
|
||||
<p>{{ fechaHora(props.row.fecha_creacion) }}</p>
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column field="motivo" label="Motivo" v-slot="props" centered>
|
||||
<p>{{ props.row.motivo }}</p>
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column
|
||||
field="operador"
|
||||
label="Operador que cambio el status"
|
||||
v-slot="props"
|
||||
centered
|
||||
>
|
||||
<p>{{ props.row.operador.operador }}</p>
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column
|
||||
field="status"
|
||||
label="Status al que se cambió"
|
||||
v-slot="props"
|
||||
centered
|
||||
>
|
||||
<p>{{ props.row.status.status }}</p>
|
||||
</b-table-column>
|
||||
</b-table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import moment from 'moment'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
data: { type: Array, required: true, default: () => [] },
|
||||
isLoadingTable: { type: Boolean, required: true, default: false },
|
||||
onPageChange: { type: Function, required: true, default: () => {} },
|
||||
page: { type: Number, required: true, default: 0 },
|
||||
total: { type: Number, required: true, default: 0 },
|
||||
},
|
||||
methods: {
|
||||
fechaHora(date) {
|
||||
return moment(date).format('YYYY-MM-DD HH:MM')
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
35
components/tablas/TablaOperadores.vue
Normal file
35
components/tablas/TablaOperadores.vue
Normal file
@ -0,0 +1,35 @@
|
||||
<template>
|
||||
<b-table
|
||||
class="mb-6"
|
||||
:current-page="page"
|
||||
:data="data"
|
||||
:loading="isLoadingTable"
|
||||
:per-page="25"
|
||||
:total="total"
|
||||
@page-change="onPageChange"
|
||||
backend-pagination
|
||||
hoverable
|
||||
paginated
|
||||
striped
|
||||
>
|
||||
</b-table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
components: {},
|
||||
props: {
|
||||
data: { type: Array, required: true, default: () => [] },
|
||||
isLoadingTable: { type: Boolean, required: true, default: false },
|
||||
onPageChange: { type: Function, required: true, default: () => {} },
|
||||
total: { type: Number, required: true, default: 0 },
|
||||
page: { type: Number, required: true, default: 0 },
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {},
|
||||
watch: {},
|
||||
created() {},
|
||||
}
|
||||
</script>
|
35
components/tablas/TablaPrestamos.vue
Normal file
35
components/tablas/TablaPrestamos.vue
Normal file
@ -0,0 +1,35 @@
|
||||
<template>
|
||||
<b-table
|
||||
class="mb-6"
|
||||
:current-page="page"
|
||||
:data="data"
|
||||
:loading="isLoadingTable"
|
||||
:per-page="25"
|
||||
:total="total"
|
||||
@page-change="onPageChange"
|
||||
backend-pagination
|
||||
hoverable
|
||||
paginated
|
||||
striped
|
||||
>
|
||||
</b-table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
components: {},
|
||||
props: {
|
||||
data: { type: Array, required: true, default: () => [] },
|
||||
isLoadingTable: { type: Boolean, required: true, default: false },
|
||||
onPageChange: { type: Function, required: true, default: () => {} },
|
||||
total: { type: Number, required: true, default: 0 },
|
||||
page: { type: Number, required: true, default: 0 },
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {},
|
||||
watch: {},
|
||||
created() {},
|
||||
}
|
||||
</script>
|
72
components/tablas/TablaProgramas.vue
Normal file
72
components/tablas/TablaProgramas.vue
Normal file
@ -0,0 +1,72 @@
|
||||
<template>
|
||||
<b-table
|
||||
class="mb-6"
|
||||
:data="data"
|
||||
:loading="isLoadingTable"
|
||||
:per-page="25"
|
||||
:total="total"
|
||||
hoverable
|
||||
paginated
|
||||
striped
|
||||
>
|
||||
<b-table-column field="programa" label="Software" v-slot="props" centered>
|
||||
<p>
|
||||
{{ props.row.programa.programa }}
|
||||
</p>
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column field="activo" label="Status" v-slot="props" centered>
|
||||
<BotonDesactivar
|
||||
:activarDesactivar="activarDesactivar"
|
||||
:data="props.row"
|
||||
:msjWarning="`¿Estás segur@ de querer ${
|
||||
row.activo || row.mostrar ? 'desactivar' : 'activar'
|
||||
} este tipo de software?`"
|
||||
/>
|
||||
</b-table-column>
|
||||
</b-table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BotonDesactivar from '@/components/botones/BotonDesactivar'
|
||||
|
||||
export default {
|
||||
components: { BotonDesactivar },
|
||||
props: {
|
||||
data: { type: Array, required: true, default: () => [] },
|
||||
isLoadingTable: { type: Boolean, required: true, default: false },
|
||||
obtenerProgramas: {
|
||||
type: Function,
|
||||
required: true,
|
||||
default: () => {},
|
||||
},
|
||||
updateIsLoading: { type: Function, required: true, default: () => {} },
|
||||
total: { type: Number, required: true, default: 0 },
|
||||
},
|
||||
methods: {
|
||||
activarDesactivar(institucionPrograma) {
|
||||
const data = {
|
||||
id_institucion_programa: institucionPrograma.id_institucion_programa,
|
||||
mostrar: !institucionPrograma.mostrar,
|
||||
}
|
||||
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.put(
|
||||
`${process.env.api}/institucion-programa/`,
|
||||
data,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.obtenerProgramas()
|
||||
this.updateIsLoading(false)
|
||||
this.$alertsGenericos.imprimirMensaje(this.$buefy, res.data.message)
|
||||
})
|
||||
.catch((err) => {
|
||||
this.updateIsLoading(false)
|
||||
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data)
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
76
components/tablas/TablaTiposCarritos.vue
Normal file
76
components/tablas/TablaTiposCarritos.vue
Normal file
@ -0,0 +1,76 @@
|
||||
<template>
|
||||
<b-table
|
||||
class="mb-6"
|
||||
:data="data"
|
||||
:loading="isLoadingTable"
|
||||
:per-page="25"
|
||||
:total="total"
|
||||
hoverable
|
||||
paginated
|
||||
striped
|
||||
>
|
||||
<b-table-column
|
||||
field="tipoCarrito"
|
||||
label="Tipo de carrito"
|
||||
v-slot="props"
|
||||
centered
|
||||
>
|
||||
<p>{{ props.row.tipoCarrito.tipo_carrito }}</p>
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column field="activo" label="Status" v-slot="props" centered>
|
||||
<BotonDesactivar
|
||||
:activarDesactivar="activarDesactivar"
|
||||
:data="props.row"
|
||||
:msjWarning="`¿Estás segur@ de querer ${
|
||||
row.activo || row.mostrar ? 'desactivar' : 'activar'
|
||||
} este tipo de carrito?`"
|
||||
/>
|
||||
</b-table-column>
|
||||
</b-table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BotonDesactivar from '@/components/botones/BotonDesactivar'
|
||||
|
||||
export default {
|
||||
components: { BotonDesactivar },
|
||||
props: {
|
||||
data: { type: Array, required: true, default: () => [] },
|
||||
isLoadingTable: { type: Boolean, required: true, default: false },
|
||||
obtenerTiposCarritos: {
|
||||
type: Function,
|
||||
required: true,
|
||||
default: () => {},
|
||||
},
|
||||
updateIsLoading: { type: Function, required: true, default: () => {} },
|
||||
total: { type: Number, required: true, default: 0 },
|
||||
},
|
||||
methods: {
|
||||
activarDesactivar(institucionTipoCarrito) {
|
||||
const data = {
|
||||
id_institucion_tipo_carrito:
|
||||
institucionTipoCarrito.id_institucion_tipo_carrito,
|
||||
mostrar: !institucionTipoCarrito.mostrar,
|
||||
}
|
||||
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.put(
|
||||
`${process.env.api}/institucion-tipo-carrito/`,
|
||||
data,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.obtenerTiposCarritos()
|
||||
this.updateIsLoading(false)
|
||||
this.$alertsGenericos.imprimirMensaje(this.$buefy, res.data.message)
|
||||
})
|
||||
.catch((err) => {
|
||||
this.updateIsLoading(false)
|
||||
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data)
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
78
components/tablas/TablaTiposEntradas.vue
Normal file
78
components/tablas/TablaTiposEntradas.vue
Normal file
@ -0,0 +1,78 @@
|
||||
<template>
|
||||
<b-table
|
||||
class="mb-6"
|
||||
:data="data"
|
||||
:loading="isLoadingTable"
|
||||
:per-page="25"
|
||||
:total="total"
|
||||
hoverable
|
||||
paginated
|
||||
striped
|
||||
>
|
||||
<b-table-column
|
||||
field="tipoEntrada"
|
||||
label="Tipo de conector"
|
||||
v-slot="props"
|
||||
centered
|
||||
>
|
||||
<p>
|
||||
{{ props.row.tipoEntrada.tipo_entrada }}
|
||||
</p>
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column field="activo" label="Status" v-slot="props" centered>
|
||||
<BotonDesactivar
|
||||
:activarDesactivar="activarDesactivar"
|
||||
:data="props.row"
|
||||
:msjWarning="`¿Estás segur@ de querer ${
|
||||
row.activo || row.mostrar ? 'desactivar' : 'activar'
|
||||
} este tipo de conector?`"
|
||||
/>
|
||||
</b-table-column>
|
||||
</b-table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BotonDesactivar from '@/components/botones/BotonDesactivar'
|
||||
|
||||
export default {
|
||||
components: { BotonDesactivar },
|
||||
props: {
|
||||
data: { type: Array, required: true, default: () => [] },
|
||||
isLoadingTable: { type: Boolean, required: true, default: false },
|
||||
obtenerTiposEntradas: {
|
||||
type: Function,
|
||||
required: true,
|
||||
default: () => {},
|
||||
},
|
||||
updateIsLoading: { type: Function, required: true, default: () => {} },
|
||||
total: { type: Number, required: true, default: 0 },
|
||||
},
|
||||
methods: {
|
||||
activarDesactivar(institucionTipoEntrada) {
|
||||
const data = {
|
||||
id_institucion_tipo_entrada:
|
||||
institucionTipoEntrada.id_institucion_tipo_entrada,
|
||||
mostrar: !institucionTipoEntrada.mostrar,
|
||||
}
|
||||
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.put(
|
||||
`${process.env.api}/institucion-tipo-entrada/`,
|
||||
data,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.obtenerTiposEntradas()
|
||||
this.updateIsLoading(false)
|
||||
this.$alertsGenericos.imprimirMensaje(this.$buefy, res.data.message)
|
||||
})
|
||||
.catch((err) => {
|
||||
this.updateIsLoading(false)
|
||||
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data)
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
36
components/tablas/TablaUsuarios.vue
Normal file
36
components/tablas/TablaUsuarios.vue
Normal file
@ -0,0 +1,36 @@
|
||||
<template>
|
||||
<b-table
|
||||
class="mb-6"
|
||||
:current-page="page"
|
||||
:data="data"
|
||||
:loading="isLoadingTable"
|
||||
:per-page="25"
|
||||
:row-class="(row, index) => pintarFila(row)"
|
||||
:total="total"
|
||||
@page-change="onPageChange"
|
||||
backend-pagination
|
||||
hoverable
|
||||
paginated
|
||||
striped
|
||||
>
|
||||
</b-table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
components: {},
|
||||
props: {
|
||||
data: { type: Array, required: true, default: () => [] },
|
||||
isLoadingTable: { type: Boolean, required: true, default: false },
|
||||
onPageChange: { type: Function, required: true, default: () => {} },
|
||||
total: { type: Number, required: true, default: 0 },
|
||||
page: { type: Number, required: true, default: 0 },
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {},
|
||||
watch: {},
|
||||
created() {},
|
||||
}
|
||||
</script>
|
@ -44,13 +44,13 @@ export default {
|
||||
updateIsLoading(valorBooleano) {
|
||||
this.isLoading = valorBooleano
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
localStorageData() {
|
||||
const objeto = JSON.parse(localStorage.getItem('usuario'))
|
||||
this.admin = objeto.operador
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
this.localStorageData()
|
||||
if (this.admin.tipoUsuario.id_tipo_usuario != 2)
|
||||
this.$router.push('/operador/prestamo_devolucion')
|
||||
},
|
||||
|
@ -49,11 +49,11 @@ export default {
|
||||
updateIsLoading(valorBooleano) {
|
||||
this.isLoading = valorBooleano
|
||||
},
|
||||
// getLocalhostInfo() {
|
||||
// localStorageData() {
|
||||
// const objeto = JSON.parse(localStorage.getItem('usuario'))
|
||||
// this.admin = objeto.operador
|
||||
// },
|
||||
getLocalhostInfo() {
|
||||
localStorageData() {
|
||||
const objeto = JSON.parse(localStorage.getItem('usuario'))
|
||||
this.admin.idOperador = objeto.operador.id_operador
|
||||
this.admin.operador = objeto.operador
|
||||
@ -69,7 +69,7 @@ export default {
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
this.localStorageData()
|
||||
this.path = `upload-file/carga-masiva-equipos?id_institucion=${this.admin.idInstitucion}`
|
||||
if (
|
||||
// this.admin.tipoUsuario.id_tipo_usuario != 2 &&
|
||||
|
@ -51,7 +51,7 @@ export default {
|
||||
updateIsLoading(valorBooleano) {
|
||||
this.isLoading = valorBooleano
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
localStorageData() {
|
||||
const objeto = JSON.parse(localStorage.getItem('usuario'))
|
||||
this.admin.idOperador = objeto.operador.id_operador
|
||||
this.admin.operador = objeto.operador
|
||||
@ -61,7 +61,7 @@ export default {
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
this.localStorageData()
|
||||
this.path = `upload-file/carga-masiva-usuarios?id_institucion=${this.admin.idInstitucion}`
|
||||
if (this.admin.idTipoUsuario != 2 && this.admin.idTipoUsuario != 3)
|
||||
this.$router.push('/operador/prestamo_devolucion')
|
||||
|
@ -45,13 +45,13 @@ export default {
|
||||
updateIsLoading(valorBooleano) {
|
||||
this.isLoading = valorBooleano
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
localStorageData() {
|
||||
const objeto = JSON.parse(localStorage.getItem('usuario'))
|
||||
this.admin = objeto.operador
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
this.localStorageData()
|
||||
if (this.admin.tipoUsuario.id_tipo_usuario != 3)
|
||||
this.$router.push('/operador/prestamo_devolucion')
|
||||
},
|
||||
|
@ -24,14 +24,14 @@ export default {
|
||||
updateIsLoading(valorBooleano) {
|
||||
this.isLoading = valorBooleano
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
localStorageData() {
|
||||
const objeto = JSON.parse(localStorage.getItem('usuario'))
|
||||
|
||||
this.admin = objeto.operador
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
this.localStorageData()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
@ -36,13 +36,13 @@ export default {
|
||||
updateIsLoading(valorBooleano) {
|
||||
this.isLoading = valorBooleano
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
localStorageData() {
|
||||
const objeto = JSON.parse(localStorage.getItem('usuario'))
|
||||
this.admin = objeto.operador
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
this.localStorageData()
|
||||
if (this.admin.tipoUsuario.id_tipo_usuario != 3)
|
||||
this.$router.push('/operador/prestamo_devolucion')
|
||||
},
|
||||
|
@ -27,13 +27,13 @@ export default {
|
||||
updateIsLoading(valorBooleano) {
|
||||
this.isLoading = valorBooleano
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
localStorageData() {
|
||||
const objeto = JSON.parse(localStorage.getItem('usuario'))
|
||||
this.admin = objeto.operador
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
this.localStorageData()
|
||||
if (this.admin.tipoUsuario.id_tipo_usuario != 3)
|
||||
this.$router.push('/operador/prestamo_devolucion')
|
||||
},
|
||||
|
@ -26,13 +26,13 @@ export default {
|
||||
updateIsLoading(valorBooleano) {
|
||||
this.isLoading = valorBooleano
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
localStorageData() {
|
||||
const objeto = JSON.parse(localStorage.getItem('usuario'))
|
||||
this.admin = objeto.operador
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
this.localStorageData()
|
||||
if (this.admin.tipoUsuario.id_tipo_usuario != 3)
|
||||
this.$router.push('/operador/prestamo_devolucion')
|
||||
},
|
||||
|
@ -27,13 +27,13 @@ export default {
|
||||
updateIsLoading(valorBooleano) {
|
||||
this.isLoading = valorBooleano
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
localStorageData() {
|
||||
const objeto = JSON.parse(localStorage.getItem('usuario'))
|
||||
this.admin = objeto.operador
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
this.localStorageData()
|
||||
if (this.admin.tipoUsuario.id_tipo_usuario != 3)
|
||||
this.$router.push('/operador/prestamo_devolucion')
|
||||
},
|
||||
|
@ -26,13 +26,13 @@ export default {
|
||||
updateIsLoading(valorBooleano) {
|
||||
this.isLoading = valorBooleano
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
localStorageData() {
|
||||
const objeto = JSON.parse(localStorage.getItem('usuario'))
|
||||
this.admin = objeto.operador
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
this.localStorageData()
|
||||
if (this.admin.tipoUsuario.id_tipo_usuario != 3)
|
||||
this.$router.push('/operador/prestamo_devolucion')
|
||||
},
|
||||
|
@ -34,13 +34,13 @@ export default {
|
||||
updateIsLoading(valorBooleano) {
|
||||
this.isLoading = valorBooleano
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
localStorageData() {
|
||||
const objeto = JSON.parse(localStorage.getItem('usuario'))
|
||||
this.admin = objeto.operador
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
this.localStorageData()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
@ -27,13 +27,13 @@ export default {
|
||||
updateIsLoading(valorBooleano) {
|
||||
this.isLoading = valorBooleano
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
localStorageData() {
|
||||
const objeto = JSON.parse(localStorage.getItem('usuario'))
|
||||
this.admin = objeto.operador
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
this.localStorageData()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
@ -21,7 +21,7 @@ export default {
|
||||
updateIsLoading(booleanValue) {
|
||||
this.isLoading = booleanValue
|
||||
},
|
||||
// getLocalhostInfo() {
|
||||
// localStorageData() {
|
||||
// this.admin.idUsuario = Number(localStorage.getItem('idUsuario'))
|
||||
// this.admin.idTipoUsuario = Number(localStorage.getItem('idTipoUsuario'))
|
||||
// this.admin.tipoUsuario = localStorage.getItem('tipoUsuario')
|
||||
@ -33,7 +33,7 @@ export default {
|
||||
// },
|
||||
},
|
||||
created() {
|
||||
// this.getLocalhostInfo()
|
||||
// this.localStorageData()
|
||||
// if (this.admin.idTipoUsuario === 2) this.$router.push('/responsable')
|
||||
// if (this.admin.idTipoUsuario === 3) this.$router.push('/alumno')
|
||||
// if (this.admin.idTipoUsuario === 4) this.$router.push('/casoEspecial')
|
||||
|
@ -27,13 +27,13 @@ export default {
|
||||
updateIsLoading(valorBooleano) {
|
||||
this.isLoading = valorBooleano
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
localStorageData() {
|
||||
const objeto = JSON.parse(localStorage.getItem('usuario'))
|
||||
this.admin = objeto.operador
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
this.localStorageData()
|
||||
if (
|
||||
this.admin.tipoUsuario.id_tipo_usuario != 2 &&
|
||||
this.admin.tipoUsuario.id_tipo_usuario != 3
|
||||
|
@ -49,13 +49,13 @@ export default {
|
||||
updateIsLoading(valorBooleano) {
|
||||
this.isLoading = valorBooleano
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
localStorageData() {
|
||||
const objeto = JSON.parse(localStorage.getItem('usuario'))
|
||||
this.admin = objeto.operador
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
this.localStorageData()
|
||||
if (
|
||||
this.admin.tipoUsuario.id_tipo_usuario != 2 &&
|
||||
this.admin.tipoUsuario.id_tipo_usuario != 3
|
||||
|
@ -44,13 +44,13 @@ export default {
|
||||
updateIsLoading(valorBooleano) {
|
||||
this.isLoading = valorBooleano
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
localStorageData() {
|
||||
const objeto = JSON.parse(localStorage.getItem('usuario'))
|
||||
this.admin = objeto.operador
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
this.localStorageData()
|
||||
if (
|
||||
this.admin.tipoUsuario.id_tipo_usuario != 2 &&
|
||||
this.admin.tipoUsuario.id_tipo_usuario != 3
|
||||
|
@ -41,13 +41,13 @@ export default {
|
||||
updateIsLoading(valorBooleano) {
|
||||
this.isLoading = valorBooleano
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
localStorageData() {
|
||||
const objeto = JSON.parse(localStorage.getItem('usuario'))
|
||||
this.admin = objeto.operador
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
this.localStorageData()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
@ -21,7 +21,7 @@ export default {
|
||||
updateIsLoading(booleanValue) {
|
||||
this.isLoading = booleanValue
|
||||
},
|
||||
// getLocalhostInfo() {
|
||||
// localStorageData() {
|
||||
// this.admin.idUsuario = Number(localStorage.getItem('idUsuario'))
|
||||
// this.admin.idTipoUsuario = Number(localStorage.getItem('idTipoUsuario'))
|
||||
// this.admin.tipoUsuario = localStorage.getItem('tipoUsuario')
|
||||
@ -33,7 +33,7 @@ export default {
|
||||
// },
|
||||
},
|
||||
created() {
|
||||
// this.getLocalhostInfo()
|
||||
// this.localStorageData()
|
||||
// if (this.admin.idTipoUsuario === 2) this.$router.push('/responsable')
|
||||
// if (this.admin.idTipoUsuario === 3) this.$router.push('/alumno')
|
||||
// if (this.admin.idTipoUsuario === 4) this.$router.push('/casoEspecial')
|
||||
|
@ -24,13 +24,13 @@ export default {
|
||||
updateIsLoading(valorBooleano) {
|
||||
this.isLoading = valorBooleano
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
localStorageData() {
|
||||
const objeto = JSON.parse(localStorage.getItem('usuario'))
|
||||
this.operador = objeto.operador
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
this.localStorageData()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<Title title="Todos los carritos" :operador="operador" />
|
||||
|
||||
<CrearCarrito
|
||||
:institucion="operador.institucion"
|
||||
:updateActualizarTabla="updateActualizarTabla"
|
||||
@ -42,13 +43,13 @@ export default {
|
||||
updateIsLoading(valorBooleano) {
|
||||
this.isLoading = valorBooleano
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
localStorageData() {
|
||||
const objeto = JSON.parse(localStorage.getItem('usuario'))
|
||||
this.operador = objeto.operador
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
this.localStorageData()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
@ -27,13 +27,13 @@ export default {
|
||||
updateIsLoading(valorBooleano) {
|
||||
this.isLoading = valorBooleano
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
localStorageData() {
|
||||
const objeto = JSON.parse(localStorage.getItem('usuario'))
|
||||
this.operador = objeto.operador
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
this.localStorageData()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
@ -21,13 +21,13 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getLocalhostInfo() {
|
||||
localStorageData() {
|
||||
const objeto = JSON.parse(localStorage.getItem('usuario'))
|
||||
this.operador = objeto.operador
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
this.localStorageData()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
@ -27,13 +27,13 @@ export default {
|
||||
updateIsLoading(valorBooleano) {
|
||||
this.isLoading = valorBooleano
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
localStorageData() {
|
||||
const objeto = JSON.parse(localStorage.getItem('usuario'))
|
||||
this.operador = objeto.operador
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
this.localStorageData()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
@ -33,13 +33,13 @@ export default {
|
||||
updateIsLoading(valorBooleano) {
|
||||
this.isLoading = valorBooleano
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
localStorageData() {
|
||||
const objeto = JSON.parse(localStorage.getItem('usuario'))
|
||||
this.operador = objeto.operador
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
this.localStorageData()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
@ -25,13 +25,13 @@ export default {
|
||||
updateIsLoading(valorBooleano) {
|
||||
this.isLoading = valorBooleano
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
localStorageData() {
|
||||
const objeto = JSON.parse(localStorage.getItem('usuario'))
|
||||
this.operador = objeto.operador
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
this.localStorageData()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
@ -21,13 +21,13 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getLocalhostInfo() {
|
||||
localStorageData() {
|
||||
const objeto = JSON.parse(localStorage.getItem('usuario'))
|
||||
this.operador = objeto.operador
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
this.localStorageData()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
@ -21,13 +21,13 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getLocalhostInfo() {
|
||||
localStorageData() {
|
||||
const objeto = JSON.parse(localStorage.getItem('usuario'))
|
||||
this.operador = objeto.operador
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
this.localStorageData()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user