From 2275e5e8fcb6333fc3333fcf5724e6e603b20f9b Mon Sep 17 00:00:00 2001 From: marcorv6 Date: Wed, 25 May 2022 21:21:24 -0500 Subject: [PATCH] already registred --- nuxt.config.js | 4 ++-- pages/Profesor/index.vue | 35 +++++++++++++++++++++++++++++------ 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/nuxt.config.js b/nuxt.config.js index 5cadab6..011d9fc 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -24,9 +24,9 @@ export default { axios: {}, build: {}, env: { - // api: "http://localhost:3000", + api: "http://localhost:3000", // api: "https://890af9d598a4.ngrok.io" // api: "https://venus.acatlan.unam.mx/premiaciones_test", - api: "https://venus.acatlan.unam.mx/premiaciones", + // api: "https://venus.acatlan.unam.mx/premiaciones", }, } diff --git a/pages/Profesor/index.vue b/pages/Profesor/index.vue index ff4432f..55ac57c 100644 --- a/pages/Profesor/index.vue +++ b/pages/Profesor/index.vue @@ -15,9 +15,10 @@

Nombre: {{ `${Profesor.nombre}` }}

+

Este profesor ya registró invitados en otro momento.

¡Gracias por su registro!

-
+

Premiacion:

-
+

Cantidad de invitados:

{ + this.isLoading = false + if(res) this.alreadyRegistred = res.data + }) + .catch((err) => { + this.isLoading = false + console.log(err) + }) + }, }, - created() { + async created() { this.Profesor.idProfesor = localStorage.getItem('idProfesor') this.Profesor.nombre = localStorage.getItem('nombre') this.Profesor.adscripcion = localStorage.getItem('adscripcion') this.Profesor.numeroTrabajador = localStorage.getItem('numeroTrabajador') - this.fetchPremiaciones() + await this.fetchPremiaciones() + console.log(this.premiaciones) + if(this.premiaciones.length === 1) { + await this.yaRegistrado() + } }, watch: { numeroInvitados() {