Merge branch 'dev' of ssh://git.codelfi.com:2202/TelemedPro/hgh_admin into dev
This commit is contained in:
commit
49c1007bfa
@ -16,7 +16,6 @@ const props = defineProps({
|
||||
})
|
||||
|
||||
|
||||
|
||||
const formatDateDate = (date) => {
|
||||
const messageDate = new Date(date);
|
||||
const options = {
|
||||
@ -29,14 +28,25 @@ const formatDateDate = (date) => {
|
||||
return messageDate.toLocaleDateString('en-US', options).replace(/\//g, '-');
|
||||
};
|
||||
|
||||
const downloadFile = (fileUrl) => {
|
||||
const downloadFile = async (fileUrl, fileName = 'downloadedFile.png') => {
|
||||
try {
|
||||
const response = await fetch(fileUrl);
|
||||
if (!response.ok) throw new Error('Network response was not ok');
|
||||
const blob = await response.blob();
|
||||
const link = document.createElement('a');
|
||||
link.href = fileUrl;
|
||||
link.download = 'noteFile.png';
|
||||
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>
|
||||
|
||||
<template>
|
||||
@ -64,8 +74,10 @@ const downloadFile = (fileUrl) => {
|
||||
<span class="app-timeline-title" v-if="p_note.note_type=='Notes'">
|
||||
{{p_note.note}}
|
||||
</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'">
|
||||
|
||||
<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></span> -->
|
||||
@ -73,7 +85,13 @@ const downloadFile = (fileUrl) => {
|
||||
|
||||
<!-- 👉 Content -->
|
||||
<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
|
||||
size="20"
|
||||
icon="tabler-arrow-right"
|
||||
|
@ -142,8 +142,7 @@ const resolveUserRoleVariant = role => {
|
||||
<span class="font-weight-medium">
|
||||
Address:
|
||||
</span>
|
||||
<span class="text-body-1">{{ props.userData.patient.address }}
|
||||
<br/> {{ props.userData.patient.city }},{{ props.userData.patient.state }} {{ props.userData.patient.zip_code }}</span>
|
||||
<span class="text-body-1">{{ props.userData.patient.address }} ,{{ props.userData.patient.city }},{{ props.userData.patient.state }} {{ props.userData.patient.zip_code }}</span>
|
||||
</VListItemTitle>
|
||||
</VListItem>
|
||||
|
||||
@ -269,29 +268,7 @@ const resolveUserRoleVariant = role => {
|
||||
</VList>
|
||||
|
||||
<!-- 👉 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 -->
|
||||
<VBtn
|
||||
|
@ -160,7 +160,7 @@ const close = () => {
|
||||
:color="getStatusColor(item.status)"
|
||||
density="comfortable"
|
||||
>
|
||||
{{ getStatusColor(item.status) }}
|
||||
{{ item.status}}
|
||||
</VChip>
|
||||
</template>
|
||||
|
||||
|
@ -2,11 +2,10 @@
|
||||
import NotesPanel from '@/pages/patients/NotesPanel.vue'
|
||||
import PatienTabOverview from '@/pages/patients/PatienTabOverview.vue'
|
||||
import PatientBioPanel from '@/pages/patients/PatientBioPanel.vue'
|
||||
import PatientProfile from '@/pages/patients/PatientProfile.vue'
|
||||
import PrescriptionPanel from '@/pages/patients/PrescriptionPanel.vue'
|
||||
|
||||
// import UserTabNotifications from '@/views/apps/user/view/UserTabNotifications.vue'
|
||||
import { useStore } from 'vuex'
|
||||
import patientProfile from '../patients/patientprofile.vue'
|
||||
const patientDtail = ref(null);
|
||||
|
||||
const store = useStore();
|
||||
@ -27,14 +26,10 @@ const tabs = [
|
||||
title: 'Prescriptions',
|
||||
},
|
||||
{
|
||||
icon: 'ri-survey-line',
|
||||
icon: 'ri-notification-4-line',
|
||||
title: 'Profile',
|
||||
},
|
||||
// {
|
||||
// icon: 'ri-notification-4-line',
|
||||
// title: 'Notifications',
|
||||
// },
|
||||
// {
|
||||
// icon: 'ri-link-m',
|
||||
// title: 'Connections',
|
||||
// },
|
||||
@ -103,12 +98,8 @@ onMounted(async () => {
|
||||
<PrescriptionPanel :prescription-data="patientDtail"/>
|
||||
</VWindowItem>
|
||||
|
||||
<!-- <VWindowItem>
|
||||
<UserTabNotifications />
|
||||
</VWindowItem> -->
|
||||
|
||||
<VWindowItem>
|
||||
<patientProfile :patient_id="route.params.id"/>
|
||||
<PatientProfile />
|
||||
</VWindowItem>
|
||||
|
||||
|
||||
|
@ -37,6 +37,16 @@ const downloadFile = (fileUrl) => {
|
||||
link.click();
|
||||
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>
|
||||
|
||||
<template>
|
||||
@ -64,10 +74,13 @@ const downloadFile = (fileUrl) => {
|
||||
<span class="app-timeline-title" v-if="p_note.note_type=='Notes'">
|
||||
{{p_note.note}}
|
||||
</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'">
|
||||
<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></span> -->
|
||||
</div>
|
||||
|
@ -156,11 +156,12 @@ const close = () => {
|
||||
<!-- full name -->
|
||||
<!-- status -->
|
||||
<template #item.status="{ item }">
|
||||
|
||||
<VChip
|
||||
:color="getStatusColor(item.status)"
|
||||
density="comfortable"
|
||||
>
|
||||
{{ getStatusColor(item.status) }}
|
||||
{{ item.status}}
|
||||
</VChip>
|
||||
</template>
|
||||
|
||||
|
@ -137,8 +137,7 @@ const resolveUserRoleVariant = role => {
|
||||
<span class="font-weight-medium">
|
||||
Address:
|
||||
</span>
|
||||
<span class="text-body-1">{{ props.userData.telemed.home_address }}
|
||||
<br/> {{ props.userData.telemed.city }},{{ props.userData.telemed.state }} {{ props.userData.telemed.zip_code }}</span>
|
||||
<span class="text-body-1">{{ props.userData.telemed.home_address }}, {{ props.userData.telemed.city }},{{ props.userData.telemed.state }} {{ props.userData.telemed.zip_code }}</span>
|
||||
</VListItemTitle>
|
||||
</VListItem>
|
||||
|
||||
@ -160,7 +159,7 @@ const resolveUserRoleVariant = role => {
|
||||
<span class="font-weight-medium">
|
||||
Availability:
|
||||
</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>
|
||||
</VListItem>
|
||||
|
||||
|
@ -138,11 +138,11 @@ export const routes = [
|
||||
name: 'admin-provider-profile',
|
||||
component: () => import('@/pages/providers/provider-profile.vue'),
|
||||
},
|
||||
// {
|
||||
// path: '/admin/providers/patientprofile/:patient_id',
|
||||
// name: 'admin-providers-patientprofile',
|
||||
// component: () => import('@/pages/patients/patientprofile.vue'),
|
||||
// },
|
||||
{
|
||||
path: '/admin/providers/patientprofile/:id',
|
||||
name: 'admin-providers-patientprofile',
|
||||
component: () => import('@/pages/patients/PatientProfile.vue'),
|
||||
},
|
||||
{
|
||||
path: '/apps/email/filter/:filter',
|
||||
name: 'apps-email-filter',
|
||||
|
2
typed-router.d.ts
vendored
2
typed-router.d.ts
vendored
@ -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-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-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-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>>,
|
||||
|
Loading…
Reference in New Issue
Block a user