caso especial listo

This commit is contained in:
2021-06-09 13:44:18 -05:00
parent ac109a961a
commit 304490c015
27 changed files with 173 additions and 162 deletions
@@ -1,77 +1,86 @@
<template>
<section>
<h5 class="is-size-2 mb-3">
{{ alumno.Status.status }}
</h5>
<div>
<h3 class="title">{{ alumno.Status.status }}</h3>
<h3 class="is-size-3"><b>Datos personales</b></h3>
<h4 class="is-size-4">Datos personales</h4>
<h4 class="is-size-5 mt-3">
<b>Número de cuenta: </b> {{ alumno.Usuario.usuario }}
</h4>
<b-field label="Número de Cuenta:">
<p class="input">{{ alumno.Usuario.usuario }}</p>
</b-field>
<h4 class="is-size-5 mt-3"><b>Nombre: </b> {{ alumno.Usuario.nombre }}</h4>
<b-field label="Nombre:">
<p class="input">{{ alumno.Usuario.nombre }}</p>
</b-field>
<p class="is-size-5 mt-3"><b>Carrera: </b> {{ alumno.Carrera.carrera }}</p>
<b-field label="Carrera:">
<p class="input">{{ alumno.Carrera.carrera }}</p>
</b-field>
<p class="is-size-5 mt-3"><b>Correo: </b> {{ alumno.correo }}</p>
<b-field label="Correo:">
<p class="input">{{ alumno.correo }}</p>
</b-field>
<p class="is-size-5 mt-3"><b>Dirección: </b> {{ alumno.direccion }}</p>
<b-field label="Dirección:">
<p class="input">{{ alumno.direccion }}</p>
</b-field>
<p class="is-size-5 mt-3"><b>Teléfono: </b> {{ alumno.telefono }}</p>
<b-field label="Teléfono:">
<p class="input">{{ alumno.telefono }}</p>
</b-field>
<p class="is-size-5 mt-3" v-if="alumno.motivo">
<b>Motivo: </b>{{ motivo(alumno.motivo) }}
</p>
<b-field label="Motivo:" v-if="alumno.motivo">
<p class="input">{{ alumno.motivo }}</p>
</b-field>
<p class="is-size-5 mt-3" v-if="alumno.institucion">
<b>Institución: </b>{{ alumno.institucion }}
</p>
<b-field label="Institución:" v-if="alumno.institucion">
<p class="input">{{ alumno.institucion }}</p>
</b-field>
<p class="is-size-5 mt-3" v-if="alumno.dependencia">
<b>Dependencia: </b>{{ alumno.dependencia }}
</p>
<b-field label="Dependencia:" v-if="alumno.dependencia">
<p class="input">{{ alumno.dependencia }}</p>
</b-field>
<p class="is-size-5 mt-3"><b>Créditos: </b> {{ alumno.creditos + '%' }}</p>
<b-field label="Créditos:">
<p class="input">{{ alumno.creditos + '%' }}</p>
</b-field>
<p class="is-size-5 mt-3">
<b>Fecha de nacimiento: </b>
{{ fecha(alumno.fechaNacimiento) }}
</p>
<b-field label="Fecha de Nacimiento:">
<p class="input">{{ fecha(alumno.fechaNacimiento) }}</p>
</b-field>
<p class="is-size-5 mt-3">
<b>Fecha de inicio: </b>
{{ fecha(alumno.fechaInicio) }}
</p>
<b-field label="Fecha Inicio:">
<p class="input">{{ fecha(alumno.fechaInicio) }}</p>
</b-field>
<p class="is-size-5 mt-3">
<b>Fecha de fin: </b>
{{ fecha(alumno.fechaFin) }}
</p>
<b-button
type="is-info"
class="my-5"
@click="editar()"
v-if="alumno.Status.idStatus === 11 || alumno.Status.idStatus === 12"
>
Editar información
</b-button>
<b-field label="Fecha Fin:">
<p class="input">{{ fecha(alumno.fechaFin) }}</p>
</b-field>
<b-field
class="py-5"
v-if="alumno.Status.idStatus === 11 || alumno.Status.idStatus === 12"
>
<b-button type="is-success" class="mt-2" @click="confirmarLiberacion()">
<b-button
type="is-info"
tag="router-link"
to="/admin/casos_especiales/caso_especial/editar"
>
Editar información
</b-button>
</b-field>
<b-field
class="mt-2"
v-if="alumno.Status.idStatus === 11 || alumno.Status.idStatus === 12"
>
<b-button type="is-success" @click="confirmarLiberacion()">
Liberar
</b-button>
</b-field>
<b-loading
:is-full-page="true"
v-model="isLoading"
:can-cancel="false"
></b-loading>
</section>
<b-loading :is-full-page="true" :can-cancel="false" v-model="isLoading">
</b-loading>
</div>
</template>
<script>
@@ -83,29 +92,22 @@ export default {
return {
admin: {},
alumno: { Usuario: {}, Carrera: {}, Status: {} },
token: {},
idCasoEspecial: '',
idCasoEspecial: null,
isLoading: false,
token: {},
}
},
methods: {
fecha(date) {
if (date) {
const fecha = moment(date.substr(0, 10))
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`
const fecha = moment(date)
return `${fecha.date()}/${
fecha.month() < 9 ? '0' + (fecha.month() + 1) : fecha.month() + 1
}/${fecha.year()}`
}
return ''
},
editar() {
this.$router.push('/admin/casos_especiales/caso_especial/editar')
},
motivo(n) {
if (n == 1) {
return 'Tercera edad'
} else if (n == 2) {
return 'Capacidades diferentes'
}
},
getLocalhostInfo() {
this.admin.idUsuario = localStorage.getItem('idUsuario')
this.admin.idTipoUsuario = Number(localStorage.getItem('idTipoUsuario'))
@@ -173,12 +175,4 @@ export default {
}
</script>
<style scoped>
.centro {
text-align: center;
}
section {
height: 60vh;
}
</style>
<style scoped></style>
@@ -89,11 +89,9 @@
<b-button v-else disabled class="is-success my-5"
>Actualizar Datos</b-button
>
<b-loading
:is-full-page="true"
v-model="isLoading"
:can-cancel="false"
></b-loading>
<b-loading :is-full-page="true" :can-cancel="false" v-model="isLoading">
</b-loading>
</div>
</template>
@@ -198,7 +196,6 @@ export default {
this.token
)
.then((res) => {
console.log(res.data)
this.viejo = res.data
})
.catch((err) => {
@@ -246,9 +243,13 @@ export default {
},
fecha(date) {
if (date) {
const fecha = moment(date.substr(0, 10))
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`
const fecha = moment(date)
return `${fecha.date()}/${
fecha.month() < 9 ? '0' + (fecha.month() + 1) : fecha.month() + 1
}/${fecha.year()}`
}
return ''
},
},
computed: {
@@ -140,9 +140,14 @@ export default {
return style
},
fecha(date) {
const fecha = moment(date.substr(0, 10))
if (date) {
const fecha = moment(date)
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`
return `${fecha.date()}/${
fecha.month() < 9 ? '0' + (fecha.month() + 1) : fecha.month() + 1
}/${fecha.year()}`
}
return ''
},
onPageChange(page) {
this.page = page
@@ -174,7 +179,8 @@ export default {
}
if (this.busqueda.idStatus) data += `&idStatus=${this.busqueda.idStatus}`
if (this.busqueda.nombre) data += `&nombre=${this.busqueda.nombre}`
if (this.busqueda.numeroCuenta) data = `&numeroCuenta=${this.busqueda.numeroCuenta}`
if (this.busqueda.numeroCuenta)
data = `&numeroCuenta=${this.busqueda.numeroCuenta}`
axios
.get(
`${process.env.api}/caso_especial/servicios_especiales?&pagina=${this.page}${data}`,
+7 -2
View File
@@ -150,9 +150,14 @@ export default {
return style
},
fecha(date) {
const fecha = moment(date.substr(0, 10))
if (date) {
const fecha = moment(date)
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`
return `${fecha.date()}/${
fecha.month() < 9 ? '0' + (fecha.month() + 1) : fecha.month() + 1
}/${fecha.year()}`
}
return ''
},
onPageChange(page) {
this.page = page
+2 -5
View File
@@ -31,11 +31,8 @@
</b-button>
</div>
<b-loading
:is-full-page="true"
v-model="isLoading"
:can-cancel="false"
></b-loading>
<b-loading :is-full-page="true" :can-cancel="false" v-model="isLoading">
</b-loading>
</div>
</template>
@@ -21,11 +21,8 @@
</b-button>
</div>
<b-loading
:is-full-page="true"
v-model="isLoading"
:can-cancel="false"
></b-loading>
<b-loading :is-full-page="true" :can-cancel="false" v-model="isLoading">
</b-loading>
</div>
</template>
+2 -5
View File
@@ -32,11 +32,8 @@
</b-button>
</div>
<b-loading
:is-full-page="true"
v-model="isLoading"
:can-cancel="false"
></b-loading>
<b-loading :is-full-page="true" :can-cancel="false" v-model="isLoading">
</b-loading>
</div>
</template>
@@ -38,11 +38,8 @@
>
</div>
<b-loading
:is-full-page="true"
v-model="isLoading"
:can-cancel="false"
></b-loading>
<b-loading :is-full-page="true" :can-cancel="false" v-model="isLoading">
</b-loading>
</div>
</template>
@@ -41,11 +41,8 @@
</b-button>
</div>
<b-loading
:is-full-page="true"
v-model="isLoading"
:can-cancel="false"
></b-loading>
<b-loading :is-full-page="true" :can-cancel="false" v-model="isLoading">
</b-loading>
</div>
</template>
@@ -41,11 +41,8 @@
</b-button>
</div>
<b-loading
:is-full-page="true"
v-model="isLoading"
:can-cancel="false"
></b-loading>
<b-loading :is-full-page="true" :can-cancel="false" v-model="isLoading">
</b-loading>
</div>
</template>
@@ -49,8 +49,14 @@ export default {
},
methods: {
fecha(date) {
const fecha = moment(date.substr(0, 10))
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`
if (date) {
const fecha = moment(date)
return `${fecha.date()}/${
fecha.month() < 9 ? '0' + (fecha.month() + 1) : fecha.month() + 1
}/${fecha.year()}`
}
return ''
},
},
}
+3 -5
View File
@@ -24,11 +24,9 @@
Rechazar documento
</b-button>
<b-button v-else-if="mensajeBool" disabled> Rechazar documento </b-button>
<b-loading
:is-full-page="true"
v-model="isLoading"
:can-cancel="false"
></b-loading>
<b-loading :is-full-page="true" :can-cancel="false" v-model="isLoading">
</b-loading>
</div>
</template>
+9 -7
View File
@@ -147,11 +147,9 @@
<b-button @click="passwordDialog()" class="is-info">
Cambiar contraseña
</b-button>
<b-loading
:is-full-page="true"
v-model="isLoading"
:can-cancel="false"
></b-loading>
<b-loading :is-full-page="true" :can-cancel="false" v-model="isLoading">
</b-loading>
</div>
</div>
</template>
@@ -394,9 +392,13 @@ export default {
},
fecha(date) {
if (date) {
const fecha = moment(date.substr(0, 10))
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`
const fecha = moment(date)
return `${fecha.date()}/${
fecha.month() < 9 ? '0' + (fecha.month() + 1) : fecha.month() + 1
}/${fecha.year()}`
}
return ''
},
},
computed: {
+3 -5
View File
@@ -101,11 +101,9 @@
:deleteFromLocalStorage="['idServicio', 'idStatus']"
/>
</div>
<b-loading
:is-full-page="true"
v-model="isLoading"
:can-cancel="false"
></b-loading>
<b-loading :is-full-page="true" :can-cancel="false" v-model="isLoading">
</b-loading>
</div>
</div>
</template>
+7 -3
View File
@@ -59,10 +59,14 @@ export default {
props: ['status', 'alumno', 'programa'],
methods: {
fecha(date) {
// const fecha = moment(date);
const fecha = moment(date.substr(0, 10))
if (date) {
const fecha = moment(date)
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`
return `${fecha.date()}/${
fecha.month() < 9 ? '0' + (fecha.month() + 1) : fecha.month() + 1
}/${fecha.year()}`
}
return ''
},
},
}
+3 -1
View File
@@ -44,7 +44,9 @@
</button>
</b-field>
</div>
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
<b-loading :is-full-page="true" :can-cancel="false" v-model="isLoading">
</b-loading>
</div>
</template>
+3 -1
View File
@@ -61,7 +61,9 @@
<p class="block is-size-5">Informe Global enviado.</p>
<b-icon icon="check-bold" size="is-small" type="is-success"> </b-icon>
</div>
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
<b-loading :is-full-page="true" :can-cancel="false" v-model="isLoading">
</b-loading>
</div>
</template>
@@ -169,7 +169,8 @@
>
</div>
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
<b-loading :is-full-page="true" :can-cancel="false" v-model="isLoading">
</b-loading>
</section>
</template>
+7 -2
View File
@@ -137,9 +137,14 @@ export default {
return style
},
fecha(date) {
const fecha = moment(date)
if (date) {
const fecha = moment(date)
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`
return `${fecha.date()}/${
fecha.month() < 9 ? '0' + (fecha.month() + 1) : fecha.month() + 1
}/${fecha.year()}`
}
return ''
},
onPageChange(page) {
this.page = page
+1 -1
View File
@@ -161,7 +161,7 @@
</b-field>
</section>
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="true">
<b-loading :is-full-page="true" :can-cancel="false" v-model="isLoading">
</b-loading>
</div>
</template>
@@ -168,7 +168,9 @@
</div>
</div>
</div>
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
<b-loading :is-full-page="true" :can-cancel="false" v-model="isLoading">
</b-loading>
</section>
</template>
<script>
+8 -2
View File
@@ -201,8 +201,14 @@ export default {
return style
},
fecha(date) {
const fecha = moment(date.substr(0, 10))
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`
if (date) {
const fecha = moment(date)
return `${fecha.date()}/${
fecha.month() < 9 ? '0' + (fecha.month() + 1) : fecha.month() + 1
}/${fecha.year()}`
}
return ''
},
onPageChange(page) {
this.page = page
@@ -7,11 +7,11 @@
</template>
<script>
import formEditar from '@/components/admin/casos_especiales/formEditar'
import FormEditar from '@/components/admin/casos_especiales/formEditar'
export default {
components: {
formEditar,
FormEditar,
},
beforeCreate() {
const idTipoUsuario = Number(localStorage.getItem('idTipoUsuario'))
+3 -1
View File
@@ -22,7 +22,9 @@
<div v-else class="vh">
<h1>Ya has contestado tu cuestionario :)</h1>
</div>
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
<b-loading :is-full-page="true" :can-cancel="false" v-model="isLoading">
</b-loading>
</section>
</template>
+2 -1
View File
@@ -30,7 +30,8 @@
</div>
</form>
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="false" />
<b-loading :is-full-page="true" :can-cancel="false" v-model="isLoading">
</b-loading>
</section>
</template>
+2 -5
View File
@@ -41,11 +41,8 @@
>
</b-field>
<b-loading
:is-full-page="true"
v-model="isLoading"
:can-cancel="false"
></b-loading>
<b-loading :is-full-page="true" :can-cancel="false" v-model="isLoading">
</b-loading>
</section>
</template>
+2 -5
View File
@@ -41,11 +41,8 @@
>
</b-field>
<b-loading
:is-full-page="true"
v-model="isLoading"
:can-cancel="false"
></b-loading>
<b-loading :is-full-page="true" :can-cancel="false" v-model="isLoading">
</b-loading>
</section>
</template>