mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-11-03 03:27:10 +08:00
Fix snapshot column ordering by parent_id
This commit is contained in:
parent
384ec40c4e
commit
f0bdae8b67
1 changed files with 9 additions and 0 deletions
|
|
@ -3,6 +3,15 @@
|
|||
class RepositorySnapshotDatatableService < RepositoryDatatableService
|
||||
private
|
||||
|
||||
def create_columns_mappings
|
||||
index = @repository.default_columns_count
|
||||
@mappings = {}
|
||||
@repository.repository_columns.order(:parent_id).each do |column|
|
||||
@mappings[column.id] = index.to_s
|
||||
index += 1
|
||||
end
|
||||
end
|
||||
|
||||
def process_query
|
||||
search_value = build_conditions(@params)[:search_value]
|
||||
order_obj = build_conditions(@params)[:order_by_column]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue