This commit is contained in:
Muhammad Shahzad
2024-06-05 16:26:57 +05:00
parent cff094174e
commit a924bd603e
4 changed files with 227 additions and 74 deletions

View File

@@ -35,9 +35,9 @@ const refVForm = ref(null);
// Headers
const headers = [
{ title: 'Appointment Id', key: 'id' },
// { title: 'Appointment Id', key: 'id' },
{ title: 'Patient', key: 'patient_name' },
{ key: 'appointment_date', sortable: false, title: 'Date' },
// { key: 'appointment_date', sortable: false, title: 'Date' },
{ key: 'start_time', title: 'Start Time' },
{ key: 'end_time', title: 'End Time' },
{ key: 'duration', title: 'Duration' },
@@ -101,10 +101,27 @@ onMounted(async () => {
});
onUnmounted(() => {});
const historyDetail = (item) => {
console.log('item', item)
const historyDetail = (item, value) => {
console.log('item',item.id ,value)
if(value == 'notes')
router.push('/admin/patient/meeting-details/' + route.params.id + '/' + item.id);
if(value == 'prescription')
router.push('/admin/patient/meeting/prescription/' + route.params.id + '/' + item.id);
}
const menusVariant = [
'primary'
];
const options = [
{
title: 'Notes',
key: 'notes',
},
{
title: 'Prescription',
key: 'prescription',
},
]
</script>
<template>
@@ -138,10 +155,36 @@ const historyDetail = (item) => {
<template #item.duration="{ item }">{{ item.duration }}</template>
<!-- Actions -->
<template #item.actions="{ item }">
<div class="d-flex gap-1">
<div class="demo-space-x">
<VMenu
v-for="menu in menusVariant"
:key="menu"
>
<template #activator="{ props }">
<VBtn
:color="menu"
v-bind="props"
>
Detail
</VBtn>
</template>
<v-list>
<v-list-item
v-for="opt in options"
:key="opt.value"
@click="historyDetail(item, opt.key)"
>
{{ opt.title }}
</v-list-item>
</v-list>
</VMenu>
</div>
<!-- <div class="d-flex gap-1">
<VBtn class="text-capitalize text-white" @click="historyDetail(item)"> Detail
</VBtn>
</div>
</div> -->
</template>
</v-data-table>
</v-card>

View File

@@ -72,10 +72,10 @@ const formatPhoneNumber = () => {
};
// headers
const headers = [
{
title: 'ID',
key: 'id',
},
// {
// title: 'ID',
// key: 'id',
// },
{
title: 'NAME',
key: 'name',
@@ -352,7 +352,7 @@ function changeFormat(dateFormat) {
<VCol cols="12" sm="6" md="12">
<VTextField
v-model="editedItem.dob"
v-model="editedItem.dob" type="date"
label="Date Of Birth"
/>
</VCol>