funciones en componente principal de cada pagina
This commit is contained in:
@@ -22,5 +22,82 @@ export default {
|
||||
if (!localStorage.getItem('idCasoEspecial'))
|
||||
this.$router.push('/admin/casos_especiales')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
admin: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
imprimirError(err = {}, title = '¡Hubo un error!', onConfirm = () => {}) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-danger',
|
||||
title,
|
||||
message: err.message,
|
||||
confirmText: 'Entendido',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'alert-octagon',
|
||||
onConfirm,
|
||||
})
|
||||
if (err.err && err.err === 'token error') {
|
||||
localStorage.clear()
|
||||
this.$router.push('/')
|
||||
}
|
||||
},
|
||||
imprimirMensaje(message, title = '¡Felicidades!', onConfirm = () => {}) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-success',
|
||||
title,
|
||||
message,
|
||||
confirmText: 'Ok',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'check-circle',
|
||||
onConfirm,
|
||||
})
|
||||
},
|
||||
imprimirWarning(
|
||||
message,
|
||||
title = '¡Espera un minuto!',
|
||||
onConfirm = () => {},
|
||||
onCancel = () => {}
|
||||
) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-warning',
|
||||
title,
|
||||
message,
|
||||
confirmText: 'Confirmar',
|
||||
canCancel: true,
|
||||
cancelText: 'Cancelar',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'help-circle',
|
||||
onConfirm,
|
||||
onCancel,
|
||||
})
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
this.admin.idUsuario = Number(localStorage.getItem('idUsuario'))
|
||||
this.admin.idTipoUsuario = Number(localStorage.getItem('idTipoUsuario'))
|
||||
this.admin.tipoUsuario = localStorage.getItem('tipoUsuario')
|
||||
this.admin.token = {
|
||||
headers: {
|
||||
token: localStorage.getItem('token'),
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
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')
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -27,6 +27,83 @@ export default {
|
||||
if (!localStorage.getItem('idCasoEspecial'))
|
||||
this.$router.push('/admin/casos_especiales')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
admin: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
imprimirError(err = {}, title = '¡Hubo un error!', onConfirm = () => {}) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-danger',
|
||||
title,
|
||||
message: err.message,
|
||||
confirmText: 'Entendido',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'alert-octagon',
|
||||
onConfirm,
|
||||
})
|
||||
if (err.err && err.err === 'token error') {
|
||||
localStorage.clear()
|
||||
this.$router.push('/')
|
||||
}
|
||||
},
|
||||
imprimirMensaje(message, title = '¡Felicidades!', onConfirm = () => {}) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-success',
|
||||
title,
|
||||
message,
|
||||
confirmText: 'Ok',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'check-circle',
|
||||
onConfirm,
|
||||
})
|
||||
},
|
||||
imprimirWarning(
|
||||
message,
|
||||
title = '¡Espera un minuto!',
|
||||
onConfirm = () => {},
|
||||
onCancel = () => {}
|
||||
) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-warning',
|
||||
title,
|
||||
message,
|
||||
confirmText: 'Confirmar',
|
||||
canCancel: true,
|
||||
cancelText: 'Cancelar',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'help-circle',
|
||||
onConfirm,
|
||||
onCancel,
|
||||
})
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
this.admin.idUsuario = Number(localStorage.getItem('idUsuario'))
|
||||
this.admin.idTipoUsuario = Number(localStorage.getItem('idTipoUsuario'))
|
||||
this.admin.tipoUsuario = localStorage.getItem('tipoUsuario')
|
||||
this.admin.token = {
|
||||
headers: {
|
||||
token: localStorage.getItem('token'),
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
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')
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -22,5 +22,82 @@ export default {
|
||||
if (idTipoUsuario === 3) this.$router.push('/alumno')
|
||||
if (idTipoUsuario === 4) this.$router.push('/casoEspecial')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
admin: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
imprimirError(err = {}, title = '¡Hubo un error!', onConfirm = () => {}) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-danger',
|
||||
title,
|
||||
message: err.message,
|
||||
confirmText: 'Entendido',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'alert-octagon',
|
||||
onConfirm,
|
||||
})
|
||||
if (err.err && err.err === 'token error') {
|
||||
localStorage.clear()
|
||||
this.$router.push('/')
|
||||
}
|
||||
},
|
||||
imprimirMensaje(message, title = '¡Felicidades!', onConfirm = () => {}) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-success',
|
||||
title,
|
||||
message,
|
||||
confirmText: 'Ok',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'check-circle',
|
||||
onConfirm,
|
||||
})
|
||||
},
|
||||
imprimirWarning(
|
||||
message,
|
||||
title = '¡Espera un minuto!',
|
||||
onConfirm = () => {},
|
||||
onCancel = () => {}
|
||||
) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-warning',
|
||||
title,
|
||||
message,
|
||||
confirmText: 'Confirmar',
|
||||
canCancel: true,
|
||||
cancelText: 'Cancelar',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'help-circle',
|
||||
onConfirm,
|
||||
onCancel,
|
||||
})
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
this.admin.idUsuario = Number(localStorage.getItem('idUsuario'))
|
||||
this.admin.idTipoUsuario = Number(localStorage.getItem('idTipoUsuario'))
|
||||
this.admin.tipoUsuario = localStorage.getItem('tipoUsuario')
|
||||
this.admin.token = {
|
||||
headers: {
|
||||
token: localStorage.getItem('token'),
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
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')
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -14,7 +14,12 @@
|
||||
</b-button>
|
||||
</div>
|
||||
|
||||
<InputTableA />
|
||||
<InputTableA
|
||||
:admin="admin"
|
||||
:imprimirMensaje="imprimirMensaje"
|
||||
:imprimirWarning="imprimirWarning"
|
||||
:imprimirError="imprimirError"
|
||||
/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -32,6 +32,83 @@ export default {
|
||||
if (idTipoUsuario === 3) this.$router.push('/alumno')
|
||||
if (idTipoUsuario === 4) this.$router.push('/casoEspecial')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
admin: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
imprimirError(err = {}, title = '¡Hubo un error!', onConfirm = () => {}) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-danger',
|
||||
title,
|
||||
message: err.message,
|
||||
confirmText: 'Entendido',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'alert-octagon',
|
||||
onConfirm,
|
||||
})
|
||||
if (err.err && err.err === 'token error') {
|
||||
localStorage.clear()
|
||||
this.$router.push('/')
|
||||
}
|
||||
},
|
||||
imprimirMensaje(message, title = '¡Felicidades!', onConfirm = () => {}) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-success',
|
||||
title,
|
||||
message,
|
||||
confirmText: 'Ok',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'check-circle',
|
||||
onConfirm,
|
||||
})
|
||||
},
|
||||
imprimirWarning(
|
||||
message,
|
||||
title = '¡Espera un minuto!',
|
||||
onConfirm = () => {},
|
||||
onCancel = () => {}
|
||||
) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-warning',
|
||||
title,
|
||||
message,
|
||||
confirmText: 'Confirmar',
|
||||
canCancel: true,
|
||||
cancelText: 'Cancelar',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'help-circle',
|
||||
onConfirm,
|
||||
onCancel,
|
||||
})
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
this.admin.idUsuario = Number(localStorage.getItem('idUsuario'))
|
||||
this.admin.idTipoUsuario = Number(localStorage.getItem('idTipoUsuario'))
|
||||
this.admin.tipoUsuario = localStorage.getItem('tipoUsuario')
|
||||
this.admin.token = {
|
||||
headers: {
|
||||
token: localStorage.getItem('token'),
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
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')
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -26,5 +26,82 @@ export default {
|
||||
if (idTipoUsuario === 3) this.$router.push('/alumno')
|
||||
if (idTipoUsuario === 4) this.$router.push('/casoEspecial')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
admin: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
imprimirError(err = {}, title = '¡Hubo un error!', onConfirm = () => {}) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-danger',
|
||||
title,
|
||||
message: err.message,
|
||||
confirmText: 'Entendido',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'alert-octagon',
|
||||
onConfirm,
|
||||
})
|
||||
if (err.err && err.err === 'token error') {
|
||||
localStorage.clear()
|
||||
this.$router.push('/')
|
||||
}
|
||||
},
|
||||
imprimirMensaje(message, title = '¡Felicidades!', onConfirm = () => {}) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-success',
|
||||
title,
|
||||
message,
|
||||
confirmText: 'Ok',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'check-circle',
|
||||
onConfirm,
|
||||
})
|
||||
},
|
||||
imprimirWarning(
|
||||
message,
|
||||
title = '¡Espera un minuto!',
|
||||
onConfirm = () => {},
|
||||
onCancel = () => {}
|
||||
) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-warning',
|
||||
title,
|
||||
message,
|
||||
confirmText: 'Confirmar',
|
||||
canCancel: true,
|
||||
cancelText: 'Cancelar',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'help-circle',
|
||||
onConfirm,
|
||||
onCancel,
|
||||
})
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
this.admin.idUsuario = Number(localStorage.getItem('idUsuario'))
|
||||
this.admin.idTipoUsuario = Number(localStorage.getItem('idTipoUsuario'))
|
||||
this.admin.tipoUsuario = localStorage.getItem('tipoUsuario')
|
||||
this.admin.token = {
|
||||
headers: {
|
||||
token: localStorage.getItem('token'),
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
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')
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -33,6 +33,83 @@ export default {
|
||||
if (!localStorage.getItem('idResponsable'))
|
||||
this.$router.push('/admin/responsables')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
admin: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
imprimirError(err = {}, title = '¡Hubo un error!', onConfirm = () => {}) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-danger',
|
||||
title,
|
||||
message: err.message,
|
||||
confirmText: 'Entendido',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'alert-octagon',
|
||||
onConfirm,
|
||||
})
|
||||
if (err.err && err.err === 'token error') {
|
||||
localStorage.clear()
|
||||
this.$router.push('/')
|
||||
}
|
||||
},
|
||||
imprimirMensaje(message, title = '¡Felicidades!', onConfirm = () => {}) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-success',
|
||||
title,
|
||||
message,
|
||||
confirmText: 'Ok',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'check-circle',
|
||||
onConfirm,
|
||||
})
|
||||
},
|
||||
imprimirWarning(
|
||||
message,
|
||||
title = '¡Espera un minuto!',
|
||||
onConfirm = () => {},
|
||||
onCancel = () => {}
|
||||
) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-warning',
|
||||
title,
|
||||
message,
|
||||
confirmText: 'Confirmar',
|
||||
canCancel: true,
|
||||
cancelText: 'Cancelar',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'help-circle',
|
||||
onConfirm,
|
||||
onCancel,
|
||||
})
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
this.admin.idUsuario = Number(localStorage.getItem('idUsuario'))
|
||||
this.admin.idTipoUsuario = Number(localStorage.getItem('idTipoUsuario'))
|
||||
this.admin.tipoUsuario = localStorage.getItem('tipoUsuario')
|
||||
this.admin.token = {
|
||||
headers: {
|
||||
token: localStorage.getItem('token'),
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
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')
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -25,5 +25,82 @@ export default {
|
||||
if (!localStorage.getItem('idResponsable'))
|
||||
this.$router.push('/admin/responsables')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
admin: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
imprimirError(err = {}, title = '¡Hubo un error!', onConfirm = () => {}) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-danger',
|
||||
title,
|
||||
message: err.message,
|
||||
confirmText: 'Entendido',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'alert-octagon',
|
||||
onConfirm,
|
||||
})
|
||||
if (err.err && err.err === 'token error') {
|
||||
localStorage.clear()
|
||||
this.$router.push('/')
|
||||
}
|
||||
},
|
||||
imprimirMensaje(message, title = '¡Felicidades!', onConfirm = () => {}) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-success',
|
||||
title,
|
||||
message,
|
||||
confirmText: 'Ok',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'check-circle',
|
||||
onConfirm,
|
||||
})
|
||||
},
|
||||
imprimirWarning(
|
||||
message,
|
||||
title = '¡Espera un minuto!',
|
||||
onConfirm = () => {},
|
||||
onCancel = () => {}
|
||||
) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-warning',
|
||||
title,
|
||||
message,
|
||||
confirmText: 'Confirmar',
|
||||
canCancel: true,
|
||||
cancelText: 'Cancelar',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'help-circle',
|
||||
onConfirm,
|
||||
onCancel,
|
||||
})
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
this.admin.idUsuario = Number(localStorage.getItem('idUsuario'))
|
||||
this.admin.idTipoUsuario = Number(localStorage.getItem('idTipoUsuario'))
|
||||
this.admin.tipoUsuario = localStorage.getItem('tipoUsuario')
|
||||
this.admin.token = {
|
||||
headers: {
|
||||
token: localStorage.getItem('token'),
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
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')
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -22,5 +22,82 @@ export default {
|
||||
this.$router.push('/admin')
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
admin: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
imprimirError(err = {}, title = '¡Hubo un error!', onConfirm = () => {}) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-danger',
|
||||
title,
|
||||
message: err.message,
|
||||
confirmText: 'Entendido',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'alert-octagon',
|
||||
onConfirm,
|
||||
})
|
||||
if (err.err && err.err === 'token error') {
|
||||
localStorage.clear()
|
||||
this.$router.push('/')
|
||||
}
|
||||
},
|
||||
imprimirMensaje(message, title = '¡Felicidades!', onConfirm = () => {}) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-success',
|
||||
title,
|
||||
message,
|
||||
confirmText: 'Ok',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'check-circle',
|
||||
onConfirm,
|
||||
})
|
||||
},
|
||||
imprimirWarning(
|
||||
message,
|
||||
title = '¡Espera un minuto!',
|
||||
onConfirm = () => {},
|
||||
onCancel = () => {}
|
||||
) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-warning',
|
||||
title,
|
||||
message,
|
||||
confirmText: 'Confirmar',
|
||||
canCancel: true,
|
||||
cancelText: 'Cancelar',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'help-circle',
|
||||
onConfirm,
|
||||
onCancel,
|
||||
})
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
this.admin.idUsuario = Number(localStorage.getItem('idUsuario'))
|
||||
this.admin.idTipoUsuario = Number(localStorage.getItem('idTipoUsuario'))
|
||||
this.admin.tipoUsuario = localStorage.getItem('tipoUsuario')
|
||||
this.admin.token = {
|
||||
headers: {
|
||||
token: localStorage.getItem('token'),
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
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')
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -22,5 +22,82 @@ export default {
|
||||
this.$router.push('/admin')
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
admin: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
imprimirError(err = {}, title = '¡Hubo un error!', onConfirm = () => {}) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-danger',
|
||||
title,
|
||||
message: err.message,
|
||||
confirmText: 'Entendido',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'alert-octagon',
|
||||
onConfirm,
|
||||
})
|
||||
if (err.err && err.err === 'token error') {
|
||||
localStorage.clear()
|
||||
this.$router.push('/')
|
||||
}
|
||||
},
|
||||
imprimirMensaje(message, title = '¡Felicidades!', onConfirm = () => {}) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-success',
|
||||
title,
|
||||
message,
|
||||
confirmText: 'Ok',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'check-circle',
|
||||
onConfirm,
|
||||
})
|
||||
},
|
||||
imprimirWarning(
|
||||
message,
|
||||
title = '¡Espera un minuto!',
|
||||
onConfirm = () => {},
|
||||
onCancel = () => {}
|
||||
) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-warning',
|
||||
title,
|
||||
message,
|
||||
confirmText: 'Confirmar',
|
||||
canCancel: true,
|
||||
cancelText: 'Cancelar',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'help-circle',
|
||||
onConfirm,
|
||||
onCancel,
|
||||
})
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
this.admin.idUsuario = Number(localStorage.getItem('idUsuario'))
|
||||
this.admin.idTipoUsuario = Number(localStorage.getItem('idTipoUsuario'))
|
||||
this.admin.tipoUsuario = localStorage.getItem('tipoUsuario')
|
||||
this.admin.token = {
|
||||
headers: {
|
||||
token: localStorage.getItem('token'),
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
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')
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -256,6 +256,83 @@ export default {
|
||||
mounted() {
|
||||
this.idCuestionario = localStorage.getItem('idCuestionarioAlumno')
|
||||
},
|
||||
// data() {
|
||||
// return {
|
||||
// admin: {},
|
||||
// }
|
||||
// },
|
||||
// methods: {
|
||||
// imprimirError(err = {}, title = '¡Hubo un error!', onConfirm = () => {}) {
|
||||
// this.$buefy.dialog.alert({
|
||||
// ariaRole: 'alertdialog',
|
||||
// ariaModal: true,
|
||||
// type: 'is-danger',
|
||||
// title,
|
||||
// message: err.message,
|
||||
// confirmText: 'Entendido',
|
||||
// hasIcon: true,
|
||||
// iconPack: 'mdi',
|
||||
// icon: 'alert-octagon',
|
||||
// onConfirm,
|
||||
// })
|
||||
// if (err.err && err.err === 'token error') {
|
||||
// localStorage.clear()
|
||||
// this.$router.push('/')
|
||||
// }
|
||||
// },
|
||||
// imprimirMensaje(message, title = '¡Felicidades!', onConfirm = () => {}) {
|
||||
// this.$buefy.dialog.alert({
|
||||
// ariaRole: 'alertdialog',
|
||||
// ariaModal: true,
|
||||
// type: 'is-success',
|
||||
// title,
|
||||
// message,
|
||||
// confirmText: 'Ok',
|
||||
// hasIcon: true,
|
||||
// iconPack: 'mdi',
|
||||
// icon: 'check-circle',
|
||||
// onConfirm,
|
||||
// })
|
||||
// },
|
||||
// imprimirWarning(
|
||||
// message,
|
||||
// title = '¡Espera un minuto!',
|
||||
// onConfirm = () => {},
|
||||
// onCancel = () => {}
|
||||
// ) {
|
||||
// this.$buefy.dialog.alert({
|
||||
// ariaRole: 'alertdialog',
|
||||
// ariaModal: true,
|
||||
// type: 'is-warning',
|
||||
// title,
|
||||
// message,
|
||||
// confirmText: 'Confirmar',
|
||||
// canCancel: true,
|
||||
// cancelText: 'Cancelar',
|
||||
// hasIcon: true,
|
||||
// iconPack: 'mdi',
|
||||
// icon: 'help-circle',
|
||||
// onConfirm,
|
||||
// onCancel,
|
||||
// })
|
||||
// },
|
||||
// getLocalhostInfo() {
|
||||
// this.admin.idUsuario = Number(localStorage.getItem('idUsuario'))
|
||||
// this.admin.idTipoUsuario = Number(localStorage.getItem('idTipoUsuario'))
|
||||
// this.admin.tipoUsuario = localStorage.getItem('tipoUsuario')
|
||||
// this.admin.token = {
|
||||
// headers: {
|
||||
// token: localStorage.getItem('token'),
|
||||
// },
|
||||
// }
|
||||
// },
|
||||
// },
|
||||
// created() {
|
||||
// this.getLocalhostInfo()
|
||||
// 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')
|
||||
// },
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
|
||||
@@ -154,6 +154,83 @@ export default {
|
||||
created() {
|
||||
this.getData()
|
||||
},
|
||||
// data() {
|
||||
// return {
|
||||
// admin: {},
|
||||
// }
|
||||
// },
|
||||
// methods: {
|
||||
// imprimirError(err = {}, title = '¡Hubo un error!', onConfirm = () => {}) {
|
||||
// this.$buefy.dialog.alert({
|
||||
// ariaRole: 'alertdialog',
|
||||
// ariaModal: true,
|
||||
// type: 'is-danger',
|
||||
// title,
|
||||
// message: err.message,
|
||||
// confirmText: 'Entendido',
|
||||
// hasIcon: true,
|
||||
// iconPack: 'mdi',
|
||||
// icon: 'alert-octagon',
|
||||
// onConfirm,
|
||||
// })
|
||||
// if (err.err && err.err === 'token error') {
|
||||
// localStorage.clear()
|
||||
// this.$router.push('/')
|
||||
// }
|
||||
// },
|
||||
// imprimirMensaje(message, title = '¡Felicidades!', onConfirm = () => {}) {
|
||||
// this.$buefy.dialog.alert({
|
||||
// ariaRole: 'alertdialog',
|
||||
// ariaModal: true,
|
||||
// type: 'is-success',
|
||||
// title,
|
||||
// message,
|
||||
// confirmText: 'Ok',
|
||||
// hasIcon: true,
|
||||
// iconPack: 'mdi',
|
||||
// icon: 'check-circle',
|
||||
// onConfirm,
|
||||
// })
|
||||
// },
|
||||
// imprimirWarning(
|
||||
// message,
|
||||
// title = '¡Espera un minuto!',
|
||||
// onConfirm = () => {},
|
||||
// onCancel = () => {}
|
||||
// ) {
|
||||
// this.$buefy.dialog.alert({
|
||||
// ariaRole: 'alertdialog',
|
||||
// ariaModal: true,
|
||||
// type: 'is-warning',
|
||||
// title,
|
||||
// message,
|
||||
// confirmText: 'Confirmar',
|
||||
// canCancel: true,
|
||||
// cancelText: 'Cancelar',
|
||||
// hasIcon: true,
|
||||
// iconPack: 'mdi',
|
||||
// icon: 'help-circle',
|
||||
// onConfirm,
|
||||
// onCancel,
|
||||
// })
|
||||
// },
|
||||
// getLocalhostInfo() {
|
||||
// this.admin.idUsuario = Number(localStorage.getItem('idUsuario'))
|
||||
// this.admin.idTipoUsuario = Number(localStorage.getItem('idTipoUsuario'))
|
||||
// this.admin.tipoUsuario = localStorage.getItem('tipoUsuario')
|
||||
// this.admin.token = {
|
||||
// headers: {
|
||||
// token: localStorage.getItem('token'),
|
||||
// },
|
||||
// }
|
||||
// },
|
||||
// },
|
||||
// created() {
|
||||
// this.getLocalhostInfo()
|
||||
// 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')
|
||||
// },
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -24,5 +24,82 @@ export default {
|
||||
if (idTipoUsuario === 2) this.$router.push('/alumno')
|
||||
if (idTipoUsuario === 3) this.$router.push('/alumno')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
admin: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
imprimirError(err = {}, title = '¡Hubo un error!', onConfirm = () => {}) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-danger',
|
||||
title,
|
||||
message: err.message,
|
||||
confirmText: 'Entendido',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'alert-octagon',
|
||||
onConfirm,
|
||||
})
|
||||
if (err.err && err.err === 'token error') {
|
||||
localStorage.clear()
|
||||
this.$router.push('/')
|
||||
}
|
||||
},
|
||||
imprimirMensaje(message, title = '¡Felicidades!', onConfirm = () => {}) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-success',
|
||||
title,
|
||||
message,
|
||||
confirmText: 'Ok',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'check-circle',
|
||||
onConfirm,
|
||||
})
|
||||
},
|
||||
imprimirWarning(
|
||||
message,
|
||||
title = '¡Espera un minuto!',
|
||||
onConfirm = () => {},
|
||||
onCancel = () => {}
|
||||
) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-warning',
|
||||
title,
|
||||
message,
|
||||
confirmText: 'Confirmar',
|
||||
canCancel: true,
|
||||
cancelText: 'Cancelar',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'help-circle',
|
||||
onConfirm,
|
||||
onCancel,
|
||||
})
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
this.admin.idUsuario = Number(localStorage.getItem('idUsuario'))
|
||||
this.admin.idTipoUsuario = Number(localStorage.getItem('idTipoUsuario'))
|
||||
this.admin.tipoUsuario = localStorage.getItem('tipoUsuario')
|
||||
this.admin.token = {
|
||||
headers: {
|
||||
token: localStorage.getItem('token'),
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
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')
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -22,6 +22,83 @@ export default {
|
||||
if (idTipoUsuario === 2) this.$router.push('/alumno')
|
||||
if (idTipoUsuario === 3) this.$router.push('/alumno')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
admin: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
imprimirError(err = {}, title = '¡Hubo un error!', onConfirm = () => {}) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-danger',
|
||||
title,
|
||||
message: err.message,
|
||||
confirmText: 'Entendido',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'alert-octagon',
|
||||
onConfirm,
|
||||
})
|
||||
if (err.err && err.err === 'token error') {
|
||||
localStorage.clear()
|
||||
this.$router.push('/')
|
||||
}
|
||||
},
|
||||
imprimirMensaje(message, title = '¡Felicidades!', onConfirm = () => {}) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-success',
|
||||
title,
|
||||
message,
|
||||
confirmText: 'Ok',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'check-circle',
|
||||
onConfirm,
|
||||
})
|
||||
},
|
||||
imprimirWarning(
|
||||
message,
|
||||
title = '¡Espera un minuto!',
|
||||
onConfirm = () => {},
|
||||
onCancel = () => {}
|
||||
) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-warning',
|
||||
title,
|
||||
message,
|
||||
confirmText: 'Confirmar',
|
||||
canCancel: true,
|
||||
cancelText: 'Cancelar',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'help-circle',
|
||||
onConfirm,
|
||||
onCancel,
|
||||
})
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
this.admin.idUsuario = Number(localStorage.getItem('idUsuario'))
|
||||
this.admin.idTipoUsuario = Number(localStorage.getItem('idTipoUsuario'))
|
||||
this.admin.tipoUsuario = localStorage.getItem('tipoUsuario')
|
||||
this.admin.token = {
|
||||
headers: {
|
||||
token: localStorage.getItem('token'),
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
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')
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -148,6 +148,83 @@ export default {
|
||||
if (idTipoUsuario === 3) this.$router.push('/alumno')
|
||||
if (idTipoUsuario === 4) this.$router.push('/casoEspecial')
|
||||
},
|
||||
// data() {
|
||||
// return {
|
||||
// admin: {},
|
||||
// }
|
||||
// },
|
||||
// methods: {
|
||||
// imprimirError(err = {}, title = '¡Hubo un error!', onConfirm = () => {}) {
|
||||
// this.$buefy.dialog.alert({
|
||||
// ariaRole: 'alertdialog',
|
||||
// ariaModal: true,
|
||||
// type: 'is-danger',
|
||||
// title,
|
||||
// message: err.message,
|
||||
// confirmText: 'Entendido',
|
||||
// hasIcon: true,
|
||||
// iconPack: 'mdi',
|
||||
// icon: 'alert-octagon',
|
||||
// onConfirm,
|
||||
// })
|
||||
// if (err.err && err.err === 'token error') {
|
||||
// localStorage.clear()
|
||||
// this.$router.push('/')
|
||||
// }
|
||||
// },
|
||||
// imprimirMensaje(message, title = '¡Felicidades!', onConfirm = () => {}) {
|
||||
// this.$buefy.dialog.alert({
|
||||
// ariaRole: 'alertdialog',
|
||||
// ariaModal: true,
|
||||
// type: 'is-success',
|
||||
// title,
|
||||
// message,
|
||||
// confirmText: 'Ok',
|
||||
// hasIcon: true,
|
||||
// iconPack: 'mdi',
|
||||
// icon: 'check-circle',
|
||||
// onConfirm,
|
||||
// })
|
||||
// },
|
||||
// imprimirWarning(
|
||||
// message,
|
||||
// title = '¡Espera un minuto!',
|
||||
// onConfirm = () => {},
|
||||
// onCancel = () => {}
|
||||
// ) {
|
||||
// this.$buefy.dialog.alert({
|
||||
// ariaRole: 'alertdialog',
|
||||
// ariaModal: true,
|
||||
// type: 'is-warning',
|
||||
// title,
|
||||
// message,
|
||||
// confirmText: 'Confirmar',
|
||||
// canCancel: true,
|
||||
// cancelText: 'Cancelar',
|
||||
// hasIcon: true,
|
||||
// iconPack: 'mdi',
|
||||
// icon: 'help-circle',
|
||||
// onConfirm,
|
||||
// onCancel,
|
||||
// })
|
||||
// },
|
||||
// getLocalhostInfo() {
|
||||
// this.admin.idUsuario = Number(localStorage.getItem('idUsuario'))
|
||||
// this.admin.idTipoUsuario = Number(localStorage.getItem('idTipoUsuario'))
|
||||
// this.admin.tipoUsuario = localStorage.getItem('tipoUsuario')
|
||||
// this.admin.token = {
|
||||
// headers: {
|
||||
// token: localStorage.getItem('token'),
|
||||
// },
|
||||
// }
|
||||
// },
|
||||
// },
|
||||
// created() {
|
||||
// this.getLocalhostInfo()
|
||||
// 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')
|
||||
// },
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -144,6 +144,83 @@ export default {
|
||||
if (idTipoUsuario === 3) this.$router.push('/alumno')
|
||||
if (idTipoUsuario === 4) this.$router.push('/casoEspecial')
|
||||
},
|
||||
// data() {
|
||||
// return {
|
||||
// admin: {},
|
||||
// }
|
||||
// },
|
||||
// methods: {
|
||||
// imprimirError(err = {}, title = '¡Hubo un error!', onConfirm = () => {}) {
|
||||
// this.$buefy.dialog.alert({
|
||||
// ariaRole: 'alertdialog',
|
||||
// ariaModal: true,
|
||||
// type: 'is-danger',
|
||||
// title,
|
||||
// message: err.message,
|
||||
// confirmText: 'Entendido',
|
||||
// hasIcon: true,
|
||||
// iconPack: 'mdi',
|
||||
// icon: 'alert-octagon',
|
||||
// onConfirm,
|
||||
// })
|
||||
// if (err.err && err.err === 'token error') {
|
||||
// localStorage.clear()
|
||||
// this.$router.push('/')
|
||||
// }
|
||||
// },
|
||||
// imprimirMensaje(message, title = '¡Felicidades!', onConfirm = () => {}) {
|
||||
// this.$buefy.dialog.alert({
|
||||
// ariaRole: 'alertdialog',
|
||||
// ariaModal: true,
|
||||
// type: 'is-success',
|
||||
// title,
|
||||
// message,
|
||||
// confirmText: 'Ok',
|
||||
// hasIcon: true,
|
||||
// iconPack: 'mdi',
|
||||
// icon: 'check-circle',
|
||||
// onConfirm,
|
||||
// })
|
||||
// },
|
||||
// imprimirWarning(
|
||||
// message,
|
||||
// title = '¡Espera un minuto!',
|
||||
// onConfirm = () => {},
|
||||
// onCancel = () => {}
|
||||
// ) {
|
||||
// this.$buefy.dialog.alert({
|
||||
// ariaRole: 'alertdialog',
|
||||
// ariaModal: true,
|
||||
// type: 'is-warning',
|
||||
// title,
|
||||
// message,
|
||||
// confirmText: 'Confirmar',
|
||||
// canCancel: true,
|
||||
// cancelText: 'Cancelar',
|
||||
// hasIcon: true,
|
||||
// iconPack: 'mdi',
|
||||
// icon: 'help-circle',
|
||||
// onConfirm,
|
||||
// onCancel,
|
||||
// })
|
||||
// },
|
||||
// getLocalhostInfo() {
|
||||
// this.admin.idUsuario = Number(localStorage.getItem('idUsuario'))
|
||||
// this.admin.idTipoUsuario = Number(localStorage.getItem('idTipoUsuario'))
|
||||
// this.admin.tipoUsuario = localStorage.getItem('tipoUsuario')
|
||||
// this.admin.token = {
|
||||
// headers: {
|
||||
// token: localStorage.getItem('token'),
|
||||
// },
|
||||
// }
|
||||
// },
|
||||
// },
|
||||
// created() {
|
||||
// this.getLocalhostInfo()
|
||||
// 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')
|
||||
// },
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -18,5 +18,82 @@ export default {
|
||||
if (idTipoUsuario === 3) this.$router.push('/alumno')
|
||||
if (idTipoUsuario === 4) this.$router.push('/casoEspecial')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
admin: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
imprimirError(err = {}, title = '¡Hubo un error!', onConfirm = () => {}) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-danger',
|
||||
title,
|
||||
message: err.message,
|
||||
confirmText: 'Entendido',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'alert-octagon',
|
||||
onConfirm,
|
||||
})
|
||||
if (err.err && err.err === 'token error') {
|
||||
localStorage.clear()
|
||||
this.$router.push('/')
|
||||
}
|
||||
},
|
||||
imprimirMensaje(message, title = '¡Felicidades!', onConfirm = () => {}) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-success',
|
||||
title,
|
||||
message,
|
||||
confirmText: 'Ok',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'check-circle',
|
||||
onConfirm,
|
||||
})
|
||||
},
|
||||
imprimirWarning(
|
||||
message,
|
||||
title = '¡Espera un minuto!',
|
||||
onConfirm = () => {},
|
||||
onCancel = () => {}
|
||||
) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-warning',
|
||||
title,
|
||||
message,
|
||||
confirmText: 'Confirmar',
|
||||
canCancel: true,
|
||||
cancelText: 'Cancelar',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'help-circle',
|
||||
onConfirm,
|
||||
onCancel,
|
||||
})
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
this.admin.idUsuario = Number(localStorage.getItem('idUsuario'))
|
||||
this.admin.idTipoUsuario = Number(localStorage.getItem('idTipoUsuario'))
|
||||
this.admin.tipoUsuario = localStorage.getItem('tipoUsuario')
|
||||
this.admin.token = {
|
||||
headers: {
|
||||
token: localStorage.getItem('token'),
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
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')
|
||||
},F
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -35,6 +35,83 @@ export default {
|
||||
if (idTipoUsuario === 3) this.$router.push('/alumno')
|
||||
if (idTipoUsuario === 4) this.$router.push('/casoEspecial')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
admin: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
imprimirError(err = {}, title = '¡Hubo un error!', onConfirm = () => {}) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-danger',
|
||||
title,
|
||||
message: err.message,
|
||||
confirmText: 'Entendido',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'alert-octagon',
|
||||
onConfirm,
|
||||
})
|
||||
if (err.err && err.err === 'token error') {
|
||||
localStorage.clear()
|
||||
this.$router.push('/')
|
||||
}
|
||||
},
|
||||
imprimirMensaje(message, title = '¡Felicidades!', onConfirm = () => {}) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-success',
|
||||
title,
|
||||
message,
|
||||
confirmText: 'Ok',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'check-circle',
|
||||
onConfirm,
|
||||
})
|
||||
},
|
||||
imprimirWarning(
|
||||
message,
|
||||
title = '¡Espera un minuto!',
|
||||
onConfirm = () => {},
|
||||
onCancel = () => {}
|
||||
) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-warning',
|
||||
title,
|
||||
message,
|
||||
confirmText: 'Confirmar',
|
||||
canCancel: true,
|
||||
cancelText: 'Cancelar',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'help-circle',
|
||||
onConfirm,
|
||||
onCancel,
|
||||
})
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
this.admin.idUsuario = Number(localStorage.getItem('idUsuario'))
|
||||
this.admin.idTipoUsuario = Number(localStorage.getItem('idTipoUsuario'))
|
||||
this.admin.tipoUsuario = localStorage.getItem('tipoUsuario')
|
||||
this.admin.token = {
|
||||
headers: {
|
||||
token: localStorage.getItem('token'),
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
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')
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -24,6 +24,83 @@ export default {
|
||||
if (idTipoUsuario === 3) this.$router.push('/alumno')
|
||||
if (idTipoUsuario === 4) this.$router.push('/casoEspecial')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
admin: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
imprimirError(err = {}, title = '¡Hubo un error!', onConfirm = () => {}) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-danger',
|
||||
title,
|
||||
message: err.message,
|
||||
confirmText: 'Entendido',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'alert-octagon',
|
||||
onConfirm,
|
||||
})
|
||||
if (err.err && err.err === 'token error') {
|
||||
localStorage.clear()
|
||||
this.$router.push('/')
|
||||
}
|
||||
},
|
||||
imprimirMensaje(message, title = '¡Felicidades!', onConfirm = () => {}) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-success',
|
||||
title,
|
||||
message,
|
||||
confirmText: 'Ok',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'check-circle',
|
||||
onConfirm,
|
||||
})
|
||||
},
|
||||
imprimirWarning(
|
||||
message,
|
||||
title = '¡Espera un minuto!',
|
||||
onConfirm = () => {},
|
||||
onCancel = () => {}
|
||||
) {
|
||||
this.$buefy.dialog.alert({
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
type: 'is-warning',
|
||||
title,
|
||||
message,
|
||||
confirmText: 'Confirmar',
|
||||
canCancel: true,
|
||||
cancelText: 'Cancelar',
|
||||
hasIcon: true,
|
||||
iconPack: 'mdi',
|
||||
icon: 'help-circle',
|
||||
onConfirm,
|
||||
onCancel,
|
||||
})
|
||||
},
|
||||
getLocalhostInfo() {
|
||||
this.admin.idUsuario = Number(localStorage.getItem('idUsuario'))
|
||||
this.admin.idTipoUsuario = Number(localStorage.getItem('idTipoUsuario'))
|
||||
this.admin.tipoUsuario = localStorage.getItem('tipoUsuario')
|
||||
this.admin.token = {
|
||||
headers: {
|
||||
token: localStorage.getItem('token'),
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getLocalhostInfo()
|
||||
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')
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user