fix
This commit is contained in:
parent
8666ea2033
commit
9699b230d5
@ -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,9 +74,12 @@ 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>
|
||||
|
||||
<span class="app-timeline-title" v-if="p_note.note_type == 'file'">
|
||||
<img :src="p_note.note" @click="downloadImage(p_note.note)" />
|
||||
<button @click="downloadImage(p_note.note)">Download Image</button>
|
||||
</span>
|
||||
|
||||
|
||||
<span class="app-timeline-meta">{{ formatDateDate(p_note.created_at) }}</span>
|
||||
<!-- <span></span> -->
|
||||
|
@ -160,7 +160,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>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user