Fix gene sequence html compiling with deface [SCI-9032]

This commit is contained in:
Andrej 2023-09-14 17:10:52 +02:00
parent 40a82f67c0
commit b9fe7c3d3e
2 changed files with 7 additions and 5 deletions

View file

@ -39,18 +39,20 @@
fileUrl: { type: String },
fileName: { type: String },
updateUrl: { type: String },
canEditFile: { type: Boolean, default: false },
oveEnabledDaysLeft: { type: Number }
canEditFile: { type: String },
oveEnabledDaysLeftString: { type: String }
},
data() {
return {
editor: null,
sequenceName: null,
closeAfterSave: false,
readOnly: !this.canEditFile
readOnly: this.canEditFile !== 'true',
oveEnabledDaysLeft: 0
}
},
mounted() {
this.oveEnabledDaysLeft = parseInt(this.oveEnabledDaysLeftString);
let editorConfig = {
onSave: this.saveFile,
generatePng: true,

View file

@ -19,8 +19,8 @@
file-url="<%= @file_url %>"
file-name="<%= @file_name %>"
update-url="<%= @asset ? gene_sequence_asset_url(@asset) : gene_sequence_assets_url(parent_type: params[:parent_type], parent_id: params[:parent_id]) %>"
:can-edit-file="<%= asset_managable? %>"
:ove-enabled-days-left="<%= OpenVectorEditorService.evaluation_period_left %>"
can-edit-file="<%= asset_managable? %>"
ove-enabled-days-left-string="<%= OpenVectorEditorService.evaluation_period_left %>"
/>
</div>
<%= javascript_include_tag 'open_vector_editor' %>