Arreglo del step
This commit is contained in:
@@ -48,16 +48,13 @@
|
||||
</b-table-column>
|
||||
|
||||
<b-table-column
|
||||
field="Validacion"
|
||||
label="validacion"
|
||||
field="confirmacion"
|
||||
label="Confirmación"
|
||||
centered
|
||||
v-slot="props"
|
||||
>
|
||||
<b-tag
|
||||
:type="types(props.row.validacion)"
|
||||
v-if="props.row.validacion != null"
|
||||
>
|
||||
{{ estatus(props.row.validacion) }}
|
||||
<b-tag :type="types(props.row.confirmacion)">
|
||||
{{ props.row.confirmacion }}
|
||||
</b-tag>
|
||||
</b-table-column>
|
||||
|
||||
@@ -91,7 +88,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
types(value) {
|
||||
return value === 1 ? 'is-success' : value === 0 ? 'is-danger' : ''
|
||||
return value === true ? 'is-success' : 'is-danger'
|
||||
},
|
||||
todasInscripciones() {
|
||||
axios
|
||||
@@ -106,15 +103,6 @@ export default {
|
||||
// this.imprimirError(err.response.data)
|
||||
})
|
||||
},
|
||||
estatus(value) {
|
||||
const status = {
|
||||
0: 'false',
|
||||
1: 'true',
|
||||
2: '--',
|
||||
}
|
||||
|
||||
return status[value]
|
||||
},
|
||||
verTicket(value) {
|
||||
console.log(value)
|
||||
this.$router.push({
|
||||
|
||||
@@ -38,12 +38,13 @@
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
activeStep: { type: Number, require: true },
|
||||
inscripcion: { type: Object, require: true },
|
||||
area: { type: Function, require: true },
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeStep: 0,
|
||||
|
||||
isAnimated: true,
|
||||
isRounded: true,
|
||||
isLoading: false,
|
||||
@@ -52,8 +53,14 @@ export default {
|
||||
isStepsClickable: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
step() {
|
||||
if (this.inscripcion.confirmacion === true) this.activeStep = 1
|
||||
if (this.inscripcion.validacion === 1) this.activeStep = 2
|
||||
},
|
||||
},
|
||||
created() {
|
||||
console.log(this.inscripcion)
|
||||
this.step()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<p class="title is-2">Registro</p>
|
||||
|
||||
<div v-for="(inscripcion, index) in inscripcionesUsuario" :key="index">
|
||||
<Steps :activeStep="activeStep" :inscripcion="inscripcion" :area="area" />
|
||||
<Steps :inscripcion="inscripcion" :area="area" />
|
||||
</div>
|
||||
|
||||
<p class="title is-2">Datos del alumno</p>
|
||||
@@ -41,8 +41,6 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeStep: 0,
|
||||
|
||||
datosUsuario: {},
|
||||
inscripcionesUsuario: [],
|
||||
}
|
||||
@@ -55,25 +53,12 @@ export default {
|
||||
)
|
||||
.then((res) => {
|
||||
this.inscripcionesUsuario = res.data
|
||||
console.log(res.data)
|
||||
if (this.inscripcionesUsuario[0].confirmacion === true)
|
||||
this.activeStep = 1
|
||||
if (this.inscripcionesUsuario[0].validacion === 1) this.activeStep = 2
|
||||
// if (this.inscripcionesUsuario.length > 0 && mostrarWarning) {
|
||||
// this.imprimirWarning(
|
||||
// 'Tu ya tienes una inscripción en proceso, ¿Quieres realizar otra?',
|
||||
// this.clearActiveStep
|
||||
// )
|
||||
// }
|
||||
})
|
||||
.catch((err) => {
|
||||
this.error = 'is-danger'
|
||||
this.imprimirError(err.response.data)
|
||||
})
|
||||
},
|
||||
// clearActiveStep() {
|
||||
// this.activeStep = 0
|
||||
// },
|
||||
area(idArea) {
|
||||
if (idArea === 1) return 'Windows'
|
||||
return idArea === 2 ? 'Mac' : 'Linux'
|
||||
|
||||
Reference in New Issue
Block a user