77 lines
1.8 KiB
Vue
77 lines
1.8 KiB
Vue
<template>
|
|
<div class="columns">
|
|
<div class="column box mx-2">
|
|
<p>Cuenta: {{ datosUsuario.numeroCuenta }}</p>
|
|
<p>Nombre: {{ datosUsuario.nombre }}</p>
|
|
<p>Correo: {{ datosUsuario.numeroCuenta }}@pcpuma.unam.acatlan.mx</p>
|
|
<p>Carrera: {{ datosUsuario.carrera }}</p>
|
|
</div>
|
|
|
|
<b-table
|
|
class="column box tabla"
|
|
:data="inscripcionesUsuario"
|
|
v-if="inscripcionesUsuario.length != 0"
|
|
>
|
|
<b-table-column
|
|
field="inscrito"
|
|
label="Inscrito en"
|
|
centered
|
|
v-slot="props"
|
|
>
|
|
<b-icon :icon="icono(props.row.idArea)" size="is-small"></b-icon>
|
|
{{ area(props.row.idArea) }}
|
|
</b-table-column>
|
|
|
|
<b-table-column field="tiempo" label="Tiempo asignado" centered>
|
|
3600 minutos(s)
|
|
</b-table-column>
|
|
</b-table>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
props: {
|
|
inscripcionesUsuario: { type: Array, required: true },
|
|
area: { type: Function, required: true },
|
|
},
|
|
data() {
|
|
return {
|
|
datosUsuario: {},
|
|
}
|
|
},
|
|
methods: {
|
|
icono(idArea) {
|
|
if (idArea === 1) return 'microsoft-windows'
|
|
if (idArea === 2) return 'apple'
|
|
return idArea === 3 ? 'linux' : 'laptop'
|
|
},
|
|
confirmacion(status) {
|
|
return status === 1 ? 'Si' : 'No'
|
|
},
|
|
getLocalhostInfo() {
|
|
this.datosUsuario.idUsuario = localStorage.getItem('idUsuario')
|
|
this.datosUsuario.numeroCuenta = localStorage.getItem('usuario')
|
|
this.datosUsuario.nombre = localStorage.getItem('nombre')
|
|
this.datosUsuario.carrera = localStorage.getItem('carrera')
|
|
this.token = {
|
|
headers: {
|
|
token: localStorage.getItem('token'),
|
|
},
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
this.getLocalhostInfo()
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
.table,
|
|
.table td {
|
|
padding: 0.2em;
|
|
text-align: center;
|
|
}
|
|
</style>
|