nuevo formateo

This commit is contained in:
Lemuel Marquez
2021-05-13 14:22:56 -05:00
parent eaf298c4a9
commit 24cd81c73d
61 changed files with 2227 additions and 2271 deletions
+64 -72
View File
@@ -3,10 +3,8 @@
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 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">
@@ -17,22 +15,16 @@
<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 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 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 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>Créditos: </b> {{ alumno.creditos + '%' }}</p>
<p class="is-size-5 mt-3">
<b>Fecha de nacimiento: </b>
{{ fecha(alumno.fechaNacimiento) }}
@@ -70,32 +62,32 @@
</template>
<script>
import moment from "moment";
import axios from "axios";
import moment from 'moment'
import axios from 'axios'
export default {
data() {
return {
alumno: {
fechaNacimiento: "",
fechaInicio: "",
fechaFin: "",
fechaNacimiento: '',
fechaInicio: '',
fechaFin: '',
Usuario: {},
Carrera: {},
Status: {},
},
token: {
headers: {
token: localStorage.getItem("token"),
token: localStorage.getItem('token'),
},
},
idCasoEspecial: localStorage.getItem("idCasoEspecial"),
idCasoEspecial: localStorage.getItem('idCasoEspecial'),
isLoading: false,
};
}
},
methods: {
editar(){
this.$router.push("/admin/especial/casoEspecial/editar");
editar() {
this.$router.push('/admin/especial/casoEspecial/editar')
},
obtenerDatos() {
return axios
@@ -104,85 +96,85 @@ export default {
this.token
)
.then((res) => {
this.alumno = res.data;
this.alumno = res.data
})
.catch((err) => {
this.error(err.response.data.message);
this.error(err.response.data.message)
})
.finally(() => {
this.isLoading = false;
});
this.isLoading = false
})
},
confirmarLiberacion() {
this.isLoading = true;
const data = { idCasoEspecial: this.idCasoEspecial };
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");
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);
this.error(err.response.data.message)
})
.finally(() => {
this.isLoading = false;
});
this.isLoading = false
})
},
fecha(date) {
const fecha = moment(date.substr(0, 10));
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`;
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"
if (n == 1) {
return 'Tercera edad'
} else if (n == 2) {
return 'Capacidades diferentes'
}
},
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',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
})
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
localStorage.clear()
this.$router.push(`/`)
}
},
},
created() {
this.obtenerDatos();
this.obtenerDatos()
},
};
}
</script>
<style>
+90 -89
View File
@@ -53,15 +53,11 @@
: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"
>
<b-select class="my-4" expanded v-model="nuevo.motivo">
<option value="1">Tercera edad</option>
<option value="2">Capacidades diferentes</option>
</b-select>
@@ -83,13 +79,16 @@
</b-input>
</b-field>
</div>
<b-button
v-if="mostrar()"
<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>
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"
@@ -99,37 +98,37 @@
</template>
<script>
import axios from "axios";
import moment from "moment";
import validator from "validator";
import axios from 'axios'
import moment from 'moment'
import validator from 'validator'
export default {
data() {
return {
idCasoEspecial: localStorage.getItem("idCasoEspecial"),
idCasoEspecial: localStorage.getItem('idCasoEspecial'),
isLoading: false,
minDate1: new Date("2020-01-01"),
minDate1: new Date('2020-01-01'),
viejo: {},
nuevo: {
idCasoEspecial: null,
correo: "",
telefono: "",
correo: '',
telefono: '',
fechaInicio: null,
fechaFin: null,
fechaNacimiento: null,
institucion: "",
dependencia: "",
motivo: "",
direccion: "",
institucion: '',
dependencia: '',
motivo: '',
direccion: '',
},
token: {
headers: {
token: window.localStorage.getItem("token"),
token: window.localStorage.getItem('token'),
},
},
};
}
},
methods: {
mostrar(){
mostrar() {
if (
validator.isEmail(this.nuevo.correo) ||
this.nuevo.direccion ||
@@ -142,123 +141,125 @@ 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
}
},
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(),
});
})
},
actualizar() {
this.isLoading = true;
const data = { idCasoEspecial: this.idCasoEspecial };
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);
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");
this.$buefy.dialog.alert('Los datos han sido actualizados')
this.$router.push('/admin/especial/casoEspecial')
})
.catch((err) => {
this.error(err.response.data.message);
this.error(err.response.data.message)
})
.finally(() => {
this.isLoading = false;
});
this.isLoading = false
})
},
obtenerDatos() {
this.isLoading = true;
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;
console.log(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
})
},
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',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
})
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
localStorage.clear()
this.$router.push(`/`)
}
},
fecha(date) {
if (date) {
const fecha = moment(date.substr(0, 10));
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`;
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());
const min = new Date(this.nuevo.fechaInicio)
return new Date(min.getFullYear(), min.getMonth() + 6, min.getDate())
},
},
created() {
this.obtenerDatos();
this.obtenerDatos()
},
};
}
</script>
<style scoped>
@@ -269,4 +270,4 @@ export default {
.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
opacity: 0;
}
</style>
</style>
@@ -28,7 +28,7 @@
</b-field>
</div>
<div class="column is-3 mb-4 pb-4 ">
<div class="column is-3 mb-4 pb-4">
<b-field>
<b-select
placeholder="Status"
@@ -38,7 +38,7 @@
v-model="idStatus"
>
<optgroup>
<option value=""> Status </option>
<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>
@@ -122,71 +122,71 @@
</template>
<script>
import axios from "axios";
import moment from "moment";
import axios from 'axios'
import moment from 'moment'
export default {
data() {
return {
idUsuario: "",
idTipoUsuario: "",
tipoUsuario: "",
idUsuario: '',
idTipoUsuario: '',
tipoUsuario: '',
data: [],
total: "",
total: '',
isLoading: false,
page: 1,
perPage: 25,
numeroCuenta: "",
nombre: "",
idStatus: "",
numeroCuenta: '',
nombre: '',
idStatus: '',
token: {
headers: {
token: window.localStorage.getItem("token"),
token: window.localStorage.getItem('token'),
},
},
};
}
},
methods: {
onPageChange(page) {
this.page = page;
this.obtenerDatos();
this.page = page
this.obtenerDatos()
},
types(idStatus) {
if (idStatus === 1) {
return "is-dark";
return 'is-dark'
} else if (idStatus === 2) {
return "is-info";
return 'is-info'
} else if (idStatus === 3) {
return "is-link";
return 'is-link'
} else if (idStatus === 4) {
return "is-warning";
return 'is-warning'
} else if (idStatus === 5) {
return "is-success";
return 'is-success'
} else if (idStatus === 6) {
return "is-link";
return 'is-link'
} else if (
idStatus === 7 ||
idStatus === 8 ||
idStatus === 9 ||
idStatus === 10
) {
return "is-danger";
return 'is-danger'
} else if (idStatus === 11) {
return "is-link is-light";
return 'is-link is-light'
} else if (idStatus === 12) {
return "is-danger is-light";
return 'is-danger is-light'
} else if (idStatus === 13 || idStatus === 14) {
return "is-success is-light";
return 'is-success is-light'
}
},
fecha(date) {
const fecha = moment(date.substr(0, 10));
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`;
const fecha = moment(date.substr(0, 10))
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`
},
obtenerDatos(idStatus) {
this.isLoading = true;
this.data = [];
this.isLoading = true
this.data = []
axios
.get(
@@ -194,7 +194,7 @@ export default {
this.token
)
.then((res) => {
const servicios = res.data.servicios;
const servicios = res.data.servicios
if (servicios.length !== 0) {
for (let i = 0; i < servicios.length; i++) {
@@ -206,83 +206,83 @@ export default {
diaCreado: servicios[i].createdAt,
idStatus: servicios[i].Status.idStatus,
idCasoEspecial: servicios[i].idCasoEspecial,
});
})
}
}
let currentTotal = servicios.length;
let contador;
let currentTotal = servicios.length
let contador
for (let i = 0; i < res.data.registros / 25 + 1; i++) {
contador = i;
contador = i
}
currentTotal = this.perPage * contador;
this.total = currentTotal;
currentTotal = this.perPage * contador
this.total = currentTotal
})
.catch((error) => {
this.error(error.response.data.message);
this.error(error.response.data.message)
})
.finally(() => {
this.isLoading = false;
});
this.isLoading = false
})
},
servicios(idCasoEspecial) {
window.localStorage.setItem("idCasoEspecial", idCasoEspecial);
this.$router.push("/admin/especial/casoEspecial");
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");
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("/");
if (this.idTipoUsuario != 1 && this.tipoUsuario != 'admin') {
localStorage.clear()
this.$router.push('/')
}
},
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',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
})
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
localStorage.clear()
this.$router.push(`/`)
}
},
},
created() {
this.getIdLocal();
this.obtenerDatos(0);
this.getIdLocal()
this.obtenerDatos(0)
},
};
}
</script>
<style>
+75 -75
View File
@@ -28,7 +28,7 @@
</b-field>
</div>
<div class="column is-3 mb-4 pb-4 ">
<div class="column is-3 mb-4 pb-4">
<b-field>
<b-select
placeholder="Status"
@@ -38,7 +38,7 @@
v-model="idStatus"
>
<optgroup>
<option value=""> Status </option>
<option value="">Status</option>
<option value="1">Pre-registro</option>
<option value="2">Pre-registro Validado</option>
<option value="3">Registro</option>
@@ -151,68 +151,68 @@
</template>
<script>
import axios from "axios";
import moment from "moment";
import axios from 'axios'
import moment from 'moment'
export default {
data() {
return {
idUsuario: "",
idTipoUsuario: "",
tipoUsuario: "",
idUsuario: '',
idTipoUsuario: '',
tipoUsuario: '',
data: [],
total: "",
total: '',
isLoading: false,
page: 1,
perPage: 25,
numeroCuenta: "",
nombre: "",
idStatus: "",
numeroCuenta: '',
nombre: '',
idStatus: '',
token: {
headers: {
token: window.localStorage.getItem("token"),
token: window.localStorage.getItem('token'),
},
},
};
}
},
methods: {
onPageChange(page) {
this.page = page;
this.obtenerDatos();
this.page = page
this.obtenerDatos()
},
types(idStatus) {
if (idStatus === 1) {
return "is-dark";
return 'is-dark'
} else if (idStatus === 2) {
return "is-info";
return 'is-info'
} else if (idStatus === 3) {
return "is-warning";
return 'is-warning'
} else if (idStatus === 4) {
return "is-link";
return 'is-link'
} else if (idStatus === 5) {
return "is-success";
return 'is-success'
} else if (idStatus === 6) {
return "is-success is-light";
return 'is-success is-light'
} else if (idStatus === 7) {
return "is-danger";
return 'is-danger'
} else if (idStatus === 8) {
return "is-danger";
return 'is-danger'
} else if (idStatus === 9) {
return "is-danger";
return 'is-danger'
} else if (idStatus === 10) {
// admin
return "is-danger";
return 'is-danger'
}
},
fecha(date) {
const fecha = moment(date.substr(0, 10));
const fecha = moment(date.substr(0, 10))
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`;
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`
},
obtenerDatos(idStatus) {
this.isLoading = true;
this.data = [];
this.isLoading = true
this.data = []
axios
.get(
@@ -220,7 +220,7 @@ export default {
this.token
)
.then((res) => {
const servicios = res.data.servicios;
const servicios = res.data.servicios
if (servicios.length !== 0) {
for (let i = 0; i < servicios.length; i++) {
@@ -234,83 +234,83 @@ export default {
diaCreado: servicios[i].createdAt,
idStatus: servicios[i].Status.idStatus,
idServicio: servicios[i].idServicio,
});
})
}
}
let currentTotal = servicios.length;
let contador;
let currentTotal = servicios.length
let contador
for (let i = 0; i < res.data.registros / 25 + 1; i++) {
contador = i;
contador = i
}
currentTotal = this.perPage * contador;
this.total = currentTotal;
currentTotal = this.perPage * contador
this.total = currentTotal
})
.catch((error) => {
this.error(error.response.data.message);
this.error(error.response.data.message)
})
.finally(() => {
this.isLoading = false;
});
this.isLoading = false
})
},
servicios(idServicio) {
window.localStorage.setItem("idServicio", idServicio);
this.$router.push("/admin/servicio");
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");
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("/");
if (this.idTipoUsuario != 1 && this.tipoUsuario != 'admin') {
localStorage.clear()
this.$router.push('/')
}
},
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',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
})
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
localStorage.clear()
this.$router.push(`/`)
}
},
},
created() {
this.getIdLocal();
this.obtenerDatos(0);
this.getIdLocal()
this.obtenerDatos(0)
},
};
}
</script>
<style>
+54 -54
View File
@@ -16,7 +16,7 @@
</p>
<p>
{{
csv.name || "Arrastra aquí tu archivo o da click para buscar"
csv.name || 'Arrastra aquí tu archivo o da click para buscar'
}}
</p>
</div>
@@ -36,108 +36,108 @@
</template>
<script>
import axios from "axios";
import axios from 'axios'
export default {
data() {
return {
csv: {},
token: {
headers: {
token: window.localStorage.getItem("token"),
token: window.localStorage.getItem('token'),
},
},
isLoading: false,
toastType: null,
toastMessage: null,
};
}
},
methods: {
validarExt() {
const extPermitidas = /(.csv)$/i;
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 = {};
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",
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();
const formData = new FormData()
this.isLoading = true;
formData.append("csv", this.csv);
this.isLoading = true
formData.append('csv', this.csv)
axios
.post(`${process.env.api}/programa/carga_masiva`, formData, {
headers: {
"Content-Type": "multipart/form-data",
'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");
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);
});
this.isLoading = false
this.error(err.response.data.message)
})
},
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',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
})
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
localStorage.clear()
this.$router.push(`/`)
}
},
},
};
}
</script>
+56 -56
View File
@@ -61,122 +61,122 @@
</template>
<script>
import axios from "axios";
import axios from 'axios'
export default {
data() {
return {
idUsuario: "",
idUsuario: '',
data: [],
total: "",
total: '',
loading: false,
page: 1,
perPage: 25,
correo: "",
nombre: "",
correo: '',
nombre: '',
idStatus: 1,
token: {
headers: {
token: window.localStorage.getItem("token"),
token: window.localStorage.getItem('token'),
},
},
};
}
},
methods: {
onPageChange(page) {
this.page = page;
this.obtenerDatos();
this.page = page
this.obtenerDatos()
},
obtenerDatos(idStatus) {
this.loading = true;
this.data = [];
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;
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;
let currentTotal = servicios.length
let contador
for (let i = 0; i < res.data.registros / this.perPage + 1; i++) {
contador = i;
contador = i
}
currentTotal = this.perPage * contador;
this.total = currentTotal;
this.loading = false;
currentTotal = this.perPage * contador
this.total = currentTotal
this.loading = false
})
.catch((err) => {
this.loading = false;
this.error(err.response.data.message);
});
this.loading = false
this.error(err.response.data.message)
})
},
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',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
})
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
localStorage.clear()
this.$router.push(`/`)
}
},
insertIdLocal() {
this.idUsuario = localStorage.getItem("idUsuario");
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");
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();
await this.obtenerDatos()
this.insertIdLocal()
},
};
}
</script>
<style scoped>
@@ -14,7 +14,7 @@
<b>Correo: </b>{{ alumno.correo }}
</p>
<p class="is-size-5 mt-3" v-if="alumno.creditos">
<b>Créditos: </b>{{ 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) }}
@@ -41,7 +41,7 @@
</template>
<script>
import moment from "moment";
import moment from 'moment'
export default {
props: {
@@ -49,9 +49,9 @@ export default {
},
methods: {
fecha(date) {
const fecha = moment(date.substr(0, 10));
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`;
const fecha = moment(date.substr(0, 10))
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`
},
},
};
}
</script>
+1 -1
View File
@@ -24,5 +24,5 @@ export default {
props: {
programa: Object,
},
};
}
</script>
+84 -88
View File
@@ -4,9 +4,7 @@
><strong>{{ title }}</strong></span
>
<a :href="link" target="_blank">
<b-button class="is-link is-light">
Ver
</b-button>
<b-button class="is-link is-light"> Ver </b-button>
</a>
<b-button
class="is-danger"
@@ -25,9 +23,7 @@
>
Rechazar documento
</b-button>
<b-button v-else-if="mensajeBool" disabled>
Rechazar documento
</b-button>
<b-button v-else-if="mensajeBool" disabled> Rechazar documento </b-button>
<b-loading
:is-full-page="true"
v-model="isLoading"
@@ -37,7 +33,7 @@
</template>
<script>
import axios from "axios";
import axios from 'axios'
export default {
props: {
title: String,
@@ -48,59 +44,59 @@ export default {
},
data() {
return {
mensajeRech: "",
mensajeRech: '',
mensajeBool: false,
idServicio: localStorage.getItem("idServicio"),
idServicio: localStorage.getItem('idServicio'),
isLoading: false,
token: {
headers: {
token: window.localStorage.getItem("token"),
token: window.localStorage.getItem('token'),
},
},
};
}
},
methods: {
esRechazable() {
switch (this.idDoc) {
case 1:
if (this.status == 1) return true;
else return false;
if (this.status == 1) return true
else return false
case 2:
if (this.status == 5) return true;
else return false;
if (this.status == 5) return true
else return false
case 3:
if (this.status == 5) return true;
else return false;
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",
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;
this.rechazarCartaAceptacion()
break
case 2:
this.rechazarCartaTermino();
break;
this.rechazarCartaTermino()
break
case 3:
this.rechazarInformeGlobal();
this.rechazarInformeGlobal()
}
},
});
})
},
rechazarCartaAceptacion() {
this.isLoading = true;
this.isLoading = true
const data = {
mensaje: this.mensajeRech,
idServicio: this.idServicio,
};
}
axios
.put(
`${process.env.api}/servicio/rechazar_aceptacion`,
@@ -108,102 +104,102 @@ export default {
this.token
)
.then((res) => {
this.isLoading = false;
this.$buefy.dialog.alert("Se ha rechazado el documento");
this.$router.push("/admin");
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();
});
this.isLoading = false
this.error(err.response.data.message)
this.errorDoc()
})
},
rechazarCartaTermino() {
this.isLoading = true;
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");
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();
});
this.isLoading = false
this.error(err.response.data.message)
this.errorDoc()
})
},
rechazarInformeGlobal() {
this.isLoading = true;
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");
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();
});
this.isLoading = false
this.error(err.response.data.message)
this.errorDoc()
})
},
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',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
})
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
localStorage.clear()
this.$router.push(`/`)
}
},
errorDoc() {
this.$buefy.dialog.alert({
title: "Error",
message: "Ha ocurrido un error al rechazar el documento",
type: "is-danger",
title: 'Error',
message: 'Ha ocurrido un error al rechazar el documento',
type: 'is-danger',
hasIcon: true,
icon: "times-circle",
iconPack: "fa",
ariaRole: "alertdialog",
icon: 'times-circle',
iconPack: 'fa',
ariaRole: 'alertdialog',
ariaModal: true,
});
})
},
},
};
}
</script>
+119 -119
View File
@@ -79,7 +79,7 @@
<p>
{{
nuevo.cartaAceptacion.name ||
"Arrastra aquí tu archivo o da click para buscar"
'Arrastra aquí tu archivo o da click para buscar'
}}
</p>
</div>
@@ -105,7 +105,7 @@
<p>
{{
nuevo.cartaTermino.name ||
"Arrastra aquí tu archivo o da click para buscar"
'Arrastra aquí tu archivo o da click para buscar'
}}
</p>
</div>
@@ -131,7 +131,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>
@@ -157,10 +157,10 @@
</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 +168,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 +187,50 @@ export default {
fechaFin: [],
token: {
headers: {
token: window.localStorage.getItem("token"),
token: window.localStorage.getItem('token'),
},
},
minDate1: new Date("2020-01-01"),
minDate1: new Date('2020-01-01'),
isLoading: false,
padding: false,
};
}
},
methods: {
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 +245,182 @@ 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',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
})
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
localStorage.clear()
this.$router.push(`/`)
}
},
fecha(date) {
if (date) {
const fecha = moment(date.substr(0, 10));
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`;
const fecha = moment(date.substr(0, 10))
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`
}
},
},
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>
+7 -19
View File
@@ -1,23 +1,11 @@
<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>
<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>
@@ -26,5 +14,5 @@ export default {
props: {
status: Number,
},
};
}
</script>
+4 -10
View File
@@ -1,19 +1,13 @@
<template>
<div>
<h3 class="is-size-3 mb-5" v-if="status == 1">
<strong>
Confirmar el pre-registro del alumno
</strong>
<strong> Confirmar el pre-registro del alumno </strong>
</h3>
<h3 class="is-size-3 mb-5" v-if="status == 4">
<strong>
Término
</strong>
<strong> Término </strong>
</h3>
<h3 class="is-size-3 mb-5" v-if="status == 5">
<strong>
Validar el término del alumno
</strong>
<strong> Validar el término del alumno </strong>
</h3>
</div>
</template>
@@ -23,5 +17,5 @@ export default {
props: {
status: Number,
},
};
}
</script>
+109 -115
View File
@@ -51,14 +51,10 @@
Visto bueno Acatlán
</b-checkbox>
<p v-if="alumno.idCuestionarioPrograma" class="my-4">
<strong>
Cuenta con cuestionario de programa resuelto.
</strong>
<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>
<strong> Cuenta con cuestionario de alumno resuelto. </strong>
</p>
</div>
<div id="acciones" class="my-5">
@@ -98,9 +94,7 @@
>
Cancelar servicio
</b-button>
<b-button v-else-if="enviarCancel" disabled>
Cancelar servicio
</b-button>
<b-button v-else-if="enviarCancel" disabled> Cancelar servicio </b-button>
<div>
<BotonRegresar
:path="'/admin'"
@@ -117,13 +111,13 @@
</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";
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: {
@@ -142,204 +136,204 @@ export default {
Carrera: {},
Status: {},
},
idServicio: localStorage.getItem("idServicio"),
idServicio: localStorage.getItem('idServicio'),
token: {
headers: {
token: localStorage.getItem("token"),
token: localStorage.getItem('token'),
},
},
linkCartaAceptacion: "",
linkCartaTermino: "",
linkInformeGlobal: "",
linkCartaAceptacion: '',
linkCartaTermino: '',
linkInformeGlobal: '',
enviarMensaje: false,
enviarCancel: false,
mensaje: "",
mensajeCancel: "",
mensaje: '',
mensajeCancel: '',
isLoading: false,
};
}
},
methods: {
mostrarConfirmar1() {
if (this.alumno.Status.idStatus === 1) return true;
return false;
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;
if (!this.alumno.acatlanContigo) return true
else if (this.alumno.vistoBueno) return true
}
return false;
return false
},
mostrarCancelar() {
if (
this.alumno.Status.idStatus === 10 ||
this.alumno.Status.idStatus === 6
)
return false;
return true;
return false
return true
},
mostrarEditar() {
if (this.alumno.Status.idStatus === 10) return false;
return true;
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;
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");
localStorage.setItem('idStatus', this.alumno.Status.idStatus)
this.$router.push('servicio/modificar')
},
obtenerRegistro() {
this.isLoading = true;
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);
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`;
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`;
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`;
this.linkInformeGlobal = `https://drive.google.com/file/d/${this.alumno.informeGlobal}/view?usp=sharing`
})
.catch((err) => {
this.error(err.response.data.message);
this.error(err.response.data.message)
})
.finally(() => {
this.isLoading = false;
});
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",
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",
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;
this.confirmarRegistro()
break
case 2:
this.confirmarLiberacion();
break;
this.confirmarLiberacion()
break
}
},
});
})
},
cancelar() {
this.isLoading = true;
const data = { idServicio: this.idServicio, mensaje: this.mensajeCancel };
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");
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);
this.error(err.response.data.message)
})
.finally(() => {
this.isLoading = false;
});
this.isLoading = false
})
},
confirmarRegistro() {
this.isLoading = true;
const data = { idServicio: this.idServicio };
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");
this.$buefy.dialog.alert('El servicio ha sido aprobado')
localStorage.removeItem('idServicio')
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
})
},
confirmarLiberacion() {
this.isLoading = true;
const data = { idServicio: this.idServicio };
this.isLoading = true
const data = { idServicio: this.idServicio }
if (this.alumno.vistoBuenoAcatlan)
data.vistoBuenoAcatlan = 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");
this.$buefy.dialog.alert('El servicio ha sido liberado')
localStorage.removeItem('idServicio')
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',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
})
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
localStorage.clear()
this.$router.push(`/`)
}
},
},
async created() {
await this.obtenerRegistro();
await this.obtenerRegistro()
},
};
}
</script>
<style scoped>
+19 -19
View File
@@ -49,33 +49,33 @@ 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>
+27 -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,41 @@ 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>
+32 -32
View File
@@ -202,52 +202,52 @@ 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>
+45 -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,68 @@ 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>
+18 -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,34 @@ 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>
+47 -47
View File
@@ -179,76 +179,76 @@ 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>
+25 -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,18 @@ 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>
+6 -6
View File
@@ -50,20 +50,20 @@
</style>
<script>
import moment from "moment";
import moment from 'moment'
export default {
data() {
return {};
return {}
},
props: ["status", "alumno", "programa"],
props: ['status', 'alumno', 'programa'],
methods: {
fecha(date) {
// const fecha = moment(date);
const fecha = moment(date.substr(0, 10));
const fecha = moment(date.substr(0, 10))
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`;
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`
},
},
};
}
</script>
+13 -13
View File
@@ -22,38 +22,38 @@ export default {
data() {
return {
Mensajes: [
{ status: 1, mensaje: "" },
{ status: 2, mensaje: "" },
{ 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",
'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: 4, mensaje: '' },
{
status: 5,
mensaje:
"Espera a que tus documentos sean validados por el Departamento de Servicio Social y Bolsa de Trabajo",
'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",
'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: 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",
'Informe global de actividades rechazado. Por favor reenvia el informe correctamente',
},
{
status: 10,
mensaje: "servicio cancelado",
mensaje: 'servicio cancelado',
},
],
};
}
},
props: ["status"],
};
props: ['status'],
}
</script>
+54 -54
View File
@@ -49,106 +49,106 @@
</template>
<script>
import moment from "moment";
import axios from "axios";
import moment from 'moment'
import axios from 'axios'
export default {
data() {
return {
token: {
headers: {
token: window.localStorage.getItem("token"),
token: window.localStorage.getItem('token'),
},
},
nacimiento: [],
minDate: new Date(),
maxDate: new Date(),
telefono: "",
direccion: "",
telefono: '',
direccion: '',
isLoading: false,
};
}
},
props: ["idServicio"],
props: ['idServicio'],
methods: {
reset() {
this.nacimiento = [];
this.telefono = "";
this.direccion = "";
this.nacimiento = []
this.telefono = ''
this.direccion = ''
},
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',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
})
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
localStorage.clear()
this.$router.push(`/`)
}
},
enviarRegistro() {
this.isLoading = true;
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",
title: 'Success',
message: 'Se enviaron los datos correctamente',
type: 'is-success',
hasIcon: true,
icon: "checkbox-marked-circle",
iconPack: "mdi",
ariaRole: "alertdialog",
icon: 'checkbox-marked-circle',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
})
this.reset();
this.$parent.getData();
this.reset()
this.$parent.getData()
})
.catch((error) => {
this.error(error.response.data.message);
this.error(error.response.data.message)
})
.finally(() => {
this.isLoading = false;
});
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);
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>
+59 -59
View File
@@ -39,7 +39,7 @@
</p>
<p>
{{
file.name || "Arrastra aquí tu archivo o da click para buscar"
file.name || 'Arrastra aquí tu archivo o da click para buscar'
}}
</p>
<p>Tamaño máximo 20MB</p>
@@ -47,7 +47,7 @@
</section>
</b-upload>
</b-field>
<b-field style="text-align:center;">
<b-field style="text-align: center">
<button
:disabled="file == ''"
class="button is-success is-medium mb-4"
@@ -66,116 +66,116 @@
</template>
<script>
import axios from "axios";
import axios from 'axios'
export default {
data() {
return {
token: {
headers: {
token: window.localStorage.getItem("token"),
token: window.localStorage.getItem('token'),
},
},
isLoading: false,
file: [],
};
}
},
props: ["idCuestionario", "informeGlobal", "idServicio"],
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",
title: 'Error',
message: 'El tamaño del archivo exede los 20MB',
type: 'is-danger',
hasIcon: true,
icon: "alert-circle",
iconPack: "mdi",
ariaRole: "alertdialog",
icon: 'alert-circle',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
this.file = [];
})
this.file = []
}
},
},
methods: {
reset() {
this.file = [];
this.file = []
},
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',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
})
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
localStorage.clear()
this.$router.push(`/`)
}
},
enviarInforme() {
this.isLoading = true;
this.isLoading = true
const data = {
idServicio: this.idServicio,
};
const formData = new FormData();
}
const formData = new FormData()
formData.append("data", JSON.stringify(data));
formData.append("informeGlobal", this.file);
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",
'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",
title: 'Success',
message: 'Se enviaron los datos correctamente',
type: 'is-success',
hasIcon: true,
icon: "checkbox-marked-circle",
iconPack: "mdi",
ariaRole: "alertdialog",
icon: 'checkbox-marked-circle',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
})
this.reset();
this.$parent.getData();
this.reset()
this.$parent.getData()
})
.catch((error) => {
this.error(error.response.data.message);
this.error(error.response.data.message)
})
.finally(() => {
this.isLoading = false;
});
this.isLoading = false
})
},
},
};
}
</script>
+3 -3
View File
@@ -82,10 +82,10 @@
<script>
export default {
data() {
return {};
return {}
},
props: ["activeStep"],
};
props: ['activeStep'],
}
</script>
<style>
+3 -3
View File
@@ -19,11 +19,11 @@ export default {
regresar() {
if (this.deleteFromLocalStorage) {
for (let i = 0; i < this.deleteFromLocalStorage.length; i++) {
localStorage.removeItem(this.deleteFromLocalStorage[i]);
localStorage.removeItem(this.deleteFromLocalStorage[i])
}
}
this.$router.push(this.path);
this.$router.push(this.path)
},
},
};
}
</script>
+124 -124
View File
@@ -148,7 +148,7 @@
</p>
<p>
{{
file.name || "Arrastra aquí tu archivo o da click para buscar"
file.name || 'Arrastra aquí tu archivo o da click para buscar'
}}
</p>
</div>
@@ -159,15 +159,15 @@
<b-button
:disabled="
alumno.articulo == '' ||
alumno.numeroCuenta == '' ||
alumno.nombre == '' ||
alumno.carrera == '' ||
alumno.direccion == '' ||
alumno.fechaNacimiento == '' ||
alumno.fechaInicio == '' ||
alumno.fechaFin == '' ||
alumno.correoElectronico == '' ||
file == ''
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"
@@ -180,103 +180,103 @@
</template>
<script>
import "buefy/dist/buefy.css";
import axios from "axios";
import validator from "validator";
import moment from "moment";
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: "",
noCuenta: '',
alumno: {
cuenta: "",
nombre: "",
carrera: "",
creditos: "",
discapacidad: "",
institucion: "",
dependencia: "",
idAlumno: "",
idCarrera: "",
telefono: "",
cuenta: '',
nombre: '',
carrera: '',
creditos: '',
discapacidad: '',
institucion: '',
dependencia: '',
idAlumno: '',
idCarrera: '',
telefono: '',
fechaNacimiento: [],
fechaInicio: [],
fechaFin: [],
correoElectronico: "",
correoElectronico: '',
},
minDate1: new Date("2020-01-01"),
minDate1: new Date('2020-01-01'),
token: {
headers: {
token: window.localStorage.getItem("token"),
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 = {};
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 = {};
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",
});
message: 'Asegurate de ingresar un archivo con la extensión correcta',
type: 'is-danger',
})
},
buscarAlumno() {
this.isLoading = true;
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;
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);
this.error(error.response.data.message)
})
.finally(() => {
this.isLoading = false;
});
this.isLoading = false
})
},
enviar() {
this.isLoading = true;
this.isLoading = true
const data = {
idUsuario: this.alumno.idUsuario,
idStatus: this.alumno.articulo,
@@ -292,112 +292,112 @@ export default {
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);
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",
'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",
title: 'Success',
message: 'Se enviaron los datos correctamente',
type: 'is-success',
hasIcon: true,
icon: "checkbox-marked-circle",
iconPack: "mdi",
ariaRole: "alertdialog",
icon: 'checkbox-marked-circle',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
this.reset();
})
this.reset()
})
.catch((error) => {
this.error(error.response.data.message);
this.error(error.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',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
})
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
localStorage.clear()
this.$router.push(`/`)
}
},
esNumero(numero) {
const ultimaLetra = numero.length - 1;
const ultimaLetra = numero.length - 1
if (numero && !validator.isNumeric(numero[ultimaLetra])) {
return numero.substr(0, ultimaLetra);
return numero.substr(0, ultimaLetra)
}
return numero;
return numero
},
maxLength(str, max) {
if (str.length > max) return str.substr(0, max);
return str;
if (str.length > max) return str.substr(0, max)
return str
},
correoValidado() {
if (validator.isEmail(this.alumno.correoElectronico)) {
return "";
return ''
}
},
},
computed: {
minDate2() {
const min = new Date(this.alumno.fechaInicio);
return new Date(min.getFullYear(), min.getMonth() + 6, min.getDate());
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);
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();
this.noCuenta = ''
this.searched = false
this.reset()
}
},
},
};
}
</script>
<style>
+73 -73
View File
@@ -28,7 +28,7 @@
</b-field>
</div>
<div class="column is-3 mb-4 pb-4 ">
<div class="column is-3 mb-4 pb-4">
<b-field>
<b-select icon="information" expanded rounded v-model="idStatus">
<optgroup>
@@ -119,73 +119,73 @@
</template>
<script>
import axios from "axios";
import moment from "moment";
import axios from 'axios'
import moment from 'moment'
export default {
data() {
return {
idTipoUsuario: "",
idUsuario: "",
tipoUsuario: "",
idTipoUsuario: '',
idUsuario: '',
tipoUsuario: '',
data: [],
total: "",
total: '',
isLoading: false,
page: 1,
perPage: 25,
numeroCuenta: "",
nombre: "",
idStatus: "",
idServicio: "",
numeroCuenta: '',
nombre: '',
idStatus: '',
idServicio: '',
token: {
headers: {
token: window.localStorage.getItem("token"),
token: window.localStorage.getItem('token'),
},
},
};
}
},
methods: {
onPageChange(page) {
this.page = page;
this.obtenerDatos();
this.page = page
this.obtenerDatos()
},
types(idStatus) {
if (idStatus === 1) {
return "is-dark";
return 'is-dark'
} else if (idStatus === 2) {
return "is-info";
return 'is-info'
} else if (idStatus === 3) {
return "is-link";
return 'is-link'
} else if (idStatus === 4) {
return "is-warning";
return 'is-warning'
} else if (idStatus === 5) {
return "is-success";
return 'is-success'
} else if (idStatus === 6) {
return "is-link";
return 'is-link'
} else if (idStatus === 7 || idStatus === 8 || idStatus === 9) {
return "is-danger";
return 'is-danger'
} else if (idStatus === 11) {
return "is-link is-light";
return 'is-link is-light'
} else if (idStatus === 12) {
return "is-danger is-light";
return 'is-danger is-light'
} else if (idStatus === 13 || idStatus === 14) {
return "is-success is-light";
return 'is-success is-light'
}
},
fecha(date) {
const fecha = moment(date.substr(0, 10));
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`;
const fecha = moment(date.substr(0, 10))
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`
},
obtenerDatos(idStatus) {
this.isLoading = true;
this.data = [];
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;
const servicios = res.data.servicios
if (servicios.length !== 0) {
for (let i = 0; i < servicios.length; i++) {
this.data.push({
@@ -194,76 +194,76 @@ export default {
carrera: servicios[i].Carrera.carrera,
status: servicios[i].Status.status,
idStatus: servicios[i].Status.idStatus,
});
})
}
}
let currentTotal = servicios.length;
let contador;
let currentTotal = servicios.length
let contador
for (let i = 0; i < res.data.registros / 25 + 1; i++) {
contador = i;
contador = i
}
currentTotal = this.perPage * contador;
this.total = currentTotal;
currentTotal = this.perPage * contador
this.total = currentTotal
})
.catch((error) => {
this.error(error.response.data.message);
this.error(error.response.data.message)
})
.finally(() => {
this.isLoading = false;
});
this.isLoading = false
})
},
getIdLocal() {
this.idUsuario = localStorage.getItem("idUsuario");
this.idTipoUsuario = localStorage.getItem("idTipoUsuario");
this.tipoUsuario = localStorage.getItem("tipoUsuario");
if (this.idTipoUsuario != 4 && this.tipoUsuario != "casoEspecial") {
localStorage.clear();
this.$router.push("/");
this.idUsuario = localStorage.getItem('idUsuario')
this.idTipoUsuario = localStorage.getItem('idTipoUsuario')
this.tipoUsuario = localStorage.getItem('tipoUsuario')
if (this.idTipoUsuario != 4 && this.tipoUsuario != 'casoEspecial') {
localStorage.clear()
this.$router.push('/')
}
},
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',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
})
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
localStorage.clear()
this.$router.push(`/`)
}
},
},
created() {
this.getIdLocal();
this.obtenerDatos(0);
this.getIdLocal()
this.obtenerDatos(0)
},
};
}
</script>
<style>
+2 -4
View File
@@ -2,9 +2,7 @@
<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>
<p class="mb-1">Hecho en México, todos los derechos reservados 2020.</p>
<p>
Esta página puede ser reproducida con fines no lucrativos, siempre y
@@ -18,7 +16,7 @@
</template>
<script>
export default {};
export default {}
</script>
<style scoped>
+1 -1
View File
@@ -31,7 +31,7 @@
</template>
<script>
export default {};
export default {}
</script>
<style scoped>
+7 -7
View File
@@ -15,10 +15,10 @@
export default {
data() {
return {
usuario: localStorage.getItem("usuario")
? localStorage.getItem("usuario")
: "",
};
usuario: localStorage.getItem('usuario')
? localStorage.getItem('usuario')
: '',
}
},
// created() {
// if (
@@ -33,12 +33,12 @@ export default {
// },
methods: {
cerrarSesion() {
localStorage.clear();
localStorage.clear()
this.$router.push("/");
this.$router.push('/')
},
},
};
}
</script>
<style scoped>
+64 -64
View File
@@ -31,7 +31,7 @@
</p>
<p>
{{
file.name || "Arrastra aquí tu archivo o da click para buscar"
file.name || 'Arrastra aquí tu archivo o da click para buscar'
}}
</p>
<p>Tamaño máximo para el archivo: 20MB</p>
@@ -55,128 +55,128 @@
</template>
<script>
import axios from "axios";
import axios from 'axios'
export default {
data() {
return {
isFullPage: true,
file: [],
idServicio: "",
cartaAceptacion: "",
idServicio: '',
cartaAceptacion: '',
isLoading: false,
token: {
headers: {
token: window.localStorage.getItem("token"),
token: window.localStorage.getItem('token'),
},
},
};
}
},
methods: {
validarTamaño() {
const TamMax = 20000000;
const archivo = this.file;
const TamMax = 20000000
const archivo = this.file
if (archivo.size > TamMax) {
this.toast();
this.file = "";
this.toast()
this.file = ''
}
},
toast() {
this.$buefy.toast.open({
message: "El archivo excede el tamaño permitido",
type: "is-danger",
});
message: 'El archivo excede el tamaño permitido',
type: 'is-danger',
})
},
Enviar() {
const data = { idServicio: this.idServicio };
const formData = new FormData();
const data = { idServicio: this.idServicio }
const formData = new FormData()
formData.append("data", JSON.stringify(data));
formData.append("cartaAceptacion", this.file);
this.isLoading = true;
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",
'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",
title: 'Success',
message: 'Se enviaron los datos correctamente',
type: 'is-success',
hasIcon: true,
icon: "checkbox-marked-circle",
iconPack: "mdi",
ariaRole: "alertdialog",
icon: 'checkbox-marked-circle',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
})
})
.catch((error) => {
this.error(error.response.data.message);
this.error(error.response.data.message)
})
.finally(() => {
this.isLoading = false;
localStorage.removeItem("idServicio");
localStorage.removeItem("cartaAceptacion");
this.$router.push("/responsable");
});
this.isLoading = false
localStorage.removeItem('idServicio')
localStorage.removeItem('cartaAceptacion')
this.$router.push('/responsable')
})
},
getIdLocal() {
this.idServicio = localStorage.getItem("idServicio");
this.cartaAceptacion = localStorage.getItem("cartaAceptacion");
this.idServicio = localStorage.getItem('idServicio')
this.cartaAceptacion = localStorage.getItem('cartaAceptacion')
if (this.idServicio === null || this.cartaAceptacion === null) {
this.$router.push("/responsable");
this.$router.push('/responsable')
}
},
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',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
})
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
localStorage.clear()
this.$router.push(`/`)
}
},
},
watch: {
file: function(newFile, oldFile) {
this.validarTamaño();
file: function (newFile, oldFile) {
this.validarTamaño()
},
},
created() {
this.getIdLocal();
this.getIdLocal()
},
};
}
</script>
<style>
+64 -64
View File
@@ -30,7 +30,7 @@
</p>
<p>
{{
file.name || "Arrastra aquí tu archivo o da click para buscar"
file.name || 'Arrastra aquí tu archivo o da click para buscar'
}}
</p>
<p>Tamaño máximo para el archivo: 20MB</p>
@@ -55,129 +55,129 @@
</template>
<script>
import axios from "axios";
import axios from 'axios'
export default {
data() {
return {
isFullPage: true,
file: [],
idServicio: "",
cartaTermino: "",
idServicio: '',
cartaTermino: '',
isLoading: false,
token: {
headers: {
token: window.localStorage.getItem("token"),
token: window.localStorage.getItem('token'),
},
},
};
}
},
methods: {
validarTamaño() {
const TamMax = 20000000;
const archivo = this.file;
const TamMax = 20000000
const archivo = this.file
if (archivo.size > TamMax) {
this.toast();
this.file = "";
this.toast()
this.file = ''
}
},
toast() {
this.$buefy.toast.open({
message: "El archivo excede el tamaño permitido",
type: "is-danger",
});
message: 'El archivo excede el tamaño permitido',
type: 'is-danger',
})
},
Enviar() {
const data = { idServicio: this.idServicio };
const formData = new FormData();
const data = { idServicio: this.idServicio }
const formData = new FormData()
formData.append("data", JSON.stringify(data));
formData.append("cartaTermino", this.file);
this.isLoading = true;
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",
'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",
title: 'Success',
message: 'Se enviaron los datos correctamente',
type: 'is-success',
hasIcon: true,
icon: "checkbox-marked-circle",
iconPack: "mdi",
ariaRole: "alertdialog",
icon: 'checkbox-marked-circle',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
})
})
.catch((error) => {
this.error(error.response.data.message);
this.error(error.response.data.message)
})
.finally(() => {
this.isLoading = false;
localStorage.removeItem("idServicio");
localStorage.removeItem("cartaTermino");
this.$router.push("/responsable");
});
this.isLoading = false
localStorage.removeItem('idServicio')
localStorage.removeItem('cartaTermino')
this.$router.push('/responsable')
})
},
getIdLocal() {
this.idServicio = localStorage.getItem("idServicio");
this.cartaTermino = localStorage.getItem("cartaTermino");
this.idServicio = localStorage.getItem('idServicio')
this.cartaTermino = localStorage.getItem('cartaTermino')
if (this.idServicio === null || this.cartaTermino === null) {
this.$router.push("/responsable");
this.$router.push('/responsable')
}
},
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',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
})
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
localStorage.clear()
this.$router.push(`/`)
}
},
},
watch: {
file: function(newFile, oldFile) {
this.validarTamaño();
file: function (newFile, oldFile) {
this.validarTamaño()
},
},
created() {
this.getIdLocal();
this.getIdLocal()
},
};
}
</script>
<style>
+64 -64
View File
@@ -145,13 +145,13 @@
<b-button
:disabled="
actividad1 == '' ||
actividad2 == '' ||
actividad3 == '' ||
actividad4 == '' ||
actividad5 == '' ||
retroalimentacion.length < 5 ||
p6 == '' ||
p7 == ''
actividad2 == '' ||
actividad3 == '' ||
actividad4 == '' ||
actividad5 == '' ||
retroalimentacion.length < 5 ||
p6 == '' ||
p7 == ''
"
class="border-success my-5"
type="is-success"
@@ -167,27 +167,27 @@
</template>
<script>
import axios from "axios";
import axios from 'axios'
export default {
data() {
return {
idServicio: localStorage.getItem("idServicio"),
cuestionario: "",
idServicio: localStorage.getItem('idServicio'),
cuestionario: '',
isLoading: false,
actividad1: "",
actividad2: "",
actividad3: "",
actividad4: "",
actividad5: "",
actividad1: '',
actividad2: '',
actividad3: '',
actividad4: '',
actividad5: '',
retroalimentacion: [],
p6: "",
p7: "",
p6: '',
p7: '',
token: {
headers: {
token: window.localStorage.getItem("token"),
token: window.localStorage.getItem('token'),
},
},
};
}
},
methods: {
enviarCuestionario() {
@@ -202,82 +202,82 @@ export default {
p6: this.p6,
p7: this.p7,
idServicio: this.idServicio,
};
}
this.isLoading = true;
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",
title: 'Success',
message: 'Se enviaron los datos correctamente',
type: 'is-success',
hasIcon: true,
icon: "checkbox-marked-circle",
iconPack: "mdi",
ariaRole: "alertdialog",
icon: 'checkbox-marked-circle',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
})
})
.catch((error) => {
this.error(error.response.data.message);
this.error(error.response.data.message)
})
.finally(() => {
this.isLoading = false;
localStorage.removeItem("idServicio");
localStorage.removeItem("cuestionario");
this.$router.push("/responsable");
});
this.isLoading = false
localStorage.removeItem('idServicio')
localStorage.removeItem('cuestionario')
this.$router.push('/responsable')
})
},
getIdLocal() {
this.idServicio = localStorage.getItem("idServicio");
this.cuestionario = localStorage.getItem("cuestionario");
this.idServicio = localStorage.getItem('idServicio')
this.cuestionario = localStorage.getItem('cuestionario')
if (this.idServicio === null || this.cuestionario === null) {
this.$router.push("/responsable");
this.$router.push('/responsable')
}
},
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',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
})
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
localStorage.clear()
this.$router.push(`/`)
}
},
},
created() {
this.getIdLocal();
this.getIdLocal()
},
};
}
</script>
<style>
+170 -171
View File
@@ -1,16 +1,14 @@
<template>
<section>
<h1 class="title is-1 titleAnadir">
Añadir Servicio Social
</h1>
<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">
<div class="column pl-0">
<form>
<b-field class="column p-0 my-5 is-full">
<input
class="input column "
class="input column"
v-model="noCuenta"
message="Solo numeros"
required="required"
@@ -52,8 +50,9 @@
v-for="programa in programas"
v-bind:key="programa.idPrograma"
:value="programa.idPrograma"
>{{ programa.programa }}</option
>
{{ programa.programa }}
</option>
</b-select>
</b-field>
@@ -133,7 +132,7 @@
<p>
{{
file.name ||
"Arrastra aquí tu archivo o da click para buscar"
'Arrastra aquí tu archivo o da click para buscar'
}}
</p>
<p>Tamaño máximo 20MB</p>
@@ -150,7 +149,7 @@
type="is-info is-light "
icon-left="arrow-left-box"
class="border-info"
style="float: left;"
style="float: left"
size="is-mediumm"
>
Regresar
@@ -173,184 +172,184 @@
</section>
</template>
<script>
import "buefy/dist/buefy.css";
import validator from "validator";
import axios from "axios";
import moment from "moment";
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"),
token: window.localStorage.getItem('token'),
},
},
isLoading: false,
noCuenta: "",
sizeOk: "",
noCuenta: '',
sizeOk: '',
searched: false,
minDate: new Date(),
programaSelectedID: "",
programaSelectedID: '',
file: [],
programas: [],
programaSelected: {
idPrograma: null,
institucion: "",
dependencia: "",
programa: "",
clavePrograma: "",
acatlan: "",
activo: "",
idUsuario: "",
programaInterno: "",
profesor: "",
institucion: '',
dependencia: '',
programa: '',
clavePrograma: '',
acatlan: '',
activo: '',
idUsuario: '',
programaInterno: '',
profesor: '',
},
alumno: {
cuenta: "",
nombre: "",
carrera: "",
creditos: "",
idAlumno: "",
idCarrera: "",
cuenta: '',
nombre: '',
carrera: '',
creditos: '',
idAlumno: '',
idCarrera: '',
inicio: [],
fin: [],
correo: "",
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.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.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 = "";
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 != ""
this.file != '' &&
this.noCuenta != '' &&
this.alumno.correo != '' &&
this.alumno.inicio != '' &&
this.alumno.fin != '' &&
this.programaSelectedID != ''
)
return false;
else return true;
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 != ""
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;
return false
else return true
}
},
esNumero(numero) {
const ultimaLetra = numero.length - 1;
const ultimaLetra = numero.length - 1
if (numero && !validator.isNumeric(numero[ultimaLetra])) {
return numero.substr(0, ultimaLetra);
return numero.substr(0, ultimaLetra)
}
return numero;
return numero
},
maxLength(str, max) {
if (str.length > max) return str.substr(0, max);
return str;
if (str.length > max) return str.substr(0, max)
return str
},
correoValidado() {
if (validator.isEmail(this.alumno.correo)) {
return "";
return ''
}
},
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',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
})
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
localStorage.clear()
this.$router.push(`/`)
}
},
buscarAlumno() {
this.isLoading = true;
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;
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);
this.error(error.response.data.message)
})
.finally(() => {
this.isLoading = false;
});
this.isLoading = false
})
},
Enviar() {
this.isLoading = true;
this.isLoading = true
const data = {
idUsuario: this.alumno.idAlumno,
idPrograma: this.programaSelected.idPrograma,
@@ -362,96 +361,96 @@ export default {
profesor: this.programaSelected.profesor,
fechaInicio: moment(this.alumno.inicio),
fechaFin: moment(this.alumno.fin),
};
const formData = new FormData();
}
const formData = new FormData()
formData.append("alumno", JSON.stringify(data));
formData.append("cartaAceptacion", this.file);
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",
'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",
title: 'Success',
message: 'Se enviaron los datos correctamente',
type: 'is-success',
hasIcon: true,
icon: "checkbox-marked-circle",
iconPack: "mdi",
ariaRole: "alertdialog",
icon: 'checkbox-marked-circle',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
this.reset();
})
this.reset()
})
.catch((error) => {
this.error(error.response.data.message);
this.error(error.response.data.message)
})
.finally(() => {
this.isLoading = false;
});
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);
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();
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.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;
].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.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.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",
title: 'Error',
message: 'El tamaño del archivo exede los 20MB',
type: 'is-danger',
hasIcon: true,
icon: "alert-circle",
iconPack: "mdi",
ariaRole: "alertdialog",
icon: 'alert-circle',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
this.file = [];
})
this.file = []
}
},
"alumno.inicio"() {
this.alumno.fin = [];
'alumno.inicio'() {
this.alumno.fin = []
},
},
mounted() {
@@ -460,26 +459,26 @@ export default {
`${
process.env.api
}/programa/programas_responsable?idUsuario=${localStorage.getItem(
"idUsuario"
'idUsuario'
)}`,
this.token
)
.then((resp) => {
this.programas = resp.data;
this.programas = resp.data
})
.catch((error) => {
this.error(error.response.data.message);
});
this.error(error.response.data.message)
})
this.minDate.setDate(this.minDate.getDate() - 16);
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());
const min = new Date(this.alumno.inicio)
return new Date(min.getFullYear(), min.getMonth() + 6, min.getDate())
},
},
};
}
</script>
<style scoped>
.titleAnadir,
+87 -87
View File
@@ -28,7 +28,7 @@
</b-field>
</div>
<div class="column is-3 mb-4 pb-4 ">
<div class="column is-3 mb-4 pb-4">
<b-field>
<b-select icon="information" expanded rounded v-model="idStatus">
<optgroup>
@@ -217,101 +217,101 @@
</template>
<script>
import axios from "axios";
import moment from "moment";
import axios from 'axios'
import moment from 'moment'
export default {
data() {
return {
idTipoUsuario: "",
idUsuario: "",
tipoUsuario: "",
idTipoUsuario: '',
idUsuario: '',
tipoUsuario: '',
data: [],
total: "",
total: '',
isLoading: false,
page: 1,
perPage: 25,
numeroCuenta: "",
nombre: "",
idStatus: "",
idServicio: "",
numeroCuenta: '',
nombre: '',
idStatus: '',
idServicio: '',
token: {
headers: {
token: window.localStorage.getItem("token"),
token: window.localStorage.getItem('token'),
},
},
};
}
},
methods: {
onPageChange(page) {
this.page = page;
this.obtenerDatos();
this.page = page
this.obtenerDatos()
},
types(idStatus) {
if (idStatus === 1) {
return "is-dark";
return 'is-dark'
} else if (idStatus === 2) {
return "is-info";
return 'is-info'
} else if (idStatus === 3) {
return "is-warning";
return 'is-warning'
} else if (idStatus === 4) {
return "is-link";
return 'is-link'
} else if (idStatus === 5) {
return "is-success";
return 'is-success'
} else if (idStatus === 6) {
return "is-success is-light";
return 'is-success is-light'
} else if (idStatus === 7) {
return "is-danger";
return 'is-danger'
} else if (idStatus === 8) {
return "is-danger";
return 'is-danger'
} else if (idStatus === 9) {
return "is-danger";
return 'is-danger'
}
},
botonCarta(cartaTermino, idServicio) {
window.localStorage.setItem("idServicio", idServicio);
window.localStorage.setItem("cartaTermino", cartaTermino);
this.$router.push("/responsable/carta_termino");
window.localStorage.setItem('idServicio', idServicio)
window.localStorage.setItem('cartaTermino', cartaTermino)
this.$router.push('/responsable/carta_termino')
if (cartaTermino === 1) {
return "is-success";
return 'is-success'
} else {
return "is-danger";
return 'is-danger'
}
},
botonCuestionario(cuestionario, idServicio) {
window.localStorage.setItem("idServicio", idServicio);
window.localStorage.setItem("cuestionario", cuestionario);
this.$router.push("/responsable/cuestionario");
window.localStorage.setItem('idServicio', idServicio)
window.localStorage.setItem('cuestionario', cuestionario)
this.$router.push('/responsable/cuestionario')
if (cuestionario === 1) {
return "is-success";
return 'is-success'
} else {
return "is-danger";
return 'is-danger'
}
},
iconoCarta(cartaTermino) {
if (cartaTermino != null) {
return "check";
return 'check'
}
},
iconoCuestionario(cuestionario) {
if (cuestionario != null) {
return "check";
return 'check'
}
},
fecha(date) {
const fecha = moment(date.substr(0, 10));
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`;
const fecha = moment(date.substr(0, 10))
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`
},
obtenerDatos(idStatus) {
this.isLoading = true;
this.data = [];
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;
const servicios = res.data.servicios
if (servicios.length !== 0) {
for (let i = 0; i < servicios.length; i++) {
@@ -326,82 +326,82 @@ export default {
cuestionario: servicios[i].idCuestionarioPrograma,
cartaTermino: servicios[i].cartaTermino,
idServicio: servicios[i].idServicio,
});
})
}
}
let currentTotal = servicios.length;
let contador;
let currentTotal = servicios.length
let contador
for (let i = 0; i < res.data.registros / 25 + 1; i++) {
contador = i;
contador = i
}
currentTotal = this.perPage * contador;
this.total = currentTotal;
currentTotal = this.perPage * contador
this.total = currentTotal
})
.catch((error) => {
this.error(error.response.data.message);
this.error(error.response.data.message)
})
.finally(() => {
this.isLoading = false;
});
this.isLoading = false
})
},
cartaAceptacion(idServicio, idStatus) {
window.localStorage.setItem("idServicio", idServicio);
window.localStorage.setItem("cartaAceptacion", idStatus);
this.$router.push("/responsable/carta_aceptacion");
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");
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("/");
if (this.idTipoUsuario != 2 && this.tipoUsuario != 'responsable') {
localStorage.clear()
this.$router.push('/')
}
},
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',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
})
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
localStorage.clear()
this.$router.push(`/`)
}
},
},
created() {
this.getIdLocal();
this.obtenerDatos(0);
this.getIdLocal()
this.obtenerDatos(0)
},
};
}
</script>
<style>
+3 -3
View File
@@ -1,16 +1,16 @@
<template>
<section class="mensaje has-text-justified is-size-6 ">
<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 ">
<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 ">
<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
+5 -5
View File
@@ -8,13 +8,13 @@
</template>
<script>
import Header from "../components/layouts/Header";
import Footer from "../components/layouts/Footer";
import Logout from "../components/layouts/Logout";
import Header from '../components/layouts/Header'
import Footer from '../components/layouts/Footer'
import Logout from '../components/layouts/Logout'
export default {
components: { Header, Footer, Logout },
};
}
</script>
<style>
@@ -26,7 +26,7 @@ input::-webkit-inner-spin-button {
}
/* Firefox */
input[type="number"] {
input[type='number'] {
-moz-appearance: textfield;
}
</style>
+9 -7
View File
@@ -11,9 +11,7 @@
></b-image>
</div>
<div class="column">
<h1 class="title">
ERROR 404 LA PÁGINA NO HA SIDO ENCONTRADA
</h1>
<h1 class="title">ERROR 404 LA PÁGINA NO HA SIDO ENCONTRADA</h1>
<b-button class="is-dark" outlined @click="cerrarSesion()"
>Ir a la página principal
</b-button>
@@ -26,15 +24,15 @@
<script>
export default {
layout: "login",
layout: 'login',
methods: {
cerrarSesion() {
localStorage.clear();
localStorage.clear()
this.$router.push("/");
this.$router.push('/')
},
},
};
}
</script>
<style scoped>
@@ -42,15 +40,19 @@ export default {
height: 100%;
width: 100%;
}
.title {
margin-top: 40%;
}
.slide-fade-enter-active {
transition: all 2s ease;
}
.slide-fade-leave-active {
transition: all 0.8s cubic-bezier(1, 0.5, 0.8, 1);
}
.slide-fade-enter, .slide-fade-leave-to
/* .slide-fade-leave-active below version 2.1.8 */ {
transform: translateX(10px);
+3 -3
View File
@@ -7,10 +7,10 @@
</template>
<script>
import Header from "../components/layouts/Header";
import Footer from "../components/layouts/Footer";
import Header from '../components/layouts/Header'
import Footer from '../components/layouts/Footer'
export default {
components: { Header, Footer },
};
}
</script>
+61 -65
View File
@@ -9,12 +9,8 @@
expanded
placeholder="Seleccione un cuestionario: "
>
<option value="cuestionario_alumno">
Cuestionario del alumno
</option>
<option value="cuestionario_programa">
Cuestionario del programa
</option>
<option value="cuestionario_alumno">Cuestionario del alumno</option>
<option value="cuestionario_programa">Cuestionario del programa</option>
</b-select>
<p class="is-size-3">Seleccione un año:</p>
<b-select
@@ -70,7 +66,7 @@
trap-focus
>
</b-datepicker>
<b-button
class="is-info mb-5"
v-if="selectedInicio && selectedFin"
@@ -132,8 +128,8 @@
</template>
<script>
import axios from "axios";
import botonRegresar from "../../../components/botonRegresar";
import axios from 'axios'
import botonRegresar from '../../../components/botonRegresar'
export default {
components: {
botonRegresar,
@@ -149,128 +145,128 @@ export default {
botonDos: false,
reporteListo: false,
gustavoListo: false,
minDate: new Date("January 1, 2020"),
minDate: new Date('January 1, 2020'),
maxDate: new Date(),
link: "",
link2: "",
link3: "",
link: '',
link2: '',
link3: '',
isLoading: false,
token: {
headers: {
token: localStorage.getItem("token"),
token: localStorage.getItem('token'),
},
},
};
}
},
methods: {
CalcYears() {
let now = new Date();
let year = now.getFullYear();
for (let i = 2020; i <= year; i++) this.years[i - 2020] = i;
let now = new Date()
let year = now.getFullYear()
for (let i = 2020; i <= year; i++) this.years[i - 2020] = i
},
crear() {
this.isLoading = true;
this.isLoading = true
axios
.get(
`${process.env.api}/${this.selectedCuestionario}?year=${this.selectedYear}`,
this.token
)
.then((res) => {
this.link = `${process.env.api}/${this.selectedYear}_${this.selectedCuestionario}.csv`;
this.botonDos = true;
this.link = `${process.env.api}/${this.selectedYear}_${this.selectedCuestionario}.csv`
this.botonDos = true
})
.catch((err) => {
this.error(err.response.data.message);
this.error(err.response.data.message)
})
.finally(() => {
this.isLoading = false;
});
this.isLoading = false
})
},
crearReporte() {
this.isLoading = true;
this.isLoading = true
axios
.get(
`${process.env.api}/servicio/reporte?inicio=${this.selectedInicio}&fin=${this.selectedFin}`,
this.token
)
.then((res) => {
this.link2 = `${process.env.api}/reporte.csv`;
this.reporteListo = true;
this.link2 = `${process.env.api}/reporte.csv`
this.reporteListo = true
})
.catch((err) => {
this.error(err.response.data.message);
this.error(err.response.data.message)
})
.finally(() => {
this.isLoading = false;
});
this.isLoading = false
})
},
crearGustavoBaz() {
this.isLoading = true;
this.isLoading = true
axios
.get(
`${process.env.api}/servicio/gustavo_bas_prada?year=${this.selectedYearGustavoBaz}`,
this.token
)
.then((res) => {
this.link3 = `${process.env.api}/${this.selectedYearGustavoBaz}_gustavo_baz_prada.csv`;
this.gustavoListo = true;
this.link3 = `${process.env.api}/${this.selectedYearGustavoBaz}_gustavo_baz_prada.csv`
this.gustavoListo = true
})
.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',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
})
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
localStorage.clear()
this.$router.push(`/`)
}
},
},
created() {
this.CalcYears();
this.CalcYears()
},
watch: {
selectedYear() {
this.botonDos = false;
this.botonDos = false
},
selectedCuestionario() {
this.botonDos = false;
this.botonDos = false
},
},
};
}
</script>
<style scoped>
@@ -11,6 +11,6 @@ import formEditar from '../../../../../components/admin/especial/formEditar'
export default {
components: {
formEditar,
}
},
}
</script>
</script>
+3 -3
View File
@@ -6,14 +6,14 @@
</template>
<script>
import BotonRegresar from "../../../../components/botonRegresar";
import DatosPersonalesEspecial from "../../../../components/admin/especial/casoEspecial.vue";
import BotonRegresar from '../../../../components/botonRegresar'
import DatosPersonalesEspecial from '../../../../components/admin/especial/casoEspecial.vue'
export default {
components: {
BotonRegresar,
DatosPersonalesEspecial,
},
};
}
</script>
<style></style>
+3 -3
View File
@@ -6,12 +6,12 @@
</template>
<script>
import botonRegresar from "../../../components/botonRegresar";
import TablaCasosEspeciales from "../../../components/admin/especial/tablaCasosEspeciales.vue";
import botonRegresar from '../../../components/botonRegresar'
import TablaCasosEspeciales from '../../../components/admin/especial/tablaCasosEspeciales.vue'
export default {
components: {
botonRegresar,
TablaCasosEspeciales,
},
};
}
</script>
+2 -2
View File
@@ -25,11 +25,11 @@
</template>
<script>
import InputTableA from "../../components/admin/inputTableA";
import InputTableA from '../../components/admin/inputTableA'
export default {
components: {
InputTableA,
},
};
}
</script>
+5 -5
View File
@@ -10,9 +10,9 @@
</template>
<script>
import tablaResponsables from "../../../components/admin/programa/tablaResponsables";
import cargaMasiva from "../../../components/admin/programa/cargaMasiva";
import botonRegresar from "../../../components/botonRegresar";
import tablaResponsables from '../../../components/admin/programa/tablaResponsables'
import cargaMasiva from '../../../components/admin/programa/cargaMasiva'
import botonRegresar from '../../../components/botonRegresar'
export default {
components: {
@@ -23,7 +23,7 @@ export default {
data() {
return {
link: `${process.env.api}/plantilla.csv`,
};
}
},
};
}
</script>
+40 -40
View File
@@ -8,7 +8,7 @@
<p class="is-size-4 mb-4"><strong>Nombre: </strong> {{ nombre }}</p>
<p class="is-size-4 mb-4"><strong>Correo: </strong> {{ correo }}</p>
<div class="columns">
<p class="is-size-4 column is-narrow" style="width: 250px;">
<p class="is-size-4 column is-narrow" style="width: 250px">
<strong>Clave de programa: </strong>
</p>
<b-select
@@ -51,8 +51,8 @@
</template>
<script>
import axios from "axios";
import botonRegresar from "../../../../components/botonRegresar";
import axios from 'axios'
import botonRegresar from '../../../../components/botonRegresar'
export default {
components: {
@@ -60,17 +60,17 @@ export default {
},
data() {
return {
idResponsable: localStorage.getItem("idResponsable"),
correo: localStorage.getItem("correo"),
nombre: localStorage.getItem("nombre"),
idResponsable: localStorage.getItem('idResponsable'),
correo: localStorage.getItem('correo'),
nombre: localStorage.getItem('nombre'),
programas: [],
selected: {},
token: {
headers: {
token: window.localStorage.getItem("token"),
token: window.localStorage.getItem('token'),
},
},
};
}
},
methods: {
obtenerProgramas() {
@@ -80,58 +80,58 @@ export default {
this.token
)
.then((res) => {
this.programas = res.data;
this.programas = res.data
})
.catch((err) => {
this.error(err.response.data.message);
});
this.error(err.response.data.message)
})
},
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',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
})
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
localStorage.clear()
this.$router.push(`/`)
}
},
},
created() {
this.obtenerProgramas();
this.obtenerProgramas()
},
beforeCreate() {
if (!localStorage.getItem("idResponsable")) {
this.$router.push("/admin/programa");
if (!localStorage.getItem('idResponsable')) {
this.$router.push('/admin/programa')
}
},
};
}
</script>
<style scoped>
@@ -1,5 +1,5 @@
<template>
<div class="container" style="margin-bottom:10%;margin-top:2%;">
<div class="container" style="margin-bottom: 10%; margin-top: 2%">
<BotonRegresar :path="'/admin/programa/infoResponsable'" />
<p class="is-size-2">Editar información del responsable</p>
<b-field label="Nombre">
@@ -28,9 +28,9 @@
</template>
<script>
import validator from "validator";
import botonRegresar from "../../../../../components/botonRegresar";
import axios from "axios";
import validator from 'validator'
import botonRegresar from '../../../../../components/botonRegresar'
import axios from 'axios'
export default {
components: {
@@ -38,73 +38,73 @@ export default {
},
data() {
return {
idResponsable: localStorage.getItem("idResponsable"),
idResponsable: localStorage.getItem('idResponsable'),
viejo: {
nombre: localStorage.getItem("nombre"),
correo: localStorage.getItem("correo"),
nombre: localStorage.getItem('nombre'),
correo: localStorage.getItem('correo'),
},
nuevo: {
nombre: "",
correo: "",
nombre: '',
correo: '',
},
idServicio: localStorage.getItem("idServicio"),
idServicio: localStorage.getItem('idServicio'),
token: {
headers: {
token: window.localStorage.getItem("token"),
token: window.localStorage.getItem('token'),
},
},
isLoading: false,
};
}
},
methods: {
mostrar() {
if (validator.isEmail(this.nuevo.correo) || this.nuevo.nombre) {
if (this.nuevo.correo) {
if (validator.isEmail(this.nuevo.correo)) {
return true;
return true
} else {
return false;
return false
}
}
return true;
return true
}
},
actualizar() {
const data = { idUsuario: this.idResponsable };
const data = { idUsuario: this.idResponsable }
this.isLoading = true;
this.isLoading = true
if (this.nuevo.correo) {
data.correo = this.nuevo.correo;
data.correo = this.nuevo.correo
}
if (this.nuevo.nombre) {
data.nombre = this.nuevo.nombre;
data.nombre = this.nuevo.nombre
}
axios
.put(`${process.env.api}/usuario/responsable/update`, data, this.token)
.then((res) => {
this.isLoading = false;
this.toast();
this.$router.push("/admin/programa");
this.isLoading = false
this.toast()
this.$router.push('/admin/programa')
})
.catch((err) => {
this.isLoading = false;
this.error(err.response.data.message);
});
this.isLoading = false
this.error(err.response.data.message)
})
},
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 = { idUsuario: this.idResponsable };
this.isLoading = true
const data = { idUsuario: this.idResponsable }
axios
.put(
`${process.env.api}/usuario/new_password_responsable`,
@@ -113,65 +113,65 @@ export default {
)
.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
})
},
toast() {
this.$buefy.toast.open({
message: "Se han actualizado los datos del responsable",
type: "is-success",
});
message: 'Se han actualizado los datos del responsable',
type: 'is-success',
})
},
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',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
})
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
localStorage.clear()
this.$router.push(`/`)
}
},
},
beforeCreate() {
if (!localStorage.getItem("idResponsable")) {
this.$router.push("/admin/programa");
if (!localStorage.getItem('idResponsable')) {
this.$router.push('/admin/programa')
}
},
};
}
</script>
+4 -4
View File
@@ -5,16 +5,16 @@
</template>
<script>
import vistaServicio from "../../../components/admin/servicio/vistaServicio.vue";
import vistaServicio from '../../../components/admin/servicio/vistaServicio.vue'
export default {
components: {
vistaServicio,
},
beforeCreate() {
if (!window.localStorage.getItem("idServicio")) {
this.$router.push("/admin");
if (!window.localStorage.getItem('idServicio')) {
this.$router.push('/admin')
}
},
};
}
</script>
+4 -4
View File
@@ -5,16 +5,16 @@
</template>
<script>
import Form from "../../../../components/admin/servicio/modificar/form";
import Form from '../../../../components/admin/servicio/modificar/form'
export default {
components: {
Form,
},
beforeCreate() {
if (!window.localStorage.getItem("idServicio")) {
this.$router.push("/admin");
if (!window.localStorage.getItem('idServicio')) {
this.$router.push('/admin')
}
},
};
}
</script>
+117 -117
View File
@@ -27,17 +27,17 @@
</template>
<script>
import Buefy from "buefy";
import "buefy/dist/buefy.css";
import axios from "axios";
import parteA from "../../../components/alumno/cuestionario/A";
import parteB from "../../../components/alumno/cuestionario/B";
import parteC from "../../../components/alumno/cuestionario/C";
import parteD from "../../../components/alumno/cuestionario/D";
import parteE from "../../../components/alumno/cuestionario/E";
import parteF from "../../../components/alumno/cuestionario/F";
import navCues from "../../../components/alumno/cuestionario/navCues";
import BotonRegresar from "../../../components/botonRegresar";
import Buefy from 'buefy'
import 'buefy/dist/buefy.css'
import axios from 'axios'
import parteA from '../../../components/alumno/cuestionario/A'
import parteB from '../../../components/alumno/cuestionario/B'
import parteC from '../../../components/alumno/cuestionario/C'
import parteD from '../../../components/alumno/cuestionario/D'
import parteE from '../../../components/alumno/cuestionario/E'
import parteF from '../../../components/alumno/cuestionario/F'
import navCues from '../../../components/alumno/cuestionario/navCues'
import BotonRegresar from '../../../components/botonRegresar'
export default {
components: {
@@ -54,145 +54,145 @@ export default {
return {
token: {
headers: {
token: window.localStorage.getItem("token"),
token: window.localStorage.getItem('token'),
},
},
isLoading: false,
current: 1,
idCuestionario: "",
idCuestionario: '',
answers: {
sexo: "",
edad: "",
servicioMedico: "",
servicioMedicoOtro: "",
servicioMedicoAux: "",
p1: "",
p2: "",
sexo: '',
edad: '',
servicioMedico: '',
servicioMedicoOtro: '',
servicioMedicoAux: '',
p1: '',
p2: '',
p3: [], // selecciona 3 opciones
p3Otro: "",
p4: "",
p3Otro: '',
p4: '',
p5: [],
p6: "",
p7: "",
p6: '',
p7: '',
p8: [],
p9: "",
p10: "",
p11: "",
p12: "",
p13: "",
p9: '',
p10: '',
p11: '',
p12: '',
p13: '',
p14: [],
p15: [],
p16: "",
p16: '',
p17: [],
p18: "",
p19: "",
p20: "",
p18: '',
p19: '',
p20: '',
p21: [],
p22: [],
p23: [],
p24: [],
p25: "",
p26: "",
p27: "",
p25: '',
p26: '',
p27: '',
p28: null,
p29: null,
p30: "",
p30: '',
},
};
}
},
methods: {
onChildA(value) {
this.answers.servicioMedico = value.servicioMedico;
this.answers.sexo = value.sexo;
this.answers.edad = value.edad;
this.answers.servicioMedico = value.servicioMedico
this.answers.sexo = value.sexo
this.answers.edad = value.edad
},
onChildB(value) {
this.answers.p1 = value.p1;
this.answers.p2 = value.p2;
this.answers.p3 = value.p3;
this.answers.p3Otro = value.p3Otro;
this.answers.p1 = value.p1
this.answers.p2 = value.p2
this.answers.p3 = value.p3
this.answers.p3Otro = value.p3Otro
},
onChildC(value) {
this.answers.p4 = value.p4;
this.answers.p5 = value.p5;
this.answers.p6 = value.p6;
this.answers.p7 = value.p7;
this.answers.p8 = value.p8;
this.answers.p9 = value.p9;
this.answers.p10 = value.p10;
this.answers.p11 = value.p11;
this.answers.p12 = value.p12;
this.answers.p13 = value.p13;
this.answers.p4 = value.p4
this.answers.p5 = value.p5
this.answers.p6 = value.p6
this.answers.p7 = value.p7
this.answers.p8 = value.p8
this.answers.p9 = value.p9
this.answers.p10 = value.p10
this.answers.p11 = value.p11
this.answers.p12 = value.p12
this.answers.p13 = value.p13
},
onChildD(value) {
this.answers.p14 = value.p14;
this.answers.p15 = value.p15;
this.answers.p16 = value.p16;
this.answers.p17 = value.p17;
this.answers.p14 = value.p14
this.answers.p15 = value.p15
this.answers.p16 = value.p16
this.answers.p17 = value.p17
},
onChildE(value) {
this.answers.p18 = value.p18;
this.answers.p19 = value.p19;
this.answers.p20 = value.p20;
this.answers.p21 = value.p21;
this.answers.p18 = value.p18
this.answers.p19 = value.p19
this.answers.p20 = value.p20
this.answers.p21 = value.p21
},
onChildF(value) {
this.answers.p22 = value.p22;
this.answers.p23 = value.p23;
this.answers.p24 = value.p24;
this.answers.p25 = value.p25;
this.answers.p26 = value.p26;
this.answers.p27 = value.p27;
this.answers.p28 = value.p28;
this.answers.p29 = value.p29;
this.answers.p30 = value.p30;
this.answers.p22 = value.p22
this.answers.p23 = value.p23
this.answers.p24 = value.p24
this.answers.p25 = value.p25
this.answers.p26 = value.p26
this.answers.p27 = value.p27
this.answers.p28 = value.p28
this.answers.p29 = value.p29
this.answers.p30 = value.p30
},
onChildNAV(value) {
this.current = value;
this.current = value
},
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',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
})
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
localStorage.clear()
this.$router.push(`/`)
}
},
enviarCuestionario() {
this.isLoading = true;
if (this.answers.p3Otro != "" && this.maxCheckbox < 3) {
this.answers.p3.push(this.answers.p3Otro);
this.isLoading = true
if (this.answers.p3Otro != '' && this.maxCheckbox < 3) {
this.answers.p3.push(this.answers.p3Otro)
}
const data = {
idServicio: localStorage.getItem("idServicio"),
idServicio: localStorage.getItem('idServicio'),
sexo: this.answers.sexo,
edad: this.answers.edad,
servicioMedico: this.answers.servicioMedico,
@@ -226,37 +226,37 @@ export default {
p28: this.answers.p28,
p29: this.answers.p29,
p30: this.answers.p30,
};
}
axios
.post(`${process.env.api}/cuestionario_alumno`, data, this.token)
.then((res) => {
this.$buefy.dialog.alert({
title: "Success",
message: "Se enviaron los datos correctamente",
type: "is-success",
title: 'Success',
message: 'Se enviaron los datos correctamente',
type: 'is-success',
hasIcon: true,
icon: "checkbox-marked-circle",
iconPack: "mdi",
ariaRole: "alertdialog",
icon: 'checkbox-marked-circle',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
})
//this.reset()
localStorage.removeItem("idCuestionarioAlumno");
this.$router.push("/alumno");
localStorage.removeItem('idCuestionarioAlumno')
this.$router.push('/alumno')
})
.catch((error) => {
this.error(error.response.data.message);
this.error(error.response.data.message)
})
.finally(() => {
this.isLoading = false;
});
this.isLoading = false
})
},
},
mounted() {
this.idCuestionario = localStorage.getItem("idCuestionarioAlumno");
this.idCuestionario = localStorage.getItem('idCuestionarioAlumno')
},
};
}
</script>
<style>
.SINO * {
+91 -91
View File
@@ -22,51 +22,51 @@
</style>
<script>
import "buefy/dist/buefy.css";
import axios from "axios";
import Steps from "../../components/alumno/steps";
import Info from "../../components/alumno/info";
import Mensajes from "../../components/alumno/mensajes";
import PreRegistroValidado from "../../components/alumno/pre-registro-validado";
import PreTermino from "../../components/alumno/preTermino";
import 'buefy/dist/buefy.css'
import axios from 'axios'
import Steps from '../../components/alumno/steps'
import Info from '../../components/alumno/info'
import Mensajes from '../../components/alumno/mensajes'
import PreRegistroValidado from '../../components/alumno/pre-registro-validado'
import PreTermino from '../../components/alumno/preTermino'
export default {
data() {
return {
token: {
headers: {
token: window.localStorage.getItem("token"),
token: window.localStorage.getItem('token'),
},
},
activeStep: "",
status: "",
activeStep: '',
status: '',
alumno: {
carrera: "",
creditos: "",
nombre: "",
cuenta: "",
correo: "",
direccion: "",
nacimiento: "",
telefono: "",
idCuestionario: "",
informeGlobal: "",
idAlumno: "",
idCarrera: "",
idServicio: "",
inicio: "",
fin: "",
registro: "",
carrera: '',
creditos: '',
nombre: '',
cuenta: '',
correo: '',
direccion: '',
nacimiento: '',
telefono: '',
idCuestionario: '',
informeGlobal: '',
idAlumno: '',
idCarrera: '',
idServicio: '',
inicio: '',
fin: '',
registro: '',
},
programa: {
programa: "",
institucion: "",
dependencia: "",
clave: "",
acatlan: "",
programaInterno: "",
profesor: "",
programa: '',
institucion: '',
dependencia: '',
clave: '',
acatlan: '',
programaInterno: '',
profesor: '',
},
};
}
},
components: {
Steps,
@@ -77,92 +77,92 @@ export default {
},
methods: {
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',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
})
if (salir == true) {
localStorage.clear();
this.$router.push(`/`);
localStorage.clear()
this.$router.push(`/`)
}
},
getData() {
axios
.get(
`${process.env.api}/servicio/alumno?idUsuario=${localStorage.getItem(
"idUsuario"
'idUsuario'
)}`,
this.token
)
.then((resp) => {
this.activeStep = resp.data.Status.idStatus - 1;
this.status = resp.data.Status.idStatus;
this.activeStep = resp.data.Status.idStatus - 1
this.status = resp.data.Status.idStatus
this.programa.programa = resp.data.Programa.programa;
this.programa.dependencia = resp.data.Programa.dependencia;
this.programa.institucion = resp.data.Programa.institucion;
this.programa.clave = resp.data.Programa.clavePrograma;
this.programa.profesor = resp.data.profesor;
this.programa.acatlan = resp.data.Programa.acatlan;
this.programa.programaInterno = resp.data.programaInterno;
this.programa.programa = resp.data.Programa.programa
this.programa.dependencia = resp.data.Programa.dependencia
this.programa.institucion = resp.data.Programa.institucion
this.programa.clave = resp.data.Programa.clavePrograma
this.programa.profesor = resp.data.profesor
this.programa.acatlan = resp.data.Programa.acatlan
this.programa.programaInterno = resp.data.programaInterno
this.alumno.creditos = parseInt(resp.data.creditos, 10);
this.alumno.carrera = resp.data.Carrera.carrera;
this.alumno.idCarrera = resp.data.Carrera.idCarrera;
this.alumno.correo = resp.data.correo;
this.alumno.inicio = resp.data.fechaInicio;
this.alumno.fin = resp.data.fechaFin;
this.alumno.registro = resp.data.createdAt;
this.alumno.direccion = resp.data.direccion;
this.alumno.nacimiento = resp.data.fechaNacimiento;
this.alumno.telefono = resp.data.telefono;
this.alumno.idServicio = resp.data.idServicio;
this.alumno.idCuestionario = resp.data.idCuestionarioAlumno;
this.alumno.informeGlobal = resp.data.informeGlobal;
this.alumno.nombre = localStorage.getItem("nombre");
this.alumno.cuenta = localStorage.getItem("usuario");
this.alumno.creditos = parseInt(resp.data.creditos, 10)
this.alumno.carrera = resp.data.Carrera.carrera
this.alumno.idCarrera = resp.data.Carrera.idCarrera
this.alumno.correo = resp.data.correo
this.alumno.inicio = resp.data.fechaInicio
this.alumno.fin = resp.data.fechaFin
this.alumno.registro = resp.data.createdAt
this.alumno.direccion = resp.data.direccion
this.alumno.nacimiento = resp.data.fechaNacimiento
this.alumno.telefono = resp.data.telefono
this.alumno.idServicio = resp.data.idServicio
this.alumno.idCuestionario = resp.data.idCuestionarioAlumno
this.alumno.informeGlobal = resp.data.informeGlobal
this.alumno.nombre = localStorage.getItem('nombre')
this.alumno.cuenta = localStorage.getItem('usuario')
window.localStorage.setItem(
"idCuestionarioAlumno",
'idCuestionarioAlumno',
resp.data.idCuestionarioAlumno
);
window.localStorage.setItem("idServicio", resp.data.idServicio);
)
window.localStorage.setItem('idServicio', resp.data.idServicio)
})
.catch((error) => {
this.error(error.response.data.message);
});
this.error(error.response.data.message)
})
},
},
created() {
this.getData();
this.getData()
},
};
}
</script>
<style scoped>
+2 -2
View File
@@ -8,10 +8,10 @@
</template>
<script>
import tablaServicios from "../../components/casoEspecial/tablaServicios";
import tablaServicios from '../../components/casoEspecial/tablaServicios'
export default {
components: {
tablaServicios,
},
};
}
</script>
+3 -3
View File
@@ -6,15 +6,15 @@
</template>
<script>
import BotonRegresar from "../../../components/botonRegresar";
import FormularioEspecial from "../../../components/casoEspecial/formularioEspecial.vue";
import BotonRegresar from '../../../components/botonRegresar'
import FormularioEspecial from '../../../components/casoEspecial/formularioEspecial.vue'
export default {
components: {
BotonRegresar,
FormularioEspecial,
},
};
}
</script>
<style></style>
+34 -34
View File
@@ -18,8 +18,8 @@
<button
:disabled="
usuario == '' ||
password == '' ||
(password == '' && error == true)
password == '' ||
(password == '' && error == true)
"
class="button is-success is-medium"
@click="enviar()"
@@ -35,83 +35,83 @@
</template>
<script>
import validator from "validator";
import axios from "axios";
import validator from 'validator'
import axios from 'axios'
export default {
data() {
return {
usuario: "",
password: "",
usuario: '',
password: '',
error: false,
isLoading: false,
};
}
},
methods: {
usuarioValido() {
if (!this.usuario) {
this.error = true;
this.error = true
}
if (validator.isNumeric(this.usuario, { no_symbols: true })) {
if (this.usuario.length === 10) {
}
return "";
return ''
} else if (validator.isEmail(this.usuario)) {
return "";
return ''
} else if (validator.isAlpha(this.usuario)) {
return "";
return ''
}
this.error = true;
this.error = true
},
enviar() {
this.isLoading = true;
this.isLoading = true
const data = {
usuario: this.usuario.trim(),
password: this.password,
};
}
axios
.post(`${process.env.api}/usuario/login`, data)
.then((resp) => {
window.localStorage.setItem("idUsuario", resp.data.Usuario.idUsuario);
window.localStorage.setItem("token", resp.data.token);
window.localStorage.setItem("nombre", resp.data.Usuario.nombre);
window.localStorage.setItem('idUsuario', resp.data.Usuario.idUsuario)
window.localStorage.setItem('token', resp.data.token)
window.localStorage.setItem('nombre', resp.data.Usuario.nombre)
window.localStorage.setItem(
"idTipoUsuario",
'idTipoUsuario',
resp.data.Usuario.TipoUsuario.idTipoUsuario
);
)
window.localStorage.setItem(
"tipoUsuario",
'tipoUsuario',
resp.data.Usuario.TipoUsuario.tipoUsuario
);
window.localStorage.setItem("usuario", resp.data.Usuario.usuario);
this.$router.push(`/${resp.data.Usuario.TipoUsuario.tipoUsuario}`);
)
window.localStorage.setItem('usuario', resp.data.Usuario.usuario)
this.$router.push(`/${resp.data.Usuario.TipoUsuario.tipoUsuario}`)
})
.catch((error) => {
this.$buefy.dialog.alert({
title: "Error",
title: 'Error',
message: error.response.data.message,
type: "is-danger",
type: 'is-danger',
hasIcon: true,
icon: "alert-circle",
iconPack: "mdi",
ariaRole: "alertdialog",
icon: 'alert-circle',
iconPack: 'mdi',
ariaRole: 'alertdialog',
ariaModal: true,
});
})
})
.finally(() => {
this.isLoading = false;
});
this.isLoading = false
})
},
},
watch: {
usuario() {
this.error = false;
this.error = false
},
},
layout: "login",
};
layout: 'login',
}
</script>
<style scoped>
+2 -2
View File
@@ -5,11 +5,11 @@
</template>
<script>
import Cuestionario from "../../../components/responsable/cartaTermino";
import Cuestionario from '../../../components/responsable/cartaTermino'
export default {
components: {
Cuestionario,
},
};
}
</script>
+2 -2
View File
@@ -5,11 +5,11 @@
</template>
<script>
import CartaAceptacion from "../../../components/responsable/cartaAceptacion";
import CartaAceptacion from '../../../components/responsable/cartaAceptacion'
export default {
components: {
CartaAceptacion,
},
};
}
</script>
+2 -2
View File
@@ -5,11 +5,11 @@
</template>
<script>
import cartaTermino from "../../../components/responsable/cartaTermino";
import cartaTermino from '../../../components/responsable/cartaTermino'
export default {
components: {
cartaTermino,
},
};
}
</script>
+2 -2
View File
@@ -5,11 +5,11 @@
</template>
<script>
import Cuestionario from "../../../components/responsable/cuestionario";
import Cuestionario from '../../../components/responsable/cuestionario'
export default {
components: {
Cuestionario,
},
};
}
</script>
+3 -3
View File
@@ -24,7 +24,7 @@
</template>
<script>
import InputTable from "../../components/responsable/inputTable";
import InputTable from '../../components/responsable/inputTable'
export default {
components: {
@@ -32,10 +32,10 @@ export default {
},
methods: {
agregarAlumno() {
this.$router.push("/responsable/nuevo");
this.$router.push('/responsable/nuevo')
},
},
};
}
</script>
<style></style>
+4 -4
View File
@@ -7,9 +7,9 @@
</template>
<script>
import Texto from "../../../components/responsable/nuevoTexto";
import BotonRegresar from "../../../components/botonRegresar";
import FormSerivicioSocial from "../../../components/responsable/formServicioSocial";
import Texto from '../../../components/responsable/nuevoTexto'
import BotonRegresar from '../../../components/botonRegresar'
import FormSerivicioSocial from '../../../components/responsable/formServicioSocial'
export default {
components: {
@@ -17,7 +17,7 @@ export default {
BotonRegresar,
FormSerivicioSocial,
},
};
}
</script>
<style scoped>