diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..a876ef4 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,20 @@ +# Base image +FROM node:16-alpine + +# Set working directory +WORKDIR /app + +# Copy package.json and package-lock.json first +COPY package*.json ./ + +# Install dependencies +RUN npm install + +# Copy the rest of the project files +COPY . . + +# Expose port 3000 for Nuxt.js +EXPOSE 3000 + +# Default command to run the development server +CMD ["npm", "run", "dev"] diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..2fb0fc8 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,16 @@ +{ + "name": "Nuxt Dev Container", + "build": { + "dockerfile": "Dockerfile", + "context": ".." + }, + "forwardPorts": [3000], + "settings": { + "terminal.integrated.defaultProfile.linux": "bash" + }, + "extensions": [ + "dbaeumer.vscode-eslint", + "esbenp.prettier-vscode" + ], + "postCreateCommand": "npm install" +} diff --git a/components/alumno/cuestionario2/FullCuestionario.vue b/components/alumno/cuestionario2/FullCuestionario.vue new file mode 100644 index 0000000..6ca0746 --- /dev/null +++ b/components/alumno/cuestionario2/FullCuestionario.vue @@ -0,0 +1,973 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/components/layouts/Logout.vue b/components/layouts/Logout.vue index 492a8c0..18739a0 100644 --- a/components/layouts/Logout.vue +++ b/components/layouts/Logout.vue @@ -27,7 +27,7 @@ export default { this.$router.push('/') }, }, - created() { + /* created() { if ( !localStorage.getItem('usuario') || !localStorage.getItem('idUsuario') || @@ -37,7 +37,7 @@ export default { !localStorage.getItem('token') ) this.cerrarSesion() - }, + }, */ } diff --git a/components/responsable/CuestionarioResponsable2.vue b/components/responsable/CuestionarioResponsable2.vue new file mode 100644 index 0000000..703a2cf --- /dev/null +++ b/components/responsable/CuestionarioResponsable2.vue @@ -0,0 +1,973 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/nuxt.config.js b/nuxt.config.js index 4221c67..9cbc577 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:3001', // api: "https://890af9d598a4.ngrok.io" - api: 'https://venus.acatlan.unam.mx/ss-pruebas', + // api: 'https://venus.acatlan.unam.mx/ss-pruebas', // api: 'https://venus.acatlan.unam.mx/serviciosocial', }, } diff --git a/pages/alumno/cuestionario/index.vue b/pages/alumno/cuestionario/index.vue index 3090a72..0af0971 100644 --- a/pages/alumno/cuestionario/index.vue +++ b/pages/alumno/cuestionario/index.vue @@ -1,384 +1,150 @@ + + - + + } + + + \ No newline at end of file diff --git a/pages/alumno/cuestionario/indexOld.vue b/pages/alumno/cuestionario/indexOld.vue new file mode 100644 index 0000000..dc00a1b --- /dev/null +++ b/pages/alumno/cuestionario/indexOld.vue @@ -0,0 +1,384 @@ + + + + diff --git a/pages/alumno/cuestionario2/index.vue b/pages/alumno/cuestionario2/index.vue new file mode 100644 index 0000000..e0ee7d2 --- /dev/null +++ b/pages/alumno/cuestionario2/index.vue @@ -0,0 +1,392 @@ + + + + + \ No newline at end of file diff --git a/pages/alumno/cuestionarioView/index.vue b/pages/alumno/cuestionarioView/index.vue new file mode 100644 index 0000000..a163493 --- /dev/null +++ b/pages/alumno/cuestionarioView/index.vue @@ -0,0 +1,309 @@ + + + + + \ No newline at end of file diff --git a/pages/alumno/index.vue b/pages/alumno/index.vue index d73354d..cb23b41 100644 --- a/pages/alumno/index.vue +++ b/pages/alumno/index.vue @@ -169,13 +169,13 @@ export default { } }, }, - created() { +/* created() { this.getLocalhostInfo() if (this.alumno.idTipoUsuario === 1) this.$router.push('/admin') if (this.alumno.idTipoUsuario === 2) this.$router.push('/responsable') if (this.alumno.idTipoUsuario === 4) this.$router.push('/casoEspecial') if (this.alumno.idTipoUsuario === 3) this.obtenerServicio() - }, + }, */ } diff --git a/pages/responsable/cuestionario/index.vue b/pages/responsable/cuestionario/index.vue index eb00dc7..366d51b 100644 --- a/pages/responsable/cuestionario/index.vue +++ b/pages/responsable/cuestionario/index.vue @@ -1,143 +1,309 @@ + + + methods: { + onChildA(value) { + this.answers.servicioMedico = value.servicioMedico + this.answers.sexo = value.sexo + this.answers.edad = value.edad + }, + onChildB(value) { + this.answers.p1 = value.p1 + this.answers.p2 = value.p2 + this.answers.p3 = value.p3 + this.answers.p3Otro = value.p3Otro + }, + onChildC(value) { + this.answers.p4 = value.p4 + this.answers.p5 = value.p5 + this.answers.p6 = value.p6 + this.answers.p7 = value.p7 + this.answers.p8 = value.p8 + this.answers.p9 = value.p9 + this.answers.p10 = value.p10 + this.answers.p11 = value.p11 + this.answers.p12 = value.p12 + this.answers.p13 = value.p13 + }, + onChildD(value) { + this.answers.p14 = value.p14 + this.answers.p15 = value.p15 + this.answers.p16 = value.p16 + this.answers.p17 = value.p17 + }, + onChildE(value) { + this.answers.p18 = value.p18 + this.answers.p19 = value.p19 + this.answers.p20 = value.p20 + this.answers.p21 = value.p21 + }, + onChildF(value) { + this.answers.p22 = value.p22 + this.answers.p23 = value.p23 + this.answers.p24 = value.p24 + this.answers.p25 = value.p25 + this.answers.p26 = value.p26 + this.answers.p27 = value.p27 + this.answers.p28 = value.p28 + this.answers.p29 = value.p29 + this.answers.p30 = value.p30 + }, + onChildNAV(value) { + this.current = value + }, + error(msj) { + let salir = false + switch (msj) { + case 'invalid signature': + msj = 'Tu token no es valido, inicia sesión de nuevo.' + salir = true + break + case 'jwt expired': + msj = 'Tu sesión ha expirado, inicia sesión de nuevo.' + salir = true + break + case 'jwt malformed': + msj = 'No se encontro tu token, inicia sesión de nuevo.' + salir = true + break + case 'No hay token': + msj = 'Ocurrio un error al enviar tu token, inicia sesión de nuevo.' + salir = true + break + } + + this.$buefy.dialog.alert({ + title: 'Error', + message: msj, + type: 'is-danger', + hasIcon: true, + icon: 'alert-circle', + ariaRole: 'alertdialog', + ariaModal: true, + }) + if (salir == true) { + localStorage.clear() + this.$router.push(`/`) + } + }, + enviarCuestionario() { + this.isLoading = true + if (this.answers.p3Otro != '' && this.maxCheckbox < 3) { + this.answers.p3.push(this.answers.p3Otro) + } + const data = { + idServicio: localStorage.getItem('idServicio'), + sexo: this.answers.sexo, + edad: this.answers.edad, + servicioMedico: this.answers.servicioMedico, + p1: this.answers.p1, + p2: this.answers.p2, + p3: this.answers.p3, + p4: this.answers.p4, + p5: this.answers.p5, + p6: this.answers.p6, + p7: this.answers.p7, + p8: this.answers.p8, + p9: this.answers.p9, + p10: this.answers.p10, + p11: this.answers.p11, + p12: this.answers.p12, + p13: this.answers.p13, + p14: this.answers.p14, + p15: this.answers.p15, + p16: this.answers.p16, + p17: this.answers.p17, + p18: this.answers.p18, + p19: this.answers.p19, + p20: this.answers.p20, + p21: this.answers.p21, + p22: this.answers.p22, + p23: this.answers.p23, + p24: this.answers.p24, + p25: this.answers.p25, + p26: this.answers.p26, + p27: this.answers.p27, + p28: this.answers.p28, + p29: this.answers.p29, + p30: this.answers.p30, + } + axios + .post(`${process.env.api}/cuestionario_alumno`, data, this.token) + .then((res) => { + this.$buefy.dialog.alert({ + title: 'Success', + message: 'Se enviaron los datos correctamente', + type: 'is-success', + hasIcon: true, + icon: 'checkbox-marked-circle', + ariaRole: 'alertdialog', + ariaModal: true, + }) + + //this.reset() + localStorage.removeItem('idCuestionarioAlumno') + this.$router.push('/alumno') + }) + .catch((error) => { + this.error(error.response.data.message) + }) + .finally(() => { + this.isLoading = false + }) + }, + }, + + + } + + + \ No newline at end of file diff --git a/pages/responsable/cuestionario/indexOld.vue b/pages/responsable/cuestionario/indexOld.vue new file mode 100644 index 0000000..eb00dc7 --- /dev/null +++ b/pages/responsable/cuestionario/indexOld.vue @@ -0,0 +1,143 @@ + + + diff --git a/static/cuestionario2.json b/static/cuestionario2.json new file mode 100644 index 0000000..ec57c66 --- /dev/null +++ b/static/cuestionario2.json @@ -0,0 +1,160 @@ +{ + "titulo": "2025 Evaluación del Universitario(a)", + "descripcion": "Te invitamos a compartir tu experiencia respecto al programa de servicio social en el que participaste. Tus respuestas son confidenciales.", + "preguntas": [ + { + "id": "criterios", + "tipo": "seleccionMultiple", + "texto": "Señala los tres principales criterios para seleccionar el programa:", + "opciones": [ + "Actividades adscritas al programa", + "Apoyo económico", + "Asesoría académica", + "Dependencia de la UNAM", + "Flexibilidad en horarios", + "Institución del sector público", + "Institución del sector social", + "Invitación de profesores", + "Modalidad de titulación por servicio social", + "Objetivo del programa", + "Oportunidad de desarrollo de tesis", + "Prestigio de la institución", + "Recomendación de compañeros" + ] + }, + { + "id": "inscripcion", + "tipo": "seleccionUnica", + "texto": "¿Cómo evalúas tu proceso de inscripción?", + "opciones": ["Deficiente", "Básico", "Intermedio", "Destacado"] + }, + { + "id": "recibidos", + "tipo": "checkbox", + "texto": "¿Recibiste asesoría, acompañamiento, supervisión y seguimiento?", + "opciones": ["Asesoría", "Acompañamiento", "Supervisión", "Seguimiento"] + }, + { + "id": "actividades", + "tipo": "seleccionUnica", + "texto": "¿Las actividades realizadas fueron acordes al programa?", + "opciones": ["Sí", "No"] + }, + { + "id": "actividadesComentarios", + "tipo": "texto", + "texto": "En caso de que las actividades hayan sido distintas, ¿cuáles fueron?", + "condicional": { + "preguntaId": "actividades", + "valor": "No" + } + }, + { + "id": "espacioFisico", + "tipo": "seleccionUnica", + "texto": "¿Contaste con un espacio físico adecuado para realizar tus actividades?", + "opciones": ["Sí", "No"] + }, + { + "id": "instalaciones", + "tipo": "seleccionUnica", + "texto": "¿Las instalaciones contaban con condiciones adecuadas?", + "opciones": ["Sí", "No"] + }, + { + "id": "instalacionesComentarios", + "tipo": "texto", + "texto": "Si respondiste NO, ¿por qué?", + "condicional": { + "preguntaId": "instalaciones", + "valor": "No" + } + }, + { + "id": "materialProporcionado", + "tipo": "seleccionUnica", + "texto": "¿La institución te proporcionó material/equipo necesario?", + "opciones": ["Sí", "No"] + }, + { + "id": "trato", + "tipo": "checkbox", + "texto": "El trato que recibiste fue:", + "opciones": ["Profesional", "Amable", "Respetuoso"] + }, + { + "id": "aplicasteConocimientos", + "tipo": "escala", + "texto": "En tu servicio social, aplicaste conocimientos:", + "opciones": ["Nunca", "Rara vez", "Algunas veces", "Regularmente", "Siempre"] + }, + { + "id": "desarrollasteHabilidades", + "tipo": "escala", + "texto": "Desarrollaste habilidades:", + "opciones": ["Nunca", "Rara vez", "Algunas veces", "Regularmente", "Siempre"] + }, + { + "id": "enriquecisteConocimientos", + "tipo": "escala", + "texto": "Enriqueciste conocimientos:", + "opciones": ["Nunca", "Rara vez", "Algunas veces", "Regularmente", "Siempre"] + }, + { + "id": "habilidades", + "tipo": "evaluacion", + "texto": "Evalúa tu propio desempeño en relación con habilidades personales, profesionales, sociales y conocimientos:", + "categorias": [ + { + "titulo": "Habilidades personales", + "items": ["Puntualidad", "Eficiencia", "Organización", "Eficacia"] + }, + { + "titulo": "Habilidades profesionales", + "items": ["Disposición", "Proactividad", "Propositividad", "Resolutividad"] + }, + { + "titulo": "Habilidades sociales", + "items": ["Empatía", "Trabajo en equipo", "Comunicación asertiva", "Tolerancia a la frustración"] + }, + { + "titulo": "Conocimientos", + "items": ["Teóricos", "Metodológicos", "Pensamiento crítico", "Formación académica", "Uso tecnológico"] + } + ], + "opciones": ["Deficiente", "Básico", "Intermedio", "Destacado"] + }, + { + "id": "supervisor", + "tipo": "seleccionUnica", + "texto": "¿Quién asesoró y supervisó las actividades que realizaste?", + "opciones": [ + "Coordinador administrativo del programa", + "Responsable directo del programa", + "Alguien diferente a los dos anteriores" + ] + }, + { + "id": "apoyoEconomico", + "tipo": "seleccionUnica", + "texto": "El apoyo económico señalado en el programa...", + "opciones": [ + "Se te otorgó de acuerdo a lo establecido", + "Fue condicionado", + "Se te proporcionó solo una parte" + ] + }, + { + "id": "recomendacion", + "tipo": "seleccionUnica", + "texto": "¿Recomendarías el programa en el que participaste?", + "opciones": ["Sí", "No"] + }, + { + "id": "habilidadesFuturo", + "tipo": "texto", + "texto": "Enlista los conocimientos o habilidades que te ayudarían a un mejor desempeño para tu actividad profesional a futuro" + } + ] + } + \ No newline at end of file