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 }
+}
-
-
-
-
- {{ item.name }}
-
-
#{{ appointmentId }} By {{ item.doctor }}
- {{ item.date }}
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ getStatusColor(item.status) }}
+
+
-
-
-
-
- Pending
-
-
- {{ item.status }}
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Brand:
+ Brand:
- {{ item.brand }}
+ {{ prescriptionIndex.brand }}
+
- From:
+ From:
- {{ item.from }}
+ {{ prescriptionIndex.from }}
+
- Dosage:
+ Dosage:
- {{ item.dosage }}
+ {{ prescriptionIndex.dosage }}
+
- Quantity:
+ Quantity:
- {{ item.quantity }}
+ {{ prescriptionIndex.quantity }}
+
- Direction Quantity:
+ Direction Quantity:
- {{ item.direction_quantity }}
+ {{ prescriptionIndex.direction_quantity }}
+
- Direction One:
+ Direction One:
- {{ item.direction_one }}
+ {{ prescriptionIndex.direction_one }}
+
- Direction Two:
+ Direction Two:
- {{ item.direction_two }}
+ {{ prescriptionIndex.direction_two }}
+
- Refill Quantity:
+ Refill Quantity:
- {{ item.refill_quantity }}
+ {{ prescriptionIndex.refill_quantity }}
+
- Status:
+ Status:
- Pending
- {{ item.status }}
+ Pending
+ {{ prescriptionIndex.status }}
-
+
+
- Comments:
+ Comments:
- {{ item.comments }}
+ {{ prescriptionIndex.comments }}
-
-
-
-
-
-
-
-
-
-
-
-
- No data found
-
-
-
-
+
+
+
+
+