97 Commits

Author SHA1 Message Date
xXpuma99Xx 97dfcfac4f pruebas 2021-11-30 12:23:33 -06:00
xXpuma99Xx cb2cab6062 pruebas 2021-11-30 12:22:17 -06:00
xXpuma99Xx afc119fa8b faltan cuestionario de alumno y editar servicio 2021-11-30 12:15:49 -06:00
xXpuma99Xx 24d02a71e6 aparentemente todo listo 2021-11-29 13:07:16 -06:00
xXpuma99Xx 772412f6a4 informe global listo 2021-11-29 10:15:45 -06:00
xXpuma99Xx e2b2da7a2e carta termino y cuestionario listos 2021-11-29 09:40:07 -06:00
xXpuma99Xx 97dbd5878d hasta registro listo 2021-11-29 09:16:55 -06:00
xXpuma99Xx 7bd50bf3d4 pre termino alumno listo para pruebas 2021-11-29 03:25:35 -06:00
xXpuma99Xx b962628dde barra progreso 2021-11-29 02:54:52 -06:00
xXpuma99Xx 813e251593 mensajes 2021-11-29 02:44:41 -06:00
xXpuma99Xx 302ab76f2c info servicio alumno 2021-11-29 02:18:57 -06:00
xXpuma99Xx 7c9c3900c0 confirmar pre registro listo 2021-11-29 01:15:23 -06:00
xXpuma99Xx f97a8a0068 crear servicio listo 2021-11-29 00:46:18 -06:00
xXpuma99Xx a50122e61f admin responsable listo 2021-11-28 23:28:05 -06:00
xXpuma99Xx 5f66fecde6 casos especiales proceso listo 2021-11-28 22:12:50 -06:00
xXpuma99Xx 8bded6e7e9 listo prueba caso especial, falta editar caso especial 2021-11-28 20:54:01 -06:00
xXpuma99Xx 3a3bf26918 nuevo caso especial 2021-11-28 19:04:47 -06:00
xXpuma99Xx 7e59f8f381 casos especiales tabla 2021-11-28 12:31:47 -06:00
xXpuma99Xx 8f2b3eaadd cuestionario responsable 2021-11-27 21:23:59 -06:00
xXpuma99Xx de98b7a1b3 carta aceptación 2021-11-27 12:55:07 -06:00
xXpuma99Xx c14cc0f860 upload archivo componente 2021-11-27 12:35:55 -06:00
xXpuma99Xx 8374f3ebdc validadción nuevo servicio 2021-11-25 14:56:15 -06:00
xXpuma99Xx 1f43c269c5 nuevo servicio 2021-11-25 14:51:33 -06:00
xXpuma99Xx 98af63e609 responsable tabla 2021-11-25 07:04:06 -06:00
xXpuma99Xx 8cf7bae82e style 2021-11-24 22:05:37 -06:00
xXpuma99Xx f09caf110b componentes carpeta menos confusa 2021-11-24 21:26:10 -06:00
xXpuma99Xx 954e2103e0 editar servicio 2021-11-24 21:02:01 -06:00
xXpuma99Xx db1a723605 ver servicio social 2021-11-24 18:02:15 -06:00
xXpuma99Xx c3ab1107cd editar responsable 2021-11-23 18:38:37 -06:00
xXpuma99Xx 58ca512bab responsable info 2021-11-23 18:25:54 -06:00
xXpuma99Xx 8d283707c4 reponsables listo 2021-11-23 18:09:06 -06:00
xXpuma99Xx 6c8ac6fff7 reportes falta mayuscula 2021-11-23 17:44:24 -06:00
xXpuma99Xx fdcebaa1d6 pendiente editar caso especial 2021-11-23 17:21:24 -06:00
xXpuma99Xx 17373f37c6 liberar caso especial 2021-11-23 15:28:38 -06:00
xXpuma99Xx f8dd0ccaf8 tablas con mayusculas 2021-11-23 14:51:37 -06:00
xXpuma99Xx e0a60215c9 tablas casos especiales y servicios sociales admin final 2021-11-23 14:49:00 -06:00
xXpuma99Xx 4e537ff938 tabla servicios sociales organizada 2021-11-23 14:39:41 -06:00
puma99 31558bc14c Proyectos CEDETEC 2021-08-12 12:22:04 -05:00
puma99 48c483810a archivo e info 2021-08-05 21:54:35 -05:00
puma99 66fc25ccf7 actualizar responsable casi listo 2021-08-05 16:47:56 -05:00
puma99 3604d00a29 info responsable listo 2021-08-05 15:53:05 -05:00
puma99 7adde8ac4b admin responsalbes listo 2021-08-05 15:39:11 -05:00
puma99 08a786899e reportes listo 2021-08-05 15:12:22 -05:00
puma99 614a199f84 admin editar caso especial casi listo 2021-08-05 14:56:01 -05:00
Lemuel Marquez e291493089 listo admin caso especial 2021-08-05 14:12:22 -05:00
Lemuel Marquez 9431a783b8 admin tabla casos especiales listo 2021-08-05 13:52:10 -05:00
Lemuel Marquez 101f60f489 admin mini cambios 2021-08-04 18:25:24 -05:00
Lemuel Marquez db0a63854a admin caso especial funiones imprimir 2021-08-04 17:31:24 -05:00
Lemuel Marquez 68c1c95ff4 responsable funiones imprimir 2021-08-04 17:03:13 -05:00
Lemuel Marquez 90aad06995 reportes 2021-08-04 16:28:45 -05:00
Lemuel Marquez 089c23ec2b tabla servicios sociales 2021-08-04 16:12:05 -05:00
Lemuel Marquez f753b6860d se manda las funciones imprimir a los componentes 2021-08-04 15:02:08 -05:00
Lemuel Marquez 94ba35e988 funciones en componente principal de cada pagina 2021-08-04 14:49:40 -05:00
Lemuel Marquez 8085f2dc01 funciones para imprimir mejoradas y finales 2021-08-04 14:38:44 -05:00
puma99 0bbf324f30 update caso especial a medias 2021-06-09 17:34:46 -05:00
puma99 304490c015 caso especial listo 2021-06-09 13:44:18 -05:00
puma99 ac109a961a tabla casos especiales lista 2021-06-09 12:25:57 -05:00
Lemuel Marquez 38e3db0f30 codigo para acticar responsable en bases 2021-06-09 09:14:12 -05:00
Lemuel Marquez 12d160e058 actualizar listo 2021-06-08 22:45:32 -05:00
Lemuel Marquez b35e6b316d listo responsable info 2021-06-08 18:22:28 -05:00
Lemuel Marquez bdbd1866b1 carga masiva lista 2021-06-08 13:36:21 -05:00
Lemuel Marquez 147df99268 tabla responsables lista 2021-06-08 13:19:51 -05:00
Lemuel Marquez dbea788589 registros listos 2021-06-08 12:21:19 -05:00
Lemuel Marquez e305613757 tabla servicios admin lista 2021-06-07 23:42:00 -05:00
Lemuel Marquez dbf0b0dbb2 nuevo sse listo 2021-06-07 21:55:16 -05:00
Lemuel Marquez ba96a6c172 tabla casos especiales lista 2021-06-07 20:24:33 -05:00
Lemuel Marquez 6a12223c96 listo nuevo caso especial 2021-05-31 13:56:03 -05:00
Lemuel Marquez 61b29098e9 correciones minimas 2021-05-25 13:05:06 -05:00
Lemuel Marquez 44ba43a8ee casos especiales y caso especial listo 2021-05-17 01:09:05 -05:00
Lemuel Marquez 5a08433938 carta termino listo 2021-05-16 22:27:34 -05:00
Lemuel Marquez 9cd91c8752 vista carta de aceptación mejorado 2021-05-16 22:14:27 -05:00
Lemuel Marquez 1a55bcf7aa tabla responsable casos especiales 2021-05-15 01:35:46 -05:00
Lemuel Marquez 637b7bd0e3 busqueda con enter 2021-05-15 01:18:15 -05:00
Lemuel Marquez 736ac50110 table casos especiales lista 2021-05-15 00:58:24 -05:00
Lemuel Marquez f53b9a84da ya no pueden entrar a otra pagina que no sea la que les corresponde 2021-05-15 00:15:19 -05:00
Lemuel Marquez dbe3e93e86 tabla admin lista 2021-05-14 18:47:35 -05:00
Lemuel Marquez 1a1c309523 inicio responsable listo 2021-05-14 17:13:46 -05:00
Lemuel Marquez ccf4a95f8c tabla responsable aparentemente lista 2021-05-14 14:56:34 -05:00
Lemuel Marquez 75aa6d884d quitando código de table inecesario 2021-05-14 09:51:43 -05:00
Lemuel Marquez b81931d82c campos tabla mejorados 2021-05-13 23:16:27 -05:00
Lemuel Marquez a42f6711c5 login mejorado 2021-05-13 15:55:40 -05:00
Lemuel Marquez 04b47e2160 logout mejorado 2021-05-13 14:47:41 -05:00
Lemuel Marquez 388d476f36 plantillas layout 2021-05-13 14:32:58 -05:00
Lemuel Marquez 24cd81c73d nuevo formateo 2021-05-13 14:22:56 -05:00
Lemuel Marquez eaf298c4a9 nuxt mejorado 2021-04-20 21:47:01 -05:00
Lemuel Marquez 7c8c2a4060 antes de pasar a nuevo nuxt 2021-04-20 21:29:01 -05:00
Lemuel Marquez 439ce08606 merge ultima version con dev 2021-04-20 12:36:04 -05:00
puma99 81e84005d0 cambio de loco acatlan 2021-04-14 08:58:36 -05:00
Lemuel Marquez 1928931861 merge master dev registros 2021-04-06 08:20:22 -05:00
Lemuel Marquez 47f7513cd5 registros 2021-04-06 08:18:54 -05:00
Lemuel Marquez 55695092e3 datos faltantes en vista servicio 2021-04-06 08:10:31 -05:00
Lemuel Marquez 24265fc0b3 Merge branch 'marco' of https://repositorio.acatlan.unam.mx/CIDWA/servicio_social_front into dev 2021-04-06 07:54:16 -05:00
Lemuel Marquez 7b64f3f4fd merge 2021-04-06 07:54:09 -05:00
Lemuel Marquez a35c72da9a tipo usuario correcto 2021-03-24 20:55:13 -06:00
Lemuel Marquez 9e6e4c08cd en teoria listo 2021-03-24 20:31:42 -06:00
Lemuel Marquez 8418fdcc77 merge master casos especiales 2021-03-24 20:25:43 -06:00
puma99 e863d69e14 correo alumno texto 2021-03-17 17:22:48 -06:00
162 changed files with 12941 additions and 17387 deletions
+13
View File
@@ -0,0 +1,13 @@
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
-19
View File
@@ -1,19 +0,0 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"plugin:vue/essential",
"standard"
],
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": [
"vue"
],
"rules": {
}
}
+1
View File
@@ -69,6 +69,7 @@ typings/
.nuxt
# Nuxt generate
dist
# vuepress build output
.vuepress/dist
+4
View File
@@ -0,0 +1,4 @@
{
"semi": false,
"singleQuote": true
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 16 KiB

+289
View File
@@ -0,0 +1,289 @@
<template>
<div>
<b-table
:data="data"
:total="total"
:current-page="page"
:per-page="perPage"
:loading="isLoading"
:selected.sync="servicioSelected"
:row-class="(row, index) => addPointer()"
@page-change="onPageChange"
hoverable
striped
paginated
backend-pagination
>
<b-table-column
field="fechaCreado"
label="Fecha Registro"
v-slot="props"
v-if="columnaFechaCreado"
centered
>
<span>{{ fecha(props.row.createdAt) }}</span>
<!-- <span>{{ props.row }}</span> -->
</b-table-column>
<b-table-column
field="numeroCuenta"
label="Número de Cuenta"
v-slot="props"
centered
>
<span>{{ props.row.Usuario.usuario }}</span>
</b-table-column>
<b-table-column field="nombre" label="Nombre" v-slot="props" centered>
<span>{{ props.row.Usuario.nombre }}</span>
</b-table-column>
<b-table-column field="carrera" label="Carrera" v-slot="props" centered>
<span>{{ props.row.Carrera.carrera }}</span>
</b-table-column>
<b-table-column
field="fechaInicio"
label="Fecha Inicio"
v-slot="props"
v-if="columnaFechaInicio"
centered
>
<span>{{ fecha(props.row.fechaInicio) }}</span>
</b-table-column>
<b-table-column
field="fechaFin"
label="Fecha Fin"
v-slot="props"
v-if="columnaFechaFin"
centered
>
<span>{{ fecha(props.row.fechaFin) }}</span>
</b-table-column>
<b-table-column field="status" label="Status" v-slot="props" centered>
<b-button
type="is-danger"
size="is-small"
class="tag"
@click="responsableUpdate(props.row, 'carta_aceptacion')"
v-if="columnasResponsable && props.row.Status.idStatus === 7"
>
Carta Aceptación Rechazada
</b-button>
<span :class="types(props.row.Status.idStatus)" v-else>
{{ props.row.Status.status }}
</span>
</b-table-column>
<b-table-column
field="cartaTermino"
label="Carta Término"
v-slot="props"
v-if="columnasResponsable"
centered
>
<div
v-if="
props.row.Status.idStatus >= 4 &&
props.row.Status.idStatus != 7 &&
props.row.Status.idStatus != 10
"
>
<b-icon
class="tag is-success"
icon="check"
v-if="props.row.cartaTermino"
/>
<b-button
type="is-link is-light"
class="tag"
@click="responsableUpdate(props.row, 'carta_termino')"
v-else
>
Carta Término
</b-button>
</div>
</b-table-column>
<b-table-column
field="cuestionarioP"
label="Cuestionario"
v-slot="props"
v-if="columnasResponsable"
centered
>
<div
v-if="
props.row.Status.idStatus >= 4 &&
props.row.Status.idStatus != 7 &&
props.row.Status.idStatus != 10
"
>
<b-icon
class="tag is-success"
icon="check"
v-if="props.row.idCuestionarioPrograma"
/>
<b-button
type="is-link is-light"
class="tag"
@click="responsableUpdate(props.row, 'cuestionario')"
v-else
>
Cuestionario
</b-button>
</div>
</b-table-column>
</b-table>
</div>
</template>
<script>
import moment from 'moment'
export default {
props: {
columnaFechaCreado: {
type: Boolean,
required: false,
default: true,
},
columnaFechaFin: {
type: Boolean,
required: false,
default: true,
},
columnaFechaInicio: {
type: Boolean,
required: false,
default: true,
},
columnasResponsable: {
type: Boolean,
required: false,
default: false,
},
isLoading: {
type: Boolean,
required: true,
},
path: {
type: String,
required: false,
},
idTipoUsuario: {
type: Number,
required: true,
},
page: {
type: Number,
required: true,
},
total: {
type: Number,
required: true,
},
data: {
type: Array,
required: true,
},
onPageChange: {
type: Function,
require: true,
},
},
data() {
return {
servicioSelected: {},
perPage: 25,
}
},
methods: {
fecha(date) {
const fecha = moment(date)
if (date) return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`
return ''
},
types(idStatus) {
let style = 'tag'
switch (idStatus) {
case 1:
style += ' is-dark'
break
case 2:
style += ' is-info'
break
case 3:
style += ' is-warning'
break
case 4:
style += ' is-link'
break
case 5:
style += ' is-success'
break
case 6:
style += ' is-success is-light'
break
case 7:
case 8:
case 9:
case 10:
style += ' is-danger'
break
case 11:
style += ' is-link is-light'
break
case 12:
style += ' is-info is-light'
break
case 13:
case 14:
style += ' is-success is-light'
break
}
return style
},
addPointer() {
return this.idTipoUsuario === 1 ? 'pointer' : ''
},
responsableUpdate(servicio, path) {
/*pendiente*/
localStorage.setItem('idServicio', servicio.idServicio)
localStorage.setItem(
// 'idCuestionarioPrograma',
'cuestionario',
servicio.idCuestionarioPrograma
)
this.$router.push(`/responsable/${path}`)
},
},
watch: {
servicioSelected() {
if (this.idTipoUsuario === 1) {
if (this.servicioSelected.idServicio)
localStorage.setItem('idServicio', this.servicioSelected.idServicio)
if (this.servicioSelected.idCasoEspecial)
localStorage.setItem(
'idCasoEspecial',
this.servicioSelected.idCasoEspecial
)
this.$router.push(this.path)
} else if (
this.servicioSelected.idServicio ||
this.servicioSelected.idCasoEspecial
)
this.servicioSelected = {}
},
},
}
</script>
<style scoped></style>
+138
View File
@@ -0,0 +1,138 @@
<template>
<div class="mb-4">
<div class="is-flex is-align-items-center">
<h6 class="pr-4 is-size-5">Ver {{ title }}</h6>
<div class="pr-4">
<b-button
type="is-link is-light"
tag="a"
target="_blank"
:href="`https://drive.google.com/file/d/${this.archivo()}/view?usp=sharing`"
>
Ver
</b-button>
</div>
<div>
<b-button
type="is-danger"
@click="updateRechazar()"
v-if="
(alumno.Status.idStatus === 1 && title === 'carta de aceptación') ||
(alumno.Status.idStatus === 5 &&
(title === 'carta de termino' || title === 'informe global'))
"
>
Rechazar
</b-button>
</div>
</div>
<div v-if="rechazar" class="mt-2">
<b-field label="Razón del rechazo:">
<b-input maxlength="500" type="textarea" v-model="mensajeRechazo" />
</b-field>
<div>
<b-button
class="is-link"
:disabled="!mensajeRechazo"
@click="
imprimirWarning(
'¿Seguro(a) que quiere rechazar este documento?',
rechazarArchivo
)
"
>
Rechazar documento
</b-button>
</div>
</div>
</div>
</template>
<script>
import axios from 'axios'
export default {
data() {
return {
rechazar: false,
mensajeRechazo: '',
}
},
props: {
title: { type: String, required: true },
admin: { type: Object, required: true },
alumno: { type: Object, required: true },
imprimirError: { type: Function, required: true },
imprimirMensaje: { type: Function, required: true },
imprimirWarning: { type: Function, required: true },
updateIsLoading: { type: Function, required: true },
},
methods: {
updateRechazar() {
if (this.rechazar) this.mensajeRechazo = ''
this.rechazar = !this.rechazar
},
archivo() {
if (this.title === 'carta de aceptación')
return this.alumno.cartaAceptacion
else if (this.title === 'carta de termino')
return this.alumno.cartaTermino
else if (this.title === 'informe global') return this.alumno.informeGlobal
},
rechazarArchivo() {
if (this.title === 'carta de aceptación')
this.rechazarFunc(this.rechazarCartaAceptacion)
else if (this.title === 'carta de termino')
this.rechazarFunc(this.rechazarCartaTermino)
else if (this.title === 'informe global')
this.rechazarFunc(this.rechazarInformeGlobal)
},
rechazarFunc(funcRechazar) {
const data = {
idServicio: this.alumno.idServicio,
mensaje: this.mensajeRechazo,
}
this.updateIsLoading(true)
funcRechazar(data)
.then((res) => {
localStorage.removeItem('idServicio')
this.updateIsLoading(false)
this.imprimirMensaje(res.data.message)
this.$router.push('/admin')
})
.catch((err) => {
this.updateIsLoading(false)
this.imprimirError(err.response.data)
})
},
rechazarCartaAceptacion(data) {
return axios.put(
`${process.env.api}/servicio/rechazar_aceptacion`,
data,
this.admin.token
)
},
rechazarCartaTermino(data) {
return axios.put(
`${process.env.api}/servicio/rechazar_termino`,
data,
this.admin.token
)
},
rechazarInformeGlobal(data) {
return axios.put(
`${process.env.api}/servicio/rechazar_informe`,
data,
this.admin.token
)
},
},
}
</script>
<style scoped></style>
+86
View File
@@ -0,0 +1,86 @@
<template>
<div class="my-5">
<div>
<b-button
class="is-danger"
:disabled="
alumno.Status.idStatus === 6 || alumno.Status.idStatus === 10
"
@click="updateCancelar()"
>
Cancelar
</b-button>
</div>
<div class="mt-2" v-if="cancelar">
<b-field label="Razón de la cancelación:">
<b-input maxlength="500" type="textarea" v-model="mensajeCancelar" />
</b-field>
<div>
<b-button
class="is-link"
:disabled="!mensajeCancelar"
@click="
imprimirWarning(
'¿Seguro(a) que quiere cancelar este servicio?',
cancelarServicio
)
"
>
Cancelar servicio
</b-button>
</div>
</div>
</div>
</template>
<script>
import axios from 'axios'
export default {
data() {
return {
cancelar: false,
mensajeCancelar: '',
}
},
props: {
idServicio: { type: Number, required: true },
admin: { type: Object, required: true },
alumno: { type: Object, required: true },
imprimirError: { type: Function, required: true },
imprimirMensaje: { type: Function, required: true },
imprimirWarning: { type: Function, required: true },
updateIsLoading: { type: Function, required: true },
},
methods: {
updateCancelar() {
if (this.cancelar) this.mensajeCancelar = ''
this.cancelar = !this.cancelar
},
cancelarServicio() {
const data = {
idServicio: this.idServicio,
mensaje: this.mensajeCancelar,
}
this.updateIsLoading(true)
axios
.put(`${process.env.api}/servicio/cancelar`, data, this.admin.token)
.then((res) => {
localStorage.removeItem('idServicio')
this.updateIsLoading(false)
this.imprimirMensaje(res.data.message)
this.$router.push('/admin')
})
.catch((err) => {
this.updateIsLoading(false)
this.imprimirError(err.response.data)
})
},
},
}
</script>
<style scoped></style>
+104
View File
@@ -0,0 +1,104 @@
<template>
<div class="pb-6">
<h3 class="title">Carga Masiva</h3>
<b-field>
<b-upload
accept=".csv"
@input="validarExt()"
v-model="csv"
drag-drop
expanded
>
<div class="section has-text-centered">
<b-icon icon="upload" size="is-large" class="mb-2" />
<p class="is-size-5">
{{
csv.name || 'Arrastra aquí tu archivo o da click aquí para buscar'
}}
</p>
<p class="is-size-6">Tamaño máximo 20MB</p>
<p class="is-size-7">
Si al momento de elegir un archivo este no se selecciona, haga click
en cancelar en la ventana emergente y trate de nuevo.
</p>
</div>
</b-upload>
</b-field>
<div>
<b-button
type="is-info"
:disabled="!csv.name"
@click="
imprimirWarning(
'¿Seguro(a) que quieres enviar este archivo?',
enviarCargaMasiva
)
"
>
Enviar archivo
</b-button>
<b-button type="is-link" tag="a" target="_blank" :href="link">
Descargar plantilla
</b-button>
</div>
</div>
</template>
<script>
import axios from 'axios'
export default {
data() {
return {
csv: {},
link: `${process.env.api}/plantilla.csv`,
}
},
props: {
admin: { type: Object, required: true },
imprimirError: { type: Function, required: true },
imprimirMensaje: { type: Function, required: true },
imprimirWarning: { type: Function, required: true },
updateIsLoading: { type: Function, required: true },
},
methods: {
validarExt() {
const extPermitidas = /(.csv)$/i
if (!extPermitidas.exec(this.csv.name)) {
this.imprimirError({ message: 'Asegurate de ingresar un archivo .CSV' })
this.csv = {}
}
},
enviarCargaMasiva() {
const formData = new FormData()
this.updateIsLoading(true)
formData.append('csv', this.csv)
axios
.post(
`${process.env.api}/programa/carga_masiva`,
formData,
this.admin.tokenArchivo
)
.then((res) => {
this.updateIsLoading(false)
this.imprimirMensaje(res.data.message)
this.$router.push('/admin')
})
.catch((err) => {
this.updateIsLoading(false)
this.imprimirError(err.response.data)
})
},
},
}
</script>
<style scoped></style>
+91
View File
@@ -0,0 +1,91 @@
<template>
<div>
<b-field v-if="alumno.Status.idStatus === 5 && alumno.Programa.acatlan">
<b-checkbox type="is-info" size="is-medium" v-model="vistoBuenoAcatlan">
Visto bueno Acatlán
</b-checkbox>
</b-field>
<b-field
class="my-5"
v-if="alumno.Status.idStatus === 1 || alumno.Status.idStatus === 5"
>
<b-button
class="is-success"
:disabled="
alumno.Status.idStatus === 5 &&
alumno.Programa.acatlan &&
!vistoBuenoAcatlan
"
@click="
imprimirWarning(
'¿Seguro(a) que quieres confirmar este servicio?',
confirmarServicio
)
"
>
Confirmar
</b-button>
</b-field>
</div>
</template>
<script>
import axios from 'axios'
export default {
data() {
return { vistoBuenoAcatlan: false }
},
props: {
idServicio: { type: Number, required: true },
admin: { type: Object, required: true },
alumno: { type: Object, required: true },
imprimirError: { type: Function, required: true },
imprimirMensaje: { type: Function, required: true },
imprimirWarning: { type: Function, required: true },
updateIsLoading: { type: Function, required: true },
},
methods: {
confirmarServicio() {
if (this.alumno.Status.idStatus === 1)
this.confirmar(this.confirmarPreRegistro)
else if (this.alumno.Status.idStatus === 5)
this.confirmar(this.confirmarLiberacion)
},
confirmar(funcConfirmar) {
const data = { idServicio: this.idServicio }
this.updateIsLoading(true)
funcConfirmar(data)
.then((res) => {
this.updateIsLoading(false)
this.imprimirMensaje(res.data.message)
this.$router.push('/admin')
})
.catch((err) => {
this.updateIsLoading(false)
this.imprimirError(err.response.data)
})
},
confirmarPreRegistro(data) {
return axios.put(
`${process.env.api}/servicio/registro`,
data,
this.admin.token
)
},
confirmarLiberacion(data) {
if (this.vistoBuenoAcatlan)
data.vistoBuenoAcatlan = this.vistoBuenoAcatlan
return axios.put(
`${process.env.api}/servicio/liberacion`,
data,
this.admin.token
)
},
},
}
</script>
<style scoped></style>
+82
View File
@@ -0,0 +1,82 @@
<template>
<div>
<h4 class="is-size-4 mb-2">Descargar cuestionarios</h4>
<b-field label="Cuestionario:">
<b-select v-model="selectedCuestionario" expanded>
<option value="" disabled>Seleccione un cuestionario:</option>
<option value="cuestionario_alumno">Cuestionarios del Alumnos</option>
<option value="cuestionario_programa">
Cuestionarios del Programas
</option>
</b-select>
</b-field>
<b-field label="Año:">
<b-select v-model="selectedYear" expanded>
<option value="" disabled>Seleccione un año:</option>
<option v-for="(y, i) in years" :key="i" :value="y">
{{ y }}
</option>
</b-select>
</b-field>
<div class="pb-5 pt-3">
<b-button
type="is-info"
@click="descargar()"
:disabled="!selectedYear || !selectedCuestionario"
>
Descargar Excel
</b-button>
</div>
</div>
</template>
<script>
import axios from 'axios'
import fileDownload from 'js-file-download'
export default {
data() {
return {
selectedCuestionario: '',
selectedYear: '',
}
},
props: {
years: { type: Array, required: true },
admin: { type: Object, required: true },
imprimirError: { type: Function, required: true },
updateIsLoading: { type: Function, required: true },
},
methods: {
descargar() {
this.updateIsLoading(true)
axios
.get(
`${process.env.api}/${this.selectedCuestionario}?year=${this.selectedYear}`,
this.admin.token
)
.then((res) => {
fileDownload(
res.data,
`${this.selectedYear}_${this.selectedCuestionario}.csv`
)
this.selectedYear = ''
this.selectedCuestionario = ''
this.updateIsLoading(false)
})
.catch((err) => {
this.updateIsLoading(false)
this.imprimirError(err.response.data)
})
},
},
}
</script>
<style scoped></style>
+196
View File
@@ -0,0 +1,196 @@
<template>
<div>
<h3 class="title">Editar información del alumno</h3>
<b-field label="Correo eletrónico">
<b-input
type="email"
:placeholder="viejo.correo"
v-model="nuevo.correo"
/>
</b-field>
<b-field label="Teléfono">
<b-input
type="number"
maxlength="10"
:placeholder="viejo.telefono"
v-model="nuevo.telefono"
/>
</b-field>
<b-field label="Dirección">
<b-input
type="text"
:placeholder="viejo.direccion"
v-model="nuevo.direccion"
/>
</b-field>
<b-field label="Fecha de inicio">
<b-datepicker
icon="calendar-today"
:min-date="minDate1"
:placeholder="fecha(viejo.fechaInicio)"
v-model="nuevo.fechaInicio"
/>
</b-field>
<transition name="fade">
<b-field label="Fecha de fin" v-if="nuevo.fechaInicio">
<b-datepicker
icon="calendar-today"
:min-date="minDate2"
:placeholder="fecha(viejo.fechaFin)"
v-model="nuevo.fechaFin"
/>
</b-field>
</transition>
<b-field label="Fecha de nacimiento">
<b-datepicker
icon="calendar-today"
:placeholder="fecha(viejo.fechaNacimiento)"
v-model="nuevo.fechaNacimiento"
/>
</b-field>
<b-field label="Motivo" v-if="viejo.motivo">
<b-select class="my-4" v-model="nuevo.motivo" expanded>
<option value="1">Tercera edad</option>
<option value="2">Capacidades diferentes</option>
</b-select>
</b-field>
<b-field label="Dependencia" v-if="viejo.dependencia">
<b-input
type="text"
v-model="nuevo.dependencia"
:placeholder="viejo.dependencia"
/>
</b-field>
<b-field label="Institución" v-if="viejo.institucion">
<b-input
type="text"
:placeholder="viejo.institucion"
v-model="nuevo.institucion"
/>
</b-field>
<b-button
class="my-5 is-success"
@click="
imprimirWarning(
'¿Estás segura(a) de querer actualizar estos datos?',
actualizar
)
"
:disabled="!mostrarBoton()"
>
Actualizar Datos
</b-button>
</div>
</template>
<script>
import axios from 'axios'
import moment from 'moment'
import validator from 'validator'
export default {
props: {
idCasoEspecial: { type: Number, required: true },
admin: { type: Object, required: true },
viejo: { type: Object, required: true },
imprimirMensaje: { type: Function, required: true },
imprimirWarning: { type: Function, required: true },
imprimirError: { type: Function, required: true },
updateIsLoading: { type: Function, required: true },
},
data() {
return {
isLoading: false,
minDate1: new Date('2020-01-01'),
nuevo: {},
}
},
methods: {
fecha(date) {
if (date) {
const fecha = moment(date)
return `${fecha.date() < 10 ? '0' + fecha.date() : fecha.date()}/${
fecha.month() < 9 ? '0' + (fecha.month() + 1) : fecha.month() + 1
}/${fecha.year()}`
}
return ''
},
mostrarBoton() {
if (
this.nuevo.correo ||
this.nuevo.direccion ||
this.nuevo.telefono ||
this.nuevo.fechaNacimiento ||
this.nuevo.motivo ||
this.nuevo.institucion ||
this.nuevo.dependencia ||
(this.nuevo.fechaInicio && this.nuevo.fechaFin)
) {
if (this.nuevo.correo) {
if (validator.isEmail(this.nuevo.correo)) return true
else return false
}
return true
}
return false
},
actualizar() {
const data = { idCasoEspecial: this.idCasoEspecial }
this.updateIsLoading(true)
if (this.nuevo.direccion) data.direccion = this.nuevo.direccion
if (this.nuevo.correo) data.correo = this.nuevo.correo
if (this.nuevo.telefono) data.telefono = this.nuevo.telefono
if (this.nuevo.motivo) data.motivo = this.nuevo.motivo
if (this.nuevo.dependencia) data.dependencia = this.nuevo.dependencia
if (this.nuevo.institucion) data.institucion = this.nuevo.institucion
if (this.nuevo.fechaInicio)
data.fechaInicio = moment(this.nuevo.fechaInicio)
if (this.nuevo.fechaFin) data.fechaFin = moment(this.nuevo.fechaFin)
if (this.nuevo.fechaNacimiento)
data.fechaNacimiento = moment(this.nuevo.fechaNacimiento)
axios
.put(`${process.env.api}/caso_especial/update`, data, this.admin.token)
.then((res) => {
this.updateIsLoading(false)
this.imprimirMensaje(res.data.message)
this.$router.push('/admin/casos_especiales/caso_especial')
})
.catch((err) => {
this.updateIsLoading(false)
this.imprimirError(err.response.data)
})
},
},
computed: {
minDate2() {
const min = new Date(this.nuevo.fechaInicio)
return new Date(min.getFullYear(), min.getMonth() + 6, min.getDate())
},
},
}
</script>
<style scoped>
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.5s;
}
.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
opacity: 0;
}
</style>
+131
View File
@@ -0,0 +1,131 @@
<template>
<div>
<h3 class="title">Editar información del responsable</h3>
<b-field label="Nombre">
<b-input
type="text"
:placeholder="responsable.nombre"
v-model="nuevo.nombre"
/>
</b-field>
<b-field label="Correo eletrónico">
<b-input
type="email"
:placeholder="responsable.usuario"
v-model="nuevo.correo"
/>
</b-field>
<!-- <b-field label="Estado:">
<b-select v-model="nuevo.activo" expanded>
<option :value="true">Activado</option>
<option :value="false">Desactivado</option>
</b-select>
</b-field> -->
<div class="pt-5">
<b-button
type="is-info"
:disabled="mostrarBoton()"
@click="
imprimirWarning(
'¿Seguro(a) que quiere actualizar la información de este usuario?',
actualizar
)
"
>
Guardar Cambios
</b-button>
<b-button
type="is-link"
@click="
imprimirWarning(
'¿Seguro(a) que quiere cambiar la contraseña para este usuario?',
password
)
"
>
Cambiar contraseña
</b-button>
</div>
</div>
</template>
<script>
import axios from 'axios'
import validator from 'validator'
export default {
props: {
admin: { type: Object, required: true },
responsable: { type: Object, required: true },
imprimirError: { type: Function, required: true },
imprimirMensaje: { type: Function, required: true },
imprimirWarning: { type: Function, required: true },
updateIsLoading: { type: Function, required: true },
},
data() {
return {
nuevo: {},
}
},
methods: {
mostrarBoton() {
if (this.nuevo.correo) {
if (!validator.isEmail(this.nuevo.correo)) return true
if (this.nuevo.correo != this.responsable.usuario) return false
}
if (this.nuevo.nombre && this.nuevo.nombre != this.responsable.nombre)
return false
return true
},
actualizar() {
const data = { idUsuario: this.responsable.idUsuario }
this.updateIsLoading(true)
if (this.nuevo.correo) data.correo = this.nuevo.correo
if (this.nuevo.nombre) data.nombre = this.nuevo.nombre
axios
.put(
`${process.env.api}/usuario/responsable/update`,
data,
this.admin.token
)
.then((res) => {
this.updateIsLoading(false)
this.imprimirMensaje(res.data.message)
this.$router.push('/admin/responsables/responsable')
})
.catch((err) => {
this.updateIsLoading(false)
this.imprimirError(err.response.data)
})
},
password() {
const data = { idUsuario: this.responsable.idUsuario }
this.updateIsLoading(true)
axios
.put(
`${process.env.api}/usuario/new_password_responsable`,
data,
this.admin.token
)
.then((res) => {
this.updateIsLoading(false)
this.imprimirMensaje(res.data.message)
this.$router.push('/admin/responsables/responsable')
})
.catch((err) => {
this.updateIsLoading(false)
this.imprimirError(err.response.data)
})
},
},
}
</script>
<style scoped></style>
@@ -1,18 +1,18 @@
<template>
<div class="container" :class="{ pad: padding }">
<BotonRegresar :path="'/admin/servicio'" />
<br /><br />
<BotonRegresar path="/admin/servicio" />
<p class="is-size-2">Editar información del alumno</p>
<br />
<div class="formulario">
<b-field label="Correo eletrónico alumno">
<b-input
type="email"
v-model="nuevo.correo"
:placeholder="viejo.correo"
>
</b-input>
/>
</b-field>
<div v-if="status6()">
<b-field label="Fecha de inicio">
<b-datepicker
@@ -20,9 +20,9 @@
icon="calendar-today"
v-model="fechaInicio[0]"
:min-date="minDate1"
>
</b-datepicker>
/>
</b-field>
<transition name="fade">
<b-field label="Fecha de fin" v-if="fechaInicio[0]">
<b-datepicker
@@ -30,38 +30,39 @@
v-model="fechaFin[0]"
:min-date="minDate2"
icon="calendar-today"
>
</b-datepicker>
/>
</b-field>
</transition>
<b-field label="Dirección">
<b-input
type="text"
v-model="nuevo.direccion"
:placeholder="viejo.direccion"
>
</b-input>
/>
</b-field>
<b-field label="Teléfono">
<b-input
type="number"
:placeholder="viejo.telefono"
v-model="nuevo.telefono"
maxlength="10"
></b-input>
/>
</b-field>
<b-field label="Fecha de nacimiento">
<b-datepicker
:placeholder="fecha(viejo.fechaNacimiento)"
v-model="fechaNacimiento[0]"
icon="calendar-today"
>
</b-datepicker>
/>
</b-field>
<p class="is-size-5" v-if="viejo.cartaAceptacion">
Carta de aceptación
</p>
<br />
<b-field v-if="viejo.cartaAceptacion">
<b-upload
v-model="nuevo.cartaAceptacion"
@@ -79,15 +80,16 @@
<p>
{{
nuevo.cartaAceptacion.name ||
"Arrastra aquí tu archivo o da click para buscar"
'Arrastra aquí tu archivo o da click para buscar'
}}
</p>
</div>
</section>
</b-upload>
</b-field>
<p class="is-size-5" v-if="viejo.cartaTermino">Carta de término</p>
<br />
<b-field v-if="viejo.cartaTermino">
<b-upload
v-model="nuevo.cartaTermino"
@@ -105,15 +107,16 @@
<p>
{{
nuevo.cartaTermino.name ||
"Arrastra aquí tu archivo o da click para buscar"
'Arrastra aquí tu archivo o da click para buscar'
}}
</p>
</div>
</section>
</b-upload>
</b-field>
<p class="is-size-5" v-if="viejo.informeGlobal">Informe global</p>
<br />
<b-field v-if="viejo.informeGlobal">
<b-upload
v-model="nuevo.informeGlobal"
@@ -131,7 +134,7 @@
<p>
{{
nuevo.informeGlobal.name ||
"Arrastra aquí tu archivo o da click para buscar"
'Arrastra aquí tu archivo o da click para buscar'
}}
</p>
</div>
@@ -139,28 +142,27 @@
</b-upload>
</b-field>
</div>
<br />
<b-button v-if="mostrar()" @click="actualizarDialog()" class="is-info">
Actualizar Datos
</b-button>
<b-button v-else disabled class="is-info">Actualizar Datos</b-button>
<b-button @click="passwordDialog()" class="is-info">
Cambiar contraseña
</b-button>
<b-loading
:is-full-page="true"
v-model="isLoading"
:can-cancel="false"
></b-loading>
<b-loading :is-full-page="true" :can-cancel="false" v-model="isLoading" />
</div>
</div>
</template>
<script>
import axios from "axios";
import moment from "moment";
import validator from "validator";
import botonRegresar from "../../../botonRegresar";
import axios from 'axios'
import moment from 'moment'
import validator from 'validator'
import botonRegresar from '../botonRegresar'
export default {
components: {
@@ -168,12 +170,12 @@ export default {
},
data() {
return {
idServicio: localStorage.getItem("idServicio"),
idStatus: Number(localStorage.getItem("idStatus")),
idServicio: localStorage.getItem('idServicio'),
idStatus: Number(localStorage.getItem('idStatus')),
viejo: {},
nuevo: {
correo: "",
fechaInicioFinal: "",
correo: '',
fechaInicioFinal: '',
fechaFinFinal: null,
direccion: null,
telefono: null,
@@ -187,50 +189,60 @@ export default {
fechaFin: [],
token: {
headers: {
token: window.localStorage.getItem("token"),
token: localStorage.getItem('token'),
},
},
minDate1: new Date("2020-01-01"),
minDate1: new Date('2020-01-01'),
isLoading: false,
padding: false,
};
}
},
methods: {
fecha(date) {
if (date) {
const fecha = moment(date)
return `${fecha.date() < 10 ? '0' + fecha.date() : fecha.date()}/${
fecha.month() < 9 ? '0' + (fecha.month() + 1) : fecha.month() + 1
}/${fecha.year()}`
}
return ''
},
status6() {
if (this.idStatus === 6) {
this.padding = true;
return false;
this.padding = true
return false
}
return true;
return true
},
obtenerRegistro() {
this.isLoading = true;
this.isLoading = true
return axios
.get(
`${process.env.api}/servicio/admin?idServicio=${this.idServicio}`,
this.token
)
.then((res) => {
this.viejo = res.data;
this.viejo = res.data
})
.catch((err) => {
this.error(err.response.data.message);
this.error(err.response.data.message)
})
.finally(() => {
this.isLoading = false;
});
this.isLoading = false
})
},
dangerToast() {
this.$buefy.toast.open({
message: "Asegurate de ingresar un PDF",
type: "is-danger",
});
message: 'Asegurate de ingresar un PDF',
type: 'is-danger',
})
},
toast() {
this.$buefy.toast.open({
message: "Se han actualizado los datos",
type: "is-success",
});
message: 'Se han actualizado los datos',
type: 'is-success',
})
},
mostrar() {
if (
@@ -245,182 +257,175 @@ export default {
) {
if (this.nuevo.correo) {
if (validator.isEmail(this.nuevo.correo)) {
return true;
return true
} else {
return false;
return false
}
}
return true;
return true
}
},
validarExt(a) {
const extPermitidas = /(.pdf)$/i;
const extPermitidas = /(.pdf)$/i
switch (a) {
case 1:
if (!extPermitidas.exec(this.nuevo.cartaAceptacion.name)) {
this.dangerToast();
this.nuevo.cartaAceptacion = {};
this.dangerToast()
this.nuevo.cartaAceptacion = {}
}
break;
break
case 2:
if (!extPermitidas.exec(this.nuevo.cartaTermino.name)) {
this.dangerToast();
this.nuevo.cartaTermino = {};
this.dangerToast()
this.nuevo.cartaTermino = {}
}
break;
break
case 3:
if (!extPermitidas.exec(this.nuevo.informeGlobal.name)) {
this.dangerToast();
this.nuevo.informeGlobal = {};
this.dangerToast()
this.nuevo.informeGlobal = {}
}
break;
break
}
},
actualizar() {
const formData = new FormData();
const data = { idServicio: this.idServicio };
const formData = new FormData()
const data = { idServicio: this.idServicio }
this.isLoading = true;
if (this.nuevo.direccion) data.direccion = this.nuevo.direccion;
if (this.nuevo.correo) data.correo = this.nuevo.correo;
if (this.nuevo.telefono) data.telefono = this.nuevo.telefono;
this.isLoading = true
if (this.nuevo.direccion) data.direccion = this.nuevo.direccion
if (this.nuevo.correo) data.correo = this.nuevo.correo
if (this.nuevo.telefono) data.telefono = this.nuevo.telefono
if (this.nuevo.fechaInicioFinal)
data.fechaInicio = this.nuevo.fechaInicioFinal;
if (this.nuevo.fechaFinFinal) data.fechaFin = this.nuevo.fechaFinFinal;
data.fechaInicio = this.nuevo.fechaInicioFinal
if (this.nuevo.fechaFinFinal) data.fechaFin = this.nuevo.fechaFinFinal
if (this.nuevo.fechaNacimientoFinal)
data.fechaNacimiento = this.nuevo.fechaNacimientoFinal;
formData.append("data", JSON.stringify(data));
data.fechaNacimiento = this.nuevo.fechaNacimientoFinal
formData.append('data', JSON.stringify(data))
if (this.nuevo.cartaAceptacion)
formData.append("cartaAceptacion", this.nuevo.cartaAceptacion);
formData.append('cartaAceptacion', this.nuevo.cartaAceptacion)
if (this.nuevo.cartaTermino)
formData.append("cartaTermino", this.nuevo.cartaTermino);
formData.append('cartaTermino', this.nuevo.cartaTermino)
if (this.nuevo.informeGlobal)
formData.append("informeGlobal", this.nuevo.informeGlobal);
formData.append('informeGlobal', this.nuevo.informeGlobal)
axios
.put(`${process.env.api}/servicio/update`, formData, {
headers: {
"Content-Type": "multipart/form-data",
'Content-Type': 'multipart/form-data',
token: this.token.headers.token,
},
})
.then((res) => {
this.toast();
this.$router.push("/admin/servicio");
this.toast()
this.$router.push('/admin/servicio')
})
.catch((err) => {
this.error(err.response.data.message);
this.error(err.response.data.message)
})
.finally(() => {
this.isLoading = false;
});
this.isLoading = false
})
},
actualizarDialog() {
this.$buefy.dialog.confirm({
title: "Actualizar datos",
message: "¿Seguro(a) que quiere actualizar estos datos?",
confirmText: "Confirmar",
cancelText: "Cancelar",
type: "is-success",
title: 'Actualizar datos',
message: '¿Seguro(a) que quiere actualizar estos datos?',
confirmText: 'Confirmar',
cancelText: 'Cancelar',
type: 'is-success',
hasIcon: true,
onConfirm: () => this.actualizar(),
});
})
},
passwordDialog() {
this.$buefy.dialog.confirm({
title: "Actualizar datos",
message: "¿Seguro(a) que quiere actualizar la contraseña?",
confirmText: "Confirmar",
cancelText: "Cancelar",
type: "is-success",
title: 'Actualizar datos',
message: '¿Seguro(a) que quiere actualizar la contraseña?',
confirmText: 'Confirmar',
cancelText: 'Cancelar',
type: 'is-success',
hasIcon: true,
onConfirm: () => this.password(),
});
})
},
password() {
this.isLoading = true;
const data = { idServicio: this.idServicio };
this.isLoading = true
const data = { idServicio: this.idServicio }
axios
.put(`${process.env.api}/usuario/new_password_alumno`, data, this.token)
.then((res) => {
this.$buefy.toast.open({
message: "Se ha enviado el correo con la nueva contraseña",
type: "is-success",
});
this.$router.push("/admin");
message: 'Se ha enviado el correo con la nueva contraseña',
type: 'is-success',
})
this.$router.push('/admin')
})
.catch((err) => {
this.error(err.response.data.message);
this.error(err.response.data.message)
})
.finally(() => {
this.isLoading = false;
});
this.isLoading = false
})
},
error(msj) {
let salir = false;
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;
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",
title: 'Error',
message: msj,
type: "is-danger",
type: 'is-danger',
hasIcon: true,
icon: "alert-circle",
iconPack: "mdi",
ariaRole: "alertdialog",
icon: 'alert-circle',
ariaRole: 'alertdialog',
ariaModal: true,
});
})
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
}
},
fecha(date) {
if (date) {
const fecha = moment(date.substr(0, 10));
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`;
localStorage.clear()
this.$router.push(`/`)
}
},
},
computed: {
minDate2() {
const min = new Date(this.fechaInicio);
return new Date(min.getFullYear(), min.getMonth() + 6, min.getDate());
const min = new Date(this.fechaInicio)
return new Date(min.getFullYear(), min.getMonth() + 6, min.getDate())
},
},
watch: {
fechaInicio: function() {
this.nuevo.fechaInicioFinal = moment(this.fechaInicio[0]);
this.fechaFin[0] = null;
fechaInicio: function () {
this.nuevo.fechaInicioFinal = moment(this.fechaInicio[0])
this.fechaFin[0] = null
},
fechaFin: function() {
this.nuevo.fechaFinFinal = moment(this.fechaFin[0]);
fechaFin: function () {
this.nuevo.fechaFinFinal = moment(this.fechaFin[0])
},
fechaNacimiento: function() {
this.nuevo.fechaNacimientoFinal = moment(this.fechaNacimiento[0]);
fechaNacimiento: function () {
this.nuevo.fechaNacimientoFinal = moment(this.fechaNacimiento[0])
},
},
created() {
this.obtenerRegistro();
this.obtenerRegistro()
},
};
}
</script>
<style scoped>
+68
View File
@@ -0,0 +1,68 @@
<template>
<div>
<h4 class="is-size-4 mb-2">Gustavo Baz Prada</h4>
<b-field label="Año:">
<b-select v-model="selectedYearGustavoBaz" expanded>
<option value="" disabled>Seleccione un año:</option>
<option v-for="(y, i) in years" :key="i" :value="y">
{{ y }}
</option>
</b-select>
</b-field>
<div class="pb-5 pt-3">
<b-button
type="is-info"
@click="descargar()"
:disabled="!selectedYearGustavoBaz"
>
Descargar Excel
</b-button>
</div>
</div>
</template>
<script>
import axios from 'axios'
import fileDownload from 'js-file-download'
export default {
data() {
return {
selectedYearGustavoBaz: '',
}
},
props: {
years: { type: Array, required: true },
admin: { type: Object, required: true },
imprimirError: { type: Function, required: true },
updateIsLoading: { type: Function, required: true },
},
methods: {
descargar() {
this.updateIsLoading(true)
axios
.get(
`${process.env.api}/servicio/gustavo_baz_prada?year=${this.selectedYearGustavoBaz}`,
this.admin.token
)
.then((res) => {
fileDownload(
res.data,
`${this.selectedYearGustavoBaz}_gustavo_baz_prada.csv`
)
this.selectedYearGustavoBaz = ''
this.updateIsLoading(false)
})
.catch((err) => {
this.updateIsLoading(false)
this.imprimirError(err.response.data)
})
},
},
}
</script>
<style scoped></style>
@@ -0,0 +1,102 @@
<template>
<div>
<h3 class="title">{{ alumno.Status.status }}</h3>
<h4 class="is-size-4 mb-4">Datos personales</h4>
<b-field label="Número de Cuenta:">
<p class="input">{{ alumno.Usuario.usuario }}</p>
</b-field>
<b-field label="Nombre:">
<p class="input">{{ alumno.Usuario.nombre }}</p>
</b-field>
<b-field label="Carrera:">
<p class="input">{{ alumno.Carrera.carrera }}</p>
</b-field>
<b-field label="Créditos:">
<p class="input">{{ Number(alumno.creditos) }}%</p>
</b-field>
<b-field label="Correo:">
<p class="input">{{ alumno.correo }}</p>
</b-field>
<b-field label="Fecha de Nacimiento:">
<p class="input">{{ fecha(alumno.fechaNacimiento) }}</p>
</b-field>
<b-field label="Dirección:">
<p class="input">{{ alumno.direccion }}</p>
</b-field>
<b-field label="Teléfono:">
<p class="input">{{ alumno.telefono }}</p>
</b-field>
<b-field label="Motivo:" v-if="alumno.motivo">
<p class="input" v-if="alumno.motivo === '1'">Tercera edad</p>
<p class="input" v-if="alumno.motivo === '2'">Capacidades diferentes</p>
</b-field>
<b-field label="Institución:" v-if="alumno.institucion">
<p class="input">{{ alumno.institucion }}</p>
</b-field>
<b-field label="Dependencia:" v-if="alumno.dependencia">
<p class="input">{{ alumno.dependencia }}</p>
</b-field>
<b-field label="Fecha Inicio:">
<p class="input">{{ fecha(alumno.fechaInicio) }}</p>
</b-field>
<b-field label="Fecha Fin:">
<p class="input">{{ fecha(alumno.fechaFin) }}</p>
</b-field>
<b-field label="Fecha Registro:">
<p class="input">{{ fecha(alumno.createdAt) }}</p>
</b-field>
<b-field
class="py-5"
v-if="alumno.Status.idStatus === 11 || alumno.Status.idStatus === 12"
>
<b-button
type="is-info"
tag="router-link"
to="/admin/casos_especiales/caso_especial/editar"
>
Editar información
</b-button>
</b-field>
</div>
</template>
<script>
import moment from 'moment'
export default {
props: {
alumno: { type: Object, required: true },
},
methods: {
fecha(date) {
if (date) {
const fecha = moment(date)
return `${fecha.date() < 10 ? '0' + fecha.date() : fecha.date()}/${
fecha.month() < 9 ? '0' + (fecha.month() + 1) : fecha.month() + 1
}/${fecha.year()}`
}
return ''
},
},
}
</script>
<style scoped></style>
+116
View File
@@ -0,0 +1,116 @@
<template>
<div>
<h3 class="title">Información del responsable</h3>
<b-field label="Nombre:">
<p class="input">{{ responsable.nombre }}</p>
</b-field>
<b-field label="Correo:">
<p class="input">{{ responsable.usuario }}</p>
</b-field>
<b-field label="Activo:">
<p class="input">{{ responsable.activo ? 'Si' : 'No' }}</p>
</b-field>
<b-field label="Clave de programa:">
<b-select v-model="programa" expanded>
<option value="" disabled>Elija una clave de programa:</option>
<option v-for="(p, i) in programas" :key="i" :value="p">
{{ p.clavePrograma }}
</option>
</b-select>
</b-field>
<b-field label="Institucion:">
<p class="input">{{ programa.institucion }}</p>
</b-field>
<b-field label="Dependencia:">
<p class="input">{{ programa.dependencia }}</p>
</b-field>
<b-field label="Programa:">
<p class="input">{{ programa.programa }}</p>
</b-field>
<b-field label="Programa de Acatlan:">
<p class="input">
<span v-if="programa.idPrograma">
{{ programa.acatlan ? 'Si' : 'No' }}
</span>
</p>
</b-field>
<b-field class="my-5">
<b-button
type="is-link"
tag="router-link"
to="/admin/responsables/responsable/editar"
>
Editar información
</b-button>
</b-field>
</div>
</template>
<script>
import axios from 'axios'
export default {
data() {
return {
idResponsable: null,
programas: [],
programa: {},
responsable: {},
}
},
props: {
admin: { type: Object, required: true },
imprimirError: { type: Function, required: true },
updateIsLoading: { type: Function, required: true },
},
methods: {
obtenerResponsable() {
this.updateIsLoading(true)
axios
.get(
`${process.env.api}/usuario/responsable?idUsuario=${this.idResponsable}`,
this.admin.token
)
.then((res) => {
this.responsable = res.data
this.obtenerProgramas()
this.updateIsLoading(false)
})
.catch((err) => {
this.updateIsLoading(false)
this.imprimirError(err.response.data)
})
},
obtenerProgramas() {
axios
.get(
`${process.env.api}/programa/programas_admin?idUsuario=${this.idResponsable}`,
this.admin.token
)
.then((res) => {
this.programas = res.data
})
.catch((err) => {
this.imprimirError(err.response.data)
})
},
},
created() {
this.idResponsable = Number(localStorage.getItem('idResponsable'))
if (!this.idResponsable) this.$router.push('/admin/responsables')
else this.obtenerResponsable()
},
}
</script>
<style scoped></style>
+134
View File
@@ -0,0 +1,134 @@
<template>
<section class="mb-5">
<div class="mb-5">
<h4 class="is-size-4 pb-2">Datos del programa</h4>
<b-field label="Institución:">
<p class="input">{{ alumno.Programa.institucion }}</p>
</b-field>
<b-field label="Dependencia:">
<p class="input">{{ alumno.Programa.dependencia }}</p>
</b-field>
<b-field label="Programa:">
<p class="input">{{ alumno.Programa.programa }}</p>
</b-field>
<b-field label="Clave de programa:">
<p class="input">{{ alumno.Programa.clavePrograma }}</p>
</b-field>
<b-field label="Programa de Acatlan:">
<p class="input">
<span>
{{ alumno.Programa.acatlan ? 'Si' : 'No' }}
</span>
</p>
</b-field>
</div>
<div class="mb-5">
<h4 class="is-size-4 pb-2">Datos personales</h4>
<b-field label="Numero de cuenta:">
<p class="input">{{ alumno.Usuario.usuario }}</p>
</b-field>
<b-field label="Nombre:">
<p class="input">{{ alumno.Usuario.nombre }}</p>
</b-field>
<b-field label="Fecha de nacimiento:" v-if="alumno.fechaNacimiento">
<p class="input">{{ fecha(alumno.fechaNacimiento) }}</p>
</b-field>
<b-field label="Carrera:">
<p class="input">{{ alumno.Carrera.carrera }}</p>
</b-field>
<b-field label="Créditos">
<p class="input">
{{ alumno.creditos ? parseInt(alumno.creditos) : '' }}
<span v-if="alumno.creditos">%</span>
</p>
</b-field>
<b-field label="Teléfono:" v-if="alumno.telefono">
<p class="input">{{ alumno.telefono }}</p>
</b-field>
<b-field label="Dirección:" v-if="alumno.direccion">
<p class="input">{{ alumno.direccion }}</p>
</b-field>
<b-field label="Email:">
<p class="input">{{ alumno.correo }}</p>
</b-field>
<b-field label="Programa Interno:" v-if="alumno.programaInterno">
<p class="input">{{ alumno.programaInterno }}</p>
</b-field>
<b-field label="Profesor:" v-if="alumno.profesor">
<p class="input">{{ alumno.profesor }}</p>
</b-field>
<b-field label="Fecha de registro:" v-if="alumno.createdAt">
<p class="input">{{ fecha(alumno.createdAt) }}</p>
</b-field>
<b-field label="Fecha de inicio:">
<p class="input">{{ fecha(alumno.fechaInicio) }}</p>
</b-field>
<b-field label="Fecha de termino:">
<p class="input">{{ fecha(alumno.fechaFin) }}</p>
</b-field>
<b-field label="Fecha de liberación:" v-if="alumno.fechaLiberacion">
<p class="input">{{ fecha(alumno.fechaLiberacion) }}</p>
</b-field>
</div>
<b-field>
<b-button
class="boton is-info"
@click="editar()"
:disabled="
alumno.Status.idStatus === 6 || alumno.Status.idStatus === 10
"
>
Editar información
</b-button>
</b-field>
</section>
</template>
<script>
import moment from 'moment'
export default {
props: {
alumno: { type: Object, required: true },
},
methods: {
fecha(date) {
if (date) {
const fecha = moment(date)
return `${fecha.date() < 10 ? '0' + fecha.date() : fecha.date()}/${
fecha.month() < 9 ? '0' + (fecha.month() + 1) : fecha.month() + 1
}/${fecha.year()}`
}
return ''
},
editar() {
localStorage.setItem('idStatus', this.alumno.Status.idStatus)
this.$router.push('/admin/servicio/editar')
},
},
}
</script>
<style scoped></style>
+54
View File
@@ -0,0 +1,54 @@
<template>
<b-field class="mt-2">
<b-button
type="is-success"
@click="
imprimirWarning(
'¿Esta seguro de querer liberar este caso especial?',
confirmarLiberacion
)
"
>
Liberar
</b-button>
</b-field>
</template>
<script>
import axios from 'axios'
export default {
props: {
idCasoEspecial: { type: Number, required: true },
admin: { type: Object, required: true },
imprimirError: { type: Function, required: true },
imprimirMensaje: { type: Function, required: true },
imprimirWarning: { type: Function, required: true },
updateIsLoading: { type: Function, required: true },
},
methods: {
confirmarLiberacion() {
const data = { idCasoEspecial: this.idCasoEspecial }
this.updateIsLoading(true)
axios
.put(
`${process.env.api}/caso_especial/liberacion`,
data,
this.admin.token
)
.then((res) => {
this.imprimirMensaje(res.data.message)
this.updateIsLoading(false)
this.$router.push('/admin/casos_especiales')
})
.catch((err) => {
this.updateIsLoading(false)
this.imprimirError(err.response.data)
})
},
},
}
</script>
<style scoped></style>
+88
View File
@@ -0,0 +1,88 @@
<template>
<div class="mt-6">
<h3 class="title">Reasignación de programas</h3>
<p class="is-size-6 mb-4">
A continuación inserte el usaurio que desea eliminiar, los programas que
este usuario tenga seran asignados a este: {{ responsable.usuario }}
</p>
<b-field label="Usuario/Correo electrónico">
<b-input
type="email"
placeholder="Usuario"
v-model="correoOtroResponsable"
/>
</b-field>
<b-field class="pt-5">
<b-button
type="is-info"
:disabled="mostrarBoton()"
@click="
imprimirWarning(
`¿Seguro(a) que quiere eliminar a ${correoOtroResponsable} y pasar todos los programas a ${responsable.usuario}?`,
reasignarProgramas
)
"
>
Reasignar
</b-button>
</b-field>
</div>
</template>
<script>
import axios from 'axios'
import validator from 'validator'
export default {
props: {
admin: { type: Object, required: true },
responsable: { type: Object, required: true },
imprimirError: { type: Function, required: true },
imprimirMensaje: { type: Function, required: true },
imprimirWarning: { type: Function, required: true },
updateIsLoading: { type: Function, required: true },
},
data() {
return { correoOtroResponsable: '' }
},
methods: {
mostrarBoton() {
if (
!this.correoOtroResponsable ||
!validator.isEmail(this.correoOtroResponsable) ||
this.responsable.usuario === this.correoOtroResponsable
)
return true
return false
},
reasignarProgramas() {
const data = {
idUsuario: this.responsable.idUsuario,
correoOtroResponsable: this.correoOtroResponsable,
}
this.updateIsLoading(true)
axios
.put(
`${process.env.api}/programa/reasignar_programas`,
data,
this.admin.token
)
.then((res) => {
this.updateIsLoading(false)
this.imprimirMensaje(res.data.message)
this.$router.push('/admin/responsables/responsable')
})
.catch((err) => {
this.updateIsLoading(false)
this.imprimirError(err.response.data)
})
},
},
}
</script>
<style scoped></style>
+84
View File
@@ -0,0 +1,84 @@
<template>
<div>
<h4 class="is-size-4 mb-2">Descargar reporte</h4>
<b-field label="Seleccione una fecha de inicio:">
<b-datepicker
icon="calendar-today"
placeholder="Seleccione una fecha de inicio"
:min-date="minDate"
:max-date="maxDate"
v-model="selectedInicio"
trap-focus
/>
</b-field>
<b-field label="Seleccione una fecha de fin:">
<b-datepicker
placeholder="Seleccione una fecha de fin"
icon="calendar-today"
:min-date="minDate"
:max-date="maxDate"
v-model="selectedFin"
trap-focus
/>
</b-field>
<div class="pb-5 pt-3">
<b-button type="is-info" @click="descargar()" :disabled="validarFechas()">
Descargar Excel
</b-button>
</div>
</div>
</template>
<script>
import axios from 'axios'
import moment from 'moment'
import fileDownload from 'js-file-download'
export default {
data() {
return {
selectedFin: [],
selectedInicio: [],
maxDate: new Date(),
minDate: new Date('January 1, 2020'),
}
},
props: {
admin: { type: Object, required: true },
imprimirError: { type: Function, required: true },
updateIsLoading: { type: Function, required: true },
},
methods: {
validarFechas() {
const fechaInicio = moment(new Date(this.selectedInicio))
const fechaFin = moment(new Date(this.selectedFin))
if (!fechaInicio.isValid() || !fechaFin.isValid()) return true
return false
},
descargar() {
this.updateIsLoading(true)
axios
.get(
`${process.env.api}/servicio/reporte?inicio=${this.selectedInicio}&fin=${this.selectedFin}`,
this.admin.token
)
.then((res) => {
fileDownload(res.data, `reporte.csv`)
this.selectedInicio = []
this.selectedFin = []
this.updateIsLoading(false)
})
.catch((err) => {
this.updateIsLoading(false)
this.imprimirError(err.response.data)
})
},
},
}
</script>
<style scoped></style>
@@ -0,0 +1,149 @@
<template>
<div>
<h3 class="title">Casos Especiales</h3>
<div class="columns">
<b-field class="column" label="Número de Cuenta">
<b-input
type="text"
placeholder="No.Cuenta"
icon="school"
maxlength="9"
@keyup.enter.native="obtenerCasosEspeciales()"
v-model="search.numeroCuenta"
rounded
/>
</b-field>
<b-field class="column" label="Nombre">
<b-input
type="name"
placeholder="Nombre"
icon="account"
@keyup.enter.native="obtenerCasosEspeciales()"
v-model="search.nombre"
rounded
/>
</b-field>
<b-field class="column" label="Status">
<b-select icon="information" v-model="search.idStatus" expanded rounded>
<option value="">Status</option>
<option
v-for="(s, i) in status"
:key="i"
:value="s.idStatus"
v-show="i > 9"
>
{{ s.status }}
</option>
</b-select>
</b-field>
<b-field class="column is-align-self-center">
<b-button
type="is-info"
@click="obtenerCasosEspeciales()"
expanded
rounded
>
Buscar
</b-button>
</b-field>
</div>
<TablaServiciosSociales
:columnaFechaFin="false"
:columnaFechaInicio="false"
:isLoading="isLoading"
:path="'/admin/casos_especiales/caso_especial'"
:idTipoUsuario="admin.idTipoUsuario"
:page="page"
:total="total"
:data="data"
:onPageChange="onPageChange"
/>
</div>
</template>
<script>
import axios from 'axios'
import TablaServiciosSociales from '@/components/TablaServiciosSociales'
export default {
components: { TablaServiciosSociales },
data() {
return {
isLoading: false,
page: 1,
total: 0,
data: [],
status: [],
search: {
idStatus: '',
},
searchAnterior: {},
}
},
props: {
admin: { type: Object, required: true },
imprimirError: { type: Function, required: true },
},
methods: {
onPageChange(page) {
this.page = page
this.obtenerCasosEspeciales()
},
obtenerCasosEspeciales() {
let data = ''
this.isLoading = true
if (
this.search.numeroCuenta != this.searchAnterior.numeroCuenta ||
this.search.nombre != this.searchAnterior.nombre ||
this.search.idStatus != this.searchAnterior.idStatus
) {
this.page = 1
this.searchAnterior.numeroCuenta = this.search.numeroCuenta
this.searchAnterior.nombre = this.search.nombre
this.searchAnterior.idStatus = this.search.idStatus
}
if (this.search.idStatus) data += `&idStatus=${this.search.idStatus}`
if (this.search.nombre) data += `&nombre=${this.search.nombre}`
if (this.search.numeroCuenta)
data = `&numeroCuenta=${this.search.numeroCuenta}`
axios
.get(
`${process.env.api}/caso_especial/servicios_especiales?pagina=${this.page}${data}`,
this.admin.token
)
.then((res) => {
this.data = res.data.serviciosEspeciales
this.total = res.data.count
this.isLoading = false
})
.catch((err) => {
this.isLoading = false
this.imprimirError(err.response.data)
})
},
obtenerCatalogoStatus() {
axios
.get(`${process.env.api}/status`, this.admin.token)
.then((res) => {
this.status = res.data
this.obtenerCasosEspeciales()
})
.catch((err) => {
this.imprimirError(err.response.data)
})
},
},
created() {
if (this.admin.idTipoUsuario === 1) this.obtenerCatalogoStatus()
},
}
</script>
<style scoped></style>
+150
View File
@@ -0,0 +1,150 @@
<template>
<div>
<h3 class="title">Tabla de responsables</h3>
<div class="columns">
<b-field class="column" label="Correo Electrónico">
<b-input
type="text"
placeholder="Correo"
icon="mail"
@keyup.enter.native="obtenerResponsables()"
v-model="search.correo"
rounded
/>
</b-field>
<b-field class="column" label="Nombre">
<b-input
type="name"
placeholder="Nombre"
icon="account"
@keyup.enter.native="obtenerResponsables()"
v-model="search.nombre"
rounded
/>
</b-field>
<b-field class="column is-align-self-center">
<b-button
type="is-info"
@click="obtenerResponsables()"
expanded
rounded
>
Buscar
</b-button>
</b-field>
</div>
<b-table
:data="data"
:total="total"
:current-page="page"
:per-page="perPage"
:loading="isLoading"
:selected.sync="responsableSelected"
:row-class="(row, index) => 'pointer'"
@page-change="onPageChange"
hoverable
striped
paginated
backend-pagination
>
<b-table-column
field="correo"
label="Correo Electrónico"
v-slot="props"
centered
>
<span>{{ props.row.usuario }}</span>
</b-table-column>
<b-table-column field="nombre" label="Nombre" v-slot="props" centered>
<span>{{ props.row.nombre }} </span>
</b-table-column>
<b-table-column field="estado" label="Estado" v-slot="props" centered>
<span :class="style(props.row.activo)">
{{ props.row.activo ? 'Activo' : 'Desactivado' }}
</span>
</b-table-column>
</b-table>
</div>
</template>
<script>
import axios from 'axios'
export default {
data() {
return {
isLoading: false,
page: 1,
perPage: 25,
total: 0,
data: [],
responsableSelected: {},
search: {},
searchAnterior: {},
}
},
props: {
admin: { type: Object, required: true },
imprimirError: { type: Function, required: true },
},
methods: {
style(activo) {
let style = 'tag'
if (activo) style += ' is-success'
else style += ' is-danger'
return style
},
onPageChange(page) {
this.page = page
this.obtenerResponsables()
},
obtenerResponsables() {
let data = ''
this.isLoading = true
if (
this.search.correo != this.searchAnterior.correo ||
this.search.nombre != this.searchAnterior.nombre
) {
this.page = 1
this.searchAnterior.correo = this.search.correo
this.searchAnterior.nombre = this.search.nombre
}
if (this.search.nombre) data += `&nombre=${this.search.nombre}`
if (this.search.correo) data = `&correo=${this.search.correo}`
axios
.get(
`${process.env.api}/usuario/responsables?pagina=${this.page}${data}`,
this.admin.token
)
.then((res) => {
this.data = res.data.responsables
this.total = res.data.count
this.isLoading = false
})
.catch((err) => {
this.isLoading = false
this.imprimirError(err.response.data)
})
},
},
watch: {
responsableSelected() {
localStorage.setItem('idResponsable', this.responsableSelected.idUsuario)
this.$router.push(`/admin/responsables/responsable`)
},
},
created() {
if (this.admin.idTipoUsuario === 1) this.obtenerResponsables()
},
}
</script>
<style scoped></style>
+144
View File
@@ -0,0 +1,144 @@
<template>
<div>
<h3 class="title">Servicios Sociales</h3>
<div class="columns">
<b-field class="column" label="Número de Cuenta">
<b-input
type="text"
placeholder="No.Cuenta"
icon="school"
maxlength="9"
@keyup.enter.native="obtenerServicios()"
v-model="search.numeroCuenta"
rounded
/>
</b-field>
<b-field class="column" label="Nombre">
<b-input
type="name"
placeholder="Nombre"
icon="account"
@keyup.enter.native="obtenerServicios()"
v-model="search.nombre"
rounded
/>
</b-field>
<b-field class="column" label="Status">
<b-select icon="information" v-model="search.idStatus" rounded>
<option value="">Status</option>
<option
v-for="(s, i) in status"
:key="i"
:value="s.idStatus"
v-show="i < 10"
>
{{ s.status }}
</option>
</b-select>
</b-field>
<div class="column is-align-self-center">
<b-button type="is-info" @click="obtenerServicios()" expanded rounded>
Buscar
</b-button>
</div>
</div>
<TablaServiciosSociales
:isLoading="isLoading"
:path="'/admin/servicio'"
:idTipoUsuario="admin.idTipoUsuario"
:page="page"
:total="total"
:data="data"
:onPageChange="onPageChange"
/>
</div>
</template>
<script>
import axios from 'axios'
import TablaServiciosSociales from '@/components/TablaServiciosSociales'
export default {
components: { TablaServiciosSociales },
data() {
return {
isLoading: false,
page: 1,
total: 0,
data: [],
status: [],
search: {
idStatus: '',
},
searchAnterior: {},
}
},
props: {
admin: { type: Object, required: true },
imprimirMensaje: { type: Function, required: true },
imprimirWarning: { type: Function, required: true },
imprimirError: { type: Function, required: true },
},
methods: {
onPageChange(page) {
this.page = page
this.obtenerServicios()
},
obtenerServicios() {
let data = ''
this.isLoading = true
if (
this.search.numeroCuenta != this.searchAnterior.numeroCuenta ||
this.search.nombre != this.searchAnterior.nombre ||
this.search.idStatus != this.searchAnterior.idStatus
) {
this.page = 1
this.searchAnterior.numeroCuenta = this.search.numeroCuenta
this.searchAnterior.nombre = this.search.nombre
this.searchAnterior.idStatus = this.search.idStatus
}
if (this.search.idStatus) data += `&idStatus=${this.search.idStatus}`
if (this.search.nombre) data += `&nombre=${this.search.nombre}`
if (this.search.numeroCuenta)
data += `&numeroCuenta=${this.search.numeroCuenta}`
axios
.get(
`${process.env.api}/servicio/servicios_admin?pagina=${this.page}${data}`,
this.admin.token
)
.then((res) => {
this.data = res.data.serviciosAdmin
this.total = res.data.count
this.isLoading = false
})
.catch((err) => {
this.isLoading = false
this.imprimirError(err.response.data)
})
},
obtenerCatalogoStatus() {
axios
.get(`${process.env.api}/status`, this.admin.token)
.then((res) => {
this.status = res.data
this.obtenerServicios()
})
.catch((err) => {
this.imprimirError(err.response.data)
})
},
},
created() {
if (this.admin.idTipoUsuario === 1) this.obtenerCatalogoStatus()
},
}
</script>
<style scoped></style>
+25
View File
@@ -0,0 +1,25 @@
<template>
<div class="mb-5">
<h3 class="title" v-if="alumno.Status.idStatus === 1">
<strong> Confirmar el pre-registro del alumno </strong>
</h3>
<h3 class="title" v-if="alumno.Status.idStatus === 4">
<strong> Término </strong>
</h3>
<h3 class="title" v-if="alumno.Status.idStatus === 5">
<strong> Validar el término del alumno </strong>
</h3>
</div>
</template>
<script>
export default {
props: {
alumno: { type: Object, required: true },
},
}
</script>
<style scoped></style>
-195
View File
@@ -1,195 +0,0 @@
<template>
<div
v-if="alumno.Status.idServicio != 11 || alumno.Status.idServicio != 12"
class="footter"
>
<p
class="is-size-2 mb-3"
v-if="alumno.Status">
{{ alumno.Status.status }}
</p>
<p class="is-size-3"><b>Datos personales</b></p>
<p class="is-size-5 mt-3">
<b>Número de cuenta: </b> {{ alumno.Usuario.usuario }}
</p>
<p class="is-size-5 mt-3"><b>Nombre: </b> {{ alumno.Usuario.nombre }}</p>
<p class="is-size-5 mt-3"><b>Carrera: </b> {{ alumno.Carrera.carrera }}</p>
<p class="is-size-5 mt-3"><b>Correo: </b> {{ alumno.correo }}</p>
<p class="is-size-5 mt-3"><b>Dirección: </b> {{ alumno.direccion }}</p>
<p class="is-size-5 mt-3"><b>Teléfono: </b> {{ alumno.telefono }}</p>
<p
class="is-size-5 mt-3"
v-if="alumno.motivo">
<b>Motivo: </b>{{ motivo(alumno.motivo) }}
</p>
<p
class="is-size-5 mt-3"
v-if="alumno.institucion">
<b>Institución: </b>{{ alumno.institucion }}
</p>
<p
class="is-size-5 mt-3"
v-if="alumno.dependencia">
<b>Dependencia: </b>{{ alumno.dependencia }}
</p>
<p class="is-size-5 mt-3"><b>Créditos: </b> {{ alumno.creditos + "%" }}</p>
<p class="is-size-5 mt-3">
<b>Fecha de nacimiento: </b>
{{ fecha(alumno.fechaNacimiento) }}
</p>
<p class="is-size-5 mt-3">
<b>Fecha de inicio: </b>
{{ fecha(alumno.fechaInicio) }}
</p>
<p class="is-size-5 mt-3">
<b>Fecha de fin: </b>
{{ fecha(alumno.fechaFin) }}
</p>
<b-button class="is-info my-4" @click="editar()">
Editar información
</b-button>
<b-field
v-if="alumno.Status.idStatus === 11 || alumno.Status.idStatus === 12"
class="centro"
>
<b-button
class="boton border-info my-5"
type="is-success"
@click="confirmarLiberacion()"
>
Liberar
</b-button>
</b-field>
<b-loading
:is-full-page="true"
v-model="isLoading"
:can-cancel="false"
></b-loading>
</div>
</template>
<script>
import moment from "moment";
import axios from "axios";
export default {
data() {
return {
alumno: {
fechaNacimiento: "",
fechaInicio: "",
fechaFin: "",
Usuario: {},
Carrera: {},
Status: {},
},
token: {
headers: {
token: localStorage.getItem("token"),
},
},
idCasoEspecial: localStorage.getItem("idCasoEspecial"),
isLoading: false,
};
},
methods: {
editar(){
this.$router.push("/admin/especial/casoEspecial/editar");
},
obtenerDatos() {
return axios
.get(
`${process.env.api}/caso_especial/?idCasoEspecial=${this.idCasoEspecial}`,
this.token
)
.then((res) => {
this.alumno = res.data;
})
.catch((err) => {
this.error(err.response.data.message);
})
.finally(() => {
this.isLoading = false;
});
},
confirmarLiberacion() {
this.isLoading = true;
const data = { idCasoEspecial: this.idCasoEspecial };
axios
.put(`${process.env.api}/caso_especial/liberacion`, data, this.token)
.then((res) => {
this.$buefy.dialog.alert("El servicio ha sido liberado");
localStorage.removeItem("idCasoEspecial");
this.$router.push("/admin/especial");
})
.catch((err) => {
this.error(err.response.data.message);
})
.finally(() => {
this.isLoading = false;
});
},
fecha(date) {
const fecha = moment(date.substr(0, 10));
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`;
},
motivo(n) {
if(n == 1) {
return "Tercera edad"
}else if(n == 2) {
return "Capacidades diferentes"
}
},
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",
iconPack: "mdi",
ariaRole: "alertdialog",
ariaModal: true,
});
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
}
},
},
created() {
this.obtenerDatos();
},
};
</script>
<style>
.centro {
text-align: center;
}
.footter {
margin-bottom: 6rem;
}
</style>
-272
View File
@@ -1,272 +0,0 @@
<template>
<div class="container">
<p class="is-size-2">Editar información del alumno</p>
<br />
<div class="formulario">
<b-field label="Correo eletrónico">
<b-input
type="email"
v-model="nuevo.correo"
:placeholder="viejo.correo"
>
</b-input>
</b-field>
<b-field label="Teléfono">
<b-input
type="number"
v-model="nuevo.telefono"
maxlength="10"
:placeholder="viejo.telefono"
>
</b-input>
</b-field>
<b-field label="Dirección">
<b-input
type="text"
v-model="nuevo.direccion"
:placeholder="viejo.direccion"
>
</b-input>
</b-field>
<b-field label="Fecha de inicio">
<b-datepicker
:placeholder="fecha(viejo.fechaInicio)"
icon="calendar-today"
v-model="nuevo.fechaInicio"
:min-date="minDate1"
>
</b-datepicker>
</b-field>
<transition name="fade">
<b-field label="Fecha de fin" v-if="nuevo.fechaInicio">
<b-datepicker
:placeholder="fecha(viejo.fechaFin)"
v-model="nuevo.fechaFin"
:min-date="minDate2"
icon="calendar-today"
>
</b-datepicker>
</b-field>
</transition>
<b-field label="Fecha de nacimiento">
<b-datepicker
:placeholder="fecha(viejo.fechaNacimiento)"
icon="calendar-today"
v-model="nuevo.fechaNacimiento"
>
</b-datepicker>
</b-field>
<b-field label="Motivo" v-if="viejo.motivo">
<b-select
class="my-4"
expanded
v-model="nuevo.motivo"
>
<option value="1">Tercera edad</option>
<option value="2">Capacidades diferentes</option>
</b-select>
</b-field>
<b-field label="Dependencia" v-if="viejo.dependencia">
<b-input
type="text"
v-model="nuevo.dependencia"
:placeholder="viejo.dependencia"
>
</b-input>
</b-field>
<b-field label="Institución" v-if="viejo.institucion">
<b-input
type="text"
v-model="nuevo.institucion"
:placeholder="viejo.institucion"
>
</b-input>
</b-field>
</div>
<b-button
v-if="mostrar()"
@click="actualizarDialog()"
class="my-5 is-success">
Actualizar Datos
</b-button>
<b-button v-else disabled class="is-success my-5">Actualizar Datos</b-button>
<b-loading
:is-full-page="true"
v-model="isLoading"
:can-cancel="false"
></b-loading>
</div>
</template>
<script>
import axios from "axios";
import moment from "moment";
import validator from "validator";
export default {
data() {
return {
idCasoEspecial: localStorage.getItem("idCasoEspecial"),
isLoading: false,
minDate1: new Date("2020-01-01"),
viejo: {},
nuevo: {
idCasoEspecial: null,
correo: "",
telefono: "",
fechaInicio: null,
fechaFin: null,
fechaNacimiento: null,
institucion: "",
dependencia: "",
motivo: "",
direccion: "",
},
token: {
headers: {
token: window.localStorage.getItem("token"),
},
},
};
},
methods: {
mostrar(){
if (
validator.isEmail(this.nuevo.correo) ||
this.nuevo.direccion ||
this.nuevo.telefono ||
this.nuevo.fechaNacimiento ||
this.nuevo.motivo ||
this.nuevo.institucion ||
this.nuevo.dependencia ||
(this.nuevo.fechaInicio && this.nuevo.fechaFin)
) {
if (this.nuevo.correo) {
if (validator.isEmail(this.nuevo.correo)) {
return true;
} else {
return false;
}
}
return true;
}
},
actualizarDialog() {
this.$buefy.dialog.confirm({
title: "Actualizar datos",
message: "¿Seguro(a) que quiere actualizar estos datos?",
confirmText: "Confirmar",
cancelText: "Cancelar",
type: "is-success",
hasIcon: true,
onConfirm: () => this.actualizar(),
});
},
actualizar() {
this.isLoading = true;
const data = { idCasoEspecial: this.idCasoEspecial };
if (this.nuevo.direccion) data.direccion = this.nuevo.direccion;
if (this.nuevo.correo) data.correo = this.nuevo.correo;
if (this.nuevo.telefono) data.telefono = this.nuevo.telefono;
if (this.nuevo.motivo) data.motivo = this.nuevo.motivo;
if (this.nuevo.dependencia) data.dependencia = this.nuevo.dependencia;
if (this.nuevo.institucion) data.institucion = this.nuevo.institucion;
if (this.nuevo.fechaInicio) data.fechaInicio = moment(this.nuevo.fechaInicio);
if (this.nuevo.fechaFin) data.fechaFin = moment(this.nuevo.fechaFin);
if (this.nuevo.fechaNacimiento) data.fechaNacimiento = moment(this.nuevo.fechaNacimiento);
axios
.put(`${process.env.api}/caso_especial/update`, data, this.token)
.then((res) => {
this.$buefy.dialog.alert("Los datos han sido actualizados");
this.$router.push("/admin/especial/casoEspecial");
})
.catch((err) => {
this.error(err.response.data.message);
})
.finally(() => {
this.isLoading = false;
});
},
obtenerDatos() {
this.isLoading = true;
return axios
.get(
`${process.env.api}/caso_especial/?idCasoEspecial=${this.idCasoEspecial}`,
this.token
)
.then((res) => {
console.log(res.data);
this.viejo = res.data;
})
.catch((err) => {
this.error(err.response.data.message);
})
.finally(() => {
this.isLoading = false;
});
},
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",
iconPack: "mdi",
ariaRole: "alertdialog",
ariaModal: true,
});
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
}
},
fecha(date) {
if (date) {
const fecha = moment(date.substr(0, 10));
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`;
}
},
},
computed: {
minDate2() {
const min = new Date(this.nuevo.fechaInicio);
return new Date(min.getFullYear(), min.getMonth() + 6, min.getDate());
},
},
created() {
this.obtenerDatos();
},
};
</script>
<style scoped>
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.5s;
}
.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
opacity: 0;
}
</style>
@@ -1,307 +0,0 @@
<template>
<div
v-if="this.idTipoUsuario == 1 && this.tipoUsuario == 'admin'"
class="container"
>
<div class="columns">
<div class="column is-3 mb-0">
<b-field>
<b-input
placeholder="No.Cuenta"
icon="school"
rounded
v-model="numeroCuenta"
maxlength="9"
></b-input>
</b-field>
</div>
<div class="column is-3 mb-4 pb-4">
<b-field>
<b-input
type="name"
placeholder="Nombre"
icon="account"
rounded
v-model="nombre"
></b-input>
</b-field>
</div>
<div class="column is-3 mb-4 pb-4 ">
<b-field>
<b-select
placeholder="Status"
icon="information"
expanded
rounded
v-model="idStatus"
>
<optgroup>
<option value=""> Status </option>
<option value="11">Artículo 52</option>
<option value="12">Artículo 91</option>
<option value="13">Liberación Articulo 52</option>
<option value="14">Liberación Articulo 91</option>
</optgroup>
</b-select>
</b-field>
</div>
<div class="buttons section pt-3 pl-5">
<b-button type="is-info" @click="obtenerDatos(idStatus)">
Buscar
</b-button>
</div>
</div>
<div class="columns">
<section class="column is-12">
<b-table
:data="data"
:loading="isLoading"
paginated
backend-pagination
:total="total"
:per-page="perPage"
@page-change="onPageChange"
hoverable
striped
>
<b-table-column field="nombre" label="Nombre" v-slot="props" centered>
<span @click="servicios(props.row.idCasoEspecial)">{{
props.row.nombre
}}</span>
</b-table-column>
<b-table-column
field="numeroCuenta"
label="Número de Cuenta"
v-slot="props"
centered
width="100"
>
<span @click="servicios(props.row.idCasoEspecial)">{{
props.row.numeroCuenta
}}</span>
</b-table-column>
<b-table-column
field="carrera"
label="Carrera"
v-slot="props"
centered
>
<span @click="servicios(props.row.idCasoEspecial)">{{
props.row.carrera
}}</span>
</b-table-column>
<b-table-column field="status" label="Status" v-slot="props" centered>
<span
@click="servicios(props.row.idCasoEspecial)"
class="tag"
:class="types(props.row.idStatus)"
>{{ props.row.status }}</span
>
</b-table-column>
<b-table-column
field="diaCreado"
label="Día de creación"
v-slot="props"
centered
>
<span @click="servicios(props.row.idCasoEspecial)">{{
fecha(props.row.diaCreado)
}}</span>
</b-table-column>
</b-table>
</section>
</div>
</div>
</template>
<script>
import axios from "axios";
import moment from "moment";
export default {
data() {
return {
idUsuario: "",
idTipoUsuario: "",
tipoUsuario: "",
data: [],
total: "",
isLoading: false,
page: 1,
perPage: 25,
numeroCuenta: "",
nombre: "",
idStatus: "",
token: {
headers: {
token: window.localStorage.getItem("token"),
},
},
};
},
methods: {
onPageChange(page) {
this.page = page;
this.obtenerDatos();
},
types(idStatus) {
if (idStatus === 1) {
return "is-dark";
} else if (idStatus === 2) {
return "is-info";
} else if (idStatus === 3) {
return "is-link";
} else if (idStatus === 4) {
return "is-warning";
} else if (idStatus === 5) {
return "is-success";
} else if (idStatus === 6) {
return "is-link";
} else if (
idStatus === 7 ||
idStatus === 8 ||
idStatus === 9 ||
idStatus === 10
) {
return "is-danger";
} else if (idStatus === 11) {
return "is-link is-light";
} else if (idStatus === 12) {
return "is-danger is-light";
} else if (idStatus === 13 || idStatus === 14) {
return "is-success is-light";
}
},
fecha(date) {
const fecha = moment(date.substr(0, 10));
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`;
},
obtenerDatos(idStatus) {
this.isLoading = true;
this.data = [];
axios
.get(
`${process.env.api}/caso_especial/servicios_especiales?pagina=${this.page}&idStatus=${this.idStatus}&nombre=${this.nombre}&numeroCuenta=${this.numeroCuenta}`,
this.token
)
.then((res) => {
const servicios = res.data.servicios;
if (servicios.length !== 0) {
for (let i = 0; i < servicios.length; i++) {
this.data.push({
nombre: servicios[i].Usuario.nombre,
numeroCuenta: servicios[i].Usuario.usuario,
carrera: servicios[i].Carrera.carrera,
status: servicios[i].Status.status,
diaCreado: servicios[i].createdAt,
idStatus: servicios[i].Status.idStatus,
idCasoEspecial: servicios[i].idCasoEspecial,
});
}
}
let currentTotal = servicios.length;
let contador;
for (let i = 0; i < res.data.registros / 25 + 1; i++) {
contador = i;
}
currentTotal = this.perPage * contador;
this.total = currentTotal;
})
.catch((error) => {
this.error(error.response.data.message);
})
.finally(() => {
this.isLoading = false;
});
},
servicios(idCasoEspecial) {
window.localStorage.setItem("idCasoEspecial", idCasoEspecial);
this.$router.push("/admin/especial/casoEspecial");
},
getIdLocal() {
this.idUsuario = 1; //localStorage.getItem("idUsuario");
this.idTipoUsuario = 1; //localStorage.getItem("idTipoUsuario");
this.tipoUsuario = "admin"; //localStorage.getItem("tipoUsuario");
if (this.idTipoUsuario != 1 && this.tipoUsuario != "admin") {
localStorage.clear();
this.$router.push("/");
}
},
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",
iconPack: "mdi",
ariaRole: "alertdialog",
ariaModal: true,
});
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
}
},
},
created() {
this.getIdLocal();
this.obtenerDatos(0);
},
};
</script>
<style>
.input:focus {
border: #1b3d70;
box-shadow: 0 0 8px 0 #1b3d70;
}
.select select:focus {
border-color: #1b3d70;
box-shadow: 0 0 8px 0 #1b3d70;
}
.select:not(.is-multiple):not(.is-loading)::after {
border-color: #1b3d70;
}
.pagination-link.is-current {
background-color: #1b3d70;
border-color: #1b3d70;
}
.b-table {
cursor: pointer;
}
</style>
-335
View File
@@ -1,335 +0,0 @@
<template>
<div
v-if="this.idTipoUsuario == 1 && this.tipoUsuario == 'admin'"
class="container"
>
<div class="columns">
<div class="column is-3 mb-0">
<b-field>
<b-input
placeholder="No.Cuenta"
icon="school"
rounded
v-model="numeroCuenta"
maxlength="9"
></b-input>
</b-field>
</div>
<div class="column is-3 mb-4 pb-4">
<b-field>
<b-input
type="name"
placeholder="Nombre"
icon="account"
rounded
v-model="nombre"
></b-input>
</b-field>
</div>
<div class="column is-3 mb-4 pb-4 ">
<b-field>
<b-select
placeholder="Status"
icon="information"
expanded
rounded
v-model="idStatus"
>
<optgroup>
<option value=""> Status </option>
<option value="1">Pre-registro</option>
<option value="2">Pre-registro Validado</option>
<option value="3">Registro</option>
<option value="4">Pre-Término</option>
<option value="5">Término</option>
<option value="6">Liberación</option>
<option value="7">Carta Aceptacion Rechazada</option>
<option value="8">Carta Termino Rechazada</option>
<option value="9">Informe Global Rechazado</option>
<option value="10">Cancelado</option>
</optgroup>
</b-select>
</b-field>
</div>
<div class="buttons section pt-3 pl-5">
<b-button type="is-info" @click="obtenerDatos(idStatus)">
Buscar
</b-button>
</div>
</div>
<div class="columns">
<section class="column is-12">
<b-table
:data="data"
:loading="isLoading"
paginated
backend-pagination
:total="total"
:per-page="perPage"
@page-change="onPageChange"
hoverable
striped
>
<b-table-column field="nombre" label="Nombre" v-slot="props" centered>
<span @click="servicios(props.row.idServicio)">{{
props.row.nombre
}}</span>
</b-table-column>
<b-table-column
field="numeroCuenta"
label="Número de Cuenta"
v-slot="props"
centered
width="100"
>
<span @click="servicios(props.row.idServicio)">{{
props.row.numeroCuenta
}}</span>
</b-table-column>
<b-table-column
field="carrera"
label="Carrera"
v-slot="props"
centered
>
<span @click="servicios(props.row.idServicio)">{{
props.row.carrera
}}</span>
</b-table-column>
<b-table-column
field="fechaInicio"
truncate="10"
label="Fecha Inicio"
v-slot="props"
centered
>
<span @click="servicios(props.row.idServicio)">{{
fecha(props.row.fechaInicio)
}}</span>
</b-table-column>
<b-table-column
field="fechaFin"
label="Fecha Fin"
v-slot="props"
centered
>
<span @click="servicios(props.row.idServicio)">{{
fecha(props.row.fechaFin)
}}</span>
</b-table-column>
<b-table-column field="status" label="Status" v-slot="props" centered>
<span
@click="servicios(props.row.idServicio)"
class="tag"
:class="types(props.row.idStatus)"
>{{ props.row.status }}</span
>
</b-table-column>
<b-table-column
field="diaCreado"
label="Día de creación"
v-slot="props"
centered
>
<span @click="servicios(props.row.idServicio)">{{
fecha(props.row.diaCreado)
}}</span>
</b-table-column>
</b-table>
</section>
</div>
</div>
</template>
<script>
import axios from "axios";
import moment from "moment";
export default {
data() {
return {
idUsuario: "",
idTipoUsuario: "",
tipoUsuario: "",
data: [],
total: "",
isLoading: false,
page: 1,
perPage: 25,
numeroCuenta: "",
nombre: "",
idStatus: "",
token: {
headers: {
token: window.localStorage.getItem("token"),
},
},
};
},
methods: {
onPageChange(page) {
this.page = page;
this.obtenerDatos();
},
types(idStatus) {
if (idStatus === 1) {
return "is-dark";
} else if (idStatus === 2) {
return "is-info";
} else if (idStatus === 3) {
return "is-warning";
} else if (idStatus === 4) {
return "is-link";
} else if (idStatus === 5) {
return "is-success";
} else if (idStatus === 6) {
return "is-success is-light";
} else if (idStatus === 7) {
return "is-danger";
} else if (idStatus === 8) {
return "is-danger";
} else if (idStatus === 9) {
return "is-danger";
} else if (idStatus === 10) {
// admin
return "is-danger";
}
},
fecha(date) {
const fecha = moment(date.substr(0, 10));
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`;
},
obtenerDatos(idStatus) {
this.isLoading = true;
this.data = [];
axios
.get(
`${process.env.api}/servicio/servicios_admin?pagina=${this.page}&idStatus=${this.idStatus}&nombre=${this.nombre}&numeroCuenta=${this.numeroCuenta}`,
this.token
)
.then((res) => {
const servicios = res.data.servicios;
if (servicios.length !== 0) {
for (let i = 0; i < servicios.length; i++) {
this.data.push({
nombre: servicios[i].Usuario.nombre,
numeroCuenta: servicios[i].Usuario.usuario,
carrera: servicios[i].Carrera.carrera,
fechaInicio: servicios[i].fechaInicio,
fechaFin: servicios[i].fechaFin,
status: servicios[i].Status.status,
diaCreado: servicios[i].createdAt,
idStatus: servicios[i].Status.idStatus,
idServicio: servicios[i].idServicio,
});
}
}
let currentTotal = servicios.length;
let contador;
for (let i = 0; i < res.data.registros / 25 + 1; i++) {
contador = i;
}
currentTotal = this.perPage * contador;
this.total = currentTotal;
})
.catch((error) => {
this.error(error.response.data.message);
})
.finally(() => {
this.isLoading = false;
});
},
servicios(idServicio) {
window.localStorage.setItem("idServicio", idServicio);
this.$router.push("/admin/servicio");
},
getIdLocal() {
this.idUsuario = localStorage.getItem("idUsuario");
this.idTipoUsuario = localStorage.getItem("idTipoUsuario");
this.tipoUsuario = localStorage.getItem("tipoUsuario");
if (this.idTipoUsuario != 1 && this.tipoUsuario != "admin") {
localStorage.clear();
this.$router.push("/");
}
},
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",
iconPack: "mdi",
ariaRole: "alertdialog",
ariaModal: true,
});
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
}
},
},
created() {
this.getIdLocal();
this.obtenerDatos(0);
},
};
</script>
<style>
.input:focus {
border: #1b3d70;
box-shadow: 0 0 8px 0 #1b3d70;
}
.select select:focus {
border-color: #1b3d70;
box-shadow: 0 0 8px 0 #1b3d70;
}
.select:not(.is-multiple):not(.is-loading)::after {
border-color: #1b3d70;
}
.pagination-link.is-current {
background-color: #1b3d70;
border-color: #1b3d70;
}
.b-table {
cursor: pointer;
}
</style>
-143
View File
@@ -1,143 +0,0 @@
<template>
<div>
<p class="is-size-2 mb-5">Carga Masiva</p>
<b-field v-if="true">
<b-upload
v-model="csv"
type="is-black"
v-on:input="validarExt()"
drag-drop
expanded
>
<section class="section">
<div class="content has-text-centered">
<p>
<b-icon icon="upload" size="is-large"></b-icon>
</p>
<p>
{{
csv.name || "Arrastra aquí tu archivo o da click para buscar"
}}
</p>
</div>
</section>
</b-upload>
</b-field>
<b-button v-if="csv.name" @click="dialog()" class="is-info"
>Enviar archivo</b-button
>
<b-button v-else disabled class="is-info">Enviar archivo</b-button>
<b-loading
:is-full-page="true"
v-model="isLoading"
:can-cancel="false"
></b-loading>
</div>
</template>
<script>
import axios from "axios";
export default {
data() {
return {
csv: {},
token: {
headers: {
token: window.localStorage.getItem("token"),
},
},
isLoading: false,
toastType: null,
toastMessage: null,
};
},
methods: {
validarExt() {
const extPermitidas = /(.csv)$/i;
if (!extPermitidas.exec(this.csv.name)) {
this.toastType = "is-danger";
this.toastMessage = "Asegurate de ingresar un archivo .CSV";
this.toast();
this.csv = {};
}
},
toast() {
this.$buefy.toast.open({
message: this.toastMessage,
type: this.toastType,
});
},
dialog() {
this.$buefy.dialog.confirm({
title: "Carga masiva",
message: "¿Seguro(a) que quiere enviar este archivo?",
confirmText: "Confirmar",
cancelText: "Cancelar",
type: "is-success",
hasIcon: true,
onConfirm: () => this.enviarCargaMasiva(),
});
},
enviarCargaMasiva() {
const formData = new FormData();
this.isLoading = true;
formData.append("csv", this.csv);
axios
.post(`${process.env.api}/programa/carga_masiva`, formData, {
headers: {
"Content-Type": "multipart/form-data",
token: this.token.headers.token,
},
})
.then((res) => {
this.isLoading = false;
this.toastType = "is-success";
this.toastMessage = "Se ha enviado la carga masiva con éxito";
this.toast();
this.$router.push("/admin");
})
.catch((err) => {
this.isLoading = false;
this.error(err.response.data.message);
});
},
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",
iconPack: "mdi",
ariaRole: "alertdialog",
ariaModal: true,
});
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
}
},
},
};
</script>
@@ -1,201 +0,0 @@
<template>
<div class="container mt-5">
<p class="is-size-2 mb-5">Lista de responsables</p>
<div class="columns">
<div class="column is-3 mb-4 pb-4">
<b-field>
<b-input
type="name"
placeholder="Nombre"
icon="account"
rounded
v-model="nombre"
></b-input>
</b-field>
</div>
<div class="column is-3 mb-0">
<b-field>
<b-input
placeholder="Correo electrónico"
icon="school"
rounded
v-model="correo"
>
</b-input>
</b-field>
</div>
<div class="buttons section pt-3 pl-5">
<b-button type="is-info" @click="obtenerDatos(idStatus)">
Buscar
</b-button>
</div>
</div>
<div class="columns mb-5">
<section class="column is-12">
<b-table
:data="data"
:loading="loading"
hoverable
striped
paginated
backend-pagination
:total="total"
:per-page="perPage"
@page-change="onPageChange"
>
<b-table-column field="nombre" label="Nombre" v-slot="props" centered>
<span @click="verRegistro(props.row)">{{ props.row.nombre }}</span>
</b-table-column>
<b-table-column
field="correo"
label="Correo electrónico"
v-slot="props"
centered
>
<span @click="verRegistro(props.row)">{{ props.row.usuario }}</span>
</b-table-column>
</b-table>
</section>
</div>
</div>
</template>
<script>
import axios from "axios";
export default {
data() {
return {
idUsuario: "",
data: [],
total: "",
loading: false,
page: 1,
perPage: 25,
correo: "",
nombre: "",
idStatus: 1,
token: {
headers: {
token: window.localStorage.getItem("token"),
},
},
};
},
methods: {
onPageChange(page) {
this.page = page;
this.obtenerDatos();
},
obtenerDatos(idStatus) {
this.loading = true;
this.data = [];
axios
.get(
`${process.env.api}/usuario/responsable?pagina=${this.page}&nombre=${this.nombre}&correo=${this.correo}`,
this.token
)
.then((res) => {
const servicios = res.data.servicios;
if (servicios.length !== 0) {
for (let i = 0; i < servicios.length; i++) {
this.data.push({
nombre: servicios[i].nombre,
usuario: servicios[i].usuario,
idUsuario: servicios[i].idUsuario,
});
}
}
let currentTotal = servicios.length;
let contador;
for (let i = 0; i < res.data.registros / this.perPage + 1; i++) {
contador = i;
}
currentTotal = this.perPage * contador;
this.total = currentTotal;
this.loading = false;
})
.catch((err) => {
this.loading = false;
this.error(err.response.data.message);
});
},
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",
iconPack: "mdi",
ariaRole: "alertdialog",
ariaModal: true,
});
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
}
},
insertIdLocal() {
this.idUsuario = localStorage.getItem("idUsuario");
},
verRegistro(responsable) {
localStorage.setItem("correo", responsable.usuario);
localStorage.setItem("idResponsable", responsable.idUsuario);
localStorage.setItem("nombre", responsable.nombre);
this.$router.push("/admin/programa/infoResponsable");
},
},
computed: {
busquedaNombreResponsable() {
return this.responsables.filter((responsables) =>
responsables.nombreResp.includes(this.buscarNombreResponsable)
);
},
},
async created() {
await this.obtenerDatos();
this.insertIdLocal();
},
};
</script>
<style scoped>
.b-table {
cursor: pointer;
}
.input:focus {
border: #1b3d70;
box-shadow: 0 0 8px 0 #1b3d70;
}
.select select:focus {
border-color: #1b3d70;
box-shadow: 0 0 8px 0 #1b3d70;
}
.select:not(.is-multiple):not(.is-loading)::after {
border-color: #1b3d70;
}
.pagination-link.is-current {
background-color: #1b3d70;
border-color: #1b3d70;
}
</style>
@@ -1,51 +0,0 @@
<template>
<div id="datosPersonales">
<p class="is-size-3"><b>Datos personales</b></p>
<p class="is-size-5 mt-3" v-if="alumno.Usuario.nombre">
<b>Nombre: </b>{{ alumno.Usuario.nombre }}
</p>
<p class="is-size-5 mt-3" v-if="alumno.Usuario.usuario">
<b>Número de cuenta: </b>{{ alumno.Usuario.usuario }}
</p>
<p class="is-size-5 mt-3" v-if="alumno.Carrera.carrera">
<b>Carrera: </b>{{ alumno.Carrera.carrera }}
</p>
<p class="is-size-5 mt-3" v-if="alumno.correo">
<b>Correo: </b>{{ alumno.correo }}
</p>
<p class="is-size-5 mt-3" v-if="alumno.creditos">
<b>Créditos: </b>{{ alumno.creditos + "%" }}
</p>
<p class="is-size-5 mt-3" v-if="alumno.fechaInicio">
<b>Fecha de inicio: </b>{{ fecha(alumno.fechaInicio) }}
</p>
<p class="is-size-5 mt-3" v-if="alumno.fechaFin">
<b>Fecha de fin: </b>{{ fecha(alumno.fechaFin) }}
</p>
<p class="is-size-5 mt-3" v-if="alumno.telefono">
<b>Teléfono: </b>{{ alumno.telefono }}
</p>
<p class="is-size-5 mt-3" v-if="alumno.direccion">
<b>Dirección: </b>{{ alumno.direccion }}
</p>
<p class="is-size-5 mt-3" v-if="alumno.fechaNacimiento">
<b>Fecha de nacimiento: </b>{{ fecha(alumno.fechaNacimiento) }}
</p>
</div>
</template>
<script>
import moment from "moment";
export default {
props: {
alumno: Object,
},
methods: {
fecha(date) {
const fecha = moment(date.substr(0, 10));
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`;
},
},
};
</script>
@@ -1,28 +0,0 @@
<template>
<div id="programa">
<br />
<p class="is-size-3"><b>Datos del programa</b></p>
<br />
<p class="is-size-5 mb-3" v-if="programa.programa">
<b>Programa: </b><span> {{ programa.programa }} </span>
</p>
<p class="is-size-5 mb-3" v-if="programa.clavePrograma">
<b>Clave del programa: </b><span> {{ programa.clavePrograma }} </span>
</p>
<p class="is-size-5 mb-3" v-if="programa.dependencia">
<b>Dependecia: </b><span> {{ programa.dependencia }} </span>
</p>
<p class="is-size-5 mb-3" v-if="programa.institucion">
<b>Institución: </b><span> {{ programa.institucion }} </span>
</p>
<br />
</div>
</template>
<script>
export default {
props: {
programa: Object,
},
};
</script>
-209
View File
@@ -1,209 +0,0 @@
<template>
<div>
<span class="spanDoc"
><strong>{{ title }}</strong></span
>
<a :href="link" target="_blank">
<b-button class="is-info">
Ver
</b-button>
</a>
<b-button
class="is-danger"
v-if="esRechazable()"
@click="mensajeBool = !mensajeBool"
>
Rechazar
</b-button>
<b-field label="Razón del rechazo: " v-if="mensajeBool">
<b-input maxlength="500" type="textarea" v-model="mensajeRech"></b-input>
</b-field>
<b-button
v-if="mensajeRech && mensajeBool"
class="is-danger"
@click="rechazarDialog()"
>
Rechazar documento
</b-button>
<b-button v-else-if="mensajeBool" disabled>
Rechazar documento
</b-button>
<b-loading
:is-full-page="true"
v-model="isLoading"
:can-cancel="false"
></b-loading>
</div>
</template>
<script>
import axios from "axios";
export default {
props: {
title: String,
link: String,
idDoc: Number,
doc: String,
status: Number,
},
data() {
return {
mensajeRech: "",
mensajeBool: false,
idServicio: localStorage.getItem("idServicio"),
isLoading: false,
token: {
headers: {
token: window.localStorage.getItem("token"),
},
},
};
},
methods: {
esRechazable() {
switch (this.idDoc) {
case 1:
if (this.status == 1) return true;
else return false;
case 2:
if (this.status == 5) return true;
else return false;
case 3:
if (this.status == 5) return true;
else return false;
}
},
rechazarDialog() {
this.$buefy.dialog.confirm({
title: "Confimar servicio",
message: "¿Seguro(a) que quiere rechazar este documento?",
confirmText: "Confirmar",
cancelText: "Cancelar",
type: "is-danger",
hasIcon: true,
onConfirm: () => {
switch (this.idDoc) {
case 1:
this.rechazarCartaAceptacion();
break;
case 2:
this.rechazarCartaTermino();
break;
case 3:
this.rechazarInformeGlobal();
}
},
});
},
rechazarCartaAceptacion() {
this.isLoading = true;
const data = {
mensaje: this.mensajeRech,
idServicio: this.idServicio,
};
axios
.put(
`${process.env.api}/servicio/rechazar_aceptacion`,
data,
this.token
)
.then((res) => {
this.isLoading = false;
this.$buefy.dialog.alert("Se ha rechazado el documento");
this.$router.push("/admin");
})
.catch((err) => {
this.isLoading = false;
this.error(err.response.data.message);
this.errorDoc();
});
},
rechazarCartaTermino() {
this.isLoading = true;
const data = {
mensaje: this.mensajeRech,
idServicio: this.idServicio,
};
axios
.put(`${process.env.api}/servicio/rechazar_termino`, data, this.token)
.then((res) => {
this.isLoading = false;
this.$buefy.dialog.alert("Se ha rechazado el documento");
this.$router.push("/admin");
})
.catch((err) => {
this.isLoading = false;
this.error(err.response.data.message);
this.errorDoc();
});
},
rechazarInformeGlobal() {
this.isLoading = true;
const data = {
mensaje: this.mensajeRech,
idServicio: this.idServicio,
};
axios
.put(`${process.env.api}/servicio/rechazar_informe`, data, this.token)
.then((res) => {
this.isLoading = false;
this.$buefy.dialog.alert("Se ha rechazado el documento");
this.$router.push("/admin");
})
.catch((err) => {
this.isLoading = false;
this.error(err.response.data.message);
this.errorDoc();
});
},
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",
iconPack: "mdi",
ariaRole: "alertdialog",
ariaModal: true,
});
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
}
},
errorDoc() {
this.$buefy.dialog.alert({
title: "Error",
message: "Ha ocurrido un error al rechazar el documento",
type: "is-danger",
hasIcon: true,
icon: "times-circle",
iconPack: "fa",
ariaRole: "alertdialog",
ariaModal: true,
});
},
},
};
</script>
@@ -1,30 +0,0 @@
<template>
<div id="Status">
<p class="is-size-1" v-if="status == 1">
Pre Registro
</p>
<p class="is-size-1" v-else-if="status == 2">
Pre Registro Válidado
</p>
<p class="is-size-1" v-else-if="status == 3">
Registro
</p>
<p class="is-size-1" v-else-if="status == 4">
Pre Término
</p>
<p class="is-size-1" v-else-if="status == 5">
Término
</p>
<p class="is-size-1" v-else-if="status == 6">
Liberación
</p>
</div>
</template>
<script>
export default {
props: {
status: Number,
},
};
</script>
@@ -1,27 +0,0 @@
<template>
<div>
<h3 class="is-size-3 mb-5" v-if="status == 1">
<strong>
Confirmar el pre-registro del alumno
</strong>
</h3>
<h3 class="is-size-3 mb-5" v-if="status == 4">
<strong>
Término
</strong>
</h3>
<h3 class="is-size-3 mb-5" v-if="status == 5">
<strong>
Validar el término del alumno
</strong>
</h3>
</div>
</template>
<script>
export default {
props: {
status: Number,
},
};
</script>
-364
View File
@@ -1,364 +0,0 @@
<template>
<div class="container">
<div class="mb-5">
<BotonRegresar
:path="'/admin'"
:deleteFromLocalStorage="['idServicio', 'idStatus']"
/>
</div>
<TituloServicio :status="alumno.Status.idStatus" />
<DatosPrograma :programa="alumno.Programa" />
<DatosPersonales :alumno="alumno" />
<div id="enlaces">
<b-button class="boton is-info" @click="editar()" v-if="mostrarEditar()">
Editar información
</b-button>
<br /><br />
<TituloStatus :status="alumno.Status.idStatus" />
<div v-if="alumno.cartaAceptacion">
<Documento
:title="'Ver carta de aceptación'"
:link="linkCartaAceptacion"
:doc="alumno.cartaAceptacion"
:idDoc="1"
:status="alumno.Status.idStatus"
/>
</div>
<div v-if="alumno.cartaTermino" style="margin-top: 10px">
<Documento
:title="'Ver carta de término'"
:link="linkCartaTermino"
:doc="alumno.cartaTermino"
:idDoc="2"
:status="alumno.Status.idStatus"
/>
</div>
<div v-if="alumno.informeGlobal" style="margin-top: 10px">
<Documento
:title="'Ver informe global de actividades'"
:link="linkInformeGlobal"
:doc="alumno.InformeGlobal"
:idDoc="3"
:status="alumno.Status.idStatus"
/>
</div>
<b-checkbox
v-if="alumno.Programa.acatlan && alumno.Status.idStatus == 5"
v-model="alumno.vistoBuenoAcatlan"
size="is-medium"
type="is-info"
>
Visto bueno Acatlán
</b-checkbox>
<p v-if="alumno.idCuestionarioPrograma" class="my-4">
<strong>
Cuenta con cuestionario de programa resuelto.
</strong>
</p>
<p v-if="alumno.idCuestionarioAlumno" class="my-4">
<strong>
Cuenta con cuestionario de alumno resuelto.
</strong>
</p>
</div>
<div id="acciones" class="my-5">
<b-button
class="is-success"
@click="confirmarDialog(1)"
v-if="mostrarConfirmar1()"
>
Confirmar
</b-button>
<b-button
class="is-success"
@click="confirmarDialog(2)"
v-if="mostrarConfirmar2() && mostrarVistoBueno()"
>
Confirmar
</b-button>
<b-button
v-if="mostrarCancelar()"
class="is-danger"
@click="enviarCancel = !enviarCancel"
>
Cancelar
</b-button>
<br /><br />
<b-field label="Razón para cancelar: " v-if="enviarCancel">
<b-input
maxlength="500"
type="textarea"
v-model="mensajeCancel"
></b-input>
</b-field>
<b-button
v-if="mensajeCancel && enviarCancel"
class="is-danger"
@click="cancelarDialog()"
>
Cancelar servicio
</b-button>
<b-button v-else-if="enviarCancel" disabled>
Cancelar servicio
</b-button>
<div>
<BotonRegresar
:path="'/admin'"
:deleteFromLocalStorage="['idServicio', 'idStatus']"
/>
</div>
<b-loading
:is-full-page="true"
v-model="isLoading"
:can-cancel="false"
></b-loading>
</div>
</div>
</template>
<script>
import axios from "axios";
import tituloServicio from "./tituloServicio";
import tituloStatus from "./tituloStatus";
import datosPrograma from "./datosPrograma";
import datosPersonales from "./datosPersonales";
import documento from "./documento";
import botonRegresar from "../../botonRegresar";
export default {
components: {
tituloServicio,
datosPrograma,
datosPersonales,
tituloStatus,
documento,
botonRegresar,
},
data() {
return {
alumno: {
Programa: {},
Usuario: {},
Carrera: {},
Status: {},
},
idServicio: localStorage.getItem("idServicio"),
token: {
headers: {
token: localStorage.getItem("token"),
},
},
linkCartaAceptacion: "",
linkCartaTermino: "",
linkInformeGlobal: "",
enviarMensaje: false,
enviarCancel: false,
mensaje: "",
mensajeCancel: "",
isLoading: false,
};
},
methods: {
mostrarConfirmar1() {
if (this.alumno.Status.idStatus === 1) return true;
return false;
},
mostrarConfirmar2() {
if (this.alumno.Status.idStatus === 5) {
if (!this.alumno.acatlanContigo) return true;
else if (this.alumno.vistoBueno) return true;
}
return false;
},
mostrarCancelar() {
if (
this.alumno.Status.idStatus === 10 ||
this.alumno.Status.idStatus === 6
)
return false;
return true;
},
mostrarEditar() {
if (this.alumno.Status.idStatus === 10) return false;
return true;
},
mostrarVistoBueno() {
if (!this.alumno.Programa.acatlan) return true;
if (this.alumno.vistoBuenoAcatlan) return true;
return false;
},
editar() {
localStorage.setItem("idStatus", this.alumno.Status.idStatus);
this.$router.push("servicio/modificar");
},
obtenerRegistro() {
this.isLoading = true;
return axios
.get(
`${process.env.api}/servicio/admin?idServicio=${this.idServicio}`,
this.token
)
.then((res) => {
this.alumno = res.data;
this.alumno.creditos = Number(res.data.creditos);
if (this.alumno.cartaAceptacion)
this.linkCartaAceptacion = `https://drive.google.com/file/d/${this.alumno.cartaAceptacion}/view?usp=sharing`;
if (this.alumno.cartaTermino)
this.linkCartaTermino = `https://drive.google.com/file/d/${this.alumno.cartaTermino}/view?usp=sharing`;
if (this.alumno.informeGlobal)
this.linkInformeGlobal = `https://drive.google.com/file/d/${this.alumno.informeGlobal}/view?usp=sharing`;
})
.catch((err) => {
this.error(err.response.data.message);
})
.finally(() => {
this.isLoading = false;
});
},
cancelarDialog() {
this.$buefy.dialog.confirm({
title: "Cancelar sevicio",
message: "¿Seguro(a) que quiere cancelar este servicio?",
confirmText: "Cancelar servicio",
cancelText: "No",
type: "is-danger",
hasIcon: true,
onConfirm: () => this.cancelar(),
});
},
confirmarDialog(a) {
this.$buefy.dialog.confirm({
title: "Confimar servicio",
message: "¿Seguro(a) que quiere confirmar este servicio?",
confirmText: "Confirmar",
cancelText: "Cancelar",
type: "is-success",
hasIcon: true,
onConfirm: () => {
switch (a) {
case 1:
this.confirmarRegistro();
break;
case 2:
this.confirmarLiberacion();
break;
}
},
});
},
cancelar() {
this.isLoading = true;
const data = { idServicio: this.idServicio, mensaje: this.mensajeCancel };
axios
.put(`${process.env.api}/servicio/cancelar`, data, this.token)
.then((res) => {
this.$buefy.dialog.alert("El servicio ha sido cancelado con éxito");
localStorage.removeItem("idServicio");
this.$router.push("/admin");
})
.catch((err) => {
this.error(err.response.data.message);
})
.finally(() => {
this.isLoading = false;
});
},
confirmarRegistro() {
this.isLoading = true;
const data = { idServicio: this.idServicio };
axios
.put(`${process.env.api}/servicio/registro`, data, this.token)
.then((res) => {
this.$buefy.dialog.alert("El servicio ha sido aprobado");
localStorage.removeItem("idServicio");
this.$router.push("/admin");
})
.catch((err) => {
this.error(err.response.data.message);
})
.finally(() => {
this.isLoading = false;
});
},
confirmarLiberacion() {
this.isLoading = true;
const data = { idServicio: this.idServicio };
if (this.alumno.vistoBuenoAcatlan)
data.vistoBuenoAcatlan = this.alumno.vistoBuenoAcatlan;
axios
.put(`${process.env.api}/servicio/liberacion`, data, this.token)
.then((res) => {
this.$buefy.dialog.alert("El servicio ha sido liberado");
localStorage.removeItem("idServicio");
this.$router.push("/admin");
})
.catch((err) => {
this.error(err.response.data.message);
})
.finally(() => {
this.isLoading = false;
});
},
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",
iconPack: "mdi",
ariaRole: "alertdialog",
ariaModal: true,
});
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
}
},
},
async created() {
await this.obtenerRegistro();
},
};
</script>
<style scoped>
.boton {
margin-top: 2%;
}
.is-size-5 {
margin-bottom: 10px;
}
.link-f {
font-size: 27px !important;
}
.link {
display: flex;
justify-content: flex-start;
font-size: 20px;
margin-top: 10px;
}
.spanDoc {
margin-right: 5%;
}
</style>
+103
View File
@@ -0,0 +1,103 @@
<template>
<b-steps
class="mt-6 mb-5"
type="is-info"
size="is-large"
:has-navigation="false"
v-model="idStatus"
>
<b-step-item
label="Pre Registro"
icon="account-plus"
:visible="idStatus < 6"
:clickable="false"
/>
<b-step-item
label="Pre Registro Validado"
icon="account-clock"
:visible="idStatus < 6"
:clickable="false"
/>
<b-step-item
label="Registro"
icon="account"
:visible="idStatus < 6"
:clickable="false"
/>
<b-step-item
label="Pre Termino"
icon="account-details"
:visible="idStatus < 6"
:clickable="false"
/>
<b-step-item
label="Termino"
icon="account-clock"
:visible="idStatus < 6"
:clickable="false"
/>
<b-step-item
label="Liberacion"
icon="account-check"
:visible="idStatus < 6"
:clickable="false"
/>
<b-step-item
class="bad"
type="is-danger"
label="Carta Aceptación Rechazada"
icon="file"
:clickable="false"
:visible="idStatus === 6"
/>
<b-step-item
class="bad"
type="is-danger "
label="Carta Termino Rechazada"
icon="file"
:clickable="false"
:visible="idStatus === 7"
/>
<b-step-item
class="bad"
type="is-danger"
label="Informe Global Rechazado"
icon="file"
:clickable="false"
:visible="idStatus === 8"
/>
<b-step-item
class="bad"
type="is-danger bad"
label="Cancelado"
icon="account-cancel"
:clickable="false"
:visible="idStatus === 9"
/>
</b-steps>
</template>
<script>
export default {
props: {
idStatus: { type: Number, required: true },
},
}
</script>
<style>
.b-steps .steps .step-items .step-item.is-danger::before,
.b-steps .steps .step-items .step-item.is-danger::after {
display: none !important;
content: none !important;
}
</style>
@@ -0,0 +1,101 @@
<template>
<div>
<h3 class="title">Formulario Pre-registro</h3>
<b-field label="Fecha de nacimiento">
<b-datepicker
placeholder="Fecha de nacimiento"
icon="calendar-today"
:max-date="maxDate"
v-model="nacimiento"
/>
</b-field>
<b-field label="Telefono">
<b-input
type="tel"
placeholder="Telefono"
maxlength="10"
v-model="telefono"
/>
</b-field>
<b-field label="Direccion">
<b-input
type="text"
placeholder="Direccion"
maxlength="200"
v-model="direccion"
/>
</b-field>
<b-field class="has-text-centered">
<b-button
type="is-success"
:disabled="telefono == '' || direccion == ''"
@click="
imprimirWarning(
'¿Estas seguro(a) que tus datos son correctos?',
terminarPreRegistro
)
"
>
Enviar
</b-button>
</b-field>
</div>
</template>
<script>
import moment from 'moment'
import axios from 'axios'
export default {
props: {
idServicio: { type: Number, required: true },
alumno: { type: Object, required: true },
imprimirMensaje: { type: Function, required: true },
imprimirWarning: { type: Function, required: true },
imprimirError: { type: Function, required: true },
obtenerServicio: { type: Function, required: true },
updateIsLoading: { type: Function, required: true },
},
data() {
return {
direccion: '',
telefono: '',
nacimiento: new Date(),
maxDate: new Date(),
}
},
methods: {
terminarPreRegistro() {
const data = {
idServicio: this.idServicio,
direccion: this.direccion,
telefono: this.telefono,
fechaNacimiento: moment(this.nacimiento),
}
this.updateIsLoading(true)
axios
.put(
`${process.env.api}/servicio/registro_validado`,
data,
this.alumno.token
)
.then((res) => {
this.updateIsLoading(false)
this.imprimirMensaje(res.data.message)
this.obtenerServicio()
})
.catch((err) => {
this.updateIsLoading(false)
this.imprimirError(err.response.data)
})
},
},
}
</script>
<style scoped></style>
+118
View File
@@ -0,0 +1,118 @@
<template>
<div>
<div class="mb-5">
<h4 class="is-size-4 pb-2">Datos del programa</h4>
<b-field label="Institución:">
<p class="input">{{ servicio.Programa.institucion }}</p>
</b-field>
<b-field label="Dependencia:">
<p class="input">{{ servicio.Programa.dependencia }}</p>
</b-field>
<b-field label="Programa:">
<p class="input">{{ servicio.Programa.programa }}</p>
</b-field>
<b-field label="Clave de programa:">
<p class="input">{{ servicio.Programa.clavePrograma }}</p>
</b-field>
<b-field label="Programa de Acatlan:">
<p class="input">
<span>
{{ servicio.Programa.acatlan ? 'Si' : 'No' }}
</span>
</p>
</b-field>
</div>
<div class="mb-5">
<h4 class="is-size-4 pb-2">Datos personales</h4>
<b-field label="Numero de cuenta:">
<p class="input">{{ servicio.Usuario.usuario }}</p>
</b-field>
<b-field label="Nombre:">
<p class="input">{{ servicio.Usuario.nombre }}</p>
</b-field>
<b-field label="Fecha de nacimiento:" v-if="servicio.fechaNacimiento">
<p class="input">{{ fecha(servicio.fechaNacimiento) }}</p>
</b-field>
<b-field label="Carrera:">
<p class="input">{{ servicio.Carrera.carrera }}</p>
</b-field>
<b-field label="Créditos">
<p class="input">
{{ servicio.creditos ? parseInt(servicio.creditos) : '' }}
<span v-if="servicio.creditos">%</span>
</p>
</b-field>
<b-field label="Teléfono:" v-if="servicio.telefono">
<p class="input">{{ servicio.telefono }}</p>
</b-field>
<b-field label="Dirección:" v-if="servicio.direccion">
<p class="input">{{ servicio.direccion }}</p>
</b-field>
<b-field label="Email:">
<p class="input">{{ servicio.correo }}</p>
</b-field>
<b-field label="Programa Interno:" v-if="servicio.programaInterno">
<p class="input">{{ servicio.programaInterno }}</p>
</b-field>
<b-field label="Profesor:" v-if="servicio.profesor">
<p class="input">{{ servicio.profesor }}</p>
</b-field>
<b-field label="Fecha de registro:" v-if="servicio.createdAt">
<p class="input">{{ fecha(servicio.createdAt) }}</p>
</b-field>
<b-field label="Fecha de inicio:">
<p class="input">{{ fecha(servicio.fechaInicio) }}</p>
</b-field>
<b-field label="Fecha de termino:">
<p class="input">{{ fecha(servicio.fechaFin) }}</p>
</b-field>
<b-field label="Fecha de liberación:" v-if="servicio.fechaLiberacion">
<p class="input">{{ fecha(servicio.fechaLiberacion) }}</p>
</b-field>
</div>
</div>
</template>
<script>
import moment from 'moment'
export default {
props: {
servicio: { type: Object, required: true },
},
methods: {
fecha(date) {
if (date) {
const fecha = moment(date)
return `${fecha.date() < 10 ? '0' + fecha.date() : fecha.date()}/${
fecha.month() < 9 ? '0' + (fecha.month() + 1) : fecha.month() + 1
}/${fecha.year()}`
}
return ''
},
},
}
</script>
<style scoped></style>
+75
View File
@@ -0,0 +1,75 @@
<template>
<div class="mb-6">
<h4 class="block is-size-4">Estimado alumno(a):</h4>
<p class="has-text-justified is-size-6">
<span v-if="Status.idStatus === 2">
Para poder terminar con el registro de tu trámite de servicio social te
pedimos que verifiques que tus datos sean correctos, de no ser asi
comunícate con COESI, y también contesta el formulario que se encuentra
hasta el final de esta página.
</span>
<span v-if="Status.idStatus === 3">
Te informamos que el Área de Registro y Control de Servicio Social ha
validado tu solicitud de registro de servicio social por lo que el
siguiente trámite lo realizarás hasta que concluyas 480 horas en un
periodo de mínimo 6 meses y obtengas tu carta de término por parte de la
institución, quien se encargará de subir dicho archivo a este sistema,
además de responder un cuestionario sobre tu desempeño. A su vez,
deberás responder el siguiente cuestionario de evaluación del programa
de servicio social en donde participaste y enviar el informe global de
actividades elaborado por ti, con firma y sello de visto bueno de tu
jefe inmediato. En cuanto el Área de Registro y Control de Servicio
Social valide tu solicitud, podrás revisar las indicaciones del
siguiente paso en el panel llamado Liberación Cualquier duda puedes
acudir al área de Registro y Control de Servicio Social en COESI de
lunes a viernes de 10:00 a 14:00 hrs. y de 16:00 a 20:00 hrs. o bien,
comunicarte al 5623 1686 o al correo registross@acatlan.unam.mx
</span>
<span v-if="Status.idStatus === 4">
Para continuar con el proceso de término de tu servicio social debes de
subir tu informe global y contesta el cuestionario.
</span>
<span v-if="Status.idStatus === 5">
Espera a que tus documentos sean validados por el Departamento de
Servicio Social y Bolsa de Trabajo.
</span>
<span v-if="Status.idStatus === 6">
Te confirmamos que has concluido con los trámites necesarios para la
liberación de tu servicio social por lo que ahora sólo queda esperar a
que en máximo 15 días hábiles se te notifique por correo electrónico a
partir de cuándo puedes recoger la copia de tu carta de liberación en
las ventanillas del Área de Registro y Control de Servicio Social.
Cualquier duda puedes acudir al área de Registro y Control de Servicio
Social en COESI de lunes a viernes de 10:00 a 13:00 hrs. y de 16:00 a
19:00 hrs. o bien, comunicarte al 5623 1686 o al correo
registross@apolo.acatlan.unam.mx
</span>
<span v-if="Status.idStatus === 8">
Te informamos que la carta de término que el(la) responsable de tu
servicio social mando fue rechazada. Espera a que la vuelvan a subir al
sistema para volver a verificarla.
</span>
<span v-if="Status.idStatus === 9">
Te informamos que el informe global que mandaste fue rechazado. Subelo
nuevamente y asegurate de que cumpla con todos los requicitos.
</span>
</p>
</div>
</template>
<script>
export default {
props: {
Status: { type: Object, required: true },
},
}
</script>
<style scoped></style>
+21 -19
View File
@@ -49,33 +49,35 @@ export default {
data() {
return {
answers: {
sexo: "",
edad: "",
servicioMedico: "",
servicioMedicoOtro: "",
servicioMedicoAux: "",
sexo: '',
edad: '',
servicioMedico: '',
servicioMedicoOtro: '',
servicioMedicoAux: '',
},
servicioMedicoOptions: ["IMSS", "ISSSTE", "Ninguno", "Otro"],
};
servicioMedicoOptions: ['IMSS', 'ISSSTE', 'Ninguno', 'Otro'],
}
},
watch: {
"answers.servicioMedicoAux"() {
this.answers.servicioMedicoOtro = "";
this.answers.servicioMedico = this.answers.servicioMedicoAux;
'answers.servicioMedicoAux'() {
this.answers.servicioMedicoOtro = ''
this.answers.servicioMedico = this.answers.servicioMedicoAux
},
"answers.servicioMedicoOtro"() {
this.answers.servicioMedico = this.answers.servicioMedicoOtro;
'answers.servicioMedicoOtro'() {
this.answers.servicioMedico = this.answers.servicioMedicoOtro
},
"answers.sexo"() {
this.$emit("childAToParent", this.answers);
'answers.sexo'() {
this.$emit('childAToParent', this.answers)
},
"answers.edad"() {
this.$emit("childAToParent", this.answers);
'answers.edad'() {
this.$emit('childAToParent', this.answers)
},
"answers.servicioMedico"() {
this.$emit("childAToParent", this.answers);
'answers.servicioMedico'() {
this.$emit('childAToParent', this.answers)
},
},
};
}
</script>
<style scoped></style>
+29 -27
View File
@@ -37,7 +37,7 @@
v-model="answers.p3"
:disabled="
answers.p3.length >= 3 ||
(answers.p3.length >= 2 && answers.p3Otro != '')
(answers.p3.length >= 2 && answers.p3Otro != '')
"
/>
{{ b3 }}
@@ -58,41 +58,43 @@ export default {
data() {
return {
answers: {
p1: "",
p2: "",
p1: '',
p2: '',
p3: [], // selecciona 3 opciones
p3Otro: "",
p3Otro: '',
},
b3Options: [
"Actividades descritas en el programa",
"Apoyo económico",
"Asesoría académica",
"Dependencia de la UNAM",
"Flexibilidad en horarios",
"Institución del sector público",
"Institucíon del sector social",
"Invitación de profesores",
"Modalidad de titulación por servicio social",
"Objetivos del programa",
"Oportunidad de desarrollo de tesis",
"Prestigio de la institución",
"Recomendación de compañeros",
'Actividades descritas en el programa',
'Apoyo económico',
'Asesoría académica',
'Dependencia de la UNAM',
'Flexibilidad en horarios',
'Institución del sector público',
'Institucíon del sector social',
'Invitación de profesores',
'Modalidad de titulación por servicio social',
'Objetivos del programa',
'Oportunidad de desarrollo de tesis',
'Prestigio de la institución',
'Recomendación de compañeros',
],
};
}
},
watch: {
"answers.p1"() {
this.$emit("childBToParent", this.answers);
'answers.p1'() {
this.$emit('childBToParent', this.answers)
},
"answers.p2"() {
this.$emit("childBToParent", this.answers);
'answers.p2'() {
this.$emit('childBToParent', this.answers)
},
"answers.p3"() {
this.$emit("childBToParent", this.answers);
'answers.p3'() {
this.$emit('childBToParent', this.answers)
},
"answers.p3Otro"() {
this.$emit("childBToParent", this.answers);
'answers.p3Otro'() {
this.$emit('childBToParent', this.answers)
},
},
};
}
</script>
<style scoped></style>
+34 -32
View File
@@ -202,52 +202,54 @@ export default {
data() {
return {
answers: {
p4: "",
p4: '',
p5: [],
p6: "",
p7: "",
p6: '',
p7: '',
p8: [],
p9: "",
p10: "",
p11: "",
p12: "",
p13: "",
p9: '',
p10: '',
p11: '',
p12: '',
p13: '',
},
c5Options: ["ASESORIA", "ACOMPAÑAMIENTO", "SUPERVISION", "SEGUIMIENTO"],
c8Options: ["HIGIENE", "SEGURIDAD", "PROTECCIÓN CIVIL"],
};
c5Options: ['ASESORIA', 'ACOMPAÑAMIENTO', 'SUPERVISION', 'SEGUIMIENTO'],
c8Options: ['HIGIENE', 'SEGURIDAD', 'PROTECCIÓN CIVIL'],
}
},
watch: {
"answers.p4"() {
this.$emit("childCToParent", this.answers);
'answers.p4'() {
this.$emit('childCToParent', this.answers)
},
"answers.p5"() {
this.$emit("childCToParent", this.answers);
'answers.p5'() {
this.$emit('childCToParent', this.answers)
},
"answers.p6"() {
this.$emit("childCToParent", this.answers);
'answers.p6'() {
this.$emit('childCToParent', this.answers)
},
"answers.p7"() {
this.$emit("childCToParent", this.answers);
'answers.p7'() {
this.$emit('childCToParent', this.answers)
},
"answers.p8"() {
this.$emit("childCToParent", this.answers);
'answers.p8'() {
this.$emit('childCToParent', this.answers)
},
"answers.p9"() {
this.$emit("childCToParent", this.answers);
'answers.p9'() {
this.$emit('childCToParent', this.answers)
},
"answers.p10"() {
this.$emit("childCToParent", this.answers);
'answers.p10'() {
this.$emit('childCToParent', this.answers)
},
"answers.p11"() {
this.$emit("childCToParent", this.answers);
'answers.p11'() {
this.$emit('childCToParent', this.answers)
},
"answers.p12"() {
this.$emit("childCToParent", this.answers);
'answers.p12'() {
this.$emit('childCToParent', this.answers)
},
"answers.p13"() {
this.$emit("childCToParent", this.answers);
'answers.p13'() {
this.$emit('childCToParent', this.answers)
},
},
};
}
</script>
<style scoped></style>
+47 -47
View File
@@ -1,8 +1,6 @@
<template>
<div class="D apartado">
<p class="is-size-3">
D.INFORMACIÓN SOBRE EL PROGRAMA DE SERVICIO SOCIAL
</p>
<p class="is-size-3">D.INFORMACIÓN SOBRE EL PROGRAMA DE SERVICIO SOCIAL</p>
<div class="manyInputs">
<p>14.De acuerdo con el programa registrado:</p>
<table class="table is-fullwidth">
@@ -128,68 +126,70 @@ export default {
answers: {
p14: [],
p15: [],
p16: "",
p16: '',
p17: [],
},
d14Options: [
"Se cumplieron los objetivos señalados",
"Se cumplieron las actividades decritas",
"Las actividades del programa son congruentes con el objetivo",
"Las actividades del programa retribuyen a la sociedad",
'Se cumplieron los objetivos señalados',
'Se cumplieron las actividades decritas',
'Las actividades del programa son congruentes con el objetivo',
'Las actividades del programa retribuyen a la sociedad',
],
d15Options: [
"Aplicaste conocimientos",
"Desarrollaste habilidades",
"Enriqueciste tus conocimientos",
"Fortaleciste tus habilidades",
'Aplicaste conocimientos',
'Desarrollaste habilidades',
'Enriqueciste tus conocimientos',
'Fortaleciste tus habilidades',
],
d16Options: [
"Apoyo administrativo",
"Arte, cultura y recreación",
"Ciencia, tecnología e innovación",
"Derechos humanos, seguridad social y jurídica",
"Desarrollo social",
"Educación",
"Equipamiento e infraestructura urbana y rural",
"Medio ambiente y desarrollo sustentable",
"Medio de comunicación",
"Modernización y automatización de la gestión administrativa",
"Salud",
"Seguridad alimentaria",
"Seguridad energética",
"Investigación",
'Apoyo administrativo',
'Arte, cultura y recreación',
'Ciencia, tecnología e innovación',
'Derechos humanos, seguridad social y jurídica',
'Desarrollo social',
'Educación',
'Equipamiento e infraestructura urbana y rural',
'Medio ambiente y desarrollo sustentable',
'Medio de comunicación',
'Modernización y automatización de la gestión administrativa',
'Salud',
'Seguridad alimentaria',
'Seguridad energética',
'Investigación',
],
d17Options: [
"Coordinador administrativo del programa",
"Responsable directo del programa",
"Alguien diferente a los dos anteriores",
'Coordinador administrativo del programa',
'Responsable directo del programa',
'Alguien diferente a los dos anteriores',
],
frecuencia: [
"Diario",
"Semana",
"Quincena",
"Mes",
"Bimestre",
"Trimestre",
"Semestre",
"No recibí asesoría",
'Diario',
'Semana',
'Quincena',
'Mes',
'Bimestre',
'Trimestre',
'Semestre',
'No recibí asesoría',
],
};
}
},
watch: {
"answers.p14"() {
this.$emit("childDToParent", this.answers);
'answers.p14'() {
this.$emit('childDToParent', this.answers)
},
"answers.p15"() {
this.$emit("childDToParent", this.answers);
'answers.p15'() {
this.$emit('childDToParent', this.answers)
},
"answers.p16"() {
this.$emit("childDToParent", this.answers);
'answers.p16'() {
this.$emit('childDToParent', this.answers)
},
"answers.p17"() {
this.$emit("childDToParent", this.answers);
'answers.p17'() {
this.$emit('childDToParent', this.answers)
},
},
};
}
</script>
<style scoped></style>
+20 -20
View File
@@ -3,9 +3,7 @@
<p class="is-size-3">E.APOYOS</p>
<div class="field is-flex is-flex-direction-column SINO">
<p>
18.¿El programa en el que participaste ofrece apoyos académicos?
</p>
<p>18.¿El programa en el que participaste ofrece apoyos académicos?</p>
<b-radio v-model="answers.p18" native-value="true" type="is-info">
Si
@@ -82,34 +80,36 @@ export default {
data() {
return {
answers: {
p18: "",
p19: "",
p20: "",
p18: '',
p19: '',
p20: '',
p21: [],
},
e21Options: [
"Te fueron otorgados en tiempo y forma",
"Fueron condicionados",
'Te fueron otorgados en tiempo y forma',
'Fueron condicionados',
`Hubo procedimientos transparentes
en la asignación y entrega`,
"Se te proporcionó sólo una parte",
"No se te proporcionó el apoyo",
'Se te proporcionó sólo una parte',
'No se te proporcionó el apoyo',
],
};
}
},
watch: {
"answers.p18"() {
this.$emit("childEToParent", this.answers);
'answers.p18'() {
this.$emit('childEToParent', this.answers)
},
"answers.p19"() {
this.$emit("childEToParent", this.answers);
'answers.p19'() {
this.$emit('childEToParent', this.answers)
},
"answers.p20"() {
this.$emit("childEToParent", this.answers);
'answers.p20'() {
this.$emit('childEToParent', this.answers)
},
"answers.p21"() {
this.$emit("childEToParent", this.answers);
'answers.p21'() {
this.$emit('childEToParent', this.answers)
},
},
};
}
</script>
<style scoped></style>
+49 -47
View File
@@ -179,76 +179,78 @@ export default {
p22: [],
p23: [],
p24: [],
p25: "",
p26: "",
p27: "",
p25: '',
p26: '',
p27: '',
p28: null,
p29: null,
p30: "",
p30: '',
},
f22Options: [
"Alguien diferente a los dos anteriores",
"Contribuiste en el logro de los objetivos indicados en el programa",
"Adquiriste nuevos conocimientos",
"Fortaleciste habilidades",
"Obtuviste herramientas para tu inserción en el medio laboral",
"Fortaleciste tu formación profesional",
"Enriqueciste tu formación personal",
"Tu participación en el programa de servicio tuvo impacto social",
'Alguien diferente a los dos anteriores',
'Contribuiste en el logro de los objetivos indicados en el programa',
'Adquiriste nuevos conocimientos',
'Fortaleciste habilidades',
'Obtuviste herramientas para tu inserción en el medio laboral',
'Fortaleciste tu formación profesional',
'Enriqueciste tu formación personal',
'Tu participación en el programa de servicio tuvo impacto social',
],
f23Options: [
"Un medio para retribuir a la sociedad",
"La actividad que permite fortalecer habilidades y destrezas",
"El complemento a la formación profesional",
'Un medio para retribuir a la sociedad',
'La actividad que permite fortalecer habilidades y destrezas',
'El complemento a la formación profesional',
],
f24Options: [
"Impacto social",
"Formación profesional",
"Formación personal",
'Impacto social',
'Formación profesional',
'Formación personal',
],
frecuencia: [
"Diario",
"Semana",
"Quincena",
"Mes",
"Bimestre",
"Trimestre",
"Semestre",
"No recibí asesoría",
'Diario',
'Semana',
'Quincena',
'Mes',
'Bimestre',
'Trimestre',
'Semestre',
'No recibí asesoría',
],
adjetivos: ["muy mala", "mala", "regular", "buena", "excelente"],
};
adjetivos: ['muy mala', 'mala', 'regular', 'buena', 'excelente'],
}
},
watch: {
"answers.p22"() {
this.$emit("childFToParent", this.answers);
'answers.p22'() {
this.$emit('childFToParent', this.answers)
},
"answers.p23"() {
this.$emit("childFToParent", this.answers);
'answers.p23'() {
this.$emit('childFToParent', this.answers)
},
"answers.p24"() {
this.$emit("childFToParent", this.answers);
'answers.p24'() {
this.$emit('childFToParent', this.answers)
},
"answers.p25"() {
this.$emit("childFToParent", this.answers);
'answers.p25'() {
this.$emit('childFToParent', this.answers)
},
"answers.p26"() {
this.$emit("childFToParent", this.answers);
'answers.p26'() {
this.$emit('childFToParent', this.answers)
},
"answers.p27"() {
this.$emit("childFToParent", this.answers);
'answers.p27'() {
this.$emit('childFToParent', this.answers)
},
"answers.p28"() {
this.$emit("childFToParent", this.answers);
'answers.p28'() {
this.$emit('childFToParent', this.answers)
},
"answers.p29"() {
this.$emit("childFToParent", this.answers);
'answers.p29'() {
this.$emit('childFToParent', this.answers)
},
"answers.p30"() {
this.$emit("childFToParent", this.answers);
'answers.p30'() {
this.$emit('childFToParent', this.answers)
},
},
};
}
</script>
<style scoped></style>
+27 -25
View File
@@ -69,33 +69,33 @@ export default {
data() {
return {
current2: 1,
};
}
},
props: ["answers"],
props: ['answers'],
methods: {
navB() {
if (
this.answers.sexo !== "" &&
this.answers.edad !== "" &&
this.answers.servicioMedico !== ""
this.answers.sexo !== '' &&
this.answers.edad !== '' &&
this.answers.servicioMedico !== ''
)
if (
this.answers.servicioMedico == "Otro" &&
this.answers.servicioMedico == 'Otro' &&
!this.answers.servicioMedicoOtro
)
return true;
else return false;
else return true;
return true
else return false
else return true
},
navC() {
if (
this.answers.p1 !== "" &&
this.answers.p2 !== "" &&
this.answers.p1 !== '' &&
this.answers.p2 !== '' &&
(this.answers.p3.length == 3 ||
(this.answers.p3.length == 2 && this.answers.p3Otro !== ""))
(this.answers.p3.length == 2 && this.answers.p3Otro !== ''))
)
return false;
else return true;
return false
else return true
},
navD() {
if (
@@ -115,8 +115,8 @@ export default {
this.answers.p12 &&
this.answers.p13
)
return false;
else return true;
return false
else return true
},
navE() {
if (
@@ -131,8 +131,8 @@ export default {
this.answers.p17.length == 3 &&
this.answers.p16 != null
)
return false;
else return true;
return false
else return true
},
navF() {
if (
@@ -145,8 +145,8 @@ export default {
this.answers.p21[3] != null &&
this.answers.p21[4] != null
)
return false;
else return true;
return false
else return true
},
available() {
if (
@@ -171,18 +171,20 @@ export default {
this.answers.p29 !== null &&
this.answers.p30
)
return false;
return false
// activar boton
else return true;
else return true
},
enviar() {
this.$parent.enviarCuestionario();
this.$parent.enviarCuestionario()
},
},
watch: {
current2() {
this.$emit("childNAVToParent", this.current2);
this.$emit('childNAVToParent', this.current2)
},
},
};
}
</script>
<style scoped></style>
-69
View File
@@ -1,69 +0,0 @@
<template>
<div class="info">
<div class="info-programa">
<h3 class="title is-3">Información del programa</h3>
<p><strong> Programa: </strong> {{ programa.programa }}</p>
<p><strong> Institución: </strong> {{ programa.institucion }}</p>
<p><strong> Dependencia: </strong> {{ programa.dependencia }}</p>
<p><strong> Clave del programa: </strong> {{ programa.clave }}</p>
<div v-if="programa.acatlan == true">
<p>
<strong> Programa Interno: </strong>
{{ programa.programaInterno }}
</p>
<p><strong> Profesor: </strong> {{ programa.profesor }}</p>
</div>
</div>
<div class="info-alumno mt-6">
<h3 class="title is-3">Información del alumno</h3>
<p><strong> Nombre: </strong> {{ alumno.nombre }}</p>
<p><strong> Número de cuenta: </strong> {{ alumno.cuenta }}</p>
<p><strong> Carrera: </strong> {{ alumno.carrera }}</p>
<p>
<strong> Créditos: </strong>{{ alumno.creditos
}}<span v-if="alumno.creditos">%</span>
</p>
<p><strong> Correo del alumno: </strong> {{ alumno.correo }}</p>
<p><strong> Fecha de inicio: </strong> {{ fecha(alumno.inicio) }}</p>
<p><strong> Fecha de finalización: </strong> {{ fecha(alumno.fin) }}</p>
<p><strong> Fecha de registro: </strong> {{ fecha(alumno.registro) }}</p>
<div class="mt-4 info-extra" v-if="status >= 3">
<p><strong> Direccion: </strong> {{ alumno.direccion }}</p>
<p><strong> Telefono: </strong> {{ alumno.telefono }}</p>
<p>
<strong> Fecha de nacimiento: </strong>
{{ fecha(alumno.nacimiento) }}
</p>
</div>
</div>
</div>
</template>
<style scoped>
.info-alumno p {
margin-bottom: 0.8rem;
}
.info-programa p {
margin-bottom: 0.8rem;
}
</style>
<script>
import moment from "moment";
export default {
data() {
return {};
},
props: ["status", "alumno", "programa"],
methods: {
fecha(date) {
// const fecha = moment(date);
const fecha = moment(date.substr(0, 10));
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`;
},
},
};
</script>
-59
View File
@@ -1,59 +0,0 @@
<template>
<div>
<div class="mensajeDiv" v-for="mensaje in Mensajes" :key="mensaje.status">
<div v-if="mensaje.mensaje != '' && mensaje.status == status">
<p class="mensaje has-text-justified">
<span class="block is-size-5">Estimado alumno(a): </span><br /><br />
{{ mensaje.mensaje }}
</p>
</div>
</div>
</div>
</template>
<style scoped>
.mensaje {
margin: 3.5rem 0;
}
</style>
<script>
export default {
data() {
return {
Mensajes: [
{ status: 1, mensaje: "" },
{ status: 2, mensaje: "" },
{
status: 3,
mensaje:
"Te informamos que el Área de Registro y Control de Servicio Social ha validado tu solicitud de registro de servicio social por lo que el siguiente trámite lo realizarás hasta que concluyas 480 horas en un periodo de mínimo 6 meses y obtengas tu carta de término por parte de la institución, quien se encargará de subir dicho archivo a este sistema, además de responder un cuestionario sobre tu desempeño. A su vez, deberás responder el siguiente cuestionario de evaluación del programa de servicio social en donde participaste y enviar el informe global de actividades elaborado por ti, con firma y sello de visto bueno de tu jefe inmediato. En cuanto el Área de Registro y Control de Servicio Social valide tu solicitud, podrás revisar las indicaciones del siguiente paso en el panel llamado “Liberación” Cualquier duda puedes acudir al área de Registro y Control de Servicio Social en COESI de lunes a viernes de 10:00 a 14:00 hrs. y de 16:00 a 20:00 hrs. o bien, comunicarte al 5623 1686 o al correo registross@acatlan.unam.mx",
},
{ status: 4, mensaje: "" },
{
status: 5,
mensaje:
"Espera a que tus documentos sean validados por el Departamento de Servicio Social y Bolsa de Trabajo",
},
{
status: 6,
mensaje:
"Te confirmamos que has concluido con los trámites necesarios para la liberación de tu servicio social por lo que ahora sólo queda esperar a que en máximo 15 días hábiles se te notifique por correo electrónico a partir de cuándo puedes recoger la copia de tu carta de liberación en las ventanillas del Área de Registro y Control de Servicio Social. Cualquier duda puedes acudir al área de Registro y Control de Servicio Social en COESI de lunes a viernes de 10:00 a 13:00 hrs. y de 16:00 a 19:00 hrs. o bien, comunicarte al 5623 1686 o al correo registross@apolo.acatlan.unam.mx",
},
{ status: 7, mensaje: "carta de aceptacion rechazada" },
{ status: 8, mensaje: "carta de termino rechazada" },
{
status: 9,
mensaje:
"Informe global de actividades rechazado. Por favor reenvia el informe correctamente",
},
{
status: 10,
mensaje: "servicio cancelado",
},
],
};
},
props: ["status"],
};
</script>
-154
View File
@@ -1,154 +0,0 @@
<template>
<div>
<h3 class="title is-3 my-5">Formulario Pre-registro</h3>
<form>
<b-field label="Fecha de nacimiento">
<b-datepicker
placeholder="Fecha de nacimiento"
icon="calendar-today"
v-model="nacimiento"
:min-date="minDate"
:max-date="maxDate"
>
</b-datepicker>
</b-field>
<b-field label="Telefono">
<b-input
placeholder="Telefono"
maxlength="10"
v-model="telefono"
type="tel"
pattern="^[0-9-+\s()]*$"
>
</b-input>
</b-field>
<b-field label="Direccion">
<b-input
maxlength="200 "
placeholder="Direccion"
type="textarea"
v-model="direccion"
></b-input>
</b-field>
</form>
<div class="my-4 mb-6">
<b-field>
<button
:disabled="nacimiento == '' || telefono == '' || direccion == ''"
class="button is-success is-medium"
@click="enviarRegistro()"
>
Enviar
</button>
</b-field>
</div>
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
</div>
</template>
<script>
import moment from "moment";
import axios from "axios";
export default {
data() {
return {
token: {
headers: {
token: window.localStorage.getItem("token"),
},
},
nacimiento: [],
minDate: new Date(),
maxDate: new Date(),
telefono: "",
direccion: "",
isLoading: false,
};
},
props: ["idServicio"],
methods: {
reset() {
this.nacimiento = [];
this.telefono = "";
this.direccion = "";
},
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",
iconPack: "mdi",
ariaRole: "alertdialog",
ariaModal: true,
});
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
}
},
enviarRegistro() {
this.isLoading = true;
const data = {
idServicio: this.idServicio,
direccion: this.direccion,
telefono: this.telefono,
fechaNacimiento: moment(this.nacimiento),
};
axios
.put(`${process.env.api}/servicio/registro_validado`, 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",
iconPack: "mdi",
ariaRole: "alertdialog",
ariaModal: true,
});
this.reset();
this.$parent.getData();
})
.catch((error) => {
this.error(error.response.data.message);
})
.finally(() => {
this.isLoading = false;
});
},
},
created() {
let i = new Date().getFullYear() - 80; // hoy - 80 años fecha minima
let j = new Date().getFullYear() - 10; //hoy - 10 años
this.minDate.setFullYear(i);
this.maxDate.setFullYear(j);
},
};
</script>
+95 -147
View File
@@ -1,181 +1,129 @@
<template>
<div>
<h3 class="title is-4 mt-6">
Cuestionario de evaluación del programa de servicio social
<h3 class="label">
Cuestionario de evaluación del programa de servicio social.
</h3>
<div class="my-6" v-if="idCuestionario == null">
<b-field class="mb-6" v-if="!servicio.idCuestionarioAlumno">
<b-button
type="is-info is-light"
tag="router-link"
to="/alumno/cuestionario"
type="is-info is-light "
icon-left="book-open"
class="border-info"
size="is-medium"
>
cuestionario
Cuestionario
</b-button>
</div>
<div class="is-flex" v-else>
<p class="block is-size-5">Cuestionario contestado</p>
<b-icon icon="check-bold" size="is-small" type="is-success"> </b-icon>
</b-field>
<div class="mb-6" v-else>
<p class="block is-size-6">
Cuestionario contestado
<b-icon type="is-success" icon="check-bold" />
</p>
</div>
<h3 class="title is-4 mt-6">
Informe global de actividades (en formato .PDF. No se aceptan fotos).
<h3 class="label">
Informe global de actividades
<span v-if="!servicio.informeGlobal"
>(en formato .PDF. No se aceptan fotos)</span
>.
</h3>
<div v-if="!informeGlobal">
<b-field type="black">
<b-upload
v-model="file"
type="black"
drag-drop
expanded
accept="application/pdf"
>
<section class="section">
<div class="content has-text-centered">
<p>
<b-icon icon="upload" size="is-large"></b-icon>
</p>
<p>
{{
file.name || "Arrastra aquí tu archivo o da click para buscar"
}}
</p>
<p>Tamaño máximo 20MB</p>
</div>
</section>
<div v-if="!servicio.informeGlobal">
<b-field>
<b-upload accept="application/pdf" v-model="file" drag-drop expanded>
<div class="section has-text-centered">
<b-icon icon="upload" size="is-large" class="mb-2" />
<p class="is-size-5">
{{
file.name ||
'Arrastra aquí tu archivo o da click aquí para buscarlo.'
}}
</p>
<p class="is-size-6">Tamaño máximo 20MB</p>
</div>
</b-upload>
</b-field>
<b-field style="text-align:center;">
<button
:disabled="file == ''"
class="button is-success is-medium mb-4"
@click="enviarInforme()"
<b-field class="has-text-centered my-5">
<b-button
type="is-success"
:disabled="!file.name"
@click="
imprimirWarning(
`¿Estas seguro(a) de querer subir este informe global?`,
enviarInformeGlobal
)
"
>
Enviar
</button>
</b-button>
</b-field>
</div>
<div class="is-flex" v-else>
<p class="block is-size-5">Informe Global enviado.</p>
<b-icon icon="check-bold" size="is-small" type="is-success"> </b-icon>
<div v-else>
<p class="block is-size-6">
Informe Global enviado.
<b-icon type="is-success" icon="check-bold" />
</p>
</div>
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
</div>
</template>
<script>
import axios from "axios";
import axios from 'axios'
export default {
props: {
alumno: { type: Object, required: true },
servicio: { type: Object, required: true },
imprimirMensaje: { type: Function, required: true },
imprimirWarning: { type: Function, required: true },
imprimirError: { type: Function, required: true },
obtenerServicio: { type: Function, required: true },
updateIsLoading: { type: Function, required: true },
},
data() {
return {
token: {
headers: {
token: window.localStorage.getItem("token"),
},
},
isLoading: false,
file: [],
};
file: {},
}
},
methods: {
enviarInformeGlobal() {
const formData = new FormData()
const data = {
idServicio: this.servicio.idServicio,
}
this.updateIsLoading(true)
formData.append('data', JSON.stringify(data))
formData.append('informeGlobal', this.file)
axios
.put(
`${process.env.api}/servicio/informe_global`,
formData,
this.alumno.tokenArchivo
)
.then((res) => {
this.updateIsLoading(false)
this.imprimirMensaje(res.data.message)
this.obtenerServicio()
})
.catch((error) => {
this.updateIsLoading(false)
this.imprimirError(error.response.data)
})
},
},
props: ["idCuestionario", "informeGlobal", "idServicio"],
watch: {
file() {
if (this.file.size >= 20000000) {
this.$buefy.dialog.alert({
title: "Error",
message: "El tamaño del archivo exede los 20MB",
type: "is-danger",
hasIcon: true,
icon: "alert-circle",
iconPack: "mdi",
ariaRole: "alertdialog",
ariaModal: true,
});
this.file = [];
this.imprimirError({ message: 'El tamaño del archivo exede los 20MB' })
this.file = {}
}
},
},
methods: {
reset() {
this.file = [];
},
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",
iconPack: "mdi",
ariaRole: "alertdialog",
ariaModal: true,
});
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
}
},
enviarInforme() {
this.isLoading = true;
const data = {
idServicio: this.idServicio,
};
const formData = new FormData();
formData.append("data", JSON.stringify(data));
formData.append("informeGlobal", this.file);
axios
.put(`${process.env.api}/servicio/informe_global`, formData, {
headers: {
"Content-Type": "multipart/form-data",
token: this.token.headers.token,
},
})
.then((res) => {
this.$buefy.dialog.alert({
title: "Success",
message: "Se enviaron los datos correctamente",
type: "is-success",
hasIcon: true,
icon: "checkbox-marked-circle",
iconPack: "mdi",
ariaRole: "alertdialog",
ariaModal: true,
});
this.reset();
this.$parent.getData();
})
.catch((error) => {
this.error(error.response.data.message);
})
.finally(() => {
this.isLoading = false;
});
},
},
};
}
</script>
-97
View File
@@ -1,97 +0,0 @@
<template>
<div class="progressBar my-6">
<b-steps
type="is-success"
size="is-large"
:has-navigation="false"
v-model="activeStep"
>
<b-step-item
:visible="activeStep < 6"
:clickable="false"
label="Pre Registro"
icon="account-plus"
></b-step-item>
<b-step-item
:visible="activeStep < 6"
:clickable="false"
label="Pre Registro Validado"
icon="account-clock"
></b-step-item>
<b-step-item
:visible="activeStep < 6"
:clickable="false"
label="Registro"
icon="account"
></b-step-item>
<b-step-item
:visible="activeStep < 6"
:clickable="false"
label="Pre Termino"
icon="account-details"
></b-step-item>
<b-step-item
:visible="activeStep < 6"
:clickable="false"
label="Termino"
icon="account-clock"
></b-step-item>
<b-step-item
:visible="activeStep < 6"
:clickable="false"
label="Liberacion"
icon="account-check"
></b-step-item>
<b-step-item
:clickable="false"
:visible="activeStep == 6"
label="Carta Aceptación Rechazada"
class="bad"
icon="file"
type="is-danger"
></b-step-item>
<b-step-item
:clickable="false"
:visible="activeStep == 7"
label="Carta Termino Rechazada"
icon="file"
class="bad"
type="is-danger "
></b-step-item>
<b-step-item
:clickable="false"
:visible="activeStep == 8"
label="Informe Global Rechazado"
icon="file"
class="bad"
type="is-danger"
></b-step-item>
<b-step-item
:clickable="false"
:visible="activeStep == 9"
label="Cancelado"
icon="account-cancel"
class="bad"
type="is-danger bad"
></b-step-item>
</b-steps>
</div>
</template>
<script>
export default {
data() {
return {};
},
props: ["activeStep"],
};
</script>
<style>
.b-steps .steps .step-items .step-item.is-danger::before,
.b-steps .steps .step-items .step-item.is-danger::after {
display: none !important;
content: none !important;
}
</style>
+21 -17
View File
@@ -1,29 +1,33 @@
<template>
<b-button
class="boton border-info my-5"
type="is-info is-light "
icon-left="arrow-left-box"
@click="regresar()"
>
Regresar
</b-button>
<div class="pb-5 pt-6">
<b-button
type="is-info is-light"
icon-left="arrow-left-box"
@click="regresar()"
>
Regresar
</b-button>
</div>
</template>
<script>
export default {
props: {
path: String,
deleteFromLocalStorage: Array,
path: {
type: String,
required: true,
},
deleteFromLocalStorage: {
type: Array,
default: () => [],
},
},
methods: {
regresar() {
if (this.deleteFromLocalStorage) {
for (let i = 0; i < this.deleteFromLocalStorage.length; i++) {
localStorage.removeItem(this.deleteFromLocalStorage[i]);
}
}
this.$router.push(this.path);
for (let i = 0; i < this.deleteFromLocalStorage.length; i++)
localStorage.removeItem(this.deleteFromLocalStorage[i])
this.$router.push(this.path)
},
},
};
}
</script>
@@ -0,0 +1,325 @@
<template>
<div>
<b-field label="Número de Cuenta">
<b-input
type="text"
placeholder="Número de Cuenta"
icon="school"
maxlength="9"
@keyup.enter.native="buscarAlumno()"
v-model="numeroCuenta"
expanded
/>
<b-button type="is-info" @click="buscarAlumno()"> Buscar </b-button>
</b-field>
<b-field label="Nombre">
<p class="input">{{ alumno.nombre }}</p>
</b-field>
<b-field label="Carrera">
<p class="input">{{ alumno.carrera }}</p>
</b-field>
<b-field label="Créditos">
<p class="input">
{{ alumno.creditos ? parseInt(alumno.creditos) : '' }}
<span v-if="alumno.creditos">%</span>
</p>
</b-field>
<b-field label="Dirección">
<b-input
type="text"
placeholder="Dirección"
maxlength="200"
v-model="direccion"
/>
</b-field>
<b-field label="Teléfono">
<b-input type="tel" placeholder="Teléfono" v-model="telefono" />
</b-field>
<b-field label="Correo electrónico">
<b-input type="email" placeholder="Correo electrónico" v-model="correo" />
</b-field>
<b-field label="Fecha de inicio">
<b-datepicker
icon="calendar-today"
:min-date="minDate"
v-model="fechaInicio"
/>
</b-field>
<b-field label="Fecha de fin" v-if="fechaInicio">
<b-datepicker
icon="calendar-today"
:min-date="minDate2"
v-model="fechaFin"
/>
</b-field>
<b-field label="Fecha de nacimiento">
<b-datepicker
placeholder="Nacimiento"
icon="calendar-today"
:max-date="new Date()"
v-model="fechaNacimiento"
/>
</b-field>
<b-field label="Artículo">
<b-select
placeholder="Seleccione el articulo correspondiente"
v-model="idStatus"
expanded
>
<option value="" disabled>Selecciona una opción</option>
<option value="11">Artículo 52</option>
<option value="12">Artículo 91</option>
</b-select>
</b-field>
<b-field label="Motivo" v-if="idStatus === '11'">
<b-select placeholder="Motivo" v-model="motivo" expanded>
<option value="" disabled>Selecciona una opción</option>
<option value="1">Tercera edad</option>
<option value="2">Capacidades diferentes</option>
</b-select>
</b-field>
<div v-if="idStatus === '12'">
<b-field label="Institución">
<b-input
placeholder="Institución"
maxlength="250"
v-model="institucion"
/>
</b-field>
<b-field label="Dependencia">
<b-input
placeholder="Dependencia"
maxlength="250"
v-model="dependencia"
/>
</b-field>
</div>
<b-field label="Añade un archivo (.zip, .rar).">
<b-upload
accept=".zip,.rar,.7zip"
@input="validarExtencion()"
v-model="file"
drag-drop
expanded
>
<div class="section has-text-centered">
<b-icon icon="upload" size="is-large" class="mb-2" />
<p class="is-size-5">
{{
file.name ||
'Arrastra aquí tu archivo o da click aquí para buscar'
}}
</p>
<p class="is-size-6">Tamaño máximo 20MB</p>
<p class="is-size-7">
Si al momento de elegir un archivo este no se selecciona, haga click
en cancelar en la ventana emergente y trate de nuevo.
</p>
</div>
</b-upload>
</b-field>
<div class="has-text-centered mt-4">
<b-button
type="is-success"
:disabled="mostrarBoton()"
@click="
imprimirWarning(
'¿Estas seguro(a) de querer crear un nuevo caso especial?',
enviar
)
"
>
Enviar
</b-button>
</div>
</div>
</template>
<script>
import axios from 'axios'
import moment from 'moment'
export default {
props: {
responsable: { type: Object, required: true },
imprimirError: { type: Function, required: true },
imprimirMensaje: { type: Function, required: true },
imprimirWarning: { type: Function, required: true },
updateIsLoading: { type: Function, required: true },
},
data() {
return {
dependencia: '',
direccion: '',
correo: '',
idStatus: '',
institucion: '',
motivo: '',
numeroCuenta: '',
telefono: '',
alumno: {},
fechaFin: new Date(),
fechaInicio: new Date(),
fechaNacimiento: new Date(),
file: {},
minDate: new Date(),
minDate2: new Date(),
}
},
methods: {
resetear() {
this.dependencia = ''
this.direccion = ''
this.correo = ''
this.idStatus = ''
this.institucion = ''
this.motivo = ''
this.telefono = ''
this.alumno = {}
this.fechaNacimiento = new Date()
this.fechaInicio = new Date()
this.fechaFin = new Date()
this.file = {}
},
validarExtencion() {
const extencionesPermitidas = [/(.zip)$/i, /(.rar)$/i]
for (let i = 0; i < extencionesPermitidas.length; i++)
if (extencionesPermitidas[i].exec(this.file.name)) return
this.file = {}
this.imprimirError({
message: 'Asegurate de ingresar un archivo con la extensión correcta.',
})
},
mostrarBoton() {
if (
!this.alumno.idUsuario ||
!this.telefono ||
!this.direccion ||
!this.correo ||
!this.idStatus ||
(this.idStatus == '11' && !this.motivo) ||
(this.idStatus == '12' && (!this.dependencia || !this.institucion)) ||
!this.file.name
)
return true
return false
},
buscarAlumno() {
this.updateIsLoading(true)
axios
.get(
`${process.env.api}/usuario/escolares?numeroCuenta=${this.numeroCuenta}`,
this.responsable.token
)
.then((res) => {
this.resetear()
this.alumno = res.data
this.updateIsLoading(false)
})
.catch((err) => {
this.resetear()
this.numeroCuenta = ''
this.updateIsLoading(false)
this.imprimirError(err.response.data)
})
},
enviar() {
const formData = new FormData()
const data = {
idUsuario: this.alumno.idUsuario,
idCarrera: this.alumno.idCarrera,
idStatus: this.idStatus,
numeroCuenta: this.numeroCuenta,
creditos: this.alumno.creditos,
correo: this.correo,
fechaInicio: moment(this.fechaInicio),
fechaFin: moment(this.fechaFin),
fechaNacimiento: moment(this.fechaNacimiento),
direccion: this.direccion,
telefono: this.telefono,
institucion: this.institucion,
dependencia: this.dependencia,
motivo: this.motivo,
}
this.updateIsLoading(true)
formData.append('alumno', JSON.stringify(data))
formData.append('archivos', this.file)
axios
.post(
`${process.env.api}/caso_especial/nuevo`,
formData,
this.responsable.tokenArchivo
)
.then((res) => {
this.numeroCuenta = ''
this.resetear()
this.updateIsLoading(false)
this.imprimirMensaje(res.data.message)
})
.catch((err) => {
this.updateIsLoading(false)
this.imprimirError(err.response.data)
})
},
updateFechas() {
this.fechaFin = new Date(
this.fechaInicio.getFullYear(),
this.fechaInicio.getMonth() + 6,
this.fechaInicio.getDate()
)
this.minDate2 = new Date(
this.fechaInicio.getFullYear(),
this.fechaInicio.getMonth() + 6,
this.fechaInicio.getDate()
)
},
},
watch: {
idStatus() {
this.motivo = ''
this.institucion = ''
this.dependencia = ''
},
file() {
if (this.file.size >= 20000000) {
this.imprimirError({ message: 'El tamaño del archivo exede los 20MB' })
this.file = {}
}
},
fechaInicio() {
this.updateFechas()
},
},
created() {
this.minDate.setDate(this.minDate.getDate() - 1)
this.updateFechas()
},
}
</script>
<style scoped></style>
@@ -0,0 +1,148 @@
<template>
<div class="mb-6">
<h3 class="title">Casos Especiales</h3>
<div class="columns">
<b-field class="column" label="Número de Cuenta">
<b-input
type="text"
icon="school"
placeholder="No.Cuenta"
maxlength="9"
@keyup.enter.native="obtenerCasosEspeciales()"
v-model="search.numeroCuenta"
rounded
/>
</b-field>
<b-field class="column" label="Nombre">
<b-input
type="name"
icon="account"
placeholder="Nombre"
@keyup.enter.native="obtenerCasosEspeciales()"
v-model="search.nombre"
rounded
/>
</b-field>
<b-field class="column" label="Status">
<b-select icon="information" v-model="search.idStatus" expanded rounded>
<option value="">Status</option>
<option
v-for="(s, i) in status"
:key="i"
:value="s.idStatus"
v-show="i > 8 && i < 14"
>
{{ s.status }}
</option>
</b-select>
</b-field>
<div class="column is-align-self-center">
<b-button
type="is-info"
@click="obtenerCasosEspeciales()"
expanded
rounded
>
Buscar
</b-button>
</div>
</div>
<TablaServiciosSociales
:columnaFechaFin="false"
:columnaFechaInicio="false"
:isLoading="isLoading"
:idTipoUsuario="responsable.idTipoUsuario"
:page="page"
:total="total"
:data="data"
:onPageChange="onPageChange"
/>
</div>
</template>
<script>
import axios from 'axios'
import TablaServiciosSociales from '@/components/TablaServiciosSociales'
export default {
components: { TablaServiciosSociales },
props: {
responsable: { type: Object, required: true },
imprimirError: { type: Function, required: true },
},
data() {
return {
isLoading: false,
page: 1,
total: 0,
data: [],
status: [],
search: {
idStatus: '',
},
searchAnterior: {},
}
},
methods: {
onPageChange(page) {
this.page = page
this.obtenerCasosEspeciales()
},
obtenerCasosEspeciales() {
let data = ''
this.isLoading = true
if (
this.search.numeroCuenta != this.searchAnterior.numeroCuenta ||
this.search.nombre != this.searchAnterior.nombre ||
this.search.idStatus != this.searchAnterior.idStatus
) {
this.page = 1
this.searchAnterior.numeroCuenta = this.search.numeroCuenta
this.searchAnterior.nombre = this.search.nombre
this.searchAnterior.idStatus = this.search.idStatus
}
if (this.search.idStatus) data += `&idStatus=${this.search.idStatus}`
if (this.search.nombre) data += `&nombre=${this.search.nombre}`
if (this.search.numeroCuenta)
data += `&numeroCuenta=${this.search.numeroCuenta}`
axios
.get(
`${process.env.api}/caso_especial/servicios_especiales?pagina=${this.page}${data}`,
this.responsable.token
)
.then((res) => {
this.data = res.data.serviciosEspeciales
this.total = res.data.count
this.isLoading = false
})
.catch((err) => {
this.isLoading = false
this.imprimirError(err.response.data)
})
},
obtenerCatalogoStatus() {
axios
.get(`${process.env.api}/status`, this.responsable.token)
.then((res) => {
this.status = res.data
this.obtenerCasosEspeciales()
})
.catch((err) => {
this.imprimirError(err.response.data)
})
},
},
created() {
if (this.responsable.idTipoUsuario === 4) this.obtenerCatalogoStatus()
},
}
</script>
<style scoped></style>
@@ -1,410 +0,0 @@
<template>
<div>
<p class="is-size-3 mb-5"><b>Agregar un servicio social</b></p>
<form>
<b-field label="Número de cuenta" class="column p-0 my-5 is-full">
<input
class="input column"
v-model="noCuenta"
message="Solo numeros"
required="required"
maxlength="9"
type="number"
placeholder="Número de cuenta"
min="0"
/>
<p class="control">
<b-button class="button is-info" @click="buscarAlumno()"
>Buscar</b-button
>
</p>
</b-field>
<b-field label="Nombre">
<div class="input" placeholder="Nombre">{{ alumno.nombre }}</div>
</b-field>
<b-field label="Carrera">
<div class="input" placeholder="Carrera">{{ alumno.carrera }}</div>
</b-field>
<b-field label="Créditos">
<div class="input" placeholder="Créditos">
{{ `${alumno.creditos}%` }}
</div>
</b-field>
<b-field label="Dirección">
<b-input
class="my-4"
placeholder="Dirección"
v-model="alumno.direccion"
></b-input>
</b-field>
<b-field label="Fecha de inicio">
<b-datepicker
placeholder="Fecha Inicio"
icon="calendar-today"
v-model="alumno.fechaInicio"
:min-date="minDate1"
>
</b-datepicker>
</b-field>
<b-field label="Fecha de fin">
<b-datepicker
placeholder="Fecha fin"
v-model="alumno.fechaFin"
:min-date="minDate2"
icon="calendar-today"
>
</b-datepicker>
</b-field>
<b-field label="Fecha de nacimiento">
<b-datepicker
placeholder="Nacimiento"
icon="calendar-today"
v-model="alumno.fechaNacimiento"
>
</b-datepicker>
</b-field>
<b-field label="Teléfono">
<b-input
class="my-4"
placeholder="Teléfono"
maxlength="10"
v-model="alumno.telefono"
></b-input>
</b-field>
<b-field label="Correo electrónico">
<b-input
class="my-4"
placeholder="Correo electrónico"
v-model="alumno.correoElectronico"
></b-input>
</b-field>
</form>
<b-field label="Artículo">
<b-select
placeholder="Seleccione el articulo correspondiente"
expanded
v-model="alumno.articulo"
>
<option value="11">Artículo 52</option>
<option value="12">Artículo 91</option>
</b-select>
</b-field>
<b-field label="Motivo" v-if="alumno.articulo === '11'">
<b-select
class="my-4"
expanded
placeholder="Motivo"
v-model="alumno.motivo"
>
<option value="1">Tercera edad</option>
<option value="2">Capacidades diferentes</option>
</b-select>
</b-field>
<div v-if="alumno.articulo === '12'">
<b-field label="Institución">
<b-input
class="my-4"
placeholder="Institución"
maxlength="250"
v-model="alumno.institucion"
></b-input>
</b-field>
<b-field label="Dependencia">
<b-input
placeholder="Dependencia"
maxlength="250"
v-model="alumno.dependencia"
></b-input>
</b-field>
</div>
<b-field label="Añade un archivo (.zip, .rar)">
<b-upload
v-model="file"
drag-drop
type="is-black"
expanded
accept=".zip,.rar,.7zip"
v-on:input="validarExt()"
>
<section>
<div class="content has-text-centered">
<p>
<b-icon icon="upload" size="is-large"></b-icon>
</p>
<p>
{{
file.name || "Arrastra aquí tu archivo o da click para buscar"
}}
</p>
</div>
</section>
</b-upload>
</b-field>
<b-field class="centro">
<b-button
:disabled="
alumno.articulo == '' ||
alumno.numeroCuenta == '' ||
alumno.nombre == '' ||
alumno.carrera == '' ||
alumno.direccion == '' ||
alumno.fechaNacimiento == '' ||
alumno.fechaInicio == '' ||
alumno.fechaFin == '' ||
alumno.correoElectronico == '' ||
file == ''
"
class="border-success my-5"
type="is-success"
@click="enviar()"
>Enviar</b-button
>
</b-field>
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
</div>
</template>
<script>
import "buefy/dist/buefy.css";
import axios from "axios";
import validator from "validator";
import moment from "moment";
export default {
data() {
return {
file: {},
isLoading: false,
searched: false,
noCuenta: "",
alumno: {
cuenta: "",
nombre: "",
carrera: "",
creditos: "",
discapacidad: "",
institucion: "",
dependencia: "",
idAlumno: "",
idCarrera: "",
telefono: "",
fechaNacimiento: [],
fechaInicio: [],
fechaFin: [],
correoElectronico: "",
},
minDate1: new Date("2020-01-01"),
token: {
headers: {
token: window.localStorage.getItem("token"),
},
},
};
},
methods: {
reset() {
this.alumno.cuenta = "";
this.alumno.nombre = "";
this.alumno.carrera = "";
this.alumno.creditos = "";
this.alumno.institucion = "";
this.alumno.dependencia = "";
this.alumno.motivo = "";
this.alumno.idAlumno = "";
this.alumno.articulo = "";
this.alumno.direccion = "";
this.alumno.idCarrera = "";
this.alumno.fechaNacimiento = [];
this.alumno.fechaInicio = [];
this.alumno.fechaFin = [];
this.alumno.correoElectronico = "";
this.alumno.telefono = "";
this.noCuenta = "";
this.file = {};
},
validarExt() {
const extPermitidas1 = /(.zip)$/i;
const extPermitidas2 = /(.rar)$/i;
if(this.file.name){
if ((extPermitidas1.exec(this.file.name)
|| extPermitidas2.exec(this.file.name))
== false)
{
this.dangerToast();
this.file = {};
}
}
},
dangerToast() {
this.$buefy.toast.open({
message: "Asegurate de ingresar un archivo con la extensión correcta",
type: "is-danger",
});
},
buscarAlumno() {
this.isLoading = true;
axios
.get(
`${process.env.api}/usuario/escolares?numeroCuenta=${this.noCuenta}`,
this.token
)
.then((res) => {
this.alumno = res.data;
this.alumno.cuenta = this.noCuenta;
this.alumno.creditos = Number(res.data.creditos);
this.searched = true;
})
.catch((error) => {
this.error(error.response.data.message);
})
.finally(() => {
this.isLoading = false;
});
},
enviar() {
this.isLoading = true;
const data = {
idUsuario: this.alumno.idUsuario,
idStatus: this.alumno.articulo,
idCarrera: this.alumno.idCarrera,
numeroCuenta: this.alumno.cuenta,
creditos: this.alumno.creditos.toString(),
correo: this.alumno.correoElectronico,
fechaInicio: moment(this.alumno.fechaInicio),
fechaFin: moment(this.alumno.fechaFin),
fechaNacimiento: moment(this.alumno.fechaNacimiento),
direccion: this.alumno.direccion,
telefono: this.alumno.telefono,
institucion: this.alumno.institucion,
dependencia: this.alumno.dependencia,
motivo: this.alumno.motivo,
};
const formData = new FormData();
formData.append("alumno", JSON.stringify(data));
formData.append("archivos", this.file);
axios
.post(`${process.env.api}/caso_especial/nuevo`, formData, {
headers: {
"Content-Type": "multipart/form-data",
token: this.token.headers.token,
},
})
.then((res) => {
this.$buefy.dialog.alert({
title: "Success",
message: "Se enviaron los datos correctamente",
type: "is-success",
hasIcon: true,
icon: "checkbox-marked-circle",
iconPack: "mdi",
ariaRole: "alertdialog",
ariaModal: true,
});
this.reset();
})
.catch((error) => {
this.error(error.response.data.message);
})
.finally(() => {
this.isLoading = false;
});
},
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",
iconPack: "mdi",
ariaRole: "alertdialog",
ariaModal: true,
});
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
}
},
esNumero(numero) {
const ultimaLetra = numero.length - 1;
if (numero && !validator.isNumeric(numero[ultimaLetra])) {
return numero.substr(0, ultimaLetra);
}
return numero;
},
maxLength(str, max) {
if (str.length > max) return str.substr(0, max);
return str;
},
correoValidado() {
if (validator.isEmail(this.alumno.correoElectronico)) {
return "";
}
},
},
computed: {
minDate2() {
const min = new Date(this.alumno.fechaInicio);
return new Date(min.getFullYear(), min.getMonth() + 6, min.getDate());
},
},
watch: {
noCuenta() {
if (this.searched === false) {
this.noCuenta = Number(this.noCuenta) < 0 ? "" : this.noCuenta;
this.noCuenta = this.esNumero(this.noCuenta);
this.noCuenta = this.maxLength(this.noCuenta, 9);
} else {
this.noCuenta = "";
this.searched = false;
this.reset();
}
},
},
};
</script>
<style>
.centro {
text-align: center;
}
.upload .upload-draggable {
padding: 2.5em;
}
</style>
-288
View File
@@ -1,288 +0,0 @@
<template>
<div
v-if="this.idTipoUsuario == 2 && this.tipoUsuario == 'responsable'"
class="container"
>
<div class="columns">
<div class="column is-3 mb-0">
<b-field>
<b-input
placeholder="No.Cuenta"
icon="school"
rounded
v-model="numeroCuenta"
maxlength="9"
></b-input>
</b-field>
</div>
<div class="column is-3 mb-4 pb-4">
<b-field>
<b-input
type="name"
placeholder="Nombre"
icon="account"
rounded
v-model="nombre"
></b-input>
</b-field>
</div>
<div class="column is-3 mb-4 pb-4 ">
<b-field>
<b-select icon="information" expanded rounded v-model="idStatus">
<optgroup>
<option value="">Status</option>
<option value="11">Artículo 52</option>
<option value="12">Artículo 91</option>
<option value="13">Liberación Articulo 52</option>
<option value="14">Liberación Articulo 91</option>
</optgroup>
</b-select>
</b-field>
</div>
<div class="buttons section pt-3 pl-5">
<b-button type="is-info" @click="obtenerDatos(idStatus)">
Buscar
</b-button>
</div>
</div>
<div class="columns">
<section class="column is-12">
<b-table
:data="data"
:loading="isLoading"
hoverable
striped
paginated
backend-pagination
:total="total"
:per-page="perPage"
@page-change="onPageChange"
>
<b-table-column field="nombre" label="Nombre" v-slot="props" centered>
<span
class="cursorR"
v-if="props.row.idStatus == 7"
@click="cartaAceptacion(props.row.idServicio, props.row.idStatus)"
>{{ props.row.nombre }}</span
>
<span v-else>{{ props.row.nombre }}</span>
</b-table-column>
<b-table-column
field="numeroCuenta"
label="Número de Cuenta"
v-slot="props"
centered
width="100"
>
<span
class="cursorR"
v-if="props.row.idStatus == 7"
@click="cartaAceptacion(props.row.idServicio, props.row.idStatus)"
>{{ props.row.numeroCuenta }}</span
>
<span v-else>{{ props.row.numeroCuenta }}</span>
</b-table-column>
<b-table-column
field="carrera"
label="Carrera"
v-slot="props"
centered
>
<span
class="cursorR"
v-if="props.row.idStatus == 7"
@click="cartaAceptacion(props.row.idServicio, props.row.idStatus)"
>{{ props.row.carrera }}</span
>
<span v-else>{{ props.row.carrera }}</span>
</b-table-column>
<b-table-column field="status" label="Status" v-slot="props" centered>
<span
v-if="props.row.idStatus == 7"
class="cursorR tag"
:class="types(props.row.idStatus)"
@click="cartaAceptacion(props.row.idServicio, props.row.idStatus)"
>{{ props.row.status }}</span
>
<span v-else class="tag" :class="types(props.row.idStatus)">{{
props.row.status
}}</span>
</b-table-column>
</b-table>
</section>
</div>
</div>
</template>
<script>
import axios from "axios";
import moment from "moment";
export default {
data() {
return {
idTipoUsuario: "",
idUsuario: "",
tipoUsuario: "",
data: [],
total: "",
isLoading: false,
page: 1,
perPage: 25,
numeroCuenta: "",
nombre: "",
idStatus: "",
idServicio: "",
token: {
headers: {
token: window.localStorage.getItem("token"),
},
},
};
},
methods: {
onPageChange(page) {
this.page = page;
this.obtenerDatos();
},
types(idStatus) {
if (idStatus === 1) {
return "is-dark";
} else if (idStatus === 2) {
return "is-info";
} else if (idStatus === 3) {
return "is-link";
} else if (idStatus === 4) {
return "is-warning";
} else if (idStatus === 5) {
return "is-success";
} else if (idStatus === 6) {
return "is-link";
} else if (idStatus === 7 || idStatus === 8 || idStatus === 9) {
return "is-danger";
} else if (idStatus === 11) {
return "is-link is-light";
} else if (idStatus === 12) {
return "is-danger is-light";
} else if (idStatus === 13 || idStatus === 14) {
return "is-success is-light";
}
},
fecha(date) {
const fecha = moment(date.substr(0, 10));
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`;
},
obtenerDatos(idStatus) {
this.isLoading = true;
this.data = [];
axios
.get(
`${process.env.api}/caso_especial/servicios_especiales?pagina=${this.page}&idStatus=${this.idStatus}&nombre=${this.nombre}&numeroCuenta=${this.numeroCuenta}`,
this.token
)
.then((res) => {
const servicios = res.data.servicios;
if (servicios.length !== 0) {
for (let i = 0; i < servicios.length; i++) {
this.data.push({
nombre: servicios[i].Usuario.nombre,
numeroCuenta: servicios[i].Usuario.usuario,
carrera: servicios[i].Carrera.carrera,
status: servicios[i].Status.status,
idStatus: servicios[i].Status.idStatus,
});
}
}
let currentTotal = servicios.length;
let contador;
for (let i = 0; i < res.data.registros / 25 + 1; i++) {
contador = i;
}
currentTotal = this.perPage * contador;
this.total = currentTotal;
})
.catch((error) => {
this.error(error.response.data.message);
})
.finally(() => {
this.isLoading = false;
});
},
getIdLocal() {
this.idUsuario = localStorage.getItem("idUsuario");
this.idTipoUsuario = localStorage.getItem("idTipoUsuario");
this.tipoUsuario = localStorage.getItem("tipoUsuario");
if (this.idTipoUsuario != 2 && this.tipoUsuario != "responsable") {
localStorage.clear();
this.$router.push("/");
}
},
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",
iconPack: "mdi",
ariaRole: "alertdialog",
ariaModal: true,
});
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
}
},
},
created() {
this.getIdLocal();
this.obtenerDatos(0);
},
};
</script>
<style>
.input:focus {
border: #1b3d70;
box-shadow: 0 0 8px 0 #1b3d70;
}
.select select:focus {
border-color: #1b3d70;
box-shadow: 0 0 8px 0 #1b3d70;
}
.select:not(.is-multiple):not(.is-loading)::after {
border-color: #1b3d70;
}
.pagination-link.is-current {
background-color: #1b3d70;
border-color: #1b3d70;
}
.cursorR {
cursor: pointer;
}
</style>
+20 -19
View File
@@ -1,32 +1,33 @@
<template>
<footer class="py-4">
<div class="container is-flex is-justify-content-center is-size-7 py-4">
<div class="has-text-white has-text-centered">
<p class="mb-1">
Hecho en México, todos los derechos reservados 2020.
</p>
<footer class="footer">
<div class="container has-text-centered is-size-7-touch is-size-6-desktop">
<p>Hecho en México, todos los derechos reservados {{ year() }}.</p>
<p>
Esta página puede ser reproducida con fines no lucrativos, siempre y
cuando no se mutile, se cite la fuente completa y su dirección
electrónica. De otra forma, requiere permiso previo por escrito de la
institución.
</p>
</div>
<p>
Esta página puede ser reproducida con fines no lucrativos, siempre y
cuando no se mutile, se cite la fuente completa y su dirección
electrónica. De otra forma, requiere permiso previo por escrito de la
institución.
</p>
</div>
</footer>
</template>
<script>
export default {};
import moment from 'moment'
export default {
methods: {
year() {
return moment().year()
},
},
}
</script>
<style scoped>
footer {
background-color: #1b3d70;
/* position: fixed;
bottom: 0px;
left: 0px;
right: 0px; */
background-color: #1d3d6f;
color: #fff;
}
</style>
+32 -9
View File
@@ -1,13 +1,13 @@
<template>
<header>
<div class="container">
<header class="header-page">
<div class="container py-3">
<div
class="columns is-mobile is-vcentered is-gapless is-justify-content-space-between"
class="columns is-gapless is-vcentered is-justify-content-space-between is-mobile"
>
<a
href="https://www.unam.mx/"
class="column is-5-mobile is-3-tablet is-one-fifth-widescreen ml-3"
target="_blank"
class="column is-one-fifth-desktop is-one-third-tablet is-5-mobile my-3 ml-2"
>
<b-image
:src="require('@/assets/logo_unam.png')"
@@ -17,12 +17,12 @@
<a
href="https://www.acatlan.unam.mx/"
class="column is-5-mobile is-3-tablet is-one-fifth-widescreen mr-3"
target="_blank"
class="column is-one-fifth-desktop is-one-third-tablet is-5-mobile my-3 mr-2"
>
<b-image
:src="require('@/assets/logo_acatlan.png')"
alt="logo_unam"
alt="logo_acatlan"
></b-image>
</a>
</div>
@@ -31,11 +31,34 @@
</template>
<script>
export default {};
export default {}
</script>
<style scoped>
header {
<style>
.header-page {
background-color: #1d3d6f;
}
.input:focus {
border: #1b3d70;
box-shadow: 0 0 8px 0 #1b3d70;
}
.select select:focus {
border-color: #1b3d70;
box-shadow: 0 0 8px 0 #1b3d70;
}
.select:not(.is-multiple):not(.is-loading)::after {
border-color: #1b3d70;
}
.pagination-link.is-current {
background-color: #1b3d70;
border-color: #1b3d70;
}
.pointer {
cursor: pointer;
}
</style>
+26 -26
View File
@@ -1,49 +1,49 @@
<template>
<section>
<nav
class="container is-flex is-justify-content-space-between has-text-white is-align-items-center"
<div
class="container is-flex is-justify-content-space-between is-align-items-center"
>
<h2>{{ usuario }}</h2>
<b-button type="is-danger is-small my-1 rojo" @click="cerrarSesion()"
<h2 class="m-2 has-text-white">{{ usuario }}</h2>
<b-button
type="is-danger"
size="is-small"
class="m-2 rojo"
@click="cerrarSesion()"
>Cerrar Sesión</b-button
>
</nav>
</div>
</section>
</template>
<script>
export default {
data() {
return {
usuario: localStorage.getItem("usuario")
? localStorage.getItem("usuario")
: "",
};
return { usuario: localStorage.getItem('usuario') }
},
// created() {
// if (
// !localStorage.getItem("usuario") ||
// !localStorage.getItem("idUsuario") ||
// !localStorage.getItem("idTipoUsuario") ||
// !localStorage.getItem("nombre") ||
// !localStorage.getItem("tipoUsuario") ||
// !localStorage.getItem("token")
// )
// this.$router.push("/");
// },
methods: {
cerrarSesion() {
localStorage.clear();
this.$router.push("/");
localStorage.clear()
this.$router.push('/')
},
},
};
created() {
if (
!localStorage.getItem('usuario') ||
!localStorage.getItem('idUsuario') ||
!localStorage.getItem('idTipoUsuario') ||
!localStorage.getItem('nombre') ||
!localStorage.getItem('tipoUsuario') ||
!localStorage.getItem('token')
)
this.cerrarSesion()
},
}
</script>
<style scoped>
section {
background-color: #bb8800;
background-color: #bb8704;
}
.rojo {
@@ -0,0 +1,162 @@
<template>
<div>
<div class="mb-6">
<h2 class="title">
Estimad(a) responsable de programa de servicio social:
</h2>
<p>
Te solicitamos llenar cuidadosamente los campos solicitados a
continuación para poder validar el término del servicio social de
nuestro alumno(a)
</p>
</div>
<b-field
class="mb-4"
label="Mencione 5 actividades desempeñadas por el alumno:"
>
<div>
<b-field v-for="(a, i) in actividades" :key="i">
<b-input
maxlength="400"
:placeholder="`${i + 1})`"
v-model="actividades[i]"
/>
</b-field>
</div>
</b-field>
<div class="columns" v-for="(uAC, i) in unoAlCinco" :key="i">
<div class="column">
<p class="label">{{ i + 1 }}) {{ uAC }}</p>
</div>
<b-field class="column is-4">
<b-select v-model="retroalimentacion[i]" expanded>
<option value="" disabled>Seleccionar</option>
<option v-for="(sR, i) in selectRespuestas" :key="i" :value="i + 1">
{{ sR }}
</option>
</b-select>
</b-field>
</div>
<b-field
label="6) De acuerdo a lo observado ¿cuáles considera que son las cualidades de
nuestros alumnos de esta licenciatura?"
>
<b-input placeholder="Respuesta" maxlength="800" v-model="p6" />
</b-field>
<b-field
label="7) De acuerdo a lo observado ¿cuáles considera que son los aspectos a
mejorar en la formación de nuestros alumnos de esta licenciatura?"
>
<b-input placeholder="Respuesta" maxlength="800" v-model="p7" />
</b-field>
<b-field class="has-text-centered">
<b-button
type="is-success"
:disabled="
validarActividades() || validarRetroalimentacion() || !p6 || !p7
"
@click="
imprimirWarning(
'¿Estas seguro(a) de querer enviar este cuestionario?',
enviarCuestionario
)
"
>
Enviar
</b-button>
</b-field>
</div>
</template>
<script>
import axios from 'axios'
export default {
props: {
responsable: { type: Object, required: true },
imprimirError: { type: Function, required: true },
imprimirMensaje: { type: Function, required: true },
imprimirWarning: { type: Function, required: true },
updateIsLoading: { type: Function, required: true },
},
data() {
return {
cuestionario: '',
p6: '',
p7: '',
idServicio: null,
actividades: [],
retroalimentacion: ['', '', '', '', ''],
selectRespuestas: ['Deficiente', 'Regular', 'Bueno', 'Excelente'],
unoAlCinco: [
'Conocimiento teóricos para las funciones encomendadas.',
'Conocimientos técnicos para las funciones encomendadas.',
'Iniciativa para la implementación de mejoras en la empresa.',
'Puntualidad en la entrega de los trabajos de las tareas encomendadas.',
'Desempeño general de sus funciones.',
],
}
},
methods: {
validarActividades() {
for (let i = 0; i < this.actividades.length; i++)
if (!this.actividades[i]) return true
return false
},
validarRetroalimentacion() {
if (this.retroalimentacion.length != 5) return true
for (let i = 0; i < this.retroalimentacion.length; i++)
if (!this.retroalimentacion[i]) return true
return false
},
enviarCuestionario() {
const data = {
idServicio: this.idServicio,
actividad1: this.actividades[0],
actividad2: this.actividades[1],
actividad3: this.actividades[2],
actividad4: this.actividades[3],
actividad5: this.actividades[4],
retroalimentacion: this.retroalimentacion,
p6: this.p6,
p7: this.p7,
idServicio: this.idServicio,
}
this.updateIsLoading(true)
axios
.post(
`${process.env.api}/cuestionario_programa`,
data,
this.responsable.token
)
.then((res) => {
localStorage.removeItem('idServicio')
localStorage.removeItem('cuestionario')
this.updateIsLoading(false)
this.imprimirMensaje(res.data.message)
this.$router.push('/responsable')
})
.catch((err) => {
this.updateIsLoading(false)
this.imprimirError(err.response.data)
})
},
},
created() {
this.idServicio = Number(localStorage.getItem('idServicio'))
this.cuestionario = localStorage.getItem('cuestionario')
for (let i = 0; i < 5; i++) this.actividades.push('')
},
}
</script>
<style scoped></style>
+279
View File
@@ -0,0 +1,279 @@
<template>
<div>
<b-field label="Número de Cuenta">
<b-input
type="text"
placeholder="Número de Cuenta"
icon="school"
maxlength="9"
@keyup.enter.native="buscarAlumno()"
v-model="numeroCuenta"
expanded
/>
<b-button type="is-info" @click="buscarAlumno()"> Buscar </b-button>
</b-field>
<b-field label="Nombre">
<p class="input">{{ alumno.nombre }}</p>
</b-field>
<b-field label="Carrera">
<p class="input">{{ alumno.carrera }}</p>
</b-field>
<b-field label="Créditos">
<p class="input">
{{ alumno.creditos ? parseInt(alumno.creditos) : '' }}
<span v-if="alumno.creditos">%</span>
</p>
</b-field>
<b-field label="Seleccione programa">
<b-select placeholder="Seleccionar" v-model="programa" expanded>
<option :value="{}" disabled>Seleccionar</option>
<option v-for="(p, i) in programas" :key="i" :value="p">
{{ p.programa }}
</option>
</b-select>
</b-field>
<b-field label="Institución">
<p class="input">{{ programa.institucion }}</p>
</b-field>
<b-field label="Dependencia">
<p class="input">{{ programa.dependencia }}</p>
</b-field>
<b-field label="Clave del programa">
<p class="input">{{ programa.clavePrograma }}</p>
</b-field>
<div v-if="programa.acatlan">
<b-field label="Programa interno">
<b-input placeholder="Programa interno" v-model="programaInterno" />
</b-field>
<b-field class="mb-3" label="Profesor/Responsable de Programa">
<b-input
placeholder="Profesor/Responsable de Programa"
v-model="profesor"
/>
</b-field>
</div>
<b-field label="Fecha de inicio">
<b-datepicker
icon="calendar-today"
:min-date="minDate"
v-model="fechaInicio"
/>
</b-field>
<b-field label="Fecha de fin" v-if="fechaInicio">
<b-datepicker
icon="calendar-today"
:min-date="minDate2"
v-model="fechaFin"
/>
</b-field>
<b-field label="Correo del Alumno">
<b-input type="email" placeholder="Email" v-model="correo" />
</b-field>
<b-field
label="Carta de aceptación (en formato .PDF. No se aceptan fotos)."
>
<b-upload accept="application/pdf" v-model="file" drag-drop expanded>
<div class="section has-text-centered">
<b-icon icon="upload" size="is-large" class="mb-2" />
<p class="is-size-5">
{{
file.name ||
'Arrastra aquí tu archivo o da click aquí para buscar'
}}
</p>
<p class="is-size-6">Tamaño máximo 20MB</p>
<p class="is-size-7">
Si al momento de elegir un archivo este no se selecciona, haga click
en cancelar en la ventana emergente y trate de nuevo.
</p>
</div>
</b-upload>
</b-field>
<b-field class="has-text-centered mt-4">
<b-button
type="is-success"
:disabled="mostrarBoton()"
@click="
imprimirWarning(
'¿Esta seguro(a) de querer Pre-Registrar a este alumno?',
preRegistrar
)
"
>
Enviar
</b-button>
</b-field>
</div>
</template>
<script>
import axios from 'axios'
import moment from 'moment'
export default {
props: {
responsable: { type: Object, required: true },
imprimirError: { type: Function, required: true },
imprimirMensaje: { type: Function, required: true },
imprimirWarning: { type: Function, required: true },
updateIsLoading: { type: Function, required: true },
},
data() {
return {
correo: '',
numeroCuenta: '',
profesor: '',
programaInterno: '',
programas: [],
alumno: {},
fechaFin: new Date(),
fechaInicio: new Date(),
file: {},
minDate: new Date(),
minDate2: new Date(),
programa: {},
}
},
methods: {
resetar() {
this.correo = ''
this.profesor = ''
this.programaInterno = ''
this.fechaFin = new Date()
this.fechaInicio = new Date()
this.file = {}
this.alumno = {}
this.programa = {}
},
mostrarBoton() {
if (
!this.alumno.idUsuario ||
!this.correo ||
!this.programa.idPrograma ||
(this.programa.acatlan && (!this.profesor || !this.programaInterno)) ||
!this.file.name
)
return true
return false
},
buscarAlumno() {
this.updateIsLoading(true)
axios
.get(
`${process.env.api}/usuario/escolares?numeroCuenta=${this.numeroCuenta}`,
this.responsable.token
)
.then((res) => {
this.resetar()
this.alumno = res.data
this.updateIsLoading(false)
})
.catch((err) => {
this.numeroCuenta = ''
this.resetar()
this.updateIsLoading(false)
this.imprimirError(err.response.data)
})
},
preRegistrar() {
const formData = new FormData()
const data = {
idUsuario: this.alumno.idUsuario,
idPrograma: this.programa.idPrograma,
idCarrera: this.alumno.idCarrera,
numeroCuenta: this.numeroCuenta,
creditos: this.alumno.creditos.toString(),
correo: this.correo,
programaInterno: this.programaInterno,
profesor: this.profesor,
fechaInicio: moment(this.fechaInicio),
fechaFin: moment(this.fechaFin),
}
this.updateIsLoading(true)
formData.append('alumno', JSON.stringify(data))
formData.append('cartaAceptacion', this.file)
axios
.post(
`${process.env.api}/servicio/nuevo`,
formData,
this.responsable.tokenArchivo
)
.then((res) => {
this.numeroCuenta = ''
this.resetar()
this.updateIsLoading(false)
this.imprimirMensaje(res.data.message)
})
.catch((err) => {
this.updateIsLoading(false)
this.imprimirError(err.response.data)
})
},
obtenerProgramas() {
axios
.get(
`${process.env.api}/programa/programas_responsable?idUsuario=${this.responsable.idUsuario}`,
this.responsable.token
)
.then((res) => {
this.programas = res.data
})
.catch((err) => {
this.imprimirError(err.response.data)
})
},
updateFechas() {
this.fechaFin = new Date(
this.fechaInicio.getFullYear(),
this.fechaInicio.getMonth() + 6,
this.fechaInicio.getDate()
)
this.minDate2 = new Date(
this.fechaInicio.getFullYear(),
this.fechaInicio.getMonth() + 6,
this.fechaInicio.getDate()
)
},
},
watch: {
file() {
if (this.file.size >= 20000000) {
this.imprimirError({ message: 'El tamaño del archivo exede los 20MB' })
this.file = {}
}
},
fechaInicio() {
this.updateFechas()
},
},
created() {
if (this.responsable.idTipoUsuario === 2) {
this.minDate.setDate(this.minDate.getDate() - 16)
this.updateFechas()
this.obtenerProgramas()
}
},
}
</script>
<style scoped></style>
@@ -0,0 +1,143 @@
<template>
<div>
<div class="columns">
<b-field class="column" label="Número de Cuenta">
<b-input
type="text"
placeholder="No.Cuenta"
icon="school"
maxlength="9"
@keyup.enter.native="obtenerServicios()"
v-model="search.numeroCuenta"
rounded
/>
</b-field>
<b-field class="column" label="Nombre">
<b-input
type="name"
placeholder="Nombre"
icon="account"
@keyup.enter.native="obtenerServicios()"
v-model="search.nombre"
rounded
/>
</b-field>
<b-field class="column" label="Status">
<b-select icon="information" v-model="search.idStatus" expanded rounded>
<option value="">Status</option>
<option
v-for="(s, i) in status"
:key="i"
:value="s.idStatus"
v-show="i < 9"
>
{{ s.status }}
</option>
</b-select>
</b-field>
<b-field class="column is-align-self-center">
<b-button type="is-info" @click="obtenerServicios()" expanded rounded>
Buscar
</b-button>
</b-field>
</div>
<TablaServiciosSociales
:columnaFechaCreado="false"
:columnasResponsable="true"
:isLoading="isLoading"
:idTipoUsuario="responsable.idTipoUsuario"
:page="page"
:total="total"
:data="data"
:onPageChange="onPageChange"
/>
</div>
</template>
<script>
import axios from 'axios'
import TablaServiciosSociales from '@/components/TablaServiciosSociales'
export default {
components: {
TablaServiciosSociales,
},
props: {
responsable: { type: Object, required: true },
imprimirError: { type: Function, required: true },
},
data() {
return {
isLoading: false,
page: 1,
total: 0,
data: [],
status: [],
search: {
idStatus: '',
},
searchAnterior: {},
}
},
methods: {
onPageChange(page) {
this.page = page
this.obtenerServicios()
},
obtenerServicios() {
let data = ''
this.isLoading = true
if (
this.search.numeroCuenta != this.searchAnterior.numeroCuenta ||
this.search.nombre != this.searchAnterior.nombre ||
this.search.idStatus != this.searchAnterior.idStatus
) {
this.page = 1
this.searchAnterior.numeroCuenta = this.search.numeroCuenta
this.searchAnterior.nombre = this.search.nombre
this.searchAnterior.idStatus = this.search.idStatus
}
if (this.search.idStatus) data += `&idStatus=${this.search.idStatus}`
if (this.search.nombre) data += `&nombre=${this.search.nombre}`
if (this.search.numeroCuenta)
data += `&numeroCuenta=${this.search.numeroCuenta}`
axios
.get(
`${process.env.api}/servicio/servicios_responsable?idUsuario=${this.responsable.idUsuario}&pagina=${this.page}${data}`,
this.responsable.token
)
.then((res) => {
this.data = res.data.serviciosResponsable
this.total = res.data.count
this.isLoading = false
})
.catch((err) => {
this.isLoading = false
this.imprimirError(err.response.data)
})
},
obtenerCatalogoStatus() {
axios
.get(`${process.env.api}/status`, this.responsable.token)
.then((res) => {
this.status = res.data
this.obtenerServicios()
})
.catch((err) => {
this.imprimirError(err.response.data)
})
},
},
created() {
if (this.responsable.idTipoUsuario === 2) this.obtenerCatalogoStatus()
},
}
</script>
<style scoped></style>
+96
View File
@@ -0,0 +1,96 @@
<template>
<div>
<b-field
:label="`Carta de ${tipoCarta} (en formato .pdf, no se aceptan fotos).`"
>
<b-upload accept="application/pdf" v-model="file" drag-drop expanded>
<div class="section has-text-centered">
<b-icon icon="upload" size="is-large" class="mb-2" />
<p class="is-size-5">
{{
file.name ||
'Arrastra aquí tu archivo o da click aquí para buscarlo.'
}}
</p>
<p class="is-size-6">Tamaño máximo 20MB</p>
</div>
</b-upload>
</b-field>
<b-field class="has-text-centered my-5">
<b-button
type="is-success"
:disabled="!file.name"
@click="
imprimirWarning(
`¿Estas seguro(a) de querer subir esta carta de ${tipoCarta}?`,
subir
)
"
>
Enviar
</b-button>
</b-field>
</div>
</template>
<script>
import axios from 'axios'
export default {
props: {
idServicio: { type: Number, required: true },
path: { type: String, required: true },
tipoCarta: { type: String, required: true },
variableName: { type: String, required: true },
responsable: { type: Object, required: true },
imprimirError: { type: Function, required: true },
imprimirMensaje: { type: Function, required: true },
imprimirWarning: { type: Function, required: true },
updateIsLoading: { type: Function, required: true },
},
data() {
return {
file: {},
}
},
methods: {
subir() {
const formData = new FormData()
const data = { idServicio: this.idServicio }
this.updateIsLoading(true)
formData.append('data', JSON.stringify(data))
formData.append(this.variableName, this.file)
axios
.put(
`${process.env.api}/servicio/${this.path}`,
formData,
this.responsable.tokenArchivo
)
.then((res) => {
localStorage.removeItem('idServicio')
this.updateIsLoading(false)
this.imprimirMensaje(res.data.message)
this.$router.push('/responsable')
})
.catch((err) => {
this.updateIsLoading(false)
this.imprimirerr(err.response.data)
})
},
},
watch: {
file() {
if (this.file.size >= 20000000) {
this.imprimirError({ message: 'El tamaño del archivo exede los 20MB' })
this.file = {}
}
},
},
}
</script>
<style scoped></style>
-189
View File
@@ -1,189 +0,0 @@
<template>
<div
v-if="idServicio != null && cartaAceptacion != null"
class="container footter"
>
<b-button
class="border-info mt-5"
type="is-info is-light"
icon-left="arrow-left-box"
tag="router-link"
to="/responsable"
>Regresar</b-button
>
<h3 class="title is-4 mt-4">
Carta de aceptación (en formato .PDF. No se aceptan fotos).
</h3>
<b-field>
<b-upload
v-model="file"
drag-drop
type="is-black"
expanded
accept="application/pdf"
>
<section class="section">
<div class="content has-text-centered">
<p>
<b-icon icon="upload" size="is-large"></b-icon>
</p>
<p>
{{
file.name || "Arrastra aquí tu archivo o da click para buscar"
}}
</p>
<p>Tamaño máximo para el archivo: 20MB</p>
</div>
</section>
</b-upload>
</b-field>
<b-field class="centro">
<b-button
:disabled="file == ''"
class="border-success my-5"
type="is-success"
@click="Enviar()"
>Enviar</b-button
>
</b-field>
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false">
</b-loading>
</div>
</template>
<script>
import axios from "axios";
export default {
data() {
return {
isFullPage: true,
file: [],
idServicio: "",
cartaAceptacion: "",
isLoading: false,
token: {
headers: {
token: window.localStorage.getItem("token"),
},
},
};
},
methods: {
validarTamaño() {
const TamMax = 20000000;
const archivo = this.file;
if (archivo.size > TamMax) {
this.toast();
this.file = "";
}
},
toast() {
this.$buefy.toast.open({
message: "El archivo excede el tamaño permitido",
type: "is-danger",
});
},
Enviar() {
const data = { idServicio: this.idServicio };
const formData = new FormData();
formData.append("data", JSON.stringify(data));
formData.append("cartaAceptacion", this.file);
this.isLoading = true;
axios
.put(`${process.env.api}/servicio/carta_aceptacion`, formData, {
headers: {
"Content-Type": "multipart/form-data",
token: this.token.headers.token,
},
})
.then((res) => {
this.$buefy.dialog.alert({
title: "Success",
message: "Se enviaron los datos correctamente",
type: "is-success",
hasIcon: true,
icon: "checkbox-marked-circle",
iconPack: "mdi",
ariaRole: "alertdialog",
ariaModal: true,
});
})
.catch((error) => {
this.error(error.response.data.message);
})
.finally(() => {
this.isLoading = false;
localStorage.removeItem("idServicio");
localStorage.removeItem("cartaAceptacion");
this.$router.push("/responsable");
});
},
getIdLocal() {
this.idServicio = localStorage.getItem("idServicio");
this.cartaAceptacion = localStorage.getItem("cartaAceptacion");
if (this.idServicio === null || this.cartaAceptacion === null) {
this.$router.push("/responsable");
}
},
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",
iconPack: "mdi",
ariaRole: "alertdialog",
ariaModal: true,
});
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
}
},
},
watch: {
file: function(newFile, oldFile) {
this.validarTamaño();
},
},
created() {
this.getIdLocal();
},
};
</script>
<style>
.centro {
text-align: center;
}
.footter {
margin-bottom: 10rem;
}
</style>
-190
View File
@@ -1,190 +0,0 @@
<template>
<div
v-if="idServicio != null && cartaTermino != null"
class="container footter"
>
<b-button
class="border-info mt-5"
type="is-info is-light"
icon-left="arrow-left-box"
tag="router-link"
to="/responsable"
>Regresar</b-button
>
<h3 class="title is-4 mt-4">
Carta de termino (en formato .PDF. No se aceptan fotos).
</h3>
<b-field>
<b-upload
v-model="file"
drag-drop
type="is-black"
expanded
accept="application/pdf"
>
<section class="section">
<div class="content has-text-centered">
<p>
<b-icon icon="upload" size="is-large"></b-icon>
</p>
<p>
{{
file.name || "Arrastra aquí tu archivo o da click para buscar"
}}
</p>
<p>Tamaño máximo para el archivo: 20MB</p>
</div>
</section>
</b-upload>
</b-field>
<b-field class="centro">
<b-button
:disabled="file == ''"
class="border-success my-5 is-medium"
type="is-success"
@click="Enviar()"
>
Enviar
</b-button>
</b-field>
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="true">
</b-loading>
</div>
</template>
<script>
import axios from "axios";
export default {
data() {
return {
isFullPage: true,
file: [],
idServicio: "",
cartaTermino: "",
isLoading: false,
token: {
headers: {
token: window.localStorage.getItem("token"),
},
},
};
},
methods: {
validarTamaño() {
const TamMax = 20000000;
const archivo = this.file;
if (archivo.size > TamMax) {
this.toast();
this.file = "";
}
},
toast() {
this.$buefy.toast.open({
message: "El archivo excede el tamaño permitido",
type: "is-danger",
});
},
Enviar() {
const data = { idServicio: this.idServicio };
const formData = new FormData();
formData.append("data", JSON.stringify(data));
formData.append("cartaTermino", this.file);
this.isLoading = true;
axios
.put(`${process.env.api}/servicio/carta_termino`, formData, {
headers: {
"Content-Type": "multipart/form-data",
token: this.token.headers.token,
},
})
.then((res) => {
this.$buefy.dialog.alert({
title: "Success",
message: "Se enviaron los datos correctamente",
type: "is-success",
hasIcon: true,
icon: "checkbox-marked-circle",
iconPack: "mdi",
ariaRole: "alertdialog",
ariaModal: true,
});
})
.catch((error) => {
this.error(error.response.data.message);
})
.finally(() => {
this.isLoading = false;
localStorage.removeItem("idServicio");
localStorage.removeItem("cartaTermino");
this.$router.push("/responsable");
});
},
getIdLocal() {
this.idServicio = localStorage.getItem("idServicio");
this.cartaTermino = localStorage.getItem("cartaTermino");
if (this.idServicio === null || this.cartaTermino === null) {
this.$router.push("/responsable");
}
},
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",
iconPack: "mdi",
ariaRole: "alertdialog",
ariaModal: true,
});
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
}
},
},
watch: {
file: function(newFile, oldFile) {
this.validarTamaño();
},
},
created() {
this.getIdLocal();
},
};
</script>
<style>
.centro {
text-align: center;
}
.footter {
margin-bottom: 10rem;
}
</style>
-287
View File
@@ -1,287 +0,0 @@
<template>
<div v-if="this.idServicio && this.cuestionario" class="container">
<div class="section">
<b-button
class="border-info mb-5"
type="is-info is-light"
icon-left="arrow-left-box"
tag="router-link"
to="/responsable"
>Regresar</b-button
>
<h1 class="title is-3 mt-2">
Estimad(a) responsable de programa de servicio social:
</h1>
<p>
Te solicitamos llenar cuidadosamente los campos solicitados a
continuación para poder validar el término del servicio social de
nuestro alumno(a)
</p>
</div>
<section class="section pt-0">
<h3 class="subtitle is-5">
Mencione 5 actividades desempeñadas por el alumno:
</h3>
<b-input
class="my-4"
placeholder="1.-"
v-model="actividad1"
maxlength="400"
></b-input>
<b-input
class="my-4"
placeholder="2.-"
v-model="actividad2"
maxlength="400"
></b-input>
<b-input
class="my-4"
placeholder="3.-"
v-model="actividad3"
maxlength="400"
></b-input>
<b-input
class="my-4"
placeholder="4.-"
v-model="actividad4"
maxlength="400"
></b-input>
<b-input
class="mt-3"
placeholder="5.-"
v-model="actividad5"
maxlength="400"
></b-input>
</section>
<section class="section pt-0">
<div class="columns">
<p class="column is- 9">
1. Conocimiento teóricos para las funciones encomendadas
</p>
<b-field class="column is-2">
<b-select placeholder="Seleccionar" v-model="retroalimentacion[0]">
<option value="1">Deficiente</option>
<option value="2">Regular</option>
<option value="3">Bueno</option>
<option value="4">Excelente</option>
</b-select>
</b-field>
</div>
<br />
<div class="columns">
<p class="column is- 9">
2. Conocimientos técnicos para las funciones encomendadas
</p>
<b-field class="column is-2">
<b-select placeholder="Seleccionar" v-model="retroalimentacion[1]">
<option value="1">Deficiente</option>
<option value="2">Regular</option>
<option value="3">Bueno</option>
<option value="4">Excelente</option>
</b-select>
</b-field>
</div>
<br />
<div class="columns">
<p class="column is- 9">
3. Iniciativa para la implementación de mejoras en la empresa
</p>
<b-field class="column is-2">
<b-select placeholder="Seleccionar" v-model="retroalimentacion[2]">
<option value="1">Deficiente</option>
<option value="2">Regular</option>
<option value="3">Bueno</option>
<option value="4">Excelente</option>
</b-select>
</b-field>
</div>
<br />
<div class="columns">
<p class="column is- 9">
4. Puntualidad en la entrega de los trabajos de las tareas
encomendadas
</p>
<b-field class="column is-2">
<b-select placeholder="Seleccionar" v-model="retroalimentacion[3]">
<option value="1">Deficiente</option>
<option value="2">Regular</option>
<option value="3">Bueno</option>
<option value="4">Excelente</option>
</b-select>
</b-field>
</div>
<br />
<div class="columns">
<p class="column is- 9">5. Desempeño general de sus funciones</p>
<b-field class="column is-2">
<b-select placeholder="Seleccionar" v-model="retroalimentacion[4]">
<option value="1">Deficiente</option>
<option value="2">Regular</option>
<option value="3">Bueno</option>
<option value="4">Excelente</option>
</b-select>
</b-field>
</div>
<p class="my-5">
6. De acuerdo a lo observado ¿cuáles considera que son las cualidades de
nuestros alumnos de esta licenciatura?
</p>
<b-input placeholder="Respuesta" maxlength="800" v-model="p6"></b-input>
<p class="my-5">
7. De acuerdo a lo observado ¿cuáles considera que son los aspectos a
mejorar en la formación de nuestros alumnos de esta licenciatura?
</p>
<b-input placeholder="Respuesta" maxlength="800" v-model="p7"></b-input>
<b-field class="centro">
<b-button
:disabled="
actividad1 == '' ||
actividad2 == '' ||
actividad3 == '' ||
actividad4 == '' ||
actividad5 == '' ||
retroalimentacion.length < 5 ||
p6 == '' ||
p7 == ''
"
class="border-success my-5"
type="is-success"
@click="enviarCuestionario()"
>Enviar</b-button
>
</b-field>
</section>
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="true">
</b-loading>
</div>
</template>
<script>
import axios from "axios";
export default {
data() {
return {
idServicio: localStorage.getItem("idServicio"),
cuestionario: "",
isLoading: false,
actividad1: "",
actividad2: "",
actividad3: "",
actividad4: "",
actividad5: "",
retroalimentacion: [],
p6: "",
p7: "",
token: {
headers: {
token: window.localStorage.getItem("token"),
},
},
};
},
methods: {
enviarCuestionario() {
const data = {
idServicio: this.idServicio,
actividad1: this.actividad1,
actividad2: this.actividad2,
actividad3: this.actividad3,
actividad4: this.actividad4,
actividad5: this.actividad5,
retroalimentacion: this.retroalimentacion,
p6: this.p6,
p7: this.p7,
idServicio: this.idServicio,
};
this.isLoading = true;
axios
.post(`${process.env.api}/cuestionario_programa`, 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",
iconPack: "mdi",
ariaRole: "alertdialog",
ariaModal: true,
});
})
.catch((error) => {
this.error(error.response.data.message);
})
.finally(() => {
this.isLoading = false;
localStorage.removeItem("idServicio");
localStorage.removeItem("cuestionario");
this.$router.push("/responsable");
});
},
getIdLocal() {
this.idServicio = localStorage.getItem("idServicio");
this.cuestionario = localStorage.getItem("cuestionario");
if (this.idServicio === null || this.cuestionario === null) {
this.$router.push("/responsable");
}
},
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",
iconPack: "mdi",
ariaRole: "alertdialog",
ariaModal: true,
});
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
}
},
},
created() {
this.getIdLocal();
},
};
</script>
<style>
.centro {
text-align: center;
}
</style>
@@ -1,508 +0,0 @@
<template>
<section>
<h1 class="title is-1 titleAnadir">
Añadir Servicio Social
</h1>
<div
class="columns is-variable is-1-mobile is-0-tablet is-3-desktop is-8-widescreen is-2-fullhd pl-0"
>
<div class="column pl-0">
<form>
<b-field class="column p-0 my-5 is-full">
<input
class="input column "
v-model="noCuenta"
message="Solo numeros"
required="required"
maxlength="9"
type="number"
placeholder="Cuenta"
min="0"
/>
<p class="control">
<b-button class="button is-info" @click="buscarAlumno()"
>Buscar</b-button
>
</p>
</b-field>
<b-field label="Nombre">
<div class="input">{{ alumno.nombre }}</div>
</b-field>
<b-field label="Carrera">
<div class="input">{{ alumno.carrera }}</div>
</b-field>
<b-field label="Créditos">
<div class="input">
{{ alumno.creditos }}<span v-if="alumno.creditos">%</span>
</div>
</b-field>
<b-field label="Seleccione programa">
<b-select
placeholder="Seleccionar"
expanded
v-model="programaSelectedID"
>
<option value="">Seleccionar</option>
<option
v-for="programa in programas"
v-bind:key="programa.idPrograma"
:value="programa.idPrograma"
>{{ programa.programa }}</option
>
</b-select>
</b-field>
<b-field label="Institución">
<div class="input">{{ programaSelected.institucion }}</div>
</b-field>
<b-field label="Dependencia">
<div class="input">{{ programaSelected.dependencia }}</div>
</b-field>
<b-field label="Clave del programa">
<div class="input">{{ programaSelected.clavePrograma }}</div>
</b-field>
<div v-if="programaSelected.acatlan == true">
<b-field label="Programa interno">
<b-input
v-model="programaSelected.programaInterno"
placeholder="Programa interno"
></b-input>
</b-field>
<b-field label="Profesor/Responsable de Programa">
<b-input
v-model="programaSelected.profesor"
placeholder="Profesor/Responsable de Programa"
></b-input>
</b-field>
</div>
<b-field label="Fecha de inicio">
<b-datepicker
placeholder="Inicio"
icon="calendar-today"
v-model="alumno.inicio"
:min-date="minDate"
>
</b-datepicker>
</b-field>
<b-field label="Fecha de fin" v-if="alumno.inicio">
<b-datepicker
placeholder="Fin"
v-model="alumno.fin"
:min-date="minDate2"
icon="calendar-today"
>
</b-datepicker>
</b-field>
<b-field label="Correo">
<b-input
placeholder="Email"
type="email"
v-model="alumno.correo"
></b-input>
</b-field>
<h3 class="title is-4 mt-6">
Carta de aceptación (en formato .PDF. No se aceptan fotos).
</h3>
<b-field>
<b-upload
v-model="file"
drag-drop
type="is-black"
expanded
accept="application/pdf"
>
<section class="section">
<div class="content has-text-centered">
<p>
<b-icon icon="upload" size="is-large"></b-icon>
</p>
<p>
{{
file.name ||
"Arrastra aquí tu archivo o da click para buscar"
}}
</p>
<p>Tamaño máximo 20MB</p>
</div>
</section>
</b-upload>
</b-field>
</form>
<div class="my-6">
<b-button
tag="router-link"
to="/responsable"
type="is-info is-light "
icon-left="arrow-left-box"
class="border-info"
style="float: left;"
size="is-mediumm"
>
Regresar
</b-button>
<!-- <BotonRegresar :path="'/responsable'" /> -->
<b-field class="derecha">
<button
:disabled="disabled()"
class="button enviar is-success is-mediumm"
@click="Enviar()"
>
Enviar
</button>
</b-field>
</div>
</div>
</div>
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
</section>
</template>
<script>
import "buefy/dist/buefy.css";
import validator from "validator";
import axios from "axios";
import moment from "moment";
export default {
data() {
return {
token: {
headers: {
token: window.localStorage.getItem("token"),
},
},
isLoading: false,
noCuenta: "",
sizeOk: "",
searched: false,
minDate: new Date(),
programaSelectedID: "",
file: [],
programas: [],
programaSelected: {
idPrograma: null,
institucion: "",
dependencia: "",
programa: "",
clavePrograma: "",
acatlan: "",
activo: "",
idUsuario: "",
programaInterno: "",
profesor: "",
},
alumno: {
cuenta: "",
nombre: "",
carrera: "",
creditos: "",
idAlumno: "",
idCarrera: "",
inicio: [],
fin: [],
correo: "",
},
};
},
methods: {
reset() {
this.programaSelected.idPrograma = "";
this.programaSelected.institucion = "";
this.programaSelected.dependencia = "";
this.programaSelected.programa = "";
this.programaSelected.clavePrograma = "";
this.programaSelected.acatlan = "";
this.programaSelected.activo = "";
this.programaSelected.idUsuario = "";
this.programaSelected.programaInterno = "";
this.programaSelected.profesor = "";
this.alumno.cuenta = "";
this.alumno.nombre = "";
this.alumno.creditos = "";
this.alumno.carrera = "";
this.alumno.idAlumno = "";
this.alumno.idCarrera = "";
this.alumno.correo = "";
this.alumno.inicio = [];
this.alumno.fin = [];
this.noCuenta = "";
this.file = [];
this.programaSelectedID = "";
},
disabled() {
if (this.programaSelected.acatlan == false) {
if (
this.file != "" &&
this.noCuenta != "" &&
this.alumno.correo != "" &&
this.alumno.inicio != "" &&
this.alumno.fin != "" &&
this.programaSelectedID != ""
)
return false;
else return true;
} else {
if (
this.file != "" &&
this.noCuenta != "" &&
this.alumno.correo != "" &&
this.alumno.inicio != "" &&
this.alumno.fin != "" &&
this.programaSelectedID != "" &&
this.programaSelected.programaInterno != "" &&
this.programaSelected.profesor != ""
)
return false;
else return true;
}
},
esNumero(numero) {
const ultimaLetra = numero.length - 1;
if (numero && !validator.isNumeric(numero[ultimaLetra])) {
return numero.substr(0, ultimaLetra);
}
return numero;
},
maxLength(str, max) {
if (str.length > max) return str.substr(0, max);
return str;
},
correoValidado() {
if (validator.isEmail(this.alumno.correo)) {
return "";
}
},
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",
iconPack: "mdi",
ariaRole: "alertdialog",
ariaModal: true,
});
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
}
},
buscarAlumno() {
this.isLoading = true;
axios
.get(
`${process.env.api}/usuario/escolares?numeroCuenta=${this.noCuenta}`,
this.token
)
.then((resp) => {
this.alumno.cuenta = this.noCuenta;
this.alumno.nombre = resp.data.nombre;
this.alumno.carrera = resp.data.carrera;
this.alumno.creditos = parseInt(resp.data.creditos, 10);
this.alumno.idCarrera = resp.data.idCarrera;
this.alumno.idAlumno = resp.data.idUsuario;
this.searched = true;
})
.catch((error) => {
this.error(error.response.data.message);
})
.finally(() => {
this.isLoading = false;
});
},
Enviar() {
this.isLoading = true;
const data = {
idUsuario: this.alumno.idAlumno,
idPrograma: this.programaSelected.idPrograma,
idCarrera: this.alumno.idCarrera,
numeroCuenta: this.alumno.cuenta,
creditos: this.alumno.creditos.toString(),
correo: this.alumno.correo,
programaInterno: this.programaSelected.programaInterno,
profesor: this.programaSelected.profesor,
fechaInicio: moment(this.alumno.inicio),
fechaFin: moment(this.alumno.fin),
};
const formData = new FormData();
formData.append("alumno", JSON.stringify(data));
formData.append("cartaAceptacion", this.file);
axios
.post(`${process.env.api}/servicio/nuevo`, formData, {
headers: {
"Content-Type": "multipart/form-data",
token: this.token.headers.token,
},
})
.then((res) => {
this.$buefy.dialog.alert({
title: "Success",
message: "Se enviaron los datos correctamente",
type: "is-success",
hasIcon: true,
icon: "checkbox-marked-circle",
iconPack: "mdi",
ariaRole: "alertdialog",
ariaModal: true,
});
this.reset();
})
.catch((error) => {
this.error(error.response.data.message);
})
.finally(() => {
this.isLoading = false;
});
},
},
watch: {
noCuenta() {
if (this.searched === false) {
this.noCuenta = Number(this.noCuenta) < 0 ? "" : this.noCuenta;
this.noCuenta = this.esNumero(this.noCuenta);
this.noCuenta = this.maxLength(this.noCuenta, 9);
} else {
this.noCuenta = "";
this.searched = false;
this.reset();
}
},
programaSelectedID() {
if (this.programaSelectedID) {
for (let i = 0; i < this.programas.length; i++) {
if (this.programas[i].idPrograma === this.programaSelectedID) {
this.programaSelected.idPrograma = this.programas[i].idPrograma;
this.programaSelected.programa = this.programas[i].programa;
this.programaSelected.institucion = this.programas[i].institucion;
this.programaSelected.dependencia = this.programas[i].dependencia;
this.programaSelected.clavePrograma = this.programas[
i
].clavePrograma;
this.programaSelected.acatlan = this.programas[i].acatlan;
this.programaSelected.activo = this.programas[i].activo;
}
}
} else {
this.programaSelected.institucion = "";
this.programaSelected.dependencia = "";
this.programaSelected.programa = "";
this.programaSelected.clavePrograma = "";
this.programaSelected.acatlan = "";
this.programaSelected.activo = "";
//this.programaSelected.idUsuario = "";
this.programaSelected.programaInterno = "";
this.programaSelected.profesor = "";
}
},
file() {
if (this.file.size >= 20000000) {
this.$buefy.dialog.alert({
title: "Error",
message: "El tamaño del archivo exede los 20MB",
type: "is-danger",
hasIcon: true,
icon: "alert-circle",
iconPack: "mdi",
ariaRole: "alertdialog",
ariaModal: true,
});
this.file = [];
}
},
"alumno.inicio"() {
this.alumno.fin = [];
},
},
mounted() {
axios
.get(
`${
process.env.api
}/programa/programas_responsable?idUsuario=${localStorage.getItem(
"idUsuario"
)}`,
this.token
)
.then((resp) => {
this.programas = resp.data;
})
.catch((error) => {
this.error(error.response.data.message);
});
this.minDate.setDate(this.minDate.getDate() - 16);
},
computed: {
minDate2() {
const min = new Date(this.alumno.inicio);
return new Date(min.getFullYear(), min.getMonth() + 6, min.getDate());
},
},
};
</script>
<style scoped>
.titleAnadir,
pre {
margin: 4rem 0 0rem 0;
}
.derecha {
text-align: center;
}
.file-cta {
background-color: #167df0 !important;
}
.disabled {
cursor: help !important;
pointer-events: all !important;
}
.columns {
margin: 0;
}
@media (min-width: 600px) {
.derecha {
padding-right: 120px;
}
}
</style>
-426
View File
@@ -1,426 +0,0 @@
<template>
<div
v-if="this.idTipoUsuario == 2 && this.tipoUsuario == 'responsable'"
class="container"
>
<div class="columns">
<div class="column is-3 mb-0">
<b-field>
<b-input
placeholder="No.Cuenta"
icon="school"
rounded
v-model="numeroCuenta"
maxlength="9"
></b-input>
</b-field>
</div>
<div class="column is-3 mb-4 pb-4">
<b-field>
<b-input
type="name"
placeholder="Nombre"
icon="account"
rounded
v-model="nombre"
></b-input>
</b-field>
</div>
<div class="column is-3 mb-4 pb-4 ">
<b-field>
<b-select icon="information" expanded rounded v-model="idStatus">
<optgroup>
<option value="">Status</option>
<option value="1">Pre-Registro</option>
<option value="2">Pre-Registro Validado</option>
<option value="3">Registro</option>
<option value="4">Pre-Término</option>
<option value="5">Término</option>
<option value="6">Liberación</option>
<option value="7">Carta Aceptación Rechazada</option>
<option value="8">Carta Termino Rechazada</option>
<option value="9">Informe Global Rechazado</option>
</optgroup>
</b-select>
</b-field>
</div>
<div class="buttons section pt-3 pl-5">
<b-button type="is-info" @click="obtenerDatos(idStatus)">
Buscar
</b-button>
</div>
</div>
<div class="columns">
<section class="column is-12">
<b-table
:data="data"
:loading="isLoading"
hoverable
striped
paginated
backend-pagination
:total="total"
:per-page="perPage"
@page-change="onPageChange"
>
<b-table-column field="nombre" label="Nombre" v-slot="props" centered>
<span
class="cursorR"
v-if="props.row.idStatus == 7"
@click="cartaAceptacion(props.row.idServicio, props.row.idStatus)"
>{{ props.row.nombre }}</span
>
<span v-else>{{ props.row.nombre }}</span>
</b-table-column>
<b-table-column
field="numeroCuenta"
label="Número de Cuenta"
v-slot="props"
centered
width="100"
>
<span
class="cursorR"
v-if="props.row.idStatus == 7"
@click="cartaAceptacion(props.row.idServicio, props.row.idStatus)"
>{{ props.row.numeroCuenta }}</span
>
<span v-else>{{ props.row.numeroCuenta }}</span>
</b-table-column>
<b-table-column
field="carrera"
label="Carrera"
v-slot="props"
centered
>
<span
class="cursorR"
v-if="props.row.idStatus == 7"
@click="cartaAceptacion(props.row.idServicio, props.row.idStatus)"
>{{ props.row.carrera }}</span
>
<span v-else>{{ props.row.carrera }}</span>
</b-table-column>
<b-table-column
field="fechaInicio"
truncate="10"
label="Fecha Inicio"
v-slot="props"
centered
>
<span
class="cursorR"
v-if="props.row.idStatus == 7"
@click="cartaAceptacion(props.row.idServicio, props.row.idStatus)"
>{{ fecha(props.row.fechaInicio) }}</span
>
<span v-else>{{ fecha(props.row.fechaInicio) }}</span>
</b-table-column>
<b-table-column
field="fechaFin"
label="Fecha Fin"
v-slot="props"
centered
>
<span
class="cursorR"
v-if="props.row.idStatus == 7"
@click="cartaAceptacion(props.row.idServicio, props.row.idStatus)"
>{{ fecha(props.row.fechaFin) }}</span
>
<span v-else>{{ fecha(props.row.fechaFin) }}</span>
</b-table-column>
<b-table-column field="status" label="Status" v-slot="props" centered>
<span
v-if="props.row.idStatus == 7"
class="cursorR tag"
:class="types(props.row.idStatus)"
@click="cartaAceptacion(props.row.idServicio, props.row.idStatus)"
>{{ props.row.status }}</span
>
<span v-else class="tag" :class="types(props.row.idStatus)">{{
props.row.status
}}</span>
</b-table-column>
<b-table-column
field="cartaTermino"
label="Carta Término"
v-slot="props"
centered
v-if="idTipoUsuario == 2"
>
<div v-if="props.row.idStatus >= 4 && props.row.idStatus != 7">
<span v-if="props.row.cartaTermino">
<b-icon
:icon="iconoCarta(props.row.cartaTermino)"
class="tag is-success"
></b-icon>
</span>
<b-button
v-else
size="is-small"
@click="
botonCarta(props.row.cartaTermino, props.row.idServicio)
"
class="tag is-danger"
:icon="iconoCarta(props.row.cartaTermino)"
>
Carta Término
</b-button>
</div>
</b-table-column>
<b-table-column
field="cuestionario"
label="Cuestionario"
v-slot="props"
centered
v-if="idTipoUsuario == 2"
>
<div v-if="props.row.idStatus >= 4 && props.row.idStatus != 7">
<span v-if="props.row.cuestionario != null">
<b-icon
:icon="iconoCuestionario(props.row.cuestionario)"
class="tag is-success"
></b-icon>
</span>
<b-button
v-if="props.row.cuestionario === null"
size="is-small"
@click="
botonCuestionario(
props.row.cuestionario,
props.row.idServicio
)
"
class="tag is-danger"
:icon="iconoCuestionario(props.row.cuestionario)"
>
Cuestionario
</b-button>
</div>
</b-table-column>
</b-table>
</section>
</div>
</div>
</template>
<script>
import axios from "axios";
import moment from "moment";
export default {
data() {
return {
idTipoUsuario: "",
idUsuario: "",
tipoUsuario: "",
data: [],
total: "",
isLoading: false,
page: 1,
perPage: 25,
numeroCuenta: "",
nombre: "",
idStatus: "",
idServicio: "",
token: {
headers: {
token: window.localStorage.getItem("token"),
},
},
};
},
methods: {
onPageChange(page) {
this.page = page;
this.obtenerDatos();
},
types(idStatus) {
if (idStatus === 1) {
return "is-dark";
} else if (idStatus === 2) {
return "is-info";
} else if (idStatus === 3) {
return "is-warning";
} else if (idStatus === 4) {
return "is-link";
} else if (idStatus === 5) {
return "is-success";
} else if (idStatus === 6) {
return "is-success is-light";
} else if (idStatus === 7) {
return "is-danger";
} else if (idStatus === 8) {
return "is-danger";
} else if (idStatus === 9) {
return "is-danger";
}
},
botonCarta(cartaTermino, idServicio) {
window.localStorage.setItem("idServicio", idServicio);
window.localStorage.setItem("cartaTermino", cartaTermino);
this.$router.push("/responsable/carta_termino");
if (cartaTermino === 1) {
return "is-success";
} else {
return "is-danger";
}
},
botonCuestionario(cuestionario, idServicio) {
window.localStorage.setItem("idServicio", idServicio);
window.localStorage.setItem("cuestionario", cuestionario);
this.$router.push("/responsable/cuestionario");
if (cuestionario === 1) {
return "is-success";
} else {
return "is-danger";
}
},
iconoCarta(cartaTermino) {
if (cartaTermino != null) {
return "check";
}
},
iconoCuestionario(cuestionario) {
if (cuestionario != null) {
return "check";
}
},
fecha(date) {
const fecha = moment(date.substr(0, 10));
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`;
},
obtenerDatos(idStatus) {
this.isLoading = true;
this.data = [];
axios
.get(
`${process.env.api}/servicio/servicios_responsable?idUsuario=${this.idUsuario}&pagina=${this.page}&idStatus=${this.idStatus}&nombre=${this.nombre}&numeroCuenta=${this.numeroCuenta}`,
this.token
)
.then((res) => {
const servicios = res.data.servicios;
if (servicios.length !== 0) {
for (let i = 0; i < servicios.length; i++) {
this.data.push({
nombre: servicios[i].Usuario.nombre,
numeroCuenta: servicios[i].Usuario.usuario,
carrera: servicios[i].Carrera.carrera,
fechaInicio: servicios[i].fechaInicio,
fechaFin: servicios[i].fechaFin,
status: servicios[i].Status.status,
idStatus: servicios[i].Status.idStatus,
cuestionario: servicios[i].idCuestionarioPrograma,
cartaTermino: servicios[i].cartaTermino,
idServicio: servicios[i].idServicio,
});
}
}
let currentTotal = servicios.length;
let contador;
for (let i = 0; i < res.data.registros / 25 + 1; i++) {
contador = i;
}
currentTotal = this.perPage * contador;
this.total = currentTotal;
})
.catch((error) => {
this.error(error.response.data.message);
})
.finally(() => {
this.isLoading = false;
});
},
cartaAceptacion(idServicio, idStatus) {
window.localStorage.setItem("idServicio", idServicio);
window.localStorage.setItem("cartaAceptacion", idStatus);
this.$router.push("/responsable/carta_aceptacion");
},
getIdLocal() {
this.idUsuario = localStorage.getItem("idUsuario");
this.idTipoUsuario = localStorage.getItem("idTipoUsuario");
this.tipoUsuario = localStorage.getItem("tipoUsuario");
if (this.idTipoUsuario != 2 && this.tipoUsuario != "responsable") {
localStorage.clear();
this.$router.push("/");
}
},
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",
iconPack: "mdi",
ariaRole: "alertdialog",
ariaModal: true,
});
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
}
},
},
created() {
this.getIdLocal();
this.obtenerDatos(0);
},
};
</script>
<style>
.input:focus {
border: #1b3d70;
box-shadow: 0 0 8px 0 #1b3d70;
}
.select select:focus {
border-color: #1b3d70;
box-shadow: 0 0 8px 0 #1b3d70;
}
.select:not(.is-multiple):not(.is-loading)::after {
border-color: #1b3d70;
}
.pagination-link.is-current {
background-color: #1b3d70;
border-color: #1b3d70;
}
.cursorR {
cursor: pointer;
}
</style>
-27
View File
@@ -1,27 +0,0 @@
<template>
<section class="mensaje has-text-justified is-size-6 ">
<p class="block is-size-5">
Estimado(a) responsable de programa de servicio social:
</p>
<p class="block ">
Te solicitamos llenar cuidadosamente los campos solicitados a continuación
para iniciar el trámite de registro de servicio social de nuestro
alumno(a), quien a su vez completará posteriormente el proceso en este
mismo sistema con otros datos.
</p>
<p class="block ">
Es muy importante escribir correctamente el correo del alumno para que el
sistema pueda enviarle la notificación correspondiente de que ya puede
ingresar a completar su registro. También debes tomar en cuenta que la
fecha de inicio NO se podrá modificar, sólo la fecha de término en caso de
que el alumno no cumpla las 480 horas en el periodo mínimo de 6 meses. Al
siguiente día de la fecha de término programada, se activará la opción de
cargar la carta de término y llenar el cuestionario de desempeño del
alumno. En caso de que exista algún error en los datos o cartas emitidas
se les notificará en este panel en cuanto el Departamento de Servicio
Social y Bolsa de Trabajo revise su solicitud, para que realicen la
corrección correspondiente.
</p>
</section>
</template>
View File
-9
View File
@@ -1,9 +0,0 @@
<!doctype html>
<html>
<head>
<title>servicio_social_front</title><meta data-n-head="1" charset="utf-8"><meta data-n-head="1" name="viewport" content="width=device-width,initial-scale=1"><meta data-n-head="1" data-hid="description" name="description" content=""><link data-n-head="1" rel="icon" type="image/x-icon" href="/favicon.ico"><link data-n-head="1" rel="stylesheet" type="text/css" href="//cdn.materialdesignicons.com/5.0.45/css/materialdesignicons.min.css"><link rel="preload" href="/_nuxt/e53a321.js" as="script"><link rel="preload" href="/_nuxt/df5b311.js" as="script"><link rel="preload" href="/_nuxt/9aa6f10.js" as="script"><link rel="preload" href="/_nuxt/7184dd6.js" as="script">
</head>
<body>
<div id="__nuxt"><style>#nuxt-loading{background:#fff;visibility:hidden;opacity:0;position:absolute;left:0;right:0;top:0;bottom:0;display:flex;justify-content:center;align-items:center;flex-direction:column;animation:nuxtLoadingIn 10s ease;-webkit-animation:nuxtLoadingIn 10s ease;animation-fill-mode:forwards;overflow:hidden}@keyframes nuxtLoadingIn{0%{visibility:hidden;opacity:0}20%{visibility:visible;opacity:0}100%{visibility:visible;opacity:1}}@-webkit-keyframes nuxtLoadingIn{0%{visibility:hidden;opacity:0}20%{visibility:visible;opacity:0}100%{visibility:visible;opacity:1}}#nuxt-loading>div,#nuxt-loading>div:after{border-radius:50%;width:5rem;height:5rem}#nuxt-loading>div{font-size:10px;position:relative;text-indent:-9999em;border:.5rem solid #f5f5f5;border-left:.5rem solid #000;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation:nuxtLoading 1.1s infinite linear;animation:nuxtLoading 1.1s infinite linear}#nuxt-loading.error>div{border-left:.5rem solid #ff4500;animation-duration:5s}@-webkit-keyframes nuxtLoading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes nuxtLoading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}</style><script>window.addEventListener("error",function(){var e=document.getElementById("nuxt-loading");e&&(e.className+=" error")})</script><div id="nuxt-loading" aria-live="polite" role="status"><div>Loading...</div></div></div><script>window.__NUXT__={config:{},staticAssetsBase:void 0}</script>
<script src="/_nuxt/e53a321.js"></script><script src="/_nuxt/df5b311.js"></script><script src="/_nuxt/9aa6f10.js"></script><script src="/_nuxt/7184dd6.js"></script></body>
</html>
-1
View File
File diff suppressed because one or more lines are too long
-1
View File
File diff suppressed because one or more lines are too long
-1
View File
File diff suppressed because one or more lines are too long
-1
View File
File diff suppressed because one or more lines are too long
-1
View File
File diff suppressed because one or more lines are too long
-1
View File
File diff suppressed because one or more lines are too long
-1
View File
File diff suppressed because one or more lines are too long
-1
View File
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{241:function(e,t,r){"use strict";r.r(t);var o={props:{path:String,deleteFromLocalStorage:Array},methods:{regresar:function(){if(this.deleteFromLocalStorage)for(var i=0;i<this.deleteFromLocalStorage.length;i++)localStorage.removeItem(this.deleteFromLocalStorage[i]);this.$router.push(this.path)}}},n=r(8),component=Object(n.a)(o,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("b-button",{staticClass:"boton border-info my-5",attrs:{type:"is-info is-light ","icon-left":"arrow-left-box"},on:{click:function(t){return e.regresar()}}},[e._v("\n Regresar\n")])}),[],!1,null,null,null);t.default=component.exports},431:function(e,t,r){var content=r(571);"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,r(27).default)("37987058",content,!0,{sourceMap:!1})},570:function(e,t,r){"use strict";r(431)},571:function(e,t,r){(t=r(26)(!1)).push([e.i,".programa[data-v-242c55e7]{margin-right:20px;padding-right:20px}",""]),e.exports=t},594:function(e,t,r){"use strict";r.r(t);r(108);var o=r(44),n=r.n(o),c={components:{botonRegresar:r(241).default},data:function(){return{idResponsable:localStorage.getItem("idResponsable"),correo:localStorage.getItem("correo"),nombre:localStorage.getItem("nombre"),programas:[],selected:{},token:{headers:{token:window.localStorage.getItem("token")}}}},methods:{obtenerProgramas:function(){var e=this;return n.a.get("".concat("https://venus.acatlan.unam.mx/ss-pruebas","/programa/programas_admin?idUsuario=").concat(this.idResponsable),this.token).then((function(t){e.programas=t.data})).catch((function(t){e.error(t.response.data.message)}))},error:function(e){var t=!1;switch(e){case"invalid signature":e="Tu token no es valido, inicia sesión de nuevo.",t=!0;break;case"jwt expired":e="Tu sesión ha expirado, inicia sesión de nuevo.",t=!0;break;case"jwt malformed":e="No se encontro tu token, inicia sesión de nuevo.",t=!0;break;case"No hay token":e="Ocurrio un error al enviar tu token, inicia sesión de nuevo.",t=!0}this.$buefy.dialog.alert({title:"Error",message:e,type:"is-danger",hasIcon:!0,icon:"alert-circle",iconPack:"mdi",ariaRole:"alertdialog",ariaModal:!0}),1==t&&(localStorage.clear(),this.$router.push("/"))}},created:function(){this.obtenerProgramas()},beforeCreate:function(){localStorage.getItem("idResponsable")||this.$router.push("/admin/programa")}},l=(r(570),r(8)),component=Object(l.a)(c,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"container"},[r("BotonRegresar",{attrs:{path:"/admin/programa",deleteFromLocalStorage:["correo","idResponsable","nombre"]}}),e._v(" "),r("p",{staticClass:"is-size-2 mb-4"},[e._v("Información del responsable")]),e._v(" "),r("p",{staticClass:"is-size-4 mb-4"},[r("strong",[e._v("Nombre: ")]),e._v(" "+e._s(e.nombre))]),e._v(" "),r("p",{staticClass:"is-size-4 mb-4"},[r("strong",[e._v("Correo: ")]),e._v(" "+e._s(e.correo))]),e._v(" "),r("div",{staticClass:"columns"},[e._m(0),e._v(" "),r("b-select",{staticClass:"column",attrs:{placeholder:"Elija una clave: "},model:{value:e.selected,callback:function(t){e.selected=t},expression:"selected"}},e._l(e.programas,(function(t){return r("option",{key:t.id,domProps:{value:t}},[e._v("\n "+e._s(t.clavePrograma)+"\n ")])})),0)],1),e._v(" "),r("p",{staticClass:"is-size-4 mb-4"},[r("strong",[e._v("Programa: ")]),e._v(" "+e._s(e.selected.programa)+"\n ")]),e._v(" "),r("p",{staticClass:"is-size-4 mb-4"},[r("strong",[e._v("Institución: ")]),e._v(" "+e._s(e.selected.institucion)+"\n ")]),e._v(" "),r("p",{staticClass:"is-size-4 mb-4"},[r("strong",[e._v("Dependencia: ")]),e._v(" "+e._s(e.selected.dependencia)+"\n ")]),e._v(" "),r("div",{},[r("b-button",{staticClass:"boton is-info my-5",attrs:{tag:"router-link",to:"/admin/programa/infoResponsable/modificar"}},[e._v("\n Editar información\n ")])],1),e._v(" "),r("BotonRegresar",{attrs:{path:"/admin/programa",deleteFromLocalStorage:["correo","idResponsable","nombre"]}})],1)}),[function(){var e=this.$createElement,t=this._self._c||e;return t("p",{staticClass:"is-size-4 column is-narrow",staticStyle:{width:"250px"}},[t("strong",[this._v("Clave de programa: ")])])}],!1,null,"242c55e7",null);t.default=component.exports;installComponents(component,{BotonRegresar:r(241).default})}}]);
-1
View File
File diff suppressed because one or more lines are too long
-2
View File
File diff suppressed because one or more lines are too long
-1
View File
File diff suppressed because one or more lines are too long
-27
View File
@@ -1,27 +0,0 @@
/*!
* vue-router v3.4.9
* (c) 2020 Evan You
* @license MIT
*/
/*!
* Vue.js v2.6.12
* (c) 2014-2020 Evan You
* Released under the MIT License.
*/
/*!
* vue-client-only v2.0.0
* (c) 2019-present egoist <0x142857@gmail.com>
* Released under the MIT License.
*/
/*!
* vue-no-ssr v1.1.1
* (c) 2018-present egoist <0x142857@gmail.com>
* Released under the MIT License.
*/
//! moment.js
//! moment.js locale configuration
-1
View File
File diff suppressed because one or more lines are too long
-1
View File
File diff suppressed because one or more lines are too long
-1
View File
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{241:function(e,o,t){"use strict";t.r(o);var n={props:{path:String,deleteFromLocalStorage:Array},methods:{regresar:function(){if(this.deleteFromLocalStorage)for(var i=0;i<this.deleteFromLocalStorage.length;i++)localStorage.removeItem(this.deleteFromLocalStorage[i]);this.$router.push(this.path)}}},r=t(8),component=Object(r.a)(n,(function(){var e=this,o=e.$createElement;return(e._self._c||o)("b-button",{staticClass:"boton border-info my-5",attrs:{type:"is-info is-light ","icon-left":"arrow-left-box"},on:{click:function(o){return e.regresar()}}},[e._v("\n Regresar\n")])}),[],!1,null,null,null);o.default=component.exports},597:function(e,o,t){"use strict";t.r(o);t(16);var n=t(383),r=t.n(n),c=t(241),l=t(44),d=t.n(l),m={components:{botonRegresar:c.default},data:function(){return{idResponsable:localStorage.getItem("idResponsable"),viejo:{nombre:localStorage.getItem("nombre"),correo:localStorage.getItem("correo")},nuevo:{nombre:"",correo:""},idServicio:localStorage.getItem("idServicio"),token:{headers:{token:window.localStorage.getItem("token")}},isLoading:!1}},methods:{mostrar:function(){if(r.a.isEmail(this.nuevo.correo)||this.nuevo.nombre)return!this.nuevo.correo||!!r.a.isEmail(this.nuevo.correo)},actualizar:function(){var e=this,data={idUsuario:this.idResponsable};this.isLoading=!0,this.nuevo.correo&&(data.correo=this.nuevo.correo),this.nuevo.nombre&&(data.nombre=this.nuevo.nombre),d.a.put("".concat("https://venus.acatlan.unam.mx/ss-pruebas","/usuario/responsable/update"),data,this.token).then((function(o){e.isLoading=!1,e.toast(),e.$router.push("/admin/programa")})).catch((function(o){e.isLoading=!1,e.error(o.response.data.message)}))},passwordDialog:function(){var e=this;this.$buefy.dialog.confirm({title:"Actualizar datos",message:"¿Seguro(a) que quiere actualizar la contraseña?",confirmText:"Confirmar",cancelText:"Cancelar",type:"is-success",hasIcon:!0,onConfirm:function(){return e.password()}})},password:function(){var e=this;this.isLoading=!0;var data={idUsuario:this.idResponsable};d.a.put("".concat("https://venus.acatlan.unam.mx/ss-pruebas","/usuario/new_password_responsable"),data,this.token).then((function(o){e.$buefy.toast.open({message:"Se ha enviado el correo con la nueva contraseña",type:"is-success"}),e.$router.push("/admin")})).catch((function(o){e.error(o.response.data.message)})).finally((function(){e.isLoading=!1}))},toast:function(){this.$buefy.toast.open({message:"Se han actualizado los datos del responsable",type:"is-success"})},error:function(e){var o=!1;switch(e){case"invalid signature":e="Tu token no es valido, inicia sesión de nuevo.",o=!0;break;case"jwt expired":e="Tu sesión ha expirado, inicia sesión de nuevo.",o=!0;break;case"jwt malformed":e="No se encontro tu token, inicia sesión de nuevo.",o=!0;break;case"No hay token":e="Ocurrio un error al enviar tu token, inicia sesión de nuevo.",o=!0}this.$buefy.dialog.alert({title:"Error",message:e,type:"is-danger",hasIcon:!0,icon:"alert-circle",iconPack:"mdi",ariaRole:"alertdialog",ariaModal:!0}),1==o&&(localStorage.clear(),this.$router.push("/"))}},beforeCreate:function(){localStorage.getItem("idResponsable")||this.$router.push("/admin/programa")}},h=t(8),component=Object(h.a)(m,(function(){var e=this,o=e.$createElement,t=e._self._c||o;return t("div",{staticClass:"container",staticStyle:{"margin-bottom":"10%","margin-top":"2%"}},[t("BotonRegresar",{attrs:{path:"/admin/programa/infoResponsable"}}),e._v(" "),t("p",{staticClass:"is-size-2"},[e._v("Editar información del responsable")]),e._v(" "),t("b-field",{attrs:{label:"Nombre"}},[t("b-input",{attrs:{type:"text",placeholder:e.viejo.nombre},model:{value:e.nuevo.nombre,callback:function(o){e.$set(e.nuevo,"nombre",o)},expression:"nuevo.nombre"}})],1),e._v(" "),t("b-field",{attrs:{label:"Correo eletrónico"}},[t("b-input",{attrs:{type:"email",placeholder:e.viejo.correo},model:{value:e.nuevo.correo,callback:function(o){e.$set(e.nuevo,"correo",o)},expression:"nuevo.correo"}})],1),e._v(" "),e.mostrar()?t("b-button",{staticClass:"boton is-info my-5",on:{click:function(o){return e.actualizar()}}},[e._v("\n Editar responsable\n ")]):t("b-button",{staticClass:"boton is-info my-5",attrs:{disabled:""}},[e._v("\n Editar responsable\n ")]),e._v(" "),t("b-button",{staticClass:"is-info my-5",on:{click:function(o){return e.passwordDialog()}}},[e._v("\n Cambiar contraseña\n ")]),e._v(" "),t("b-loading",{attrs:{"is-full-page":!0,"can-cancel":!1},model:{value:e.isLoading,callback:function(o){e.isLoading=o},expression:"isLoading"}})],1)}),[],!1,null,null,null);o.default=component.exports;installComponents(component,{BotonRegresar:t(241).default})}}]);
-1
View File
@@ -1 +0,0 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{389:function(e,t,o){var content=o(397);"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,o(27).default)("661b075c",content,!0,{sourceMap:!1})},396:function(e,t,o){"use strict";o(389)},397:function(e,t,o){(t=o(26)(!1)).push([e.i,".centro{text-align:center}.footter{margin-bottom:10rem}",""]),e.exports=t},400:function(e,t,o){"use strict";o(16);var n=o(44),r=o.n(n),c={data:function(){return{isFullPage:!0,file:[],idServicio:"",cartaTermino:"",isLoading:!1,token:{headers:{token:window.localStorage.getItem("token")}}}},methods:{"validarTamaño":function(){this.file.size>2e7&&(this.toast(),this.file="")},toast:function(){this.$buefy.toast.open({message:"El archivo excede el tamaño permitido",type:"is-danger"})},Enviar:function(){var e=this,data={idServicio:this.idServicio},t=new FormData;t.append("data",JSON.stringify(data)),t.append("cartaTermino",this.file),this.isLoading=!0,r.a.put("".concat("https://venus.acatlan.unam.mx/ss-pruebas","/servicio/carta_termino"),t,{headers:{"Content-Type":"multipart/form-data",token:this.token.headers.token}}).then((function(t){e.$buefy.dialog.alert({title:"Success",message:"Se enviaron los datos correctamente",type:"is-success",hasIcon:!0,icon:"checkbox-marked-circle",iconPack:"mdi",ariaRole:"alertdialog",ariaModal:!0})})).catch((function(t){e.error(t.response.data.message)})).finally((function(){e.isLoading=!1,localStorage.removeItem("idServicio"),localStorage.removeItem("cartaTermino"),e.$router.push("/responsable")}))},getIdLocal:function(){this.idServicio=localStorage.getItem("idServicio"),this.cartaTermino=localStorage.getItem("cartaTermino"),null!==this.idServicio&&null!==this.cartaTermino||this.$router.push("/responsable")},error:function(e){var t=!1;switch(e){case"invalid signature":e="Tu token no es valido, inicia sesión de nuevo.",t=!0;break;case"jwt expired":e="Tu sesión ha expirado, inicia sesión de nuevo.",t=!0;break;case"jwt malformed":e="No se encontro tu token, inicia sesión de nuevo.",t=!0;break;case"No hay token":e="Ocurrio un error al enviar tu token, inicia sesión de nuevo.",t=!0}this.$buefy.dialog.alert({title:"Error",message:e,type:"is-danger",hasIcon:!0,icon:"alert-circle",iconPack:"mdi",ariaRole:"alertdialog",ariaModal:!0}),1==t&&(localStorage.clear(),this.$router.push("/"))}},watch:{file:function(e,t){this.validarTamaño()}},created:function(){this.getIdLocal()}},l=(o(396),o(8)),component=Object(l.a)(c,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return null!=e.idServicio&&null!=e.cartaTermino?o("div",{staticClass:"container footter"},[o("b-button",{staticClass:"border-info mt-5",attrs:{type:"is-info is-light","icon-left":"arrow-left-box",tag:"router-link",to:"/responsable"}},[e._v("Regresar")]),e._v(" "),o("h3",{staticClass:"title is-4 mt-4"},[e._v("\n Carta de termino (en formato .PDF. No se aceptan fotos).\n ")]),e._v(" "),o("b-field",[o("b-upload",{attrs:{"drag-drop":"",type:"is-black",expanded:"",accept:"application/pdf"},model:{value:e.file,callback:function(t){e.file=t},expression:"file"}},[o("section",{staticClass:"section"},[o("div",{staticClass:"content has-text-centered"},[o("p",[o("b-icon",{attrs:{icon:"upload",size:"is-large"}})],1),e._v(" "),o("p",[e._v("\n "+e._s(e.file.name||"Arrastra aquí tu archivo o da click para buscar")+"\n ")]),e._v(" "),o("p",[e._v("Tamaño máximo para el archivo: 20MB")])])])])],1),e._v(" "),o("b-field",{staticClass:"centro"},[o("b-button",{staticClass:"border-success my-5 is-medium",attrs:{disabled:""==e.file,type:"is-success"},on:{click:function(t){return e.Enviar()}}},[e._v("\n Enviar\n ")])],1),e._v(" "),o("b-loading",{attrs:{"is-full-page":!0,"can-cancel":!0},model:{value:e.isLoading,callback:function(t){e.isLoading=t},expression:"isLoading"}})],1):e._e()}),[],!1,null,null,null);t.a=component.exports},591:function(e,t,o){"use strict";o.r(t);var n={components:{cartaTermino:o(400).a}},r=o(8),component=Object(r.a)(n,(function(){var e=this.$createElement,t=this._self._c||e;return t("section",[t("cartaTermino")],1)}),[],!1,null,null,null);t.default=component.exports}}]);
-1
View File
File diff suppressed because one or more lines are too long
-2
View File
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{378:function(t,o){t.exports="\t\n\v\f\r    \u2028\u2029\ufeff"},380:function(t,o,e){var r=e(15),n="["+e(378)+"]",c=RegExp("^"+n+n+"*"),l=RegExp(n+n+"*$"),d=function(t){return function(o){var e=String(r(o));return 1&t&&(e=e.replace(c,"")),2&t&&(e=e.replace(l,"")),e}};t.exports={start:d(1),end:d(2),trim:d(3)}},433:function(t,o,e){var content=e(577);"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,e(27).default)("25a36bf4",content,!0,{sourceMap:!1})},574:function(t,o,e){"use strict";var r=e(2),n=e(380).trim;r({target:"String",proto:!0,forced:e(575)("trim")},{trim:function(){return n(this)}})},575:function(t,o,e){var r=e(5),n=e(378);t.exports=function(t){return r((function(){return!!n[t]()||"​…᠎"!="​…᠎"[t]()||n[t].name!==t}))}},576:function(t,o,e){"use strict";e(433)},577:function(t,o,e){(o=e(26)(!1)).push([t.i,"footer[data-v-cf943d08][data-v-204a720e]{display:none!important}.fix[data-v-204a720e]{height:85vh;display:flex;justify-content:center;align-items:center}.cont[data-v-204a720e]{height:auto;padding:0 1rem}.cont *[data-v-204a720e]{margin:1rem 0}.center[data-v-204a720e]{text-align:center}.columns[data-v-204a720e]{margin:0}",""]),t.exports=o},598:function(t,o,e){"use strict";e.r(o);e(16),e(574);var r=e(383),n=e.n(r),c=e(44),l=e.n(c),d={data:function(){return{usuario:"",password:"",error:!1,isLoading:!1}},methods:{usuarioValido:function(){return this.usuario||(this.error=!0),n.a.isNumeric(this.usuario,{no_symbols:!0})?(this.usuario.length,""):n.a.isEmail(this.usuario)||n.a.isAlpha(this.usuario)?"":void(this.error=!0)},enviar:function(){var t=this;this.isLoading=!0;var data={usuario:this.usuario.trim(),password:this.password};l.a.post("".concat("https://venus.acatlan.unam.mx/ss-pruebas","/usuario/login"),data).then((function(o){window.localStorage.setItem("idUsuario",o.data.Usuario.idUsuario),window.localStorage.setItem("token",o.data.token),window.localStorage.setItem("nombre",o.data.Usuario.nombre),window.localStorage.setItem("idTipoUsuario",o.data.Usuario.TipoUsuario.idTipoUsuario),window.localStorage.setItem("tipoUsuario",o.data.Usuario.TipoUsuario.tipoUsuario),window.localStorage.setItem("usuario",o.data.Usuario.usuario),t.$router.push("/".concat(o.data.Usuario.TipoUsuario.tipoUsuario))})).catch((function(o){t.$buefy.dialog.alert({title:"Error",message:o.response.data.message,type:"is-danger",hasIcon:!0,icon:"alert-circle",iconPack:"mdi",ariaRole:"alertdialog",ariaModal:!0})})).finally((function(){t.isLoading=!1}))}},watch:{usuario:function(){this.error=!1}},layout:"login"},f=(e(576),e(8)),component=Object(f.a)(d,(function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("section",{staticClass:"container p-2 log"},[e("div",{staticClass:"fix columns is-mobile"},[e("div",{staticClass:"container column is-12-mobile is-6-desktop is-6-tablet cont",on:{keydown:function(o){return!o.type.indexOf("key")&&t._k(o.keyCode,"enter",13,o.key,"Enter")?null:(o.preventDefault(),t.enviar())}}},[e("h1",{staticClass:"has-text-centered is-size-1"},[t._v("IRIS")]),t._v(" "),e("b-field",{attrs:{label:"Usuario",type:t.usuarioValido()}},[e("b-input",{model:{value:t.usuario,callback:function(o){t.usuario=o},expression:"usuario"}})],1),t._v(" "),e("b-field",{attrs:{label:"Contraseña"}},[e("b-input",{attrs:{type:"password","password-reveal":""},model:{value:t.password,callback:function(o){t.password=o},expression:"password"}})],1),t._v(" "),e("b-field",{staticClass:"center"},[e("button",{staticClass:"button is-success is-medium",attrs:{disabled:""==t.usuario||""==t.password||""==t.password&&1==t.error,type:"submit"},on:{click:function(o){return t.enviar()}}},[t._v("\n Iniciar sesion\n ")])])],1)]),t._v(" "),e("b-loading",{attrs:{"is-full-page":!0,"can-cancel":!1},model:{value:t.isLoading,callback:function(o){t.isLoading=o},expression:"isLoading"}})],1)}),[],!1,null,"204a720e",null);o.default=component.exports}}]);
-1
View File
File diff suppressed because one or more lines are too long
-2
View File
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
!function(e){function r(data){for(var r,n,f=data[0],l=data[1],d=data[2],i=0,h=[];i<f.length;i++)n=f[i],Object.prototype.hasOwnProperty.call(o,n)&&o[n]&&h.push(o[n][0]),o[n]=0;for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(e[r]=l[r]);for(v&&v(data);h.length;)h.shift()();return c.push.apply(c,d||[]),t()}function t(){for(var e,i=0;i<c.length;i++){for(var r=c[i],t=!0,n=1;n<r.length;n++){var l=r[n];0!==o[l]&&(t=!1)}t&&(c.splice(i--,1),e=f(f.s=r[0]))}return e}var n={},o={25:0},c=[];function f(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,f),t.l=!0,t.exports}f.e=function(e){var r=[],t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=o[e]=[r,n]}));r.push(t[2]=n);var c,script=document.createElement("script");script.charset="utf-8",script.timeout=120,f.nc&&script.setAttribute("nonce",f.nc),script.src=function(e){return f.p+""+{0:"d96b62f",1:"b9eadcf",4:"f35ddc8",5:"483c1c7",6:"df4237b",7:"acc8626",8:"9cebb58",9:"8da94f4",10:"88ed236",11:"c169c35",12:"1a9b0f6",13:"6160f7b",14:"609ab50",15:"d0abe43",16:"fc51d95",17:"27d245b",18:"de91e5e",19:"1115d55",20:"f053729",21:"c960943",22:"bf7fc7b",23:"ec05a6b",24:"472b564"}[e]+".js"}(e);var l=new Error;c=function(r){script.onerror=script.onload=null,clearTimeout(d);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),c=r&&r.target&&r.target.src;l.message="Loading chunk "+e+" failed.\n("+n+": "+c+")",l.name="ChunkLoadError",l.type=n,l.request=c,t[1](l)}o[e]=void 0}};var d=setTimeout((function(){c({type:"timeout",target:script})}),12e4);script.onerror=script.onload=c,document.head.appendChild(script)}return Promise.all(r)},f.m=e,f.c=n,f.d=function(e,r,t){f.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(e,r){if(1&r&&(e=f(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(f.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)f.d(t,n,function(r){return e[r]}.bind(null,n));return t},f.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(r,"a",r),r},f.o=function(object,e){return Object.prototype.hasOwnProperty.call(object,e)},f.p="/_nuxt/",f.oe=function(e){throw console.error(e),e};var l=window.webpackJsonp=window.webpackJsonp||[],d=l.push.bind(l);l.push=r,l=l.slice();for(var i=0;i<l.length;i++)r(l[i]);var v=d;t()}([]);
-1
View File
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{427:function(e,t,o){var content=o(563);"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,o(27).default)("10870322",content,!0,{sourceMap:!1})},447:function(e,t,o){"use strict";o.r(t);o(16);var n=o(44),c=o.n(n),r={data:function(){return{isFullPage:!0,file:[],idServicio:"",cartaAceptacion:"",isLoading:!1,token:{headers:{token:window.localStorage.getItem("token")}}}},methods:{"validarTamaño":function(){this.file.size>2e7&&(this.toast(),this.file="")},toast:function(){this.$buefy.toast.open({message:"El archivo excede el tamaño permitido",type:"is-danger"})},Enviar:function(){var e=this,data={idServicio:this.idServicio},t=new FormData;t.append("data",JSON.stringify(data)),t.append("cartaAceptacion",this.file),this.isLoading=!0,c.a.put("".concat("https://venus.acatlan.unam.mx/ss-pruebas","/servicio/carta_aceptacion"),t,{headers:{"Content-Type":"multipart/form-data",token:this.token.headers.token}}).then((function(t){e.$buefy.dialog.alert({title:"Success",message:"Se enviaron los datos correctamente",type:"is-success",hasIcon:!0,icon:"checkbox-marked-circle",iconPack:"mdi",ariaRole:"alertdialog",ariaModal:!0})})).catch((function(t){e.error(t.response.data.message)})).finally((function(){e.isLoading=!1,localStorage.removeItem("idServicio"),localStorage.removeItem("cartaAceptacion"),e.$router.push("/responsable")}))},getIdLocal:function(){this.idServicio=localStorage.getItem("idServicio"),this.cartaAceptacion=localStorage.getItem("cartaAceptacion"),null!==this.idServicio&&null!==this.cartaAceptacion||this.$router.push("/responsable")},error:function(e){var t=!1;switch(e){case"invalid signature":e="Tu token no es valido, inicia sesión de nuevo.",t=!0;break;case"jwt expired":e="Tu sesión ha expirado, inicia sesión de nuevo.",t=!0;break;case"jwt malformed":e="No se encontro tu token, inicia sesión de nuevo.",t=!0;break;case"No hay token":e="Ocurrio un error al enviar tu token, inicia sesión de nuevo.",t=!0}this.$buefy.dialog.alert({title:"Error",message:e,type:"is-danger",hasIcon:!0,icon:"alert-circle",iconPack:"mdi",ariaRole:"alertdialog",ariaModal:!0}),1==t&&(localStorage.clear(),this.$router.push("/"))}},watch:{file:function(e,t){this.validarTamaño()}},created:function(){this.getIdLocal()}},l=(o(562),o(8)),component=Object(l.a)(r,(function(){var e=this,t=e.$createElement,o=e._self._c||t;return null!=e.idServicio&&null!=e.cartaAceptacion?o("div",{staticClass:"container footter"},[o("b-button",{staticClass:"border-info mt-5",attrs:{type:"is-info is-light","icon-left":"arrow-left-box",tag:"router-link",to:"/responsable"}},[e._v("Regresar")]),e._v(" "),o("h3",{staticClass:"title is-4 mt-4"},[e._v("\n Carta de aceptación (en formato .PDF. No se aceptan fotos).\n ")]),e._v(" "),o("b-field",[o("b-upload",{attrs:{"drag-drop":"",type:"is-black",expanded:"",accept:"application/pdf"},model:{value:e.file,callback:function(t){e.file=t},expression:"file"}},[o("section",{staticClass:"section"},[o("div",{staticClass:"content has-text-centered"},[o("p",[o("b-icon",{attrs:{icon:"upload",size:"is-large"}})],1),e._v(" "),o("p",[e._v("\n "+e._s(e.file.name||"Arrastra aquí tu archivo o da click para buscar")+"\n ")]),e._v(" "),o("p",[e._v("Tamaño máximo para el archivo: 20MB")])])])])],1),e._v(" "),o("b-field",{staticClass:"centro"},[o("b-button",{staticClass:"border-success my-5",attrs:{disabled:""==e.file,type:"is-success"},on:{click:function(t){return e.Enviar()}}},[e._v("Enviar")])],1),e._v(" "),o("b-loading",{attrs:{"is-full-page":!0,"can-cancel":!1},model:{value:e.isLoading,callback:function(t){e.isLoading=t},expression:"isLoading"}})],1):e._e()}),[],!1,null,null,null);t.default=component.exports},562:function(e,t,o){"use strict";o(427)},563:function(e,t,o){(t=o(26)(!1)).push([e.i,".centro{text-align:center}.footter{margin-bottom:10rem}",""]),e.exports=t},590:function(e,t,o){"use strict";o.r(t);var n={components:{CartaAceptacion:o(447).default}},c=o(8),component=Object(c.a)(n,(function(){var e=this.$createElement,t=this._self._c||e;return t("section",[t("CartaAceptacion")],1)}),[],!1,null,null,null);t.default=component.exports;installComponents(component,{CartaAceptacion:o(447).default})}}]);
-1
View File
File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More