fix
This commit is contained in:
parent
8666ea2033
commit
9699b230d5
@ -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>
|
<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 class="app-timeline-meta">{{ formatDateDate(p_note.created_at) }}</span>
|
||||||
<!-- <span></span> -->
|
<!-- <span></span> -->
|
||||||
|
@ -160,7 +160,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>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user