fix
This commit is contained in:
parent
73d194ad04
commit
cd856925f1
@ -53,3 +53,4 @@ export const ADMIN_LAB_KIT_ADD_API = MAIN_DOMAIN + "/api/admin/labkit-list-creat
|
||||
export const ADMIN_LAB_KIT_DELETE_API = MAIN_DOMAIN + "/api/admin/labkit-delete/"
|
||||
|
||||
export const ADMIN_PATIENT_DETAIL_API = MAIN_DOMAIN + "/api/admin/patient-full-detail/"
|
||||
export const ADMIN_PROVIDER_DETAIL_API = MAIN_DOMAIN + "/api/admin/telemed-full-detail/"
|
||||
|
@ -71,7 +71,7 @@ const downloadFile = (fileUrl) => {
|
||||
|
||||
<!-- 👉 Content -->
|
||||
<div class="app-timeline-text mb-1">
|
||||
<span>{{ p_note.telemedPro.name }}</span>
|
||||
<span>{{ p_note.provider_name }}</span>
|
||||
<VIcon
|
||||
size="20"
|
||||
icon="tabler-arrow-right"
|
||||
|
@ -1,9 +1,15 @@
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
userData: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
})
|
||||
import CompletedMeetingTab from '@/pages/patients/CompletedMeetingTab.vue';
|
||||
import moment from 'moment';
|
||||
import { onBeforeMount, onMounted, onUnmounted, ref } from 'vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { useStore } from 'vuex';
|
||||
|
||||
const store = useStore();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
@ -44,21 +50,9 @@ const headers = [
|
||||
{ title: 'ACTIONS', key: 'actions' },
|
||||
];
|
||||
|
||||
// Utility functions
|
||||
function changeDateFormat(dateFormat) {
|
||||
if (dateFormat) {
|
||||
const [datePart, timePart] = dateFormat.split(' ');
|
||||
const [year, month, day] = datePart.split('-');
|
||||
const formattedDate = `${parseInt(month)}-${parseInt(day)}-${year}`;
|
||||
return `${formattedDate} ${timePart}`;
|
||||
}
|
||||
return dateFormat;
|
||||
}
|
||||
|
||||
function changeFormat(dateFormat) {
|
||||
const [year, month, day] = dateFormat.split('-');
|
||||
return `${parseInt(month)}-${parseInt(day)}-${year}`;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function totalCallDuration(start_time, end_time) {
|
||||
const startMoment = moment(start_time);
|
||||
@ -71,24 +65,37 @@ function totalCallDuration(start_time, end_time) {
|
||||
if (hours === '00' && minutes === '00') {
|
||||
return `00:00:${seconds}`;
|
||||
} else if (hours === '00') {
|
||||
return `00:${minutes}:${seconds}`;
|
||||
return `00:${minutes}`;
|
||||
} else {
|
||||
return `${hours}:${minutes}:${seconds}`;
|
||||
return `${hours}:${minutes}`;
|
||||
}
|
||||
}
|
||||
|
||||
const formatDate = (date) => {
|
||||
const messageDate = new Date(date);
|
||||
const options = {
|
||||
year: 'numeric',
|
||||
month: 'numeric',
|
||||
day: 'numeric',
|
||||
hour: 'numeric', // Change from '2-digit' to 'numeric'
|
||||
minute: '2-digit',
|
||||
hour12: true, // Add hour12: true to get 12-hour format with AM/PM
|
||||
};
|
||||
const formattedDate = messageDate.toLocaleString('en-US', options).replace(/\//g, '-');
|
||||
return `${formattedDate} `;
|
||||
};
|
||||
// Fetch and process the patient meeting list
|
||||
const getPatientMeetingList = async () => {
|
||||
store.dispatch('updateIsLoading', true);
|
||||
await store.dispatch('patientMeetingList', { id: route.params.id });
|
||||
store.dispatch('updateIsLoading', false);
|
||||
//store.dispatch('updateIsLoading', true);
|
||||
//await store.dispatch('patientMeetingList', { id: route.params.id });
|
||||
// store.dispatch('updateIsLoading', false);
|
||||
|
||||
let list = store.getters.getPatientMeetingList;
|
||||
let list = props.userData.upcomingMeetings;
|
||||
|
||||
patientMeetingList.value = list.map(history => ({
|
||||
...history,
|
||||
appointment_date: changeFormat(history.appointment_date),
|
||||
start_time: changeDateFormat(history.start_time),
|
||||
end_time: changeDateFormat(history.end_time),
|
||||
appointment_date: formatDate(history.appointment_date),
|
||||
start_time: formatDate(history.start_time),
|
||||
end_time: formatDate(history.end_time),
|
||||
duration: totalCallDuration(history.start_time, history.end_time),
|
||||
}));
|
||||
console.log(list);
|
||||
@ -122,25 +129,14 @@ const options = [
|
||||
},
|
||||
|
||||
]
|
||||
const breadcrums = [
|
||||
{
|
||||
title: 'Patient',
|
||||
disabled: false,
|
||||
to: '/admin/patients',
|
||||
},
|
||||
{
|
||||
title: 'Meetings',
|
||||
disabled: false,
|
||||
}
|
||||
|
||||
];
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
<v-row>
|
||||
<v-col cols="12" md="12">
|
||||
<v-card title="Meetings">
|
||||
<v-card title="UpComming Meetings">
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
<v-col cols="12" offset-md="8" md="4">
|
||||
@ -199,4 +195,5 @@ const breadcrums = [
|
||||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<CompletedMeetingTab :user-data="props.userData"/>
|
||||
</template>
|
||||
|
@ -102,6 +102,13 @@ const resolveUserRoleVariant = role => {
|
||||
>
|
||||
Patient
|
||||
</VChip>
|
||||
<VChip
|
||||
size="small"
|
||||
:color="resolveUserStatusVariant('active')"
|
||||
class="text-capitalize mt-4"
|
||||
>
|
||||
Active
|
||||
</VChip>
|
||||
</VCardText>
|
||||
|
||||
|
||||
@ -157,27 +164,9 @@ const resolveUserRoleVariant = role => {
|
||||
<span class="text-body-1">{{ props.userData.patient.zip_code }}</span>
|
||||
</VListItemTitle>
|
||||
</VListItem>
|
||||
<VListItem>
|
||||
<VListItemTitle class="text-sm">
|
||||
<span class="font-weight-medium">
|
||||
Status:
|
||||
</span>
|
||||
<VChip
|
||||
size="small"
|
||||
:color="resolveUserStatusVariant('Active')"
|
||||
class="text-capitalize"
|
||||
>
|
||||
Active
|
||||
</VChip>
|
||||
</VListItemTitle>
|
||||
</VListItem>
|
||||
|
||||
|
||||
<VListItem>
|
||||
<VListItemTitle class="text-sm">
|
||||
<span class="font-weight-medium">Role: </span>
|
||||
<span class="text-capitalize text-body-1">Patient</span>
|
||||
</VListItemTitle>
|
||||
</VListItem>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -191,29 +180,23 @@ const resolveUserRoleVariant = role => {
|
||||
</VListItem>
|
||||
|
||||
|
||||
<VListItem>
|
||||
<VListItemTitle class="text-sm">
|
||||
<span class="font-weight-medium">
|
||||
Country:
|
||||
</span>
|
||||
<span class="text-body-1">{{ props.userData.patient.country }}</span>
|
||||
</VListItemTitle>
|
||||
</VListItem>
|
||||
</VList>
|
||||
</VCardText>
|
||||
|
||||
<!-- 👉 Edit and Suspend button -->
|
||||
<VCardText class="d-flex justify-center">
|
||||
<VCardText class="d-flex justify-center" >
|
||||
<VBtn
|
||||
variant="elevated"
|
||||
class="me-4"
|
||||
@click="isUserInfoEditDialogVisible = true"
|
||||
style="display: none;"
|
||||
>
|
||||
Edit
|
||||
</VBtn>
|
||||
<VBtn
|
||||
variant="outlined"
|
||||
color="error"
|
||||
style="display: none;"
|
||||
>
|
||||
Suspend
|
||||
</VBtn>
|
||||
@ -223,7 +206,7 @@ const resolveUserRoleVariant = role => {
|
||||
<!-- !SECTION -->
|
||||
|
||||
<!-- SECTION Current Plan -->
|
||||
<VCol cols="12" v-if="props.userData.plans[0]">
|
||||
<VCol cols="12" v-if="props.userData.plans">
|
||||
<VCard
|
||||
flat
|
||||
class="current-plan"
|
||||
@ -235,16 +218,16 @@ const resolveUserRoleVariant = role => {
|
||||
color="primary"
|
||||
size="small"
|
||||
>
|
||||
{{ props.userData.plans[0].title }}
|
||||
{{ props.userData.plans.title }}
|
||||
</VChip>
|
||||
|
||||
<VSpacer />
|
||||
|
||||
<!-- 👉 Current Price -->
|
||||
<div class="d-flex align-center">
|
||||
<sup class="text-primary text-lg font-weight-medium"> {{ props.userData.plans[0].currency }}</sup>
|
||||
<sup class="text-primary text-lg font-weight-medium"> {{ props.userData.plans.currency }}</sup>
|
||||
<h1 class="text-h1 text-primary">
|
||||
{{ props.userData.plans[0].price }}
|
||||
{{ props.userData.plans.price }}
|
||||
</h1>
|
||||
<sub class="mt-3"><h6 class="text-h6 font-weight-regular">month</h6></sub>
|
||||
</div>
|
||||
@ -263,7 +246,7 @@ const resolveUserRoleVariant = role => {
|
||||
icon="ri-circle-fill"
|
||||
/>
|
||||
<div class="text-medium-emphasis">
|
||||
{{ props.userData.plans[0].list_one_title }}
|
||||
{{ props.userData.plans.list_one_title }}
|
||||
</div>
|
||||
</div>
|
||||
</VListItem>
|
||||
@ -277,7 +260,7 @@ const resolveUserRoleVariant = role => {
|
||||
icon="ri-circle-fill"
|
||||
/>
|
||||
<div class="text-medium-emphasis">
|
||||
{{ props.userData.plans[0].list_sub_title }}
|
||||
{{ props.userData.plans.list_sub_title }}
|
||||
</div>
|
||||
</div>
|
||||
</VListItem>
|
||||
@ -292,7 +275,7 @@ const resolveUserRoleVariant = role => {
|
||||
icon="ri-circle-fill"
|
||||
/>
|
||||
<div class="text-medium-emphasis">
|
||||
{{ props.userData.plans[0].list_two_title }}
|
||||
{{ props.userData.plans.list_two_title }}
|
||||
</div>
|
||||
</div>
|
||||
</VListItem>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<script setup>
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { useStore } from 'vuex';
|
||||
|
||||
const store = useStore();
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
@ -25,15 +26,15 @@ const getprescriptionList = async () => {
|
||||
// itemsPrescriptions.value = store.getters.getPrescriptionList
|
||||
for (let data of prescriptions) {
|
||||
let dataObject = {}
|
||||
dataObject.name = data.prescription.name
|
||||
dataObject.brand = data.prescription.brand
|
||||
dataObject.from = data.prescription.from
|
||||
dataObject.direction_quantity = data.prescription.direction_quantity
|
||||
dataObject.dosage = data.prescription.dosage
|
||||
dataObject.quantity = data.prescription.quantity
|
||||
dataObject.refill_quantity = data.prescription.refill_quantity
|
||||
dataObject.name = data.name
|
||||
dataObject.brand = data.brand
|
||||
dataObject.from = data.from
|
||||
dataObject.direction_quantity = data.direction_quantity
|
||||
dataObject.dosage = data.dosage
|
||||
dataObject.quantity = data.quantity
|
||||
dataObject.refill_quantity = data.refill_quantity
|
||||
dataObject.actions = ''
|
||||
dataObject.id = data.prescription.id
|
||||
dataObject.id = data.id
|
||||
dataObject.comments = data.comments
|
||||
dataObject.direction_one = data.direction_one
|
||||
dataObject.direction_two= data.direction_two
|
||||
|
@ -1,286 +0,0 @@
|
||||
<script setup>
|
||||
import { useTheme } from 'vuetify'
|
||||
import UserInvoiceTable from './UserInvoiceTable.vue'
|
||||
import pdf from '@images/icons/project-icons/pdf.png'
|
||||
import avatar2 from '@images/avatars/avatar-2.png'
|
||||
import avatar3 from '@images/avatars/avatar-3.png'
|
||||
import avatar4 from '@images/avatars/avatar-4.png'
|
||||
import avatar5 from '@images/avatars/avatar-5.png'
|
||||
import figma from '@images/icons/project-icons/figma.png'
|
||||
import html5 from '@images/icons/project-icons/html5.png'
|
||||
import python from '@images/icons/project-icons/python.png'
|
||||
import react from '@images/icons/project-icons/react.png'
|
||||
import sketch from '@images/icons/project-icons/sketch.png'
|
||||
import vue from '@images/icons/project-icons/vue.png'
|
||||
import xamarin from '@images/icons/project-icons/xamarin.png'
|
||||
|
||||
const projectTableHeaders = [
|
||||
{
|
||||
title: 'PROJECT',
|
||||
key: 'name',
|
||||
},
|
||||
{
|
||||
title: 'TOTAL TASK',
|
||||
key: 'totalTask',
|
||||
},
|
||||
{
|
||||
title: 'PROGRESS',
|
||||
key: 'progress',
|
||||
},
|
||||
{
|
||||
title: 'HOURS',
|
||||
key: 'hours',
|
||||
},
|
||||
]
|
||||
|
||||
const { name } = useTheme()
|
||||
|
||||
const projects = [
|
||||
{
|
||||
logo: react,
|
||||
name: 'BGC eCommerce App',
|
||||
project: 'React Project',
|
||||
totalTask: '122/240',
|
||||
progress: 78,
|
||||
hours: '18:42',
|
||||
},
|
||||
{
|
||||
logo: figma,
|
||||
name: 'Falcon Logo Design',
|
||||
project: 'Figma Project',
|
||||
totalTask: '09/56',
|
||||
progress: 18,
|
||||
hours: '20:42',
|
||||
},
|
||||
{
|
||||
logo: vue,
|
||||
name: 'Dashboard Design',
|
||||
project: 'Vuejs Project',
|
||||
totalTask: '290/320',
|
||||
progress: 62,
|
||||
hours: '120:87',
|
||||
},
|
||||
{
|
||||
logo: xamarin,
|
||||
name: 'Foodista mobile app',
|
||||
project: 'Xamarin Project',
|
||||
totalTask: '290/320',
|
||||
progress: 8,
|
||||
hours: '120:87',
|
||||
},
|
||||
{
|
||||
logo: python,
|
||||
name: 'Dojo Email App',
|
||||
project: 'Python Project',
|
||||
totalTask: '120/186',
|
||||
progress: 49,
|
||||
hours: '230:10',
|
||||
},
|
||||
{
|
||||
logo: sketch,
|
||||
name: 'Blockchain Website',
|
||||
project: 'Sketch Project',
|
||||
totalTask: '99/109',
|
||||
progress: 92,
|
||||
hours: '342:41',
|
||||
},
|
||||
{
|
||||
logo: html5,
|
||||
name: 'Hoffman Website',
|
||||
project: 'HTML Project',
|
||||
totalTask: '98/110',
|
||||
progress: 88,
|
||||
hours: '12:45',
|
||||
},
|
||||
]
|
||||
|
||||
const resolveUserProgressVariant = progress => {
|
||||
if (progress <= 25)
|
||||
return 'error'
|
||||
if (progress > 25 && progress <= 50)
|
||||
return 'warning'
|
||||
if (progress > 50 && progress <= 75)
|
||||
return 'primary'
|
||||
if (progress > 75 && progress <= 100)
|
||||
return 'success'
|
||||
|
||||
return 'secondary'
|
||||
}
|
||||
|
||||
const search = ref('')
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VRow>
|
||||
<VCol cols="12">
|
||||
<VCard title="Project List">
|
||||
<template #append>
|
||||
<VTextField
|
||||
v-model="search"
|
||||
placeholder="Search Project"
|
||||
density="compact"
|
||||
style="inline-size: 10rem;"
|
||||
/>
|
||||
</template>
|
||||
<!-- 👉 User Project List Table -->
|
||||
|
||||
<!-- SECTION Datatable -->
|
||||
<VDataTable
|
||||
:search="search"
|
||||
:headers="projectTableHeaders"
|
||||
:items="projects"
|
||||
item-value="name"
|
||||
class="text-no-wrap rounded-0"
|
||||
>
|
||||
<!-- projects -->
|
||||
<template #item.name="{ item }">
|
||||
<div class="d-flex align-center">
|
||||
<VAvatar
|
||||
:size="34"
|
||||
class="me-3"
|
||||
:image="item.logo"
|
||||
/>
|
||||
<div>
|
||||
<h6 class="text-h6 mb-0">
|
||||
{{ item.name }}
|
||||
</h6>
|
||||
<p class="text-sm text-medium-emphasis mb-0">
|
||||
{{ item.project }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- total task -->
|
||||
<template #item.totalTask="{ item }">
|
||||
<div class="text-high-emphasis">
|
||||
{{ item.totalTask }}
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- Progress -->
|
||||
<template #item.progress="{ item }">
|
||||
<div class="text-high-emphasis">
|
||||
{{ item.progress }}%
|
||||
</div>
|
||||
<VProgressLinear
|
||||
:height="6"
|
||||
:model-value="item.progress"
|
||||
rounded
|
||||
:color="resolveUserProgressVariant(item.progress)"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<!-- remove footer -->
|
||||
<!-- TODO refactor this after vuetify community gives answer -->
|
||||
<template #bottom />
|
||||
</VDataTable>
|
||||
<!-- !SECTION -->
|
||||
</VCard>
|
||||
</VCol>
|
||||
|
||||
<VCol cols="12">
|
||||
<!-- 👉 Activity timeline -->
|
||||
<VCard title="User Activity Timeline">
|
||||
<VCardText>
|
||||
<VTimeline
|
||||
density="compact"
|
||||
align="start"
|
||||
truncate-line="both"
|
||||
:line-inset="8"
|
||||
class="v-timeline-density-compact"
|
||||
>
|
||||
<VTimelineItem
|
||||
dot-color="error"
|
||||
size="x-small"
|
||||
>
|
||||
<div class="d-flex justify-space-between align-center flex-wrap gap-2 mb-3">
|
||||
<span class="app-timeline-title">
|
||||
12 Invoices have been paid
|
||||
</span>
|
||||
<span class="app-timeline-meta">12 min ago</span>
|
||||
</div>
|
||||
|
||||
<p class="app-timeline-text mb-2">
|
||||
Invoices have been paid to the company
|
||||
</p>
|
||||
<div class="d-inline-flex align-center timeline-chip">
|
||||
<img
|
||||
:src="pdf"
|
||||
height="20"
|
||||
class="me-2"
|
||||
alt="img"
|
||||
>
|
||||
|
||||
<span class="app-timeline-text font-weight-medium">
|
||||
invoice.pdf
|
||||
</span>
|
||||
</div>
|
||||
</VTimelineItem>
|
||||
|
||||
<VTimelineItem
|
||||
dot-color="primary"
|
||||
size="x-small"
|
||||
>
|
||||
<div class="d-flex justify-space-between align-center flex-wrap gap-2 mb-3">
|
||||
<span class="app-timeline-title">
|
||||
Client Meeting
|
||||
</span>
|
||||
<span class="app-timeline-meta">45 min ago</span>
|
||||
</div>
|
||||
|
||||
<p class="app-timeline-text mb-2">
|
||||
React Project meeting with john @10:15am
|
||||
</p>
|
||||
|
||||
<div class="d-flex align-center mt-3">
|
||||
<VAvatar
|
||||
size="32"
|
||||
class="me-2"
|
||||
:image="avatar2"
|
||||
/>
|
||||
<div>
|
||||
<p class="text-sm font-weight-medium mb-0">
|
||||
Lester McCarthy (Client)
|
||||
</p>
|
||||
<span class="text-sm">CEO of Kelly Group</span>
|
||||
</div>
|
||||
</div>
|
||||
</VTimelineItem>
|
||||
|
||||
<VTimelineItem
|
||||
dot-color="info"
|
||||
size="x-small"
|
||||
>
|
||||
<div class="d-flex justify-space-between align-center flex-wrap gap-2 mb-3">
|
||||
<span class="app-timeline-title">
|
||||
Create a new project for client
|
||||
</span>
|
||||
<span class="app-timeline-meta">2 day ago</span>
|
||||
</div>
|
||||
|
||||
<p class="app-timeline-text mb-2">
|
||||
6 team members in a project
|
||||
</p>
|
||||
|
||||
<div class="v-avatar-group">
|
||||
<VAvatar
|
||||
v-for="avatar in [avatar2, avatar3, avatar4, avatar5]"
|
||||
:key="avatar"
|
||||
:image="avatar"
|
||||
/>
|
||||
<VAvatar :color="name === 'light' ? '#F0EFF0' : '#3F3B59'">
|
||||
<span class="text-high-emphasis">+3</span>
|
||||
</VAvatar>
|
||||
</div>
|
||||
</VTimelineItem>
|
||||
</VTimeline>
|
||||
</VCardText>
|
||||
</VCard>
|
||||
</VCol>
|
||||
|
||||
<VCol cols="12">
|
||||
<UserInvoiceTable />
|
||||
</VCol>
|
||||
</VRow>
|
||||
</template>
|
@ -87,7 +87,7 @@ onMounted(async () => {
|
||||
:touch="false"
|
||||
>
|
||||
<VWindowItem>
|
||||
<PatienTabOverview :notes-data="patientDtail"/>
|
||||
<PatienTabOverview :user-data="patientDtail"/>
|
||||
</VWindowItem>
|
||||
|
||||
<VWindowItem>
|
||||
|
@ -1,11 +1,13 @@
|
||||
<script setup>
|
||||
import UserBioPanel from '@/views/apps/user/view/UserBioPanel.vue'
|
||||
import UserTabBillingsPlans from '@/views/apps/user/view/UserTabBillingsPlans.vue'
|
||||
import UserTabConnections from '@/views/apps/user/view/UserTabConnections.vue'
|
||||
import NotesPanel from '@/pages/providers/NotesPanel.vue'
|
||||
import PrescriptionPanel from '@/pages/providers/PrescriptionPanel.vue'
|
||||
import ProviderBioPanel from '@/pages/providers/ProviderBioPanel.vue'
|
||||
import ProviderTabOverview from '@/pages/providers/ProviderTabOverview.vue'
|
||||
import UserTabNotifications from '@/views/apps/user/view/UserTabNotifications.vue'
|
||||
import UserTabOverview from '@/views/apps/user/view/UserTabOverview.vue'
|
||||
import UserTabSecurity from '@/views/apps/user/view/UserTabSecurity.vue'
|
||||
import { useStore } from 'vuex'
|
||||
const patientDtail = ref(null);
|
||||
|
||||
const store = useStore();
|
||||
const route = useRoute('apps-user-view-id')
|
||||
const userTab = ref(null)
|
||||
|
||||
@ -16,33 +18,45 @@ const tabs = [
|
||||
},
|
||||
{
|
||||
icon: 'ri-lock-2-line',
|
||||
title: 'Security',
|
||||
title: 'Notes',
|
||||
},
|
||||
{
|
||||
icon: 'ri-bookmark-line',
|
||||
title: 'Billing & Plan',
|
||||
},
|
||||
{
|
||||
icon: 'ri-notification-4-line',
|
||||
title: 'Notifications',
|
||||
},
|
||||
{
|
||||
icon: 'ri-link-m',
|
||||
title: 'Connections',
|
||||
title: 'Prescriptions',
|
||||
},
|
||||
// {
|
||||
// icon: 'ri-notification-4-line',
|
||||
// title: 'Notifications',
|
||||
// },
|
||||
// {
|
||||
// icon: 'ri-link-m',
|
||||
// title: 'Connections',
|
||||
// },
|
||||
]
|
||||
const getPatientDeatail = async () => {
|
||||
store.dispatch('updateIsLoading', true);
|
||||
await store.dispatch('providerDetial', { id: route.params.id });
|
||||
store.dispatch('updateIsLoading', false);
|
||||
|
||||
const { data: userData } = await useApi(`/apps/users/${ route.params.id }`)
|
||||
let list = store.getters.getProviderDetail;
|
||||
patientDtail.value=list
|
||||
console.log(list.patient);
|
||||
};
|
||||
onMounted(async () => {
|
||||
await getPatientDeatail();
|
||||
|
||||
});
|
||||
//const { data: userData } = await useApi(`/apps/users/${ route.params.id }`)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VRow v-if="userData">
|
||||
<VRow v-if="patientDtail">
|
||||
<VCol
|
||||
cols="12"
|
||||
md="5"
|
||||
lg="4"
|
||||
>
|
||||
<UserBioPanel :user-data="userData" />
|
||||
<ProviderBioPanel :user-data="patientDtail" />
|
||||
</VCol>
|
||||
|
||||
<VCol
|
||||
@ -72,24 +86,22 @@ const { data: userData } = await useApi(`/apps/users/${ route.params.id }`)
|
||||
:touch="false"
|
||||
>
|
||||
<VWindowItem>
|
||||
<UserTabOverview />
|
||||
<ProviderTabOverview :user-data="patientDtail"/>
|
||||
</VWindowItem>
|
||||
|
||||
<VWindowItem>
|
||||
<UserTabSecurity />
|
||||
<NotesPanel :notes-data="patientDtail"/>
|
||||
</VWindowItem>
|
||||
|
||||
<VWindowItem>
|
||||
<UserTabBillingsPlans />
|
||||
<PrescriptionPanel :prescription-data="patientDtail"/>
|
||||
</VWindowItem>
|
||||
|
||||
<VWindowItem>
|
||||
<UserTabNotifications />
|
||||
</VWindowItem>
|
||||
|
||||
<VWindowItem>
|
||||
<UserTabConnections />
|
||||
</VWindowItem>
|
||||
|
||||
</VWindow>
|
||||
</VCol>
|
||||
</VRow>
|
||||
|
@ -231,7 +231,12 @@ onMounted(() => {
|
||||
</VAvatar>
|
||||
|
||||
<div class="d-flex flex-column ms-3">
|
||||
<router-link
|
||||
:to="{ name: 'admin-provider-profile', params: { id: item.id } }"
|
||||
class="text-high-emphasis "
|
||||
>
|
||||
<span class="d-block font-weight-medium text-high-emphasis text-truncate">{{ item.name }}</span>
|
||||
</router-link>
|
||||
<small>{{ item.post }}</small>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -117,6 +117,11 @@ export const routes = [
|
||||
path: '/admin/patients/patient-profile/:id',
|
||||
name: 'admin-patient-profile',
|
||||
component: () => import('@/pages/patients/patient-profile.vue'),
|
||||
},
|
||||
{
|
||||
path: '/admin/provider/provider-profile/:id',
|
||||
name: 'admin-provider-profile',
|
||||
component: () => import('@/pages/providers/provider-profile.vue'),
|
||||
},
|
||||
{
|
||||
path: '/apps/email/filter/:filter',
|
||||
|
@ -8,6 +8,7 @@ import {
|
||||
ADMIN_LAB_KIT_UPDATE_API,
|
||||
ADMIN_LOGIN_DETAIL,
|
||||
ADMIN_PATIENT_DETAIL_API,
|
||||
ADMIN_PROVIDER_DETAIL_API,
|
||||
ADMIN_UPDATE_PASSWORD,
|
||||
ADMIN_UPDATE_SITE_SETTING,
|
||||
APPOINTMENT_DETAILS_API,
|
||||
@ -63,7 +64,8 @@ export default createStore({
|
||||
timeout: null,
|
||||
checkLoginExpire: false,
|
||||
labKitList: [],
|
||||
patientDetail:null
|
||||
patientDetail: null,
|
||||
providerDetail:null
|
||||
},
|
||||
mutations: {
|
||||
setLoading(state, payload) {
|
||||
@ -102,6 +104,15 @@ export default createStore({
|
||||
console.log('payload');
|
||||
state.patientDetail = payload
|
||||
},
|
||||
setProviderDetail(state, payload) {
|
||||
console.log('payload');
|
||||
state.providerDetail = payload
|
||||
},
|
||||
setProviderMeetingList(state, payload) {
|
||||
console.log('payload');
|
||||
state.providerMeetingList = payload
|
||||
},
|
||||
|
||||
setPtientList(state, payload) {
|
||||
state.patientList = payload
|
||||
},
|
||||
@ -984,6 +995,24 @@ export default createStore({
|
||||
console.error('Error:', error);
|
||||
});
|
||||
},
|
||||
async providerDetial({ commit }, payload) {
|
||||
commit('setLoading', true)
|
||||
|
||||
await axios.post(ADMIN_PROVIDER_DETAIL_API+payload.id, {}, {
|
||||
headers: {
|
||||
'Authorization': `Bearer ${localStorage.getItem('admin_access_token')}`,
|
||||
}
|
||||
}) .then(response => {
|
||||
commit('setLoading', false)
|
||||
console.log('Response:', response.data);
|
||||
commit('setProviderDetail',response.data)
|
||||
|
||||
})
|
||||
.catch(error => {
|
||||
commit('setLoading', false)
|
||||
console.error('Error:', error);
|
||||
});
|
||||
},
|
||||
},
|
||||
getters: {
|
||||
getIsLoading(state){
|
||||
@ -1058,5 +1087,8 @@ export default createStore({
|
||||
getPatientDetail(state) {
|
||||
return state.patientDetail
|
||||
},
|
||||
getProviderDetail(state) {
|
||||
return state.providerDetail
|
||||
},
|
||||
}
|
||||
})
|
||||
|
1
typed-router.d.ts
vendored
1
typed-router.d.ts
vendored
@ -163,7 +163,6 @@ declare module 'vue-router/auto/routes' {
|
||||
'patients-patient-bio-panel': RouteRecordInfo<'patients-patient-bio-panel', '/patients/PatientBioPanel', Record<never, never>, Record<never, never>>,
|
||||
'patients-patients': RouteRecordInfo<'patients-patients', '/patients/patients', Record<never, never>, Record<never, never>>,
|
||||
'patients-prescription-panel': RouteRecordInfo<'patients-prescription-panel', '/patients/PrescriptionPanel', Record<never, never>, Record<never, never>>,
|
||||
'patients-user-tab-overview': RouteRecordInfo<'patients-user-tab-overview', '/patients/UserTabOverview', Record<never, never>, Record<never, never>>,
|
||||
'providers-meeting-details': RouteRecordInfo<'providers-meeting-details', '/providers/meeting-details', Record<never, never>, Record<never, never>>,
|
||||
'providers-meetings': RouteRecordInfo<'providers-meetings', '/providers/meetings', Record<never, never>, Record<never, never>>,
|
||||
'providers-notes-panel': RouteRecordInfo<'providers-notes-panel', '/providers/NotesPanel', Record<never, never>, Record<never, never>>,
|
||||
|
Loading…
Reference in New Issue
Block a user