tokens
This commit is contained in:
parent
6aafb2df1b
commit
55d86cf7e6
@ -39,7 +39,7 @@ export default {
|
||||
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.put(`${process.env.api}/operador`, data)
|
||||
.put(`${process.env.api}/operador`, data, this.$getToken.token())
|
||||
.then((res) => {
|
||||
this.updateIsLoading(false)
|
||||
this.$alertsGenericos.imprimirMensaje(this.$buefy, res.data.message)
|
||||
|
@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<div class="column is-4">
|
||||
<h3 class="is-size-4 mb-4">Alta del administrador</h3>
|
||||
<h3 class="is-size-4 mb-4">Alta del responsable de Pc Puma</h3>
|
||||
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<b-field
|
||||
label="Responsable"
|
||||
label="Nombre"
|
||||
v-show="admin.tipoUsuario.id_tipo_usuario === 2"
|
||||
>
|
||||
<b-input
|
||||
@ -31,7 +31,7 @@
|
||||
</b-field>
|
||||
|
||||
<b-field
|
||||
label="Telefono"
|
||||
label="Teléfono"
|
||||
v-show="admin.tipoUsuario.id_tipo_usuario === 2"
|
||||
>
|
||||
<b-input
|
||||
@ -190,7 +190,7 @@ export default {
|
||||
if (this.tiempoEntrega) this.data.tiempo_entrega = this.tiempoEntrega
|
||||
if (this.tiempoPrestamo) this.data.tiempo_prestamo = this.tiempoPrestamo
|
||||
axios
|
||||
.put(`${process.env.api}/institucion`, data)
|
||||
.put(`${process.env.api}/institucion`, data, this.$getToken.token())
|
||||
.then((res) => {
|
||||
if (this.correo) this.correo = ''
|
||||
if (this.responsable) this.responsable = ''
|
||||
|
@ -66,7 +66,7 @@ export default {
|
||||
}
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.put(`${process.env.api}/modulo`, data)
|
||||
.put(`${process.env.api}/modulo`, data, this.$getToken.token())
|
||||
.then((res) => {
|
||||
this.buscar()
|
||||
this.updateIsLoading(false)
|
||||
|
@ -99,7 +99,8 @@ export default {
|
||||
.get(
|
||||
`${process.env.api}/modulo/modulo?id_modulo=${
|
||||
this.idModulo || this.modulo.id_modulo
|
||||
}`
|
||||
}`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.updateModulo(res.data)
|
||||
@ -114,7 +115,7 @@ export default {
|
||||
},
|
||||
obtenerCatalogoInstitucion() {
|
||||
axios
|
||||
.get(`${process.env.api}/institucion/activas`)
|
||||
.get(`${process.env.api}/institucion/activas`, this.$getToken.token())
|
||||
.then((res) => {
|
||||
this.instituciones = res.data
|
||||
})
|
||||
@ -125,7 +126,8 @@ export default {
|
||||
obtenerCatalogoModulo(id_institucion) {
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/modulo/modulos?id_institucion=${id_institucion}`
|
||||
`${process.env.api}/modulo/modulos?id_institucion=${id_institucion}`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.modulos = res.data
|
||||
|
@ -42,7 +42,11 @@
|
||||
<b-field>
|
||||
<b-upload v-model="logo" drag-drop expanded accept=".png,.jpeg,.jpg">
|
||||
<section
|
||||
class="section is-flex is-align-items-center is-justify-content-center drag-drop"
|
||||
class="
|
||||
section
|
||||
is-flex is-align-items-center is-justify-content-center
|
||||
drag-drop
|
||||
"
|
||||
>
|
||||
<div class="content has-text-centered">
|
||||
<p>
|
||||
@ -96,7 +100,7 @@ export default {
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/institucion/institucion?id_institucion=${this.admin.institucion.id_institucion}`,
|
||||
this.token
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.dominio = res.data.dominio
|
||||
@ -117,7 +121,7 @@ export default {
|
||||
}
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.put(`${process.env.api}/institucion`, data)
|
||||
.put(`${process.env.api}/institucion`, data, this.$getToken.token())
|
||||
.then((res) => {
|
||||
this.updateIsLoading(false)
|
||||
this.$alertsGenericos.imprimirMensaje(this.$buefy, res.data.message)
|
||||
@ -135,7 +139,8 @@ export default {
|
||||
axios
|
||||
.post(
|
||||
`${process.env.api}/upload-file/upload-logo?id_institucion=${this.admin.institucion.id_institucion}`,
|
||||
formData
|
||||
formData,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.dropFiles = []
|
||||
|
@ -114,9 +114,12 @@ export default {
|
||||
operador: this.operador,
|
||||
}
|
||||
|
||||
console.log('Hola')
|
||||
console.log(data)
|
||||
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.post(`${process.env.api}/operador`, data)
|
||||
.post(`${process.env.api}/operador`, data, this.$getToken.token())
|
||||
.then((res) => {
|
||||
this.idInstitucion = 0
|
||||
this.operador = ''
|
||||
|
@ -76,7 +76,11 @@ export default {
|
||||
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.post(`${process.env.api}/carrera-programa`, data)
|
||||
.post(
|
||||
`${process.env.api}/carrera-programa`,
|
||||
data,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.idInstitucionCarrera = ''
|
||||
this.idPrograma = ''
|
||||
@ -93,7 +97,8 @@ export default {
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/institucion-carrera?id_institucion=${this.admin.institucion.id_institucion}`
|
||||
`${process.env.api}/institucion-carrera?id_institucion=${this.admin.institucion.id_institucion}`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.carreras = res.data
|
||||
@ -106,7 +111,7 @@ export default {
|
||||
},
|
||||
obtenerProgramas() {
|
||||
return axios
|
||||
.get(`${process.env.api}/institucion-programa`)
|
||||
.get(`${process.env.api}/institucion-programa`, this.$getToken.token())
|
||||
.then((res) => {
|
||||
this.programas = res.data
|
||||
this.updateIsLoading(false)
|
||||
|
@ -56,7 +56,11 @@ export default {
|
||||
}
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.post(`${process.env.api}/institucion-infraccion/`, data)
|
||||
.post(
|
||||
`${process.env.api}/institucion-infraccion/`,
|
||||
data,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.updateIsLoading(false)
|
||||
this.$alertsGenericos.imprimirMensaje(this.$buefy, res.data.message)
|
||||
|
@ -56,7 +56,11 @@ export default {
|
||||
}
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.post(`${process.env.api}/institucion-programa/`, data)
|
||||
.post(
|
||||
`${process.env.api}/institucion-programa/`,
|
||||
data,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.updateIsLoading(false)
|
||||
this.$alertsGenericos.imprimirMensaje(this.$buefy, res.data.message)
|
||||
|
@ -61,7 +61,7 @@ export default {
|
||||
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.post(`${process.env.api}/modulo`, data)
|
||||
.post(`${process.env.api}/modulo`, data, this.$getToken.token())
|
||||
.then((res) => {
|
||||
this.nombreModulo = ''
|
||||
this.updateIsLoading(false)
|
||||
|
@ -125,7 +125,7 @@ export default {
|
||||
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.post(`${process.env.api}/operador`, data)
|
||||
.post(`${process.env.api}/operador`, data, this.$getToken.token())
|
||||
.then((res) => {
|
||||
this.operador = ''
|
||||
this.password = ''
|
||||
|
@ -76,7 +76,11 @@ export default {
|
||||
}
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.post(`${process.env.api}/institucion-tipo-carrito/`, data)
|
||||
.post(
|
||||
`${process.env.api}/institucion-tipo-carrito/`,
|
||||
data,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.updateIsLoading(false)
|
||||
this.$alertsGenericos.imprimirMensaje(this.$buefy, res.data.message)
|
||||
|
@ -56,7 +56,11 @@ export default {
|
||||
}
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.post(`${process.env.api}/institucion-tipo-entrada/`, data)
|
||||
.post(
|
||||
`${process.env.api}/institucion-tipo-entrada/`,
|
||||
data,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.updateIsLoading(false)
|
||||
this.$alertsGenericos.imprimirMensaje(this.$buefy, res.data.message)
|
||||
|
@ -77,7 +77,7 @@ export default {
|
||||
}
|
||||
// this.updateIsLoading(true)
|
||||
axios
|
||||
.post(`${process.env.api}/hora-excepcion`, data)
|
||||
.post(`${process.env.api}/hora-excepcion`, data, this.$getToken.token())
|
||||
.then((res) => {
|
||||
this.$alertsGenericos.imprimirMensaje(this.$buefy, res.data.message)
|
||||
this.updateActualizarTabla(true)
|
||||
@ -93,7 +93,11 @@ export default {
|
||||
}
|
||||
|
||||
axios
|
||||
.delete(`${process.env.api}/hora-excepcion`, { data })
|
||||
.delete(
|
||||
`${process.env.api}/hora-excepcion`,
|
||||
{ data },
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.$alertsGenericos.imprimirMensaje(
|
||||
this.$buefy,
|
||||
|
@ -12,7 +12,7 @@
|
||||
<p class="input">{{ institucion.responsable || '' }}</p>
|
||||
</b-field>
|
||||
|
||||
<b-field label="Telefono">
|
||||
<b-field label="Teléfono">
|
||||
<p class="input">{{ institucion.telefono || '' }}</p>
|
||||
</b-field>
|
||||
|
||||
@ -55,7 +55,7 @@
|
||||
label="Tiempo de préstamo"
|
||||
v-if="admin.tipoUsuario.id_tipo_usuario === 3"
|
||||
>
|
||||
<p class="input">{{ institucion.tiempo_prestamo }}</p>
|
||||
<p class="input">{{ institucion.tiempo_prestamo }}</p>
|
||||
</b-field>
|
||||
|
||||
<b-field label="Activo/Inactivo">
|
||||
@ -116,7 +116,7 @@ export default {
|
||||
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.put(`${process.env.api}/institucion`, data)
|
||||
.put(`${process.env.api}/institucion`, data, this.$getToken.token())
|
||||
.then((res) => {
|
||||
this.updateIsLoading(false)
|
||||
this.buscar()
|
||||
|
@ -48,7 +48,7 @@ export default {
|
||||
this.updateIsLoading(true)
|
||||
|
||||
axios
|
||||
.put(`${process.env.api}/modulo`, data)
|
||||
.put(`${process.env.api}/modulo`, data, this.$getToken.token())
|
||||
.then((res) => {
|
||||
this.buscar()
|
||||
this.updateIsLoading(false)
|
||||
|
@ -58,7 +58,7 @@ export default {
|
||||
// axios
|
||||
// .get(
|
||||
// `${process.env.api}/admin/reporte?inicio=${this.inicio}&fin=${this.fin}`,
|
||||
// this.token
|
||||
// this.$getToken.token()
|
||||
// )
|
||||
// .then((res) => {
|
||||
// fileDownload(res.data, `inscripcionesCEDETEC.csv`)
|
||||
|
@ -65,7 +65,8 @@ export default {
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/institucion/institucion?id_institucion=${this.idInstitucion}`
|
||||
`${process.env.api}/institucion/institucion?id_institucion=${this.idInstitucion}`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.institucion = res.data
|
||||
|
@ -41,7 +41,7 @@ export default {
|
||||
obtenerCatalogoInstitucion() {
|
||||
this.isLoading = true
|
||||
axios
|
||||
.get(`${process.env.api}/institucion` /*, this.token*/)
|
||||
.get(`${process.env.api}/institucion`, this.$getToken.token())
|
||||
.then((res) => {
|
||||
this.instituciones = res.data
|
||||
this.isLoading = false
|
||||
|
@ -56,7 +56,11 @@ export default {
|
||||
}
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.post(`${process.env.api}/auth/login-admin`, data)
|
||||
.post(
|
||||
`${process.env.api}/auth/login-admin`,
|
||||
data,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
const info = JSON.stringify(res.data)
|
||||
localStorage.setItem('usuario', info)
|
||||
@ -74,7 +78,7 @@ export default {
|
||||
},
|
||||
obtenerCatalogoInstitucion() {
|
||||
axios
|
||||
.get(`${process.env.api}/institucion`)
|
||||
.get(`${process.env.api}/institucion`, this.$getToken.token())
|
||||
.then((res) => {
|
||||
this.instituciones = res.data
|
||||
})
|
||||
@ -85,7 +89,8 @@ export default {
|
||||
obtenerCatalogoModulo() {
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/modulo/modulos?id_institucion=${this.idInstitucion}`
|
||||
`${process.env.api}/modulo/modulos?id_institucion=${this.idInstitucion}`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.modulos = res.data
|
||||
@ -106,9 +111,7 @@ export default {
|
||||
this.obtenerCatalogoModulo()
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.obtenerCatalogoInstitucion()
|
||||
},
|
||||
created() {},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -45,7 +45,8 @@ export default {
|
||||
this.isLoadingTable = true
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/carrito/carritos?pagina=1&id_institucion=${this.admin.institucion.id_institucion}&id_modulo=${this.modulo.id_modulo}`
|
||||
`${process.env.api}/carrito/carritos?pagina=1&id_institucion=${this.admin.institucion.id_institucion}&id_modulo=${this.modulo.id_modulo}`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then(async (res) => {
|
||||
this.carritos = res.data[0]
|
||||
|
@ -34,8 +34,8 @@ export default {
|
||||
this.isLoading = true
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/modulo/modulos?id_institucion=${idInstitucion}`
|
||||
// this.token
|
||||
`${process.env.api}/modulo/modulos?id_institucion=${idInstitucion}`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.modulos = res.data
|
||||
|
@ -43,7 +43,7 @@ export default {
|
||||
methods: {
|
||||
obtenerCatalogoInstitucion() {
|
||||
axios
|
||||
.get(`${process.env.api}/institucion/activas`)
|
||||
.get(`${process.env.api}/institucion/activas`, this.$getToken.token())
|
||||
.then((res) => {
|
||||
this.instituciones = res.data
|
||||
})
|
||||
@ -54,7 +54,8 @@ export default {
|
||||
obtenerCatalogoModulo(id_institucion) {
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/modulo/modulos?id_institucion=${id_institucion}`
|
||||
`${process.env.api}/modulo/modulos?id_institucion=${id_institucion}`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.data = res.data
|
||||
|
@ -10,7 +10,11 @@
|
||||
expanded
|
||||
>
|
||||
<section
|
||||
class="section is-flex is-align-items-center is-justify-content-center drag-drop"
|
||||
class="
|
||||
section
|
||||
is-flex is-align-items-center is-justify-content-center
|
||||
drag-drop
|
||||
"
|
||||
>
|
||||
<div class="content has-text-centered">
|
||||
<p>
|
||||
@ -78,7 +82,11 @@ export default {
|
||||
this.updateIsLoading(true)
|
||||
formData.append('csv', this.csv)
|
||||
axios
|
||||
.post(`${process.env.api}/${this.path}`, formData)
|
||||
.post(
|
||||
`${process.env.api}/${this.path}`,
|
||||
formData,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.manejarRespuesta(res.data)
|
||||
|
||||
|
@ -137,7 +137,8 @@ export default {
|
||||
data = `&id_institucion=${this.search.idInstitucion}`
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/operador/operadores?pagina=${this.page}&id_tipo_usuario=3${data}`
|
||||
`${process.env.api}/operador/operadores?pagina=${this.page}&id_tipo_usuario=3${data}`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.data = res.data[0]
|
||||
|
@ -49,9 +49,11 @@ export default {
|
||||
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.delete(`${process.env.api}/carrera-programa`, {
|
||||
data,
|
||||
})
|
||||
.delete(
|
||||
`${process.env.api}/carrera-programa`,
|
||||
{ data },
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.updateIsLoading(false)
|
||||
this.$alertsGenericos.imprimirMensaje(this.$buefy, res.data.message)
|
||||
@ -66,7 +68,8 @@ export default {
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/carrera-programa?id_institucion=${this.admin.institucion.id_institucion}`
|
||||
`${process.env.api}/carrera-programa?id_institucion=${this.admin.institucion.id_institucion}`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.data = res.data
|
||||
|
@ -89,7 +89,11 @@ export default {
|
||||
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.put(`${process.env.api}/institucion-infraccion/`, data)
|
||||
.put(
|
||||
`${process.env.api}/institucion-infraccion/`,
|
||||
data,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.$alertsGenericos.imprimirMensaje(this.$buefy, res.data.message)
|
||||
this.obtenerCatalogoInfracciones()
|
||||
@ -105,7 +109,8 @@ export default {
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/institucion-infraccion/infracciones?id_institucion=${this.admin.institucion.id_institucion}`
|
||||
`${process.env.api}/institucion-infraccion/infracciones?id_institucion=${this.admin.institucion.id_institucion}`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.data = res.data
|
||||
|
@ -86,7 +86,11 @@ export default {
|
||||
}
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.put(`${process.env.api}/institucion-dia/`, data)
|
||||
.put(
|
||||
`${process.env.api}/institucion-dia/`,
|
||||
data,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.obtenerDias()
|
||||
this.updateIsLoading(false)
|
||||
@ -101,7 +105,8 @@ export default {
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/institucion-dia/?id_institucion=${this.admin.institucion.id_institucion}`
|
||||
`${process.env.api}/institucion-dia/?id_institucion=${this.admin.institucion.id_institucion}`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.data = res.data
|
||||
@ -127,7 +132,7 @@ export default {
|
||||
}
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.put(`${process.env.api}/institucion-dia`, data)
|
||||
.put(`${process.env.api}/institucion-dia`, data, this.$getToken.token())
|
||||
.then((res) => {
|
||||
this.updateIsLoading(false)
|
||||
this.$alertsGenericos.imprimirMensaje(this.$buefy, res.data.message)
|
||||
|
@ -47,7 +47,11 @@ export default {
|
||||
}
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.put(`${process.env.api}/institucion-programa/`, data)
|
||||
.put(
|
||||
`${process.env.api}/institucion-programa/`,
|
||||
data,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.obtenerCatalogoPrograma()
|
||||
this.updateIsLoading(false)
|
||||
@ -62,7 +66,8 @@ export default {
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/institucion-programa/programas?id_institucion=${this.admin.institucion.id_institucion}`
|
||||
`${process.env.api}/institucion-programa/programas?id_institucion=${this.admin.institucion.id_institucion}`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.data = res.data
|
||||
|
@ -56,7 +56,8 @@ export default {
|
||||
this.isLoadingTable = true
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/carrito/carritos?pagina=1&id_institucion=${this.admin.institucion.id_institucion}&id_modulo=${id_modulo}`
|
||||
`${process.env.api}/carrito/carritos?pagina=1&id_institucion=${this.admin.institucion.id_institucion}&id_modulo=${id_modulo}`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then(async (res) => {
|
||||
this.carritos = res.data[0]
|
||||
|
@ -108,7 +108,8 @@ export default {
|
||||
data = `&operador=${this.search.operador}&id_institucion=${this.admin.institucion.id_institucion}`
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/operador/operadores?pagina=${this.page}&id_tipo_usuario=4${data}`
|
||||
`${process.env.api}/operador/operadores?pagina=${this.page}&id_tipo_usuario=4${data}`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.data = res.data[0]
|
||||
|
@ -53,7 +53,11 @@ export default {
|
||||
}
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.put(`${process.env.api}/institucion-tipo-carrito/`, data)
|
||||
.put(
|
||||
`${process.env.api}/institucion-tipo-carrito/`,
|
||||
data,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.obtenerCatalogoTipoCarrito()
|
||||
this.updateIsLoading(false)
|
||||
@ -68,7 +72,8 @@ export default {
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/institucion-tipo-carrito/tipos-carrito?id_institucion=${this.admin.institucion.id_institucion}`
|
||||
`${process.env.api}/institucion-tipo-carrito/tipos-carrito?id_institucion=${this.admin.institucion.id_institucion}`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.data = res.data
|
||||
|
@ -1,7 +1,12 @@
|
||||
<template>
|
||||
<div>
|
||||
<b-table :data="data">
|
||||
<b-table-column field="tipoEntrada" label="Tipo de entrada" centered v-slot="props">
|
||||
<b-table-column
|
||||
field="tipoEntrada"
|
||||
label="Tipo de entrada"
|
||||
centered
|
||||
v-slot="props"
|
||||
>
|
||||
{{ props.row.tipoEntrada.tipo_entrada }}
|
||||
</b-table-column>
|
||||
|
||||
@ -47,7 +52,11 @@ export default {
|
||||
}
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.put(`${process.env.api}/institucion-tipo-entrada/`, data)
|
||||
.put(
|
||||
`${process.env.api}/institucion-tipo-entrada/`,
|
||||
data,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.obtenerCatalogoTipoEntrada()
|
||||
this.updateIsLoading(false)
|
||||
@ -62,7 +71,8 @@ export default {
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/institucion-tipo-entrada/tipos-entrada?id_institucion=${this.admin.institucion.id_institucion}`
|
||||
`${process.env.api}/institucion-tipo-entrada/tipos-entrada?id_institucion=${this.admin.institucion.id_institucion}`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.data = res.data
|
||||
|
@ -46,7 +46,7 @@ export default {
|
||||
.put(
|
||||
`${process.env.api}/operador/update-password`,
|
||||
data,
|
||||
this.admin.token
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.isLoading = false
|
||||
|
@ -197,7 +197,7 @@ export default {
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/prestamo/activos?pagina=${this.page}${data}`,
|
||||
this.operador.token
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.data = res.data[0]
|
||||
@ -215,7 +215,10 @@ export default {
|
||||
if (this.operador.institucion)
|
||||
data += `id_institucion=${this.operador.institucion.id_institucion}`
|
||||
axios
|
||||
.get(`${process.env.api}/modulo/modulos?${data}`)
|
||||
.get(
|
||||
`${process.env.api}/modulo/modulos?${data}`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.modulos = res.data
|
||||
this.obtenerCatalogoTipoCarrito()
|
||||
@ -226,7 +229,10 @@ export default {
|
||||
},
|
||||
obtenerCatalogoTipoCarrito() {
|
||||
axios
|
||||
.get(`${process.env.api}/institucion-tipo-carrito`)
|
||||
.get(
|
||||
`${process.env.api}/institucion-tipo-carrito`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.tipoCarritos = res.data
|
||||
})
|
||||
|
@ -79,7 +79,7 @@ export default {
|
||||
this.updateIsLoading(true)
|
||||
|
||||
axios
|
||||
.put(`${process.env.api}/carrito`, data)
|
||||
.put(`${process.env.api}/carrito`, data, this.$getToken.token())
|
||||
.then((res) => {
|
||||
this.buscar()
|
||||
this.updateIsLoading(false)
|
||||
@ -99,7 +99,7 @@ export default {
|
||||
}
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.put(`${process.env.api}/carrito`, data, this.operador.token)
|
||||
.put(`${process.env.api}/carrito`, data, this.$getToken.token())
|
||||
.then((res) => {
|
||||
this.buscar()
|
||||
this.updateIsLoading(false)
|
||||
|
@ -189,7 +189,7 @@ export default {
|
||||
}
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.put(`${process.env.api}/equipo`, data, this.operador.token)
|
||||
.put(`${process.env.api}/equipo`, data, this.$getToken.token())
|
||||
.then((res) => {
|
||||
this.buscar()
|
||||
this.updateIsLoading(false)
|
||||
@ -207,7 +207,11 @@ export default {
|
||||
}
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.post(`${process.env.api}/equipo-programa`, data, this.operador.token)
|
||||
.post(
|
||||
`${process.env.api}/equipo-programa`,
|
||||
data,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.buscar()
|
||||
this.updateIsLoading(false)
|
||||
@ -228,7 +232,7 @@ export default {
|
||||
.post(
|
||||
`${process.env.api}/equipo-tipo-entrada`,
|
||||
data,
|
||||
this.operador.token
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.buscar()
|
||||
@ -242,7 +246,7 @@ export default {
|
||||
},
|
||||
obtenerCatalogoStatus() {
|
||||
axios
|
||||
.get(`${process.env.api}/status`, this.operador.token)
|
||||
.get(`${process.env.api}/status`, this.$getToken.token())
|
||||
.then((res) => {
|
||||
this.status = res.data
|
||||
})
|
||||
@ -252,7 +256,7 @@ export default {
|
||||
},
|
||||
obtenerCatalogoProgramas() {
|
||||
axios
|
||||
.get(`${process.env.api}/institucion-programa`, this.operador.token)
|
||||
.get(`${process.env.api}/institucion-programa`, this.$getToken.token())
|
||||
.then((res) => {
|
||||
this.programas = res.data
|
||||
})
|
||||
@ -262,7 +266,10 @@ export default {
|
||||
},
|
||||
obtenerCatalogoTipoEntradas() {
|
||||
axios
|
||||
.get(`${process.env.api}/institucion-tipo-entrada`, this.operador.token)
|
||||
.get(
|
||||
`${process.env.api}/institucion-tipo-entrada`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.tipoEntradas = res.data
|
||||
})
|
||||
@ -274,7 +281,7 @@ export default {
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/carrito/carritos?pagina=1&id_institucion=${this.operador.institucion.id_institucion}&id_tipo_carrito=${this.equipo.carrito.tipoCarrito.id_tipo_carrito}`,
|
||||
this.operador.token
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.carritos = res.data[0]
|
||||
|
@ -113,7 +113,8 @@ export default {
|
||||
.get(
|
||||
`${process.env.api}/carrito/carrito?id_carrito=${
|
||||
this.idCarrito || this.carrito.id_carrito
|
||||
}`
|
||||
}`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.updateCarrito(res.data)
|
||||
@ -133,7 +134,7 @@ export default {
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/modulo/modulos?id_institucion=${this.operador.institucion.id_institucion}`,
|
||||
this.token
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.modulos = res.data
|
||||
@ -149,7 +150,7 @@ export default {
|
||||
`${process.env.api}/carrito/carritos?pagina=1&id_institucion=${
|
||||
this.operador.institucion.id_institucion
|
||||
}&id_modulo=${this.idModulo}&id_tipo_carrito=${i + 1}`,
|
||||
this.token
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
if (i + 1 === 1) this.carritosC = res.data[0]
|
||||
|
@ -71,7 +71,8 @@ export default {
|
||||
this.operador.institucion.id_institucion
|
||||
}&numero_inventario=${
|
||||
this.numeroInventario || this.equipo.numero_inventario
|
||||
}`
|
||||
}`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.updateEquipo(res.data)
|
||||
|
@ -42,7 +42,8 @@ export default {
|
||||
obtenerEquipos(pagina) {
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/equipo/equipos?pagina=${pagina}&id_carrito=${this.carrito.id_carrito}`
|
||||
`${process.env.api}/equipo/equipos?pagina=${pagina}&id_carrito=${this.carrito.id_carrito}`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.data = res.data[0]
|
||||
|
@ -35,7 +35,7 @@ export default {
|
||||
.put(
|
||||
`${process.env.api}/prestamo/cancelar-operador`,
|
||||
data,
|
||||
this.operador.token
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.updateIsLoadingPage(false)
|
||||
|
@ -115,7 +115,7 @@ export default {
|
||||
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.post(`${process.env.api}/carrito`, data)
|
||||
.post(`${process.env.api}/carrito`, data, this.$getToken.token())
|
||||
.then((res) => {
|
||||
this.idModulo = 0
|
||||
this.idTipoCarrito = 0
|
||||
@ -131,7 +131,8 @@ export default {
|
||||
obtenerCatalogoModulo() {
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/modulo/modulos?id_institucion=${this.institucion.id_institucion}`
|
||||
`${process.env.api}/modulo/modulos?id_institucion=${this.institucion.id_institucion}`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.modulos = res.data
|
||||
@ -142,7 +143,10 @@ export default {
|
||||
},
|
||||
obtenerCatalogoTiposCarritos() {
|
||||
axios
|
||||
.get(`${process.env.api}/institucion-tipo-carrito/`)
|
||||
.get(
|
||||
`${process.env.api}/institucion-tipo-carrito/`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.tiposCarritos = res.data
|
||||
})
|
||||
|
@ -62,7 +62,11 @@ export default {
|
||||
this.updateIsLoading(true)
|
||||
if (this.tab === '1') this.tab = '0'
|
||||
axios
|
||||
.put(`${process.env.api}/prestamo/entregar`, data, this.operador.token)
|
||||
.put(
|
||||
`${process.env.api}/prestamo/entregar`,
|
||||
data,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
const equipo = res.data.equipo
|
||||
|
||||
@ -100,7 +104,7 @@ export default {
|
||||
.put(
|
||||
`${process.env.api}/prestamo/regresar-id-prestamo`,
|
||||
data,
|
||||
this.operador.token
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.updateVariable()
|
||||
@ -119,7 +123,7 @@ export default {
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/prestamo/prestamo-id-prestamo?id_prestamo=${this.idPrestamo}`,
|
||||
this.operador.token
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
let prestamo = res.data
|
||||
|
@ -103,7 +103,7 @@ export default {
|
||||
// axios
|
||||
// .get(
|
||||
// `${process.env.api}/prestamo/historial_equipo?pagina=${this.pagePrestamos}&idEquipo=${this.equipo.idEquipo}`,
|
||||
// this.operador.token
|
||||
// this.$getToken.token()
|
||||
// )
|
||||
// .then((res) => {
|
||||
// this.dataPrestamos = res.data.rows
|
||||
@ -120,7 +120,7 @@ export default {
|
||||
// axios
|
||||
// .get(
|
||||
// `${process.env.api}/multa/historial_multas_equipo?pagina=${this.pageReportes}&idEquipo=${this.equipo.idEquipo}`,
|
||||
// this.operador.token
|
||||
// this.$getToken.token()
|
||||
// )
|
||||
// .then((res) => {
|
||||
// this.dataReportes = res.data.rows
|
||||
@ -137,7 +137,7 @@ export default {
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/motivo?pagina=${this.pageMotivos}&id_equipo=${this.equipo.id_equipo}`,
|
||||
this.operador.token
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.dataMotivos = res.data[0]
|
||||
|
@ -203,7 +203,7 @@ export default {
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/prestamo/historial?pagina=${this.page}${data}`,
|
||||
this.operador.token
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.data = res.data[0]
|
||||
@ -221,7 +221,10 @@ export default {
|
||||
if (this.operador.institucion)
|
||||
data += `id_institucion=${this.operador.institucion.id_institucion}`
|
||||
axios
|
||||
.get(`${process.env.api}/modulo/modulos?${data}`)
|
||||
.get(
|
||||
`${process.env.api}/modulo/modulos?${data}`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.modulos = res.data
|
||||
this.obtenerCatalogoTipoCarrito()
|
||||
@ -232,7 +235,10 @@ export default {
|
||||
},
|
||||
obtenerCatalogoTipoCarrito() {
|
||||
axios
|
||||
.get(`${process.env.api}/institucion-tipo-carrito`)
|
||||
.get(
|
||||
`${process.env.api}/institucion-tipo-carrito`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.tipoCarritos = res.data
|
||||
})
|
||||
|
@ -140,7 +140,11 @@ export default {
|
||||
}
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.delete(`${process.env.api}/equipo-programa`, { data })
|
||||
.delete(
|
||||
`${process.env.api}/equipo-programa`,
|
||||
{ data },
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.buscar()
|
||||
this.updateIsLoading(false)
|
||||
@ -165,7 +169,11 @@ export default {
|
||||
}
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.delete(`${process.env.api}/equipo-tipo-entrada`, { data })
|
||||
.delete(
|
||||
`${process.env.api}/equipo-tipo-entrada`,
|
||||
{ data },
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.buscar()
|
||||
this.updateIsLoading(false)
|
||||
|
@ -82,7 +82,8 @@ export default {
|
||||
obtenerCatalogoModulo() {
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/modulo/modulos?id_institucion=${this.operador.institucion.id_institucion}`
|
||||
`${process.env.api}/modulo/modulos?id_institucion=${this.operador.institucion.id_institucion}`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.modulos = res.data
|
||||
@ -94,7 +95,10 @@ export default {
|
||||
},
|
||||
obtenerCatalogoTiposCarritos() {
|
||||
axios
|
||||
.get(`${process.env.api}/institucion-tipo-carrito/`)
|
||||
.get(
|
||||
`${process.env.api}/institucion-tipo-carrito/`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.tiposCarritos = res.data
|
||||
this.obtenerCarritos()
|
||||
@ -112,7 +116,8 @@ export default {
|
||||
this.isLoadingTable = true
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/carrito/carritos?pagina=1&id_institucion=${this.operador.institucion.id_institucion}&carrito=${this.carrito}${id_modulo}${id_tipo_carrito}`
|
||||
`${process.env.api}/carrito/carritos?pagina=1&id_institucion=${this.operador.institucion.id_institucion}&carrito=${this.carrito}${id_modulo}${id_tipo_carrito}`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then(async (res) => {
|
||||
this.carritos = res.data[0]
|
||||
|
@ -64,7 +64,7 @@ export default {
|
||||
.put(
|
||||
`${process.env.api}/prestamo/regresar-numero-inventario`,
|
||||
data,
|
||||
this.operador.token
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.numeroInventario = ''
|
||||
@ -82,7 +82,7 @@ export default {
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/prestamo/prestamo-numero-inventario?numero_inventario=${this.numeroInventario}&id_institucion=${this.operador.institucion.id_institucion}`,
|
||||
this.operador.token
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
let data = res.data
|
||||
|
@ -117,7 +117,7 @@ export default {
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/institucion-infraccion/infracciones?id_institucion=${this.operador.institucion.id_institucion}`,
|
||||
this.operador.token
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.infracciones = res.data
|
||||
|
@ -116,7 +116,7 @@ export default {
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/institucion-infraccion/infracciones?id_institucion=${this.operador.institucion.id_institucion}`,
|
||||
this.operador.token
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.infracciones = res.data
|
||||
|
@ -78,7 +78,8 @@ export default {
|
||||
this.isLoadingTable = true
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/equipo/equipos?pagina=${this.page}&id_carrito=${idCarrito}`
|
||||
`${process.env.api}/equipo/equipos?pagina=${this.page}&id_carrito=${idCarrito}`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.total = res.data[1]
|
||||
|
@ -66,7 +66,8 @@ export default {
|
||||
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/equipo/equipos?pagina=${pagina}${carrito}${equipo}`
|
||||
`${process.env.api}/equipo/equipos?pagina=${pagina}${carrito}${equipo}`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.data = res.data[0]
|
||||
|
@ -130,7 +130,7 @@ export default {
|
||||
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.put(`${process.env.api}/multa`, data, this.operador.token)
|
||||
.put(`${process.env.api}/multa`, data, this.$getToken.token())
|
||||
.then((res) => {
|
||||
this.buscar()
|
||||
this.updateIsLoading(false)
|
||||
@ -146,7 +146,7 @@ export default {
|
||||
this.updateIsLoading(true)
|
||||
|
||||
axios
|
||||
.put(`${process.env.api}/usuario`, data)
|
||||
.put(`${process.env.api}/usuario`, data, this.$getToken.token())
|
||||
.then((res) => {
|
||||
this.buscar()
|
||||
this.updateIsLoading(false)
|
||||
@ -167,7 +167,7 @@ export default {
|
||||
}
|
||||
this.updateIsLoading(true)
|
||||
axios
|
||||
.put(`${process.env.api}/usuario`, data, this.operador.token)
|
||||
.put(`${process.env.api}/usuario`, data, this.$getToken.token())
|
||||
.then((res) => {
|
||||
this.buscar()
|
||||
this.updateIsLoading(false)
|
||||
|
@ -68,7 +68,8 @@ export default {
|
||||
.get(
|
||||
`${process.env.api}/usuario/usuario?usuario=${
|
||||
this.numeroCuenta || this.usuario.id_usuario
|
||||
}`
|
||||
}`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.updateUsuario(res.data)
|
||||
|
@ -95,7 +95,7 @@ export default {
|
||||
|
||||
this.isLoadingTable = true
|
||||
axios
|
||||
.get(`${url}`)
|
||||
.get(`${url}`, this.$getToken.token())
|
||||
.then(async (res) => {
|
||||
this.multas = res.data[0]
|
||||
this.total = res.data[1]
|
||||
@ -108,7 +108,7 @@ export default {
|
||||
},
|
||||
obtenerInstituciones() {
|
||||
axios
|
||||
.get(`${process.env.api}/institucion`)
|
||||
.get(`${process.env.api}/institucion`, this.$getToken.token())
|
||||
.then(async (res) => {
|
||||
this.instituciones = res.data
|
||||
})
|
||||
|
@ -117,7 +117,7 @@ export default {
|
||||
|
||||
this.isLoadingTable = true
|
||||
axios
|
||||
.get(`${url}`)
|
||||
.get(`${url}`, this.$getToken.token())
|
||||
.then(async (res) => {
|
||||
this.usuarios = res.data[0]
|
||||
this.total = res.data[1]
|
||||
@ -131,7 +131,8 @@ export default {
|
||||
obtenerCarreras() {
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/institucion-carrera/?id_institucion=${this.operador.institucion.id_institucion}`
|
||||
`${process.env.api}/institucion-carrera/?id_institucion=${this.operador.institucion.id_institucion}`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then(async (res) => {
|
||||
this.carreras = res.data
|
||||
@ -142,7 +143,7 @@ export default {
|
||||
},
|
||||
obtenerInstituciones() {
|
||||
axios
|
||||
.get(`${process.env.api}/institucion`)
|
||||
.get(`${process.env.api}/institucion`, this.$getToken.token())
|
||||
.then(async (res) => {
|
||||
this.instituciones = res.data
|
||||
})
|
||||
|
@ -82,7 +82,7 @@ export default {
|
||||
|
||||
this.updateIsLoading(true)
|
||||
return axios
|
||||
.post(`${process.env.api}/multa`, data, this.operador.token)
|
||||
.post(`${process.env.api}/multa`, data, this.$getToken.token())
|
||||
.then((res) => {
|
||||
this.buscar()
|
||||
this.updateIsLoading(false)
|
||||
@ -97,7 +97,7 @@ export default {
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/institucion-infraccion/infracciones?id_institucion=${this.operador.institucion.id_institucion}`,
|
||||
this.operador.token
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.infracciones = res.data
|
||||
|
@ -76,7 +76,7 @@ export default {
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/prestamo/historial-usuario?pagina=${this.page}&id_usuario=${this.usuario.id_usuario}`,
|
||||
this.operador.token
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then((res) => {
|
||||
this.data = res.data[0]
|
||||
@ -92,7 +92,8 @@ export default {
|
||||
this.isLoadingTable = true
|
||||
axios
|
||||
.get(
|
||||
`${process.env.api}/multa/multas-usuario?pagina=${this.page}&id_usuario=${this.usuario.id_usuario}`
|
||||
`${process.env.api}/multa/multas-usuario?pagina=${this.page}&id_usuario=${this.usuario.id_usuario}`,
|
||||
this.$getToken.token()
|
||||
)
|
||||
.then(async (res) => {
|
||||
this.multas = res.data[0]
|
||||
|
@ -26,19 +26,19 @@ export default {
|
||||
sockets: [
|
||||
{
|
||||
name: 'main',
|
||||
// url: 'http://localhost:3000',
|
||||
url: 'https://venus.acatlan.unam.mx',
|
||||
url: 'http://localhost:3000',
|
||||
// url: 'https://venus.acatlan.unam.mx',
|
||||
// url: 'https://pmodulospcpuma.unam.mx',
|
||||
},
|
||||
],
|
||||
},
|
||||
env: {
|
||||
// api: 'http://localhost:3000',
|
||||
api: 'https://venus.acatlan.unam.mx/pcpumaUnam_test',
|
||||
api: 'http://localhost:3000',
|
||||
// api: 'https://venus.acatlan.unam.mx/pcpumaUnam_test',
|
||||
// api: 'https://pmodulospcpuma.unam.mx/pcpumaUnam_test',
|
||||
// api: 'https://modulospcpuma.unam.mx/',
|
||||
// path: '/socket.io/',
|
||||
path: '/pcpumaUnam_test/socket.io/',
|
||||
path: '/socket.io/',
|
||||
// path: '/pcpumaUnam_test/socket.io/',
|
||||
// path: '/pcpumaUnam/socket.io/',
|
||||
},
|
||||
}
|
||||
|
@ -69,7 +69,39 @@ const alertsGenericos = {
|
||||
this.admin = objeto.operador
|
||||
},
|
||||
}
|
||||
const getToken = {
|
||||
token() {
|
||||
const token = this.tokenStr()
|
||||
|
||||
if (!token) return null
|
||||
return {
|
||||
headers: {
|
||||
Authorization: `Bearer ${token}`,
|
||||
},
|
||||
}
|
||||
},
|
||||
tokenStr() {
|
||||
return localStorage.getItem('token')
|
||||
},
|
||||
tokenFile() {
|
||||
const token = this.tokenStr()
|
||||
|
||||
if (!token) return null
|
||||
return {
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
Authorization: `Bearer ${token}`,
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
const objIsEmpty = (obj) => {
|
||||
for (let key in obj) if (obj.hasOwnProperty(key)) return false
|
||||
return true
|
||||
}
|
||||
|
||||
export default ({ app }, inject) => {
|
||||
inject('alertsGenericos', alertsGenericos)
|
||||
inject('getToken', getToken)
|
||||
inject('objIsEmpty', objIsEmpty)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user