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

patient details on clic

parent acc7b2a1
...@@ -27,29 +27,6 @@ ...@@ -27,29 +27,6 @@
> >
<v-icon>mdi-plus</v-icon>Registrar Paciente <v-icon>mdi-plus</v-icon>Registrar Paciente
</v-btn> </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-card-title>
<v-expansion-panels <v-expansion-panels
v-model="filterPanel" v-model="filterPanel"
...@@ -75,6 +52,7 @@ ...@@ -75,6 +52,7 @@
loading-text="Cargando Pacientes" loading-text="Cargando Pacientes"
class="elevation-1" class="elevation-1"
@pagination="paginatePatients" @pagination="paginatePatients"
@click:row="detailsItem"
> >
<template v-slot:item.estado_sistema="{ item }"> <template v-slot:item.estado_sistema="{ item }">
<v-chip <v-chip
...@@ -129,7 +107,7 @@ ...@@ -129,7 +107,7 @@
icon icon
:loading="loadingPatientData" :loading="loadingPatientData"
v-on="on" v-on="on"
@click="detailsItem(item.id_paciente)" @click="detailsItem(item)"
> >
<v-icon> <v-icon>
mdi-dots-horizontal-circle mdi-dots-horizontal-circle
...@@ -207,7 +185,7 @@ ...@@ -207,7 +185,7 @@
:loading="loadingPatientData" :loading="loadingPatientData"
icon icon
v-on="on" v-on="on"
@click="detailsItem(item.id_paciente)" @click="detailsItem(item)"
> >
<v-icon>mdi-account-check</v-icon> <v-icon>mdi-account-check</v-icon>
</v-btn> </v-btn>
...@@ -684,13 +662,13 @@ ...@@ -684,13 +662,13 @@
this.closeDetails() this.closeDetails()
this.editItem(this.patient) this.editItem(this.patient)
}, },
async detailsItem (id) { async detailsItem (item) {
this.loadingPatientData = true this.loadingPatientData = true
if (id !== null && id !== undefined) { if (item.id_paciente !== null && item.id_paciente !== undefined) {
this.loadingPatientData = true this.loadingPatientData = true
try { try {
this.loadingPatientData = false this.loadingPatientData = false
this.setPatientId(id) this.setPatientId(item.id_paciente)
this.$router.push({ name: 'PatientFile' }) this.$router.push({ name: 'PatientFile' })
} catch (e) { } catch (e) {
errorHandler(e) errorHandler(e)
...@@ -823,17 +801,6 @@ ...@@ -823,17 +801,6 @@
this.closeDelete() this.closeDelete()
this.loadingPatientsData = false 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 () { close () {
this.dialog = false this.dialog = false
this.$nextTick(() => { 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