Commit 231b2fc7 authored by Yoelvis Gonzalez's avatar Yoelvis Gonzalez
Browse files

patient details on clic

parent acc7b2a1
......@@ -27,29 +27,6 @@
>
<v-icon>mdi-plus</v-icon>Registrar Paciente
</v-btn>
<!-- <v-dialog
v-model="dialog"
max-width="800px"
persistent
>
<template v-slot:activator="{ on, attrs }">
<v-btn
color="success"
dark
class="toolbar-btn"
v-bind="attrs"
v-on="on"
>
<v-icon>mdi-plus</v-icon>Registrar Paciente
</v-btn>
</template>
<patient-form
:title="formTitle"
@refresh="closeSaved"
@close-click="close"
/>
</v-dialog> -->
</v-card-title>
<v-expansion-panels
v-model="filterPanel"
......@@ -75,6 +52,7 @@
loading-text="Cargando Pacientes"
class="elevation-1"
@pagination="paginatePatients"
@click:row="detailsItem"
>
<template v-slot:item.estado_sistema="{ item }">
<v-chip
......@@ -129,7 +107,7 @@
icon
:loading="loadingPatientData"
v-on="on"
@click="detailsItem(item.id_paciente)"
@click="detailsItem(item)"
>
<v-icon>
mdi-dots-horizontal-circle
......@@ -207,7 +185,7 @@
:loading="loadingPatientData"
icon
v-on="on"
@click="detailsItem(item.id_paciente)"
@click="detailsItem(item)"
>
<v-icon>mdi-account-check</v-icon>
</v-btn>
......@@ -684,13 +662,13 @@
this.closeDetails()
this.editItem(this.patient)
},
async detailsItem (id) {
async detailsItem (item) {
this.loadingPatientData = true
if (id !== null && id !== undefined) {
if (item.id_paciente !== null && item.id_paciente !== undefined) {
this.loadingPatientData = true
try {
this.loadingPatientData = false
this.setPatientId(id)
this.setPatientId(item.id_paciente)
this.$router.push({ name: 'PatientFile' })
} catch (e) {
errorHandler(e)
......@@ -823,17 +801,6 @@
this.closeDelete()
this.loadingPatientsData = false
},
closeSaved () {
this.dialog = false
this.$nextTick(() => {
this.clearPatient()
this.setPIndex(-1)
})
this.loadPatientsData()
if (this.patientId !== -1) {
this.detailsItem(this.patientId)
}
},
close () {
this.dialog = false
this.$nextTick(() => {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment