|
67 | 67 | <span class="font-weight-bold">Sent:</span>
|
68 | 68 | {{ format.formatDate(item.sentDate) }}
|
69 | 69 | </div>
|
70 |
| - <div class="pt-1" @click.capture="handlePdf" v-html="item.message" /> |
| 70 | + <div class="pt-1" v-html="item.message" /> |
71 | 71 | </v-col>
|
72 | 72 | </v-row>
|
73 | 73 | </template>
|
@@ -209,16 +209,6 @@ export default {
|
209 | 209 | deriveFromDisplay(item) {
|
210 | 210 | return item.ofmSourceSystem ? `${this.userInfo?.firstName ?? ''} ${this.userInfo?.lastName}` : OFM_PROGRAM
|
211 | 211 | },
|
212 |
| - handlePdf(event) { |
213 |
| - if (event.target.classList.contains('conversation-pdf')) { |
214 |
| - fetch(event.target.dataset.link) |
215 |
| - .then((res) => res.blob()) |
216 |
| - .then((blob) => { |
217 |
| - const blobUrl = URL.createObjectURL(blob) |
218 |
| - window.open(blobUrl) |
219 |
| - }) |
220 |
| - } |
221 |
| - }, |
222 | 212 | async formatConversation() {
|
223 | 213 | const parser = new DOMParser()
|
224 | 214 | for (const conversation of this.assistanceRequestConversation) {
|
@@ -246,14 +236,8 @@ export default {
|
246 | 236 | const file = await FileService.getFile(fileId)
|
247 | 237 | const dataLink = `data:${file.mimetype};base64,${file.fileData}`
|
248 | 238 |
|
249 |
| - if (file.mimetype === 'application/pdf') { |
250 |
| - fileLink.setAttribute('href', '#') |
251 |
| - fileLink.classList.add('conversation-pdf') |
252 |
| - fileLink.setAttribute('data-link', dataLink) |
253 |
| - } else { |
254 |
| - fileLink.setAttribute('href', dataLink) |
255 |
| - fileLink.setAttribute('download', file.filename) |
256 |
| - } |
| 239 | + fileLink.setAttribute('href', dataLink) |
| 240 | + fileLink.setAttribute('download', file.filename) |
257 | 241 | } else {
|
258 | 242 | fileLink.remove()
|
259 | 243 | }
|
|
0 commit comments