mostrar confirmar
This commit is contained in:
@@ -31,10 +31,16 @@
|
||||
</b-field>
|
||||
</transition>
|
||||
<b-field label="Dirección">
|
||||
<b-input type="text" v-model="nuevo.direccion" :placeholder="viejo.direccion"></b-input>
|
||||
<b-input type="text"
|
||||
v-model="nuevo.direccion"
|
||||
:placeholder="viejo.direccion">
|
||||
</b-input>
|
||||
</b-field>
|
||||
<b-field label="Teléfono">
|
||||
<b-input type="number" :placeholder="viejo.telefono" maxlength="10"></b-input>
|
||||
<b-input
|
||||
type="number"
|
||||
:placeholder="viejo.telefono"
|
||||
maxlength="10"></b-input>
|
||||
</b-field>
|
||||
<b-field label="Fecha de nacimiento">
|
||||
<b-datepicker
|
||||
@@ -44,7 +50,7 @@
|
||||
</b-datepicker>
|
||||
</b-field>
|
||||
<b-field label="ID status">
|
||||
<b-input type="" :placeholder="viejo.idStatus"></b-input>
|
||||
<b-input type="number" :placeholder="idStatus"></b-input>
|
||||
</b-field>
|
||||
<p class="is-size-5">Carta de aceptación</p>
|
||||
<br>
|
||||
@@ -98,21 +104,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
import moment from 'moment'
|
||||
import validator from 'validator'
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
viejo: {
|
||||
correo: 'juanito@gmail.com',
|
||||
fechaInicio: '20-05-15',
|
||||
fechaFin: '2020-11-12',
|
||||
direccion: 'La que sea',
|
||||
telefono: 5548689152,
|
||||
fechaNacimiento: '2000-02-06',
|
||||
idStatus: 1
|
||||
},
|
||||
viejo: {},
|
||||
idStatus: localStorage.getItem('idServicio'),
|
||||
nuevo: {
|
||||
correo: '',
|
||||
fechaInicioFinal: '',
|
||||
@@ -133,6 +133,23 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
obtenerRegistro () {
|
||||
this.isLoading = true
|
||||
return axios
|
||||
.get(
|
||||
`${process.env.api}/servicio/admin?idServicio=${this.idStatus}`//,
|
||||
// this.token
|
||||
)
|
||||
.then(res => {
|
||||
this.isLoading = false
|
||||
this.viejo = res.data
|
||||
console.log(this.viejo)
|
||||
})
|
||||
.catch(err => {
|
||||
this.isLoading = false
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
},
|
||||
dangerToast () {
|
||||
this.$buefy.toast.open({
|
||||
message: 'Asegurate de ingresar un PDF',
|
||||
@@ -183,14 +200,15 @@ export default {
|
||||
}
|
||||
},
|
||||
regresar () {
|
||||
localStorage.removeItem('idRegistro')
|
||||
this.$router.push('/admin/servicio')
|
||||
},
|
||||
actualizar () {
|
||||
this.isLoading = true
|
||||
// const data = {
|
||||
// a: 1
|
||||
// }
|
||||
// let data = {}
|
||||
const formData = new FormData()
|
||||
if (this.cartaAceptacion) { formData.append('cartaAceptacion', this.cartaAceptacion) }
|
||||
if (this.cartaTermino) { formData.append('cartaTermino', this.cartaTermino) }
|
||||
if (this.informeGlobal) { formData.append('informeGlobal', this.informeGlobal) }
|
||||
},
|
||||
actualizarDialog () {
|
||||
this.$buefy.dialog.confirm({
|
||||
@@ -202,6 +220,10 @@ export default {
|
||||
hasIcon: true,
|
||||
onConfirm: () => this.actualizar()
|
||||
})
|
||||
},
|
||||
fecha (date) {
|
||||
const fecha = moment(date.substr(0, 10))
|
||||
return `${fecha.date()}/${fecha.month() + 1}/${fecha.year()}`
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -221,6 +243,9 @@ export default {
|
||||
fechaNacimiento: function () {
|
||||
this.nuevo.fechaNacimientoFinal = moment(this.fechaNacimiento[0])
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.obtenerRegistro()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<div class="mb-5">
|
||||
<b-button class="boton is-info" @click="$router.push('./')">
|
||||
<b-button class="boton is-info" @click="regresar()">
|
||||
Regresar
|
||||
</b-button>
|
||||
<b-button class="boton is-info" @click="$router.push('./servicio/modificar')">
|
||||
@@ -112,7 +112,7 @@
|
||||
<p v-if="alumno.cuestionarioA">Cuenta con cuestionario de alumno resuelto.</p>
|
||||
</div>
|
||||
<div id="acciones" class="my-5">
|
||||
<b-button class="is-info" @click="$router.push('./')">
|
||||
<b-button class="is-info" @click="regresar()">
|
||||
Regresar
|
||||
</b-button>
|
||||
<b-button class="is-success" @click="confirmarDialog()" v-if="mostrarConfirmar()">
|
||||
@@ -148,7 +148,7 @@ export default {
|
||||
Carrera: {},
|
||||
Status: {}
|
||||
},
|
||||
idServicio: 1,
|
||||
idServicio: localStorage.getItem('idServicio'),
|
||||
token: {
|
||||
headers: {
|
||||
token: localStorage.getItem('token')
|
||||
@@ -172,8 +172,8 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
mostrarConfirmar () {
|
||||
if (this.alumno.idStatus === 1) return true
|
||||
else if (this.alumno.idStatus === 5) {
|
||||
if (this.alumno.Status.idStatus === 1) return true
|
||||
else if (this.alumno.Status.idStatus === 5) {
|
||||
if (!this.alumno.acatlanContigo) return true
|
||||
else if (this.vistoBueno) return true
|
||||
}
|
||||
@@ -351,6 +351,10 @@ export default {
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true
|
||||
})
|
||||
},
|
||||
regresar () {
|
||||
this.$router.push('./')
|
||||
localStorage.removeItem('idServicio')
|
||||
}
|
||||
},
|
||||
async created () {
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ export default {
|
||||
},
|
||||
env: {
|
||||
// api: 'http://localhost:3000'
|
||||
api: 'https://3a654113271d.ngrok.io'
|
||||
api: 'https://6fcf0b54e39d.ngrok.io'
|
||||
// api: 'https//venus.acatlan.unam.mx/pruebas_pcpuma'
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<p class="is-size-2">Editar información del responsable</p>
|
||||
<b-field label="Nombre">
|
||||
<b-input
|
||||
type="email"
|
||||
v-model="nuevo.nombre"
|
||||
:placeholder="viejo.nombre">
|
||||
</b-input>
|
||||
</b-field>
|
||||
<b-field label="Correo eletrónico">
|
||||
<b-input
|
||||
type="email"
|
||||
v-model="nuevo.correo"
|
||||
:placeholder="viejo.correo">
|
||||
</b-input>
|
||||
</b-field>
|
||||
<b-loading :is-full-page="true" v-model="isLoading" :can-cancel="true"></b-loading>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
viejo: {
|
||||
nombre: 'Marco',
|
||||
correo: 'correo1@gmail.com'
|
||||
},
|
||||
nuevo: {},
|
||||
idServicio: localStorage.getItem('idServicio'),
|
||||
isLoading: false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -44,7 +44,7 @@ export default {
|
||||
{ id: 2, programa: 'programa 2', institucion: 'institucion falsa 2', dependencia: 'dependencia falsa 2', clave: 102 },
|
||||
{ id: 3, programa: 'programa 3', institucion: 'institucion falsa 3', dependencia: 'dependencia falsa 3', clave: 103 }
|
||||
],
|
||||
selected: {} | null
|
||||
selected: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
Reference in New Issue
Block a user