From a924bd603ec0d3552aaea183229205dfd92f2bb9 Mon Sep 17 00:00:00 2001 From: Muhammad Shahzad Date: Wed, 5 Jun 2024 16:26:57 +0500 Subject: [PATCH] fixes --- .../pages/patient-meetings/prescription.vue | 231 +++++++++++++----- resources/js/pages/patients/meetings.vue | 55 ++++- resources/js/pages/patients/patients.vue | 10 +- .../js/plugins/1.router/additional-routes.js | 5 + 4 files changed, 227 insertions(+), 74 deletions(-) diff --git a/resources/js/pages/pages/patient-meetings/prescription.vue b/resources/js/pages/pages/patient-meetings/prescription.vue index 583e861..4b1b867 100644 --- a/resources/js/pages/pages/patient-meetings/prescription.vue +++ b/resources/js/pages/pages/patient-meetings/prescription.vue @@ -73,132 +73,237 @@ const getStatusColor = (status) => { return 'grey'; // Use Vuetify's grey color for any other status } }; +const resolveStatusVariant = status => { + if (status === 1) + return { + color: 'primary', + text: 'Current', + } + else if (status === 2) + return { + color: 'success', + text: 'Professional', + } + else if (status === 3) + return { + color: 'error', + text: 'Rejected', + } + else if (status === 4) + return { + color: 'warning', + text: 'Resigned', + } + else + return { + color: 'info', + text: 'Applied', + } +} +const headers = [ + { + title: '', + key: 'id', + sortable: false, + }, + { + title: 'Name', + key: 'name', + }, + { + title: 'Date', + key: 'date', + }, + { + title: 'Status', + key: 'status', + }, +] +const prescriptionIndex = ref([]); +const prescriptionItem = ref(-1) +const prescriptionDialog = ref(false) +const showDetail = item => { + // console.log("id",item); + prescriptionIndex.value = item +// console.log("index",prescriptionIndex.value); +// prescriptionItem.value = { ...item } + prescriptionDialog.value = true +} +const close = () => { + prescriptionDialog.value = false + prescriptionIndex.value = -1 + prescriptionItem.value = { ...defaultItem.value } +}