Add office file to task step - reload file option shows plain html page [SCI-7673]

This commit is contained in:
Giga Chubinidze 2023-02-17 22:51:10 +04:00
parent 1ac86b8188
commit 14592ebea6
2 changed files with 12 additions and 4 deletions

View file

@ -44,9 +44,8 @@
<div v-else class="empty-office-file">
<h2>{{ i18n.t('assets.empty_office_file.description') }}</h2>
<a :href="attachment.attributes.urls.load_asset"
remote="true"
class="btn btn-primary reload-asset"
:params="{asset: {view_mode: attachment.attributes.view_mode}}">
@click.prevent="reloadAsset">
{{ i18n.t('assets.empty_office_file.reload') }}
</a>
</div>
@ -72,6 +71,7 @@
</template>
<script>
import axios from 'axios'
import ContextMenuMixin from './mixins/context_menu.js';
import ContextMenu from './context_menu.vue';
import PdfViewer from '../../shared/pdf_viewer.vue';
@ -90,5 +90,12 @@
required: true
}
},
methods: {
reloadAsset() {
axios.get(this.attachment.attributes.urls.load_asset, {
params: { asset: { view_mode: this.attachment.attributes.view_mode } },
});
},
},
}
</script>

View file

@ -16,6 +16,7 @@ export default {
$wopiModal.modal('hide');
window.open(data.edit_url, '_blank');
window.focus();
window.location.reload();
} else {
HelperModule.flashAlertMsg(this.i18n.t('errors.general'), 'danger');
}