mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-26 22:16:28 +08:00
Fixes for saving of result table metadata [SCI-8774]
This commit is contained in:
parent
cd70625a10
commit
c7d992ab83
2 changed files with 2 additions and 1 deletions
|
|
@ -28,7 +28,7 @@
|
||||||
fillHandle: false,
|
fillHandle: false,
|
||||||
formulas: true,
|
formulas: true,
|
||||||
data: JSON.parse(contents.attr('value')).data,
|
data: JSON.parse(contents.attr('value')).data,
|
||||||
cell: JSON.parse(metadata.val() || '{}').cells || [],
|
cell: (metadata.val() || {}).cells || [],
|
||||||
readOnly: true
|
readOnly: true
|
||||||
});
|
});
|
||||||
let hot = $container.handsontable('getInstance');
|
let hot = $container.handsontable('getInstance');
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ class ResultTablesController < ApplicationController
|
||||||
|
|
||||||
def create
|
def create
|
||||||
@table = Table.new(result_params[:table_attributes])
|
@table = Table.new(result_params[:table_attributes])
|
||||||
|
@table.metadata = JSON.parse(result_params[:table_attributes][:metadata])
|
||||||
@table.created_by = current_user
|
@table.created_by = current_user
|
||||||
@table.team = current_team
|
@table.team = current_team
|
||||||
@table.last_modified_by = current_user
|
@table.last_modified_by = current_user
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue