From 30e37a95d706bd792dcc06a228f3219c891e3872 Mon Sep 17 00:00:00 2001 From: Giga Chubinidze Date: Tue, 28 Feb 2023 09:59:45 +0400 Subject: [PATCH] Add office file to task step - reload file option shows plain html page [SCI-7673] --- .../vue/protocol/step_attachments/inline.vue | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/app/javascript/vue/protocol/step_attachments/inline.vue b/app/javascript/vue/protocol/step_attachments/inline.vue index b122be4d2..980ca0312 100644 --- a/app/javascript/vue/protocol/step_attachments/inline.vue +++ b/app/javascript/vue/protocol/step_attachments/inline.vue @@ -12,8 +12,8 @@ :data-gallery-view-id="stepId" :data-preview-url="attachment.attributes.urls.preview" > - {{ attachment.attributes.file_name }} @@ -44,8 +44,8 @@

{{ i18n.t('assets.empty_office_file.description') }}

{{ i18n.t('assets.empty_office_file.reload') }} @@ -90,5 +90,13 @@ required: true } }, + methods: { + reloadAsset() { + $.ajax({ + method: 'GET', + url: this.attachment.attributes.urls.load_asset + }); + } + }, }