mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-11-08 15:31:02 +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
|
class RepositorySnapshotDatatableService < RepositoryDatatableService
|
||||||
private
|
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
|
def process_query
|
||||||
search_value = build_conditions(@params)[:search_value]
|
search_value = build_conditions(@params)[:search_value]
|
||||||
order_obj = build_conditions(@params)[:order_by_column]
|
order_obj = build_conditions(@params)[:order_by_column]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue