fix
This commit is contained in:
parent
f10af129df
commit
3f081cee50
@ -16,7 +16,6 @@ const props = defineProps({
|
||||
})
|
||||
|
||||
|
||||
|
||||
const formatDateDate = (date) => {
|
||||
const messageDate = new Date(date);
|
||||
const options = {
|
||||
@ -29,23 +28,25 @@ const formatDateDate = (date) => {
|
||||
return messageDate.toLocaleDateString('en-US', options).replace(/\//g, '-');
|
||||
};
|
||||
|
||||
const downloadFile = (fileUrl) => {
|
||||
const link = document.createElement('a');
|
||||
link.href = fileUrl;
|
||||
link.download = 'noteFile.png';
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
};
|
||||
const downloadImage = async (imageUrl) => {
|
||||
const downloadFile = async (fileUrl, fileName = 'downloadedFile.png') => {
|
||||
try {
|
||||
const response = await fetch(imageUrl)
|
||||
const blob = await response.blob()
|
||||
const fileName = imageUrl.split('/').pop()
|
||||
saveAs(blob, fileName)
|
||||
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');
|
||||
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('Error downloading image:', error) }
|
||||
}
|
||||
console.error('Download failed', error);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -75,7 +76,7 @@ const downloadImage = async (imageUrl) => {
|
||||
</span>
|
||||
<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>
|
||||
<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>
|
||||
|
@ -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>
|
||||
|
||||
|
@ -2,9 +2,9 @@
|
||||
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'
|
||||
const patientDtail = ref(null);
|
||||
|
||||
@ -25,10 +25,10 @@ const tabs = [
|
||||
icon: 'ri-bookmark-line',
|
||||
title: 'Prescriptions',
|
||||
},
|
||||
// {
|
||||
// icon: 'ri-notification-4-line',
|
||||
// title: 'Notifications',
|
||||
// },
|
||||
{
|
||||
icon: 'ri-notification-4-line',
|
||||
title: 'Profile',
|
||||
},
|
||||
// {
|
||||
// icon: 'ri-link-m',
|
||||
// title: 'Connections',
|
||||
@ -99,7 +99,7 @@ onMounted(async () => {
|
||||
</VWindowItem>
|
||||
|
||||
<VWindowItem>
|
||||
<UserTabNotifications />
|
||||
<PatientProfile :prescription-data="patientDtail"/>
|
||||
</VWindowItem>
|
||||
|
||||
|
||||
|
@ -16,10 +16,16 @@ const address1 = ref(null);
|
||||
const dob = ref(null);
|
||||
const agePatient = ref(null);
|
||||
const isMobile = ref(window.innerWidth <= 768);
|
||||
const patientId = route.params.patient_id
|
||||
|
||||
const patientId = route.params.id
|
||||
const props = defineProps({
|
||||
userData: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
})
|
||||
|
||||
onMounted(async () => {
|
||||
|
||||
const navbar = document.querySelector('.layout-navbar');
|
||||
const callDiv = document.querySelector('.layout-page-content');
|
||||
if (navbar) {
|
||||
|
@ -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>
|
||||
|
||||
|
@ -139,9 +139,9 @@ export const routes = [
|
||||
component: () => import('@/pages/providers/provider-profile.vue'),
|
||||
},
|
||||
{
|
||||
path: '/admin/providers/patientprofile/:patient_id',
|
||||
path: '/admin/providers/patientprofile/:id',
|
||||
name: 'admin-providers-patientprofile',
|
||||
component: () => import('@/pages/patients/patientprofile.vue'),
|
||||
component: () => import('@/pages/patients/PatientProfile.vue'),
|
||||
},
|
||||
{
|
||||
path: '/apps/email/filter/: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