Compare commits

13 Commits

Author SHA1 Message Date
Marcorv6 6bbf3bfcba premiaciones no mostrar inactivas 2022-06-01 20:34:02 -05:00
Marcorv6 d632711f66 estilos login mobile 2022-06-01 11:50:26 -05:00
Marcorv6 ccb97ee082 url api 2022-06-01 09:57:28 -05:00
Marcorv6 142be715d6 tokens 2022-05-29 23:17:52 -05:00
Marcorv6 e50e7ef6e6 url api 2022-05-25 23:36:32 -05:00
Marcorv6 2275e5e8fc already registred 2022-05-25 21:21:24 -05:00
Marcorv6 fc2af4c815 login arreglado 2022-05-25 19:27:02 -05:00
Marcorv6 5cf1e87d54 clean console logs 2022-05-24 23:11:56 -05:00
Marcorv6 4e7aa3d119 quick fix 2022-05-24 21:05:11 -05:00
Marcorv6 301be2124c correccion login 2022-05-24 18:06:54 -05:00
Marco 033c477808 conflict 2022-05-24 13:54:04 -05:00
Marco f424ecda46 router push 2022-05-24 13:52:25 -05:00
Jeremy Carreras 557344203b url api produccion 2022-05-23 19:29:56 -05:00
14 changed files with 182 additions and 92 deletions
+24 -12
View File
@@ -1,10 +1,8 @@
<template> <template>
<div class="full-h cont"> <div class="full-h cont">
<h2 class="has-text-centered is-size-2"> <h2 class="has-text-centered is-size-2">Registro de invitados</h2>
Registro de invitados <div class="cont-2 is-flex">
</h2> <div class="img">
<div class="is-flex">
<div class="">
<b-image <b-image
:src="require('@/assets/login_image.png')" :src="require('@/assets/login_image.png')"
alt="LoginImage" alt="LoginImage"
@@ -12,8 +10,8 @@
class="my-4 img" class="my-4 img"
></b-image> ></b-image>
</div> </div>
<div class="is-flex is-justify-content-center"> <div class="is-flex is-justify-content-center cont-login">
<form class="box"> <form class="box" @submit.prevent="">
<p> <p>
Para garantizar el acceso de sus invitados a la ceremonia de entrega Para garantizar el acceso de sus invitados a la ceremonia de entrega
de medallas en la que usted será distinguido(a), le pedimos de medallas en la que usted será distinguido(a), le pedimos
@@ -22,15 +20,16 @@
<b-field label="Número de trabajador" :type="error"> <b-field label="Número de trabajador" :type="error">
<b-input <b-input
type="number" type="number"
@keyup.enter.native="login()"
v-model="noTrabajador" v-model="noTrabajador"
v-on:keydown.prevent="submit"
/> />
</b-field> </b-field>
<div class="has-text-centered"> <div class="has-text-centered">
<b-button <b-button
@click="login()"
type="is-success" type="is-success"
native-type="submit"
@click="login()"
:disabled="error || !noTrabajador" :disabled="error || !noTrabajador"
> >
Iniciar sesión Iniciar sesión
@@ -79,12 +78,12 @@ export default {
'numeroTrabajador', 'numeroTrabajador',
info.Profesor.numeroTrabajador info.Profesor.numeroTrabajador
) )
this.$router.push('profesor') this.$router.push('Profesor')
}) })
.catch((err) => { .catch((err) => {
this.updateIsLoading(false) this.updateIsLoading(false)
this.error = 'is-danger' this.error = 'is-danger'
this.imprimirError(err.response.data) this.imprimirError(err.response.data.message)
}) })
} }
}, },
@@ -110,7 +109,20 @@ export default {
.cont { .cont {
margin-top: 10rem; margin-top: 10rem;
} }
.img{
@media (max-width: 768px) {
.img {
display: none;
}
.cont-login{
width: 382px;
}
.box
{
padding: 15px !important;
}
}
.img {
width: 30rem; width: 30rem;
height: 14rem; height: 14rem;
margin-right: 2rem; margin-right: 2rem;
+22 -8
View File
@@ -3,7 +3,7 @@
<div class="has-text-centered"> <div class="has-text-centered">
<h2 class="is-size-1">Entrega de medallas operador</h2> <h2 class="is-size-1">Entrega de medallas operador</h2>
</div> </div>
<div class="is-flex is-justify-content-center my-3"> <div class="is-flex is-justify-content-center my-3 cont-login">
<b-radio v-model="loginType" name="loginType" native-value="1"> <b-radio v-model="loginType" name="loginType" native-value="1">
Admin Admin
</b-radio> </b-radio>
@@ -11,8 +11,8 @@
Operador Operador
</b-radio> </b-radio>
</div> </div>
<div class="is-flex is-justify-content-center my-3"> <div class="is-flex is-justify-content-center my-3 cont-login">
<form v-if="loginType == 1" class="box"> <form v-if="loginType == 1" class="box" @submit.prevent="">
<b-field label="Usuario" :type="error"> <b-field label="Usuario" :type="error">
<b-input <b-input
type="text" type="text"
@@ -34,13 +34,14 @@
<b-button <b-button
@click="login()" @click="login()"
type="is-success" type="is-success"
native-type="submit"
:disabled="error || !(usuario && password)" :disabled="error || !(usuario && password)"
> >
Iniciar Sesión Iniciar Sesión
</b-button> </b-button>
</div> </div>
</form> </form>
<form v-else-if="loginType == 2" class="box"> <form v-else-if="loginType == 2" class="box" @submit.prevent="">
<b-field label="Usuario" :type="error"> <b-field label="Usuario" :type="error">
<b-input <b-input
type="text" type="text"
@@ -62,6 +63,7 @@
<b-button <b-button
@click="login()" @click="login()"
type="is-success" type="is-success"
native-type="submit"
:disabled="error || !(usuario && password)" :disabled="error || !(usuario && password)"
> >
Iniciar Sesión Iniciar Sesión
@@ -114,12 +116,13 @@ export default {
localStorage.setItem('tipoUsuario', info.Usuario.idTipoUsuario) localStorage.setItem('tipoUsuario', info.Usuario.idTipoUsuario)
localStorage.setItem('idUsuario', info.Usuario.idUsuario) localStorage.setItem('idUsuario', info.Usuario.idUsuario)
this.updateIsLoading(false) this.updateIsLoading(false)
this.$router.push(`/${'admin'}`) this.$router.push(`/${'Admin'}`)
}) })
.catch((err) => { .catch((err) => {
this.error = 'is-danger'
this.updateIsLoading(false) this.updateIsLoading(false)
this.imprimirError(err.response.data) this.error = 'is-danger'
console.log(err.response.data.message)
this.imprimirError(err.response.data.message)
}) })
} }
@@ -139,7 +142,7 @@ export default {
localStorage.setItem('usuario', info.Usuario.usuario) localStorage.setItem('usuario', info.Usuario.usuario)
localStorage.setItem('idUsuario', info.Usuario.idUsuario) localStorage.setItem('idUsuario', info.Usuario.idUsuario)
this.updateIsLoading(false) this.updateIsLoading(false)
this.$router.push(`/${'operador'}`) this.$router.push(`/${'Operador'}`)
}) })
.catch((err) => { .catch((err) => {
this.error = 'is-danger' this.error = 'is-danger'
@@ -170,6 +173,17 @@ export default {
height: 75vh; height: 75vh;
} }
@media (max-width: 768px) {
.cont-login{
width: 382px;
margin-left: 1.5rem;
}
.box
{
padding: 15px !important;
}
}
form { form {
width: 30rem; width: 30rem;
} }
+5 -4
View File
@@ -111,13 +111,14 @@ export default {
hora: this.hora, hora: this.hora,
activa: true activa: true
} }
console.log(data)
axios axios
.post(`${process.env.api}/Premiacion/nueva`, data) .post(`${process.env.api}/Premiacion/nueva`, data, {
headers: {
token: localStorage.getItem('token'),
},
})
.then((res) => { .then((res) => {
this.updateIsLoading(false) this.updateIsLoading(false)
const info = res.data
console.log(info)
this.success() this.success()
this.reset() this.reset()
}) })
+12 -6
View File
@@ -77,7 +77,11 @@ export default {
fecha: this.fechaNueva, fecha: this.fechaNueva,
} }
axios axios
.put(`${process.env.api}/Premiacion/editar`, data) .put(`${process.env.api}/Premiacion/editar`, data, {
headers: {
token: localStorage.getItem('token'),
},
})
.then((res) => { .then((res) => {
this.updateIsLoading(false) this.updateIsLoading(false)
let message = 'Se ha editado la premiación con éxito.' let message = 'Se ha editado la premiación con éxito.'
@@ -95,10 +99,9 @@ export default {
localStorage.removeItem('fecha') localStorage.removeItem('fecha')
localStorage.removeItem('hora') localStorage.removeItem('hora')
localStorage.removeItem('activa') localStorage.removeItem('activa')
this.$router.push('/admin') this.$router.push('/Admin')
}, },
colorBoton() { colorBoton() {
console.log(this.activa)
if (this.activa === true) return 'is-danger' if (this.activa === true) return 'is-danger'
return 'is-success' return 'is-success'
}, },
@@ -112,9 +115,12 @@ export default {
idPremiacion: this.idPremiacion, idPremiacion: this.idPremiacion,
activa: !this.activa, activa: !this.activa,
} }
console.log(data)
axios axios
.put(`${process.env.api}/Premiacion/activarDesactivar`, data) .put(`${process.env.api}/Premiacion/activarDesactivar`, data, {
headers: {
token: localStorage.getItem('token'),
},
})
.then((res) => { .then((res) => {
this.updateIsLoading(false) this.updateIsLoading(false)
let message = let message =
@@ -177,7 +183,7 @@ export default {
confirmButtonColor: '#1e3c70', confirmButtonColor: '#1e3c70',
}).then((res) => { }).then((res) => {
if (res.value) { if (res.value) {
this.$router.push("/admin") this.$router.push('/admin')
} }
}) })
}, },
+5 -3
View File
@@ -108,11 +108,13 @@ export default {
password: this.password, password: this.password,
} }
axios axios
.post(`${process.env.api}/usuario/nuevoOperador`, data) .post(`${process.env.api}/usuario/nuevoOperador`, data, {
headers: {
token: localStorage.getItem('token'),
},
})
.then((res) => { .then((res) => {
this.updateIsLoading(false) this.updateIsLoading(false)
const info = res.data
console.log(info)
this.success() this.success()
this.reset() this.reset()
}) })
+12 -5
View File
@@ -1,7 +1,9 @@
<template> <template>
<div> <div>
<CrearPremiacion :updateIsLoading="updateIsLoading"/> <CrearPremiacion :updateIsLoading="updateIsLoading" />
<h2 class="has-text-centered mt-5 is-size-3">Administración de premiaciones</h2> <h2 class="has-text-centered mt-5 is-size-3">
Administración de premiaciones
</h2>
<TablaPremiaciones <TablaPremiaciones
:data="data" :data="data"
:isLoadingTable="isLoadingTable" :isLoadingTable="isLoadingTable"
@@ -20,14 +22,14 @@ import axios from 'axios'
export default { export default {
components: { components: {
TablaPremiaciones, TablaPremiaciones,
CrearPremiacion CrearPremiacion,
}, },
props: { props: {
updateIsLoading: { updateIsLoading: {
type: Function, type: Function,
required: true, required: true,
default: () => {}, default: () => {},
} },
}, },
data() { data() {
return { return {
@@ -46,7 +48,12 @@ export default {
this.updateIsLoading(true) this.updateIsLoading(true)
axios axios
.get( .get(
`${process.env.api}/premiacion/premiacionesPaginacion?pagina=${this.page}` `${process.env.api}/premiacion/premiacionesPaginacion?pagina=${this.page}`,
{
headers: {
token: localStorage.getItem('token'),
},
}
) )
.then((res) => { .then((res) => {
if (res) { if (res) {
+31 -11
View File
@@ -124,12 +124,16 @@ export default {
formData.append('file', this.csv) formData.append('file', this.csv)
axios axios
.post(`${process.env.api}/profesor/cargarDatos?idPremiacion=${this.idPremiacionCSV}`, formData, { .post(
headers: { `${process.env.api}/profesor/cargarDatos?idPremiacion=${this.idPremiacionCSV}`,
'Content-Type': 'multipart/form-data', formData,
// token: localStorage.getItem('token'), {
}, headers: {
}) 'Content-Type': 'multipart/form-data',
token: localStorage.getItem('token'),
},
}
)
.then((res) => { .then((res) => {
this.isLoading = false this.isLoading = false
this.csv = {} this.csv = {}
@@ -162,6 +166,15 @@ export default {
confirmButtonColor: '#1e3c70', confirmButtonColor: '#1e3c70',
}) })
}, },
errorMessageExt() {
this.$swal({
title: 'Asegurate de ingresar un archivo .CSV.',
type: 'error',
timer: 5000,
confirmButtonText: 'Aceptar',
confirmButtonColor: '#1e3c70',
})
},
noDataErrorMessage() { noDataErrorMessage() {
this.$swal({ this.$swal({
title: 'No hay datos que descargar.', title: 'No hay datos que descargar.',
@@ -179,22 +192,25 @@ export default {
const extPermitidas = /(.csv)$/i const extPermitidas = /(.csv)$/i
if (!extPermitidas.exec(this.csv.name)) { if (!extPermitidas.exec(this.csv.name)) {
this.imprimirError({ message: 'Asegurate de ingresar un archivo .CSV' }) this.errorMessageExt()
this.csv = {} this.csv = {}
} }
}, },
}, },
watch: { watch: {
idPremiacion() { idPremiacion() {
console.log("Algo")
this.dataExport = [] this.dataExport = []
this.isLoading = true this.isLoading = true
axios axios
.get( .get(
`${process.env.api}/invitado/get?idPremiacion=${this.idPremiacion}` `${process.env.api}/invitado/get?idPremiacion=${this.idPremiacion}`,
{
headers: {
token: localStorage.getItem('token'),
},
}
) )
.then((res) => { .then((res) => {
console.log(res.data)
this.isLoading = false this.isLoading = false
if (res.data.length > 0) { if (res.data.length > 0) {
res.data.forEach((item, index) => { res.data.forEach((item, index) => {
@@ -216,7 +232,11 @@ export default {
async created() { async created() {
this.isLoading = true this.isLoading = true
await axios await axios
.get(`${process.env.api}/premiacion/get`) .get(`${process.env.api}/premiacion/get`, {
headers: {
token: localStorage.getItem('token'),
},
})
.then((res) => { .then((res) => {
this.isLoading = false this.isLoading = false
if (res) { if (res) {
+1 -1
View File
@@ -105,7 +105,7 @@ export default {
localStorage.setItem("fecha", data.fecha) localStorage.setItem("fecha", data.fecha)
localStorage.setItem("hora", data.hora) localStorage.setItem("hora", data.hora)
localStorage.setItem("activa", data.activa) localStorage.setItem("activa", data.activa)
this.$router.push("/admin/editarPremiacion") this.$router.push("/Admin/EditarPremiacion")
}, },
fecha(date) { fecha(date) {
const fecha = moment(date) const fecha = moment(date)
+1 -1
View File
@@ -29,7 +29,7 @@ export default {
methods: { methods: {
cerrarSesion() { cerrarSesion() {
localStorage.clear() localStorage.clear()
this.$router.push('/loginOperador') this.$router.push('/LoginOperador')
}, },
}, },
created() { created() {
+2 -2
View File
@@ -26,7 +26,7 @@ export default {
env: { env: {
// api: "http://localhost:3000", // api: "http://localhost:3000",
// api: "https://890af9d598a4.ngrok.io" // api: "https://890af9d598a4.ngrok.io"
api: "https://venus.acatlan.unam.mx/premiaciones_test", // api: "https://venus.acatlan.unam.mx/premiaciones_test",
// api: "https://venus.acatlan.unam.mx/produccion", api: "https://venus.acatlan.unam.mx/premiaciones",
}, },
} }
+2 -18
View File
@@ -25,13 +25,13 @@ export default {
updateIsLoading(booleanValue) { updateIsLoading(booleanValue) {
this.isLoading = booleanValue this.isLoading = booleanValue
}, },
imprimirError(err = {}, title = '¡Hubo un error!', onConfirm = () => {}) { imprimirError(err, title = '¡Hubo un error!', onConfirm = () => {}) {
this.$buefy.dialog.alert({ this.$buefy.dialog.alert({
ariaRole: 'alertdialog', ariaRole: 'alertdialog',
ariaModal: true, ariaModal: true,
type: 'is-danger', type: 'is-danger',
title, title,
message: err.message, message: err,
confirmText: 'Entendido', confirmText: 'Entendido',
hasIcon: true, hasIcon: true,
iconPack: 'mdi', iconPack: 'mdi',
@@ -79,22 +79,6 @@ export default {
onCancel: () => onCancel(), onCancel: () => 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')
}, },
layout: 'login', layout: 'login',
} }
+10 -6
View File
@@ -4,11 +4,11 @@
<p class="is-size-2">Lector de códigos QR</p> <p class="is-size-2">Lector de códigos QR</p>
</div> </div>
<div v-if="!isReading" class="has-text-centered mb-4"> <div v-if="!isReading" class="has-text-centered mb-4">
<b-button type="is-info" @click="() => this.isReading = true"> <b-button type="is-info" @click="() => (this.isReading = true)">
Leer QR Leer QR
</b-button> </b-button>
</div> </div>
<Scanner :enviar="enviar" v-if="isReading"/> <Scanner :enviar="enviar" v-if="isReading" />
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" /> <b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
</section> </section>
</template> </template>
@@ -18,7 +18,7 @@ import axios from 'axios'
import Scanner from '../../components/operador/Scanner.vue' import Scanner from '../../components/operador/Scanner.vue'
export default { export default {
components: { components: {
Scanner Scanner,
}, },
data() { data() {
return { return {
@@ -32,7 +32,11 @@ export default {
this.isReading = false this.isReading = false
const data = { idProfesor, idPremiacion } const data = { idProfesor, idPremiacion }
axios axios
.post(`${process.env.api}/profesor/entradaInvitado`, data) .post(`${process.env.api}/profesor/entradaInvitado`, data, {
headers: {
token: localStorage.getItem('token'),
},
})
.then((res) => { .then((res) => {
this.isLoading = false this.isLoading = false
this.successUpload() this.successUpload()
@@ -52,7 +56,7 @@ export default {
confirmButtonColor: '#1e3c70', confirmButtonColor: '#1e3c70',
}) })
}, },
errorMessage(err){ errorMessage(err) {
this.$swal({ this.$swal({
title: err, title: err,
type: 'error', type: 'error',
@@ -60,7 +64,7 @@ export default {
confirmButtonText: 'Aceptar', confirmButtonText: 'Aceptar',
confirmButtonColor: '#1e3c70', confirmButtonColor: '#1e3c70',
}) })
} },
}, },
layout: 'default', layout: 'default',
} }
+53 -13
View File
@@ -15,9 +15,14 @@
<div v-if="premiaciones.length !== 0" class="box"> <div v-if="premiaciones.length !== 0" class="box">
<div> <div>
<p class="is-size-4 block"><b>Nombre:</b> {{ `${Profesor.nombre}` }}</p> <p class="is-size-4 block"><b>Nombre:</b> {{ `${Profesor.nombre}` }}</p>
<p v-if="isSent" class="is-size-3 block has-text-centered">¡Gracias por su registro!</p> <p v-if="alreadyRegistred" class="is-size-3 block has-text-centered">
Este profesor ya registró invitados en otro momento.
</p>
<p v-if="isSent" class="is-size-3 block has-text-centered">
¡Gracias por su registro!
</p>
<div v-if="!isSent" class="is-flex block"> <div v-if="!isSent && !alreadyRegistred" class="is-flex block">
<p class="is-size-4 block mr-4"><b>Premiacion: </b></p> <p class="is-size-4 block mr-4"><b>Premiacion: </b></p>
<b-select <b-select
v-model="premiacion" v-model="premiacion"
@@ -34,7 +39,7 @@
</b-select> </b-select>
</div> </div>
<div v-if="!isSent" class="is-flex"> <div v-if="!isSent && !alreadyRegistred" class="is-flex">
<p class="is-size-4 block mr-4"><b>Cantidad de invitados: </b></p> <p class="is-size-4 block mr-4"><b>Cantidad de invitados: </b></p>
<b-select <b-select
v-model="numeroInvitados" v-model="numeroInvitados"
@@ -92,6 +97,7 @@
</div> </div>
<div v-if="premiaciones.length !== 0" class="has-text-centered"> <div v-if="premiaciones.length !== 0" class="has-text-centered">
<b-button <b-button
v-if="!alreadyRegistred"
:disabled="mostrarBoton()" :disabled="mostrarBoton()"
class="is-success mb-5" class="is-success mb-5"
@click="enviar()" @click="enviar()"
@@ -101,7 +107,9 @@
</div> </div>
<div v-if="premiaciones.length === 0" class="box"> <div v-if="premiaciones.length === 0" class="box">
<p class="is-size-4 block"><b>Nombre:</b> {{ `${Profesor.nombre}` }}</p> <p class="is-size-4 block"><b>Nombre:</b> {{ `${Profesor.nombre}` }}</p>
<p class="is-size-4 block"><b>No hay premiaciones activas para este profesor.</b> </p> <p class="is-size-4 block">
<b>No hay premiaciones activas para este profesor.</b>
</p>
</div> </div>
</div> </div>
</template> </template>
@@ -121,11 +129,11 @@ export default {
flag: false, flag: false,
isDisabled: false, isDisabled: false,
isSent: false, isSent: false,
alreadyRegistred: null,
} }
}, },
methods: { methods: {
enviar() { enviar() {
console.log(this.premiacion)
this.isLoading = true this.isLoading = true
this.invitados.forEach((item) => { this.invitados.forEach((item) => {
item.nombreCompleto = `${item.nombre} ${item.apellido}` item.nombreCompleto = `${item.nombre} ${item.apellido}`
@@ -135,9 +143,12 @@ export default {
idPremiacion: this.premiacion, idPremiacion: this.premiacion,
invitados: this.invitados, invitados: this.invitados,
} }
console.log(data)
axios axios
.post(`${process.env.api}/invitado/infoInvitados`, data) .post(`${process.env.api}/invitado/infoInvitados`, data, {
headers: {
token: localStorage.getItem('token'),
},
})
.then((res) => { .then((res) => {
this.isLoading = false this.isLoading = false
this.invitados = [] this.invitados = []
@@ -176,15 +187,41 @@ export default {
} }
return false return false
}, },
fetchPremiaciones() { async fetchPremiaciones() {
this.isLoading = true this.isLoading = true
axios await axios
.get( .get(
`${process.env.api}/profesor/premiaciones?idProfesor=${this.Profesor.idProfesor}` `${process.env.api}/profesor/premiaciones?idProfesor=${this.Profesor.idProfesor}`,
{
headers: {
token: localStorage.getItem('token'),
},
}
)
.then((res) => {
console.log(res)
this.isLoading = false
if (res) this.premiaciones = res.data
})
.catch((err) => {
this.isLoading = false
console.log(err)
})
},
async yaRegistrado() {
this.isLoading = true
await axios
.get(
`${process.env.api}/profesor/yaRegistro?idProfesor=${this.Profesor.idProfesor}&idPremiacion=${this.premiaciones[0].idPremiacion}`,
{
headers: {
token: localStorage.getItem('token'),
},
}
) )
.then((res) => { .then((res) => {
this.isLoading = false this.isLoading = false
if(res) this.premiaciones = res.data if (res) this.alreadyRegistred = res.data
}) })
.catch((err) => { .catch((err) => {
this.isLoading = false this.isLoading = false
@@ -192,12 +229,15 @@ export default {
}) })
}, },
}, },
created() { async created() {
this.Profesor.idProfesor = localStorage.getItem('idProfesor') this.Profesor.idProfesor = localStorage.getItem('idProfesor')
this.Profesor.nombre = localStorage.getItem('nombre') this.Profesor.nombre = localStorage.getItem('nombre')
this.Profesor.adscripcion = localStorage.getItem('adscripcion') this.Profesor.adscripcion = localStorage.getItem('adscripcion')
this.Profesor.numeroTrabajador = localStorage.getItem('numeroTrabajador') this.Profesor.numeroTrabajador = localStorage.getItem('numeroTrabajador')
this.fetchPremiaciones() await this.fetchPremiaciones()
if (this.premiaciones.length === 1 && this.premiaciones.length > 0) {
await this.yaRegistrado()
}
}, },
watch: { watch: {
numeroInvitados() { numeroInvitados() {
+2 -2
View File
@@ -25,13 +25,13 @@ export default {
updateIsLoading(booleanValue) { updateIsLoading(booleanValue) {
this.isLoading = booleanValue this.isLoading = booleanValue
}, },
imprimirError(err = {}, title = '¡Hubo un error!', onConfirm = () => {}) { imprimirError(err, title = '¡Hubo un error!', onConfirm = () => {}) {
this.$buefy.dialog.alert({ this.$buefy.dialog.alert({
ariaRole: 'alertdialog', ariaRole: 'alertdialog',
ariaModal: true, ariaModal: true,
type: 'is-danger', type: 'is-danger',
title, title,
message: err.message, message: err,
confirmText: 'Entendido', confirmText: 'Entendido',
hasIcon: true, hasIcon: true,
iconPack: 'mdi', iconPack: 'mdi',