Merge pull request #6225 from rekonder/aj_SCI_9032

Fix gene sequence html compiling with deface [SCI-9302]
This commit is contained in:
Martin Artnik 2023-09-15 09:15:25 +02:00 committed by GitHub
commit cc1d179366
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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' %>