mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-06 12:43:06 +08:00
Storage locations fix name ordering and move modal ordering [SCI-11133]
This commit is contained in:
parent
5ab1fbbab9
commit
c760b215de
2 changed files with 3 additions and 3 deletions
|
@ -253,7 +253,7 @@ class StorageLocationsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def storage_locations_recursive_builder(storage_locations)
|
def storage_locations_recursive_builder(storage_locations)
|
||||||
storage_locations.map do |storage_location|
|
storage_locations.order('LOWER(storage_locations.name) ASC').map do |storage_location|
|
||||||
{
|
{
|
||||||
storage_location: storage_location,
|
storage_location: storage_location,
|
||||||
can_manage: (can_manage_storage_location?(storage_location) unless storage_location.parent_id),
|
can_manage: (can_manage_storage_location?(storage_location) unless storage_location.parent_id),
|
||||||
|
|
|
@ -60,9 +60,9 @@ module Lists
|
||||||
@records = @records.order(id: :asc)
|
@records = @records.order(id: :asc)
|
||||||
when 'code_DESC'
|
when 'code_DESC'
|
||||||
@records = @records.order(id: :desc)
|
@records = @records.order(id: :desc)
|
||||||
when 'name_ASC'
|
when 'name_hash_ASC'
|
||||||
@records = @records.order(name: :asc)
|
@records = @records.order(name: :asc)
|
||||||
when 'name_DESC'
|
when 'name_hash_DESC'
|
||||||
@records = @records.order(name: :desc)
|
@records = @records.order(name: :desc)
|
||||||
when 'sub_location_count_ASC'
|
when 'sub_location_count_ASC'
|
||||||
@records = @records.order(sub_location_count: :asc)
|
@records = @records.order(sub_location_count: :asc)
|
||||||
|
|
Loading…
Reference in a new issue