Merge branch 'dev' of ssh://git.codelfi.com:2202/TelemedPro/hgh_admin into dev

This commit is contained in:
Inshal 2024-06-11 01:52:53 +05:00
commit 49c1007bfa
9 changed files with 63 additions and 64 deletions

View File

@ -16,7 +16,6 @@ const props = defineProps({
}) })
const formatDateDate = (date) => { const formatDateDate = (date) => {
const messageDate = new Date(date); const messageDate = new Date(date);
const options = { const options = {
@ -29,14 +28,25 @@ const formatDateDate = (date) => {
return messageDate.toLocaleDateString('en-US', options).replace(/\//g, '-'); return messageDate.toLocaleDateString('en-US', options).replace(/\//g, '-');
}; };
const downloadFile = (fileUrl) => { const downloadFile = async (fileUrl, fileName = 'downloadedFile.png') => {
const link = document.createElement('a'); try {
link.href = fileUrl; const response = await fetch(fileUrl);
link.download = 'noteFile.png'; if (!response.ok) throw new Error('Network response was not ok');
document.body.appendChild(link); const blob = await response.blob();
link.click(); const link = document.createElement('a');
document.body.removeChild(link); const url = window.URL.createObjectURL(blob);
}; link.href = url;
link.download = fileName;
document.body.appendChild(link);
link.click();
window.URL.revokeObjectURL(url);
document.body.removeChild(link);
} catch (error) {
console.error('Download failed', error);
}
};
</script> </script>
<template> <template>
@ -64,16 +74,24 @@ const downloadFile = (fileUrl) => {
<span class="app-timeline-title" v-if="p_note.note_type=='Notes'"> <span class="app-timeline-title" v-if="p_note.note_type=='Notes'">
{{p_note.note}} {{p_note.note}}
</span> </span>
<span class="app-timeline-title" v-if="p_note.note_type=='file'"> <span class="app-timeline-title" v-if="p_note.note_type == 'file'">
<img :src="p_note.note"/>
</span> <VIcon>ri-attachment-2</VIcon> <button @click="downloadFile(p_note.note,'noteFile.png')">Download Image</button>
</span>
<span class="app-timeline-meta">{{ formatDateDate(p_note.created_at) }}</span> <span class="app-timeline-meta">{{ formatDateDate(p_note.created_at) }}</span>
<!-- <span></span> --> <!-- <span></span> -->
</div> </div>
<!-- 👉 Content --> <!-- 👉 Content -->
<div class="app-timeline-text mb-1"> <div class="app-timeline-text mb-1">
<span>{{ p_note.provider_name }}</span> <router-link
:to="{ name: 'admin-provider-profile', params: { id: p_note.provider_id } }"
class=""
>
<span class="">{{ p_note.provider_name }}</span>
</router-link>
<VIcon <VIcon
size="20" size="20"
icon="tabler-arrow-right" icon="tabler-arrow-right"

View File

@ -142,8 +142,7 @@ const resolveUserRoleVariant = role => {
<span class="font-weight-medium"> <span class="font-weight-medium">
Address: Address:
</span> </span>
<span class="text-body-1">{{ props.userData.patient.address }} <span class="text-body-1">{{ props.userData.patient.address }} ,{{ props.userData.patient.city }},{{ props.userData.patient.state }} {{ props.userData.patient.zip_code }}</span>
<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ props.userData.patient.city }},{{ props.userData.patient.state }} {{ props.userData.patient.zip_code }}</span>
</VListItemTitle> </VListItemTitle>
</VListItem> </VListItem>
@ -269,29 +268,7 @@ const resolveUserRoleVariant = role => {
</VList> </VList>
<!-- 👉 Days --> <!-- 👉 Days -->
<div class="my-6">
<div class="d-flex mt-3 mb-2">
<h6 class="text-h6 font-weight-medium">
Days
</h6>
<VSpacer />
<h6 class="text-h6 font-weight-medium">
26 of 30 Days
</h6>
</div>
<!-- 👉 Progress -->
<VProgressLinear
rounded
:model-value="86"
height="8"
color="primary"
/>
<p class="text-sm mt-1">
4 days remaining
</p>
</div>
<!-- 👉 Upgrade Plan --> <!-- 👉 Upgrade Plan -->
<VBtn <VBtn

View File

@ -160,7 +160,7 @@ const close = () => {
:color="getStatusColor(item.status)" :color="getStatusColor(item.status)"
density="comfortable" density="comfortable"
> >
{{ getStatusColor(item.status) }} {{ item.status}}
</VChip> </VChip>
</template> </template>

View File

@ -2,11 +2,10 @@
import NotesPanel from '@/pages/patients/NotesPanel.vue' import NotesPanel from '@/pages/patients/NotesPanel.vue'
import PatienTabOverview from '@/pages/patients/PatienTabOverview.vue' import PatienTabOverview from '@/pages/patients/PatienTabOverview.vue'
import PatientBioPanel from '@/pages/patients/PatientBioPanel.vue' import PatientBioPanel from '@/pages/patients/PatientBioPanel.vue'
import PatientProfile from '@/pages/patients/PatientProfile.vue'
import PrescriptionPanel from '@/pages/patients/PrescriptionPanel.vue' import PrescriptionPanel from '@/pages/patients/PrescriptionPanel.vue'
// import UserTabNotifications from '@/views/apps/user/view/UserTabNotifications.vue'
import { useStore } from 'vuex' import { useStore } from 'vuex'
import patientProfile from '../patients/patientprofile.vue'
const patientDtail = ref(null); const patientDtail = ref(null);
const store = useStore(); const store = useStore();
@ -27,14 +26,10 @@ const tabs = [
title: 'Prescriptions', title: 'Prescriptions',
}, },
{ {
icon: 'ri-survey-line', icon: 'ri-notification-4-line',
title: 'Profile', title: 'Profile',
}, },
// { // {
// icon: 'ri-notification-4-line',
// title: 'Notifications',
// },
// {
// icon: 'ri-link-m', // icon: 'ri-link-m',
// title: 'Connections', // title: 'Connections',
// }, // },
@ -103,12 +98,8 @@ onMounted(async () => {
<PrescriptionPanel :prescription-data="patientDtail"/> <PrescriptionPanel :prescription-data="patientDtail"/>
</VWindowItem> </VWindowItem>
<!-- <VWindowItem>
<UserTabNotifications />
</VWindowItem> -->
<VWindowItem> <VWindowItem>
<patientProfile :patient_id="route.params.id"/> <PatientProfile />
</VWindowItem> </VWindowItem>

View File

@ -37,6 +37,16 @@ const downloadFile = (fileUrl) => {
link.click(); link.click();
document.body.removeChild(link); document.body.removeChild(link);
}; };
const downloadImage = async (imageUrl) => {
try {
const response = await fetch(imageUrl)
const blob = await response.blob()
const fileName = imageUrl.split('/').pop()
saveAs(blob, fileName)
} catch (error) {
console.error('Error downloading image:', error) }
}
</script> </script>
<template> <template>
@ -64,9 +74,12 @@ const downloadFile = (fileUrl) => {
<span class="app-timeline-title" v-if="p_note.note_type=='Notes'"> <span class="app-timeline-title" v-if="p_note.note_type=='Notes'">
{{p_note.note}} {{p_note.note}}
</span> </span>
<span class="app-timeline-title" v-if="p_note.note_type=='file'">
<img :src="p_note.note"/> <span class="app-timeline-title" v-if="p_note.note_type == 'file'">
</span> <VIcon>ri-attachment-2</VIcon> <button @click="downloadImage(p_note.note)">Download Image</button>
</span>
<span class="app-timeline-meta">{{ formatDateDate(p_note.created_at) }}</span> <span class="app-timeline-meta">{{ formatDateDate(p_note.created_at) }}</span>
<!-- <span></span> --> <!-- <span></span> -->

View File

@ -156,11 +156,12 @@ const close = () => {
<!-- full name --> <!-- full name -->
<!-- status --> <!-- status -->
<template #item.status="{ item }"> <template #item.status="{ item }">
<VChip <VChip
:color="getStatusColor(item.status)" :color="getStatusColor(item.status)"
density="comfortable" density="comfortable"
> >
{{ getStatusColor(item.status) }} {{ item.status}}
</VChip> </VChip>
</template> </template>

View File

@ -137,8 +137,7 @@ const resolveUserRoleVariant = role => {
<span class="font-weight-medium"> <span class="font-weight-medium">
Address: Address:
</span> </span>
<span class="text-body-1">{{ props.userData.telemed.home_address }} <span class="text-body-1">{{ props.userData.telemed.home_address }}, {{ props.userData.telemed.city }},{{ props.userData.telemed.state }} {{ props.userData.telemed.zip_code }}</span>
<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ props.userData.telemed.city }},{{ props.userData.telemed.state }} {{ props.userData.telemed.zip_code }}</span>
</VListItemTitle> </VListItemTitle>
</VListItem> </VListItem>
@ -160,7 +159,7 @@ const resolveUserRoleVariant = role => {
<span class="font-weight-medium"> <span class="font-weight-medium">
Availability: Availability:
</span> </span>
<span class="text-body-1">{{ props.userData.telemed.availability_from }}</span> <span class="text-body-1">{{ props.userData.telemed.availability_to }}</span> <span class="text-body-1">{{ props.userData.telemed.availability_from }}</span> to<span class="text-body-1">{{ props.userData.telemed.availability_to }}</span>
</VListItemTitle> </VListItemTitle>
</VListItem> </VListItem>

View File

@ -138,11 +138,11 @@ export const routes = [
name: 'admin-provider-profile', name: 'admin-provider-profile',
component: () => import('@/pages/providers/provider-profile.vue'), component: () => import('@/pages/providers/provider-profile.vue'),
}, },
// { {
// path: '/admin/providers/patientprofile/:patient_id', path: '/admin/providers/patientprofile/:id',
// name: 'admin-providers-patientprofile', name: 'admin-providers-patientprofile',
// component: () => import('@/pages/patients/patientprofile.vue'), component: () => import('@/pages/patients/PatientProfile.vue'),
// }, },
{ {
path: '/apps/email/filter/:filter', path: '/apps/email/filter/:filter',
name: 'apps-email-filter', name: 'apps-email-filter',

2
typed-router.d.ts vendored
View File

@ -161,7 +161,7 @@ declare module 'vue-router/auto/routes' {
'patients-patient-profile': RouteRecordInfo<'patients-patient-profile', '/patients/patient-profile', Record<never, never>, Record<never, never>>, 'patients-patient-profile': RouteRecordInfo<'patients-patient-profile', '/patients/patient-profile', Record<never, never>, Record<never, never>>,
'patients-patien-tab-overview': RouteRecordInfo<'patients-patien-tab-overview', '/patients/PatienTabOverview', Record<never, never>, Record<never, never>>, 'patients-patien-tab-overview': RouteRecordInfo<'patients-patien-tab-overview', '/patients/PatienTabOverview', Record<never, never>, Record<never, never>>,
'patients-patient-bio-panel': RouteRecordInfo<'patients-patient-bio-panel', '/patients/PatientBioPanel', Record<never, never>, Record<never, never>>, 'patients-patient-bio-panel': RouteRecordInfo<'patients-patient-bio-panel', '/patients/PatientBioPanel', Record<never, never>, Record<never, never>>,
'patients-patientprofile': RouteRecordInfo<'patients-patientprofile', '/patients/patientprofile', Record<never, never>, Record<never, never>>, 'patients-patient-profile': RouteRecordInfo<'patients-patient-profile', '/patients/PatientProfile', Record<never, never>, Record<never, never>>,
'patients-patients': RouteRecordInfo<'patients-patients', '/patients/patients', 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-prescription-panel': RouteRecordInfo<'patients-prescription-panel', '/patients/PrescriptionPanel', Record<never, never>, Record<never, never>>,
'patients-question-progress-bar': RouteRecordInfo<'patients-question-progress-bar', '/patients/QuestionProgressBar', Record<never, never>, Record<never, never>>, 'patients-question-progress-bar': RouteRecordInfo<'patients-question-progress-bar', '/patients/QuestionProgressBar', Record<never, never>, Record<never, never>>,