88 lines
1.9 KiB
Vue
88 lines
1.9 KiB
Vue
<template>
|
|
|
|
<v-dialog
|
|
v-model="dialog"
|
|
:disabled="no_history"
|
|
width="600"
|
|
>
|
|
<v-btn
|
|
slot="activator"
|
|
color="primary"
|
|
:disabled="no_history"
|
|
block
|
|
class="mt-0"
|
|
>
|
|
Histori
|
|
</v-btn>
|
|
|
|
<v-card>
|
|
<v-card-title
|
|
class="headline grey lighten-2 pt-2 pb-2"
|
|
primary-title
|
|
|
|
>
|
|
Histori Pasien
|
|
</v-card-title>
|
|
|
|
<v-card-text class="pt-2 pb-2">
|
|
<patient-history></patient-history>
|
|
</v-card-text>
|
|
|
|
<v-divider></v-divider>
|
|
|
|
<v-card-actions>
|
|
<v-spacer></v-spacer>
|
|
<v-btn
|
|
color="primary"
|
|
flat
|
|
@click="dialog = false"
|
|
>
|
|
Tutup
|
|
</v-btn>
|
|
</v-card-actions>
|
|
</v-card>
|
|
</v-dialog>
|
|
|
|
</template>
|
|
|
|
<style scoped>
|
|
.v-dialog__container {
|
|
display: block !important;
|
|
}
|
|
</style>
|
|
|
|
<script>
|
|
module.exports = {
|
|
components : {
|
|
'patient-history': httpVueLoader('./patientHistory.vue')
|
|
},
|
|
|
|
computed: {
|
|
no_history() {
|
|
//empty selected patient
|
|
|
|
if (! this.$store.state.patient.selected_patient.M_PatientID) return true
|
|
// return false
|
|
return this.$store.state.history.histories.length == 0
|
|
},
|
|
|
|
dialog: {
|
|
get() {
|
|
return this.$store.state.history.history_dialog
|
|
},
|
|
set(val) {
|
|
this.$store.commit('history/update_history_dialog',val)
|
|
}
|
|
}
|
|
},
|
|
|
|
watch : {
|
|
// dialog (n, o) {
|
|
// if (n && !o) {
|
|
// this.$store.dispatch('history/search')
|
|
// }
|
|
// }
|
|
}
|
|
}
|
|
</script>
|