Fix message for successful import protocol from protocol parser [SCI-9272]

This commit is contained in:
Andrej 2023-09-18 15:52:38 +02:00
parent 1068f9b979
commit b47651750b
3 changed files with 8 additions and 5 deletions

View file

@ -6,7 +6,7 @@
<button type="button" class="close" data-dismiss="modal">&times;</button> <button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">{{ i18n.t(`protocols.import_modal.${state}.title`) }}</h4> <h4 class="modal-title">{{ i18n.t(`protocols.import_modal.${state}.title`) }}</h4>
</div> </div>
<div class="modal-body text-xs" v-html="i18n.t(`protocols.import_modal.${state}.body_html`, { url: protocolUrl })"> <div class="modal-body text-xs" v-html="i18n.t(`protocols.import_modal.${state}.body_html`, { url: protocolTemplateTableUrl })">
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button v-if="state === 'confirm'" type="button" <button v-if="state === 'confirm'" type="button"
@ -29,7 +29,8 @@
export default { export default {
name: 'ProtocolFileImportModal', name: 'ProtocolFileImportModal',
props: { props: {
importUrl: { type: String, required: true} importUrl: { type: String, required: true },
protocolTemplateTableUrl: { type: String }
}, },
data() { data() {
return { return {
@ -38,7 +39,6 @@
jobPollInterval: null, jobPollInterval: null,
pollCount: 0, pollCount: 0,
jobId: null, jobId: null,
protocolUrl: null,
refreshCallback: null refreshCallback: null
} }
}, },

View file

@ -35,7 +35,10 @@
<% end %> <% end %>
<div id="protocolFileImportModal"> <div id="protocolFileImportModal">
<protocol-file-import-modal import-url="<%= import_docx_protocols_path %>" /> <protocol-file-import-modal
import-url="<%= import_docx_protocols_path %>"
protocol-template-table-url="<%= protocols_path %>"
/>
</div> </div>
<%= javascript_include_tag 'vue_protocol_file_import_modal' %> <%= javascript_include_tag 'vue_protocol_file_import_modal' %>

View file

@ -2818,7 +2818,7 @@ en:
body_html: "The import is taking longer than expected. You'll get a notice in Notifications when your protocol template is ready. You can close the window and continue with your work." body_html: "The import is taking longer than expected. You'll get a notice in Notifications when your protocol template is ready. You can close the window and continue with your work."
done: done:
title: "Importing finished" title: "Importing finished"
body_html: 'The protocol has been successfully imported. You can access the draft of protocol template <a href="%{url}">here.</a>' body_html: 'The protocol has been successfully imported. You can access protocol template in Notifications. You can also find it in the table of <a href="%{url}">protocol templates.</a>'
failed: failed:
title: "Import failed" title: "Import failed"
body_html: "We're sorry but the file import process has encountered an error. Please make another attempt, and if the issue persists, please contact support for further assistance." body_html: "We're sorry but the file import process has encountered an error. Please make another attempt, and if the issue persists, please contact support for further assistance."