sacara unauthorized

This commit is contained in:
xXpuma99Xx 2022-08-05 18:41:37 -05:00
parent 39c5904918
commit 034fa2fea5
74 changed files with 572 additions and 134 deletions

View File

@ -47,7 +47,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.isLoadingTable = false this.isLoadingTable = false
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -37,7 +37,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.isLoadingTable = false this.isLoadingTable = false
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -84,7 +84,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.error = 'is-danger' this.error = 'is-danger'
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
eliminarHoraExcepcion() { eliminarHoraExcepcion() {
@ -106,7 +110,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.error = 'is-danger' this.error = 'is-danger'
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -37,7 +37,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.isLoadingTable = false this.isLoadingTable = false
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -68,7 +68,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.isLoadingTable = false this.isLoadingTable = false
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
onPageChange(page) { onPageChange(page) {

View File

@ -78,7 +78,11 @@ export default {
.catch((err) => { .catch((err) => {
this.error = 'is-danger' this.error = 'is-danger'
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
} }
}, },
@ -89,7 +93,11 @@ export default {
this.instituciones = res.data this.instituciones = res.data
}) })
.catch((err) => { .catch((err) => {
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
obtenerCatalogoModulo() { obtenerCatalogoModulo() {
@ -102,7 +110,11 @@ export default {
this.modulos = res.data this.modulos = res.data
}) })
.catch((err) => { .catch((err) => {
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -51,7 +51,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.isLoadingTable = false this.isLoadingTable = false
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
onPageChange(page) { onPageChange(page) {

View File

@ -38,7 +38,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.isLoadingTable = false this.isLoadingTable = false
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -66,7 +66,7 @@ export default {
if (!extPermitidas.exec(this.csv.name)) { if (!extPermitidas.exec(this.csv.name)) {
this.csv = {} this.csv = {}
this.$alertsGenericos.imprimirError(this.$buefy, { this.$alertsGenericos.imprimirError(this.$buefy, this.$router, {
message: message:
'El archivo seleccionado no es un csv. Asegurese de escoger un archivo valido.', 'El archivo seleccionado no es un csv. Asegurese de escoger un archivo valido.',
}) })
@ -92,7 +92,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -38,7 +38,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.isLoadingTable = false this.isLoadingTable = false
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -38,7 +38,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.isLoadingTable = false this.isLoadingTable = false
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -35,7 +35,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -43,7 +43,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -104,7 +104,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -75,7 +75,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
localStorage.removeItem('numeroInventario') localStorage.removeItem('numeroInventario')
}, },

View File

@ -98,7 +98,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -97,7 +97,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -103,7 +103,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
warning() { warning() {

View File

@ -75,7 +75,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
warning() { warning() {

View File

@ -93,7 +93,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
warning() { warning() {

View File

@ -80,7 +80,11 @@ export default {
this.infracciones = res.data this.infracciones = res.data
}) })
.catch((err) => { .catch((err) => {
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
crearInfraccion() { crearInfraccion() {
@ -103,7 +107,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
warning() { warning() {

View File

@ -75,7 +75,11 @@ export default {
this.marcas = res.data this.marcas = res.data
}) })
.catch((err) => { .catch((err) => {
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
crearMarca() { crearMarca() {
@ -95,7 +99,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
warning() { warning() {

View File

@ -75,7 +75,11 @@ export default {
this.modelos = res.data this.modelos = res.data
}) })
.catch((err) => { .catch((err) => {
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
crearModelo() { crearModelo() {
@ -95,7 +99,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
warning() { warning() {

View File

@ -55,7 +55,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
warning() { warning() {

View File

@ -109,7 +109,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
warning() { warning() {

View File

@ -73,7 +73,11 @@ export default {
this.programas = res.data this.programas = res.data
}) })
.catch((err) => { .catch((err) => {
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
crearPrograma() { crearPrograma() {
@ -96,7 +100,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
warning() { warning() {

View File

@ -94,7 +94,11 @@ export default {
this.tipoCarritos = res.data this.tipoCarritos = res.data
}) })
.catch((err) => { .catch((err) => {
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
crearTipoCarrito() { crearTipoCarrito() {
@ -119,7 +123,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
warning() { warning() {

View File

@ -80,7 +80,11 @@ export default {
this.tipoEntradas = res.data this.tipoEntradas = res.data
}) })
.catch((err) => { .catch((err) => {
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
crearTipoEntrada() { crearTipoEntrada() {
@ -103,7 +107,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
warning() { warning() {

View File

@ -77,7 +77,11 @@ export default {
this.tipoUsuarios = res.data this.tipoUsuarios = res.data
}) })
.catch((err) => { .catch((err) => {
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
crearTipoUsuario() { crearTipoUsuario() {
@ -96,7 +100,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
warning() { warning() {

View File

@ -58,7 +58,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -148,7 +148,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -104,7 +104,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -67,7 +67,7 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err) this.$alertsGenericos.imprimirError(this.$buefy, this.$router, err)
}) })
}, },
}, },

View File

@ -206,7 +206,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.isLoading = false this.isLoading = false
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
obtenerCatalogoModulo() { obtenerCatalogoModulo() {
@ -224,7 +228,11 @@ export default {
this.obtenerCatalogoTipoCarrito() this.obtenerCatalogoTipoCarrito()
}) })
.catch((err) => { .catch((err) => {
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
obtenerCatalogoTipoCarrito() { obtenerCatalogoTipoCarrito() {
@ -237,7 +245,11 @@ export default {
this.tipoCarritos = res.data this.tipoCarritos = res.data
}) })
.catch((err) => { .catch((err) => {
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -51,7 +51,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.isLoadingTable = false this.isLoadingTable = false
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
onPageChange(page) { onPageChange(page) {

View File

@ -25,8 +25,8 @@ export default {
TablaBuscadorCarrito, TablaBuscadorCarrito,
}, },
props: { props: {
operador: { type: Object, required: true },
updateIsLoading: { type: Function, required: true }, updateIsLoading: { type: Function, required: true },
operador: { type: Object, required: true },
}, },
data() { data() {
return { return {

View File

@ -86,7 +86,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
regresar(descripcion, id_institucion_infraccion) { regresar(descripcion, id_institucion_infraccion) {
@ -113,7 +117,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
prestamoIdPrestamo(idPrestamo, updateVariable = () => {}) { prestamoIdPrestamo(idPrestamo, updateVariable = () => {}) {
@ -150,14 +158,18 @@ export default {
this.revisionMulta this.revisionMulta
) )
} else } else
this.$alertsGenericos.imprimirError(this.$buefy, { this.$alertsGenericos.imprimirError(this.$buefy, this.$router, {
message: 'Este préstamo ya no se encuentra activo.', message: 'Este préstamo ya no se encuentra activo.',
}) })
this.updateIsLoading(false) this.updateIsLoading(false)
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -212,7 +212,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.isLoading = false this.isLoading = false
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
obtenerCatalogoModulo() { obtenerCatalogoModulo() {
@ -230,7 +234,11 @@ export default {
this.obtenerCatalogoTipoCarrito() this.obtenerCatalogoTipoCarrito()
}) })
.catch((err) => { .catch((err) => {
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
obtenerCatalogoTipoCarrito() { obtenerCatalogoTipoCarrito() {
@ -243,7 +251,11 @@ export default {
this.tipoCarritos = res.data this.tipoCarritos = res.data
}) })
.catch((err) => { .catch((err) => {
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -97,7 +97,11 @@ export default {
.catch((err) => { .catch((err) => {
this.error = 'is-danger' this.error = 'is-danger'
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
} }
}, },
@ -108,7 +112,11 @@ export default {
this.instituciones = res.data this.instituciones = res.data
}) })
.catch((err) => { .catch((err) => {
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
obtenerCatalogoModulo() { obtenerCatalogoModulo() {
@ -120,7 +128,11 @@ export default {
this.modulos = res.data this.modulos = res.data
}) })
.catch((err) => { .catch((err) => {
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -73,7 +73,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
prestamoNumeroInventario() { prestamoNumeroInventario() {
@ -89,7 +93,7 @@ export default {
this.updateIsLoading(false) this.updateIsLoading(false)
if (data.Equipo.Status.idStatus === 2) if (data.Equipo.Status.idStatus === 2)
this.$alertsGenericos.imprimirError(this.$buefy, { this.$alertsGenericos.imprimirError(this.$buefy, this.$router, {
message: 'Aún no se entrega el equipo de cómputo al usuario.', message: 'Aún no se entrega el equipo de cómputo al usuario.',
}) })
else if (data.Equipo.Status.idStatus === 3) else if (data.Equipo.Status.idStatus === 3)
@ -101,7 +105,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
} }
}, },

View File

@ -123,7 +123,11 @@ export default {
this.infracciones = res.data this.infracciones = res.data
}) })
.catch((err) => { .catch((err) => {
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -122,7 +122,11 @@ export default {
this.infracciones = res.data this.infracciones = res.data
}) })
.catch((err) => { .catch((err) => {
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -151,7 +151,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
updatePassword() { updatePassword() {
@ -170,7 +174,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
cambiarStatus(dataSelect, status) { cambiarStatus(dataSelect, status) {
@ -186,7 +194,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
updateUsuario() { updateUsuario() {
@ -207,7 +219,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -70,13 +70,15 @@ export default {
.then((res) => { .then((res) => {
this.updateUsuario(res.data) this.updateUsuario(res.data)
this.updateIsLoading(false) this.updateIsLoading(false)
this.$router.push( this.$router.push(`/usuarios/buscar_usuario/${this.numeroCuenta}`)
`/usuarios/buscar_usuario/${this.numeroCuenta}`
)
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
localStorage.removeItem('numeroInventario') localStorage.removeItem('numeroInventario')
} }

View File

@ -104,7 +104,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.isLoadingTable = false this.isLoadingTable = false
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
obtenerInstituciones() { obtenerInstituciones() {
@ -114,7 +118,11 @@ export default {
this.instituciones = res.data this.instituciones = res.data
}) })
.catch((err) => { .catch((err) => {
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -126,7 +126,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.isLoadingTable = false this.isLoadingTable = false
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
obtenerCarreras() { obtenerCarreras() {
@ -139,7 +143,11 @@ export default {
this.carreras = res.data this.carreras = res.data
}) })
.catch((err) => { .catch((err) => {
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
obtenerInstituciones() { obtenerInstituciones() {
@ -149,7 +157,11 @@ export default {
this.instituciones = res.data this.instituciones = res.data
}) })
.catch((err) => { .catch((err) => {
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -89,7 +89,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
obtenerInfracciones() { obtenerInfracciones() {
@ -102,7 +106,11 @@ export default {
this.infracciones = res.data this.infracciones = res.data
}) })
.catch((err) => { .catch((err) => {
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -85,7 +85,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.isLoading = false this.isLoading = false
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
obtenerMultas() { obtenerMultas() {
@ -102,7 +106,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.isLoadingTable = false this.isLoadingTable = false
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -67,7 +67,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
guradar() { guradar() {
@ -87,7 +91,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -188,7 +188,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
updateProgramas() { updateProgramas() {
@ -210,7 +214,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
updateTipoEntradas() { updateTipoEntradas() {
@ -232,7 +240,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
obtenerCatalogoStatus() { obtenerCatalogoStatus() {
@ -242,7 +254,11 @@ export default {
this.status = res.data this.status = res.data
}) })
.catch((err) => { .catch((err) => {
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
obtenerCatalogoProgramas() { obtenerCatalogoProgramas() {
@ -252,7 +268,11 @@ export default {
this.programas = res.data this.programas = res.data
}) })
.catch((err) => { .catch((err) => {
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
obtenerCatalogoTipoEntradas() { obtenerCatalogoTipoEntradas() {
@ -265,7 +285,11 @@ export default {
this.tipoEntradas = res.data this.tipoEntradas = res.data
}) })
.catch((err) => { .catch((err) => {
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -132,7 +132,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
subirLogo() { subirLogo() {
@ -153,7 +157,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -2,7 +2,10 @@
<div class="column is-4"> <div class="column is-4">
<h3 class="is-size-4 mb-4">Alta del responsable de PC Puma</h3> <h3 class="is-size-4 mb-4">Alta del responsable de PC Puma</h3>
<b-field label="Nombre del responsable" v-show="admin.tipoUsuario.id_tipo_usuario === 2"> <b-field
label="Nombre del responsable"
v-show="admin.tipoUsuario.id_tipo_usuario === 2"
>
<b-input <b-input
type="text" type="text"
:disabled="!institucion.id_institucion" :disabled="!institucion.id_institucion"
@ -96,7 +99,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -55,7 +55,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -94,7 +94,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.isLoadingTable = false this.isLoadingTable = false
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
onPageChange(page) { onPageChange(page) {

View File

@ -167,7 +167,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.isLoadingTable = false this.isLoadingTable = false
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
onPageChange(page) { onPageChange(page) {

View File

@ -148,8 +148,7 @@ export default {
this.page = 1 this.page = 1
this.lastSearch.carrito = this.carrito this.lastSearch.carrito = this.carrito
if (this.operador.tipoUsuario.id_tipo_usuario > 2) if (this.operador.tipoUsuario.id_tipo_usuario > 2)
this.lastSearch.idInstitucion = this.lastSearch.idInstitucion = this.operador.institucion.id_institucion
this.operador.institucion.id_institucion
else if (this.idInstitucion) else if (this.idInstitucion)
this.lastSearch.idInstitucion = this.idInstitucion this.lastSearch.idInstitucion = this.idInstitucion
this.lastSearch.idMarca = this.idMarca this.lastSearch.idMarca = this.idMarca
@ -179,7 +178,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.isLoadingTable = false this.isLoadingTable = false
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
onPageChange(page) { onPageChange(page) {

View File

@ -61,7 +61,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.isLoadingTable = false this.isLoadingTable = false
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -67,7 +67,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.isLoadingTable = false this.isLoadingTable = false
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
updateInstitucion(institucion) { updateInstitucion(institucion) {

View File

@ -111,7 +111,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.isLoadingTable = false this.isLoadingTable = false
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
onPageChange(page) { onPageChange(page) {

View File

@ -40,7 +40,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.isLoadingTable = false this.isLoadingTable = false
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
onPageChange(page) { onPageChange(page) {

View File

@ -43,7 +43,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoadingPage(false) this.updateIsLoadingPage(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
prompt() { prompt() {

View File

@ -64,7 +64,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -40,7 +40,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.isLoadingTable = false this.isLoadingTable = false
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
onPageChange(page) { onPageChange(page) {

View File

@ -61,7 +61,7 @@ export default {
// }) // })
// .catch((err) => { // .catch((err) => {
// this.isLoadingTable = false // this.isLoadingTable = false
// this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) // this.$alertsGenericos.imprimirError(this.$buefy, this.$router, err.response.data)
// }) // })
// }, // },
// onPageChange(page) { // onPageChange(page) {
@ -87,7 +87,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -106,7 +106,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -61,7 +61,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -110,7 +110,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
editar(institucionDia) { editar(institucionDia) {
@ -147,7 +151,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -70,7 +70,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -91,7 +91,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -69,7 +69,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -75,7 +75,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -69,7 +69,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -54,7 +54,11 @@ export default {
}) })
.catch((err) => { .catch((err) => {
this.isLoading = false this.isLoading = false
this.$alertsGenericos.imprimirError(this.$buefy, err.response.data) this.$alertsGenericos.imprimirError(
this.$buefy,
this.$router,
err.response.data
)
}) })
}, },
}, },

View File

@ -1,26 +1,40 @@
const alertsGenericos = { const alertsGenericos = {
imprimirError( imprimirError(
buefy, buefy,
router,
err = {}, err = {},
title = '¡Hubo un error!', title = '¡Hubo un error!',
onConfirm = () => {} onConfirm = () => {}
) { ) {
buefy.dialog.alert({ if (err.message === 'Unauthorized') {
ariaModal: true, buefy.dialog.alert({
hasIcon: true, ariaModal: true,
onConfirm, hasIcon: true,
ariaRole: 'alertdialog', onConfirm,
confirmText: 'Entendido', ariaRole: 'alertdialog',
icon: 'alert-octagon', confirmText: 'Entendido',
iconPack: 'mdi', icon: 'alert-octagon',
message: err.message, iconPack: 'mdi',
title, message: '',
type: 'is-danger', title,
}) type: 'is-danger',
// if (err.err && err.err === 'token error') { })
// localStorage.clear() localStorage.clear()
// this.$router.push('/') router.push('/')
// } } else {
buefy.dialog.alert({
ariaModal: true,
hasIcon: true,
onConfirm,
ariaRole: 'alertdialog',
confirmText: 'Entendido',
icon: 'alert-octagon',
iconPack: 'mdi',
message: '',
title,
type: 'is-danger',
})
}
}, },
imprimirMensaje( imprimirMensaje(
buefy, buefy,