mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-25 09:13:05 +08:00
Move snapshot of deleted inventories to the bottom of inventory list in report wizard [SCI-8487] (#5972)
This commit is contained in:
parent
a5f14a8333
commit
f8a3640c4c
1 changed files with 3 additions and 2 deletions
|
@ -323,12 +323,13 @@ class ReportsController < ApplicationController
|
|||
|
||||
def load_wizard_vars
|
||||
@templates = Extends::REPORT_TEMPLATES
|
||||
live_repositories = Repository.accessible_by_teams(current_team).active
|
||||
live_repositories = Repository.accessible_by_teams(current_team).sort_by { |r| r.name.downcase }
|
||||
snapshots_of_deleted = RepositorySnapshot.left_outer_joins(:original_repository)
|
||||
.where(team: current_team)
|
||||
.where.not(original_repository: live_repositories)
|
||||
.select('DISTINCT ON ("repositories"."parent_id") "repositories".*')
|
||||
@repositories = (live_repositories + snapshots_of_deleted).sort_by { |r| r.name.downcase }
|
||||
.sort_by { |r| r.name.downcase }
|
||||
@repositories = live_repositories + snapshots_of_deleted
|
||||
@visible_projects = current_team.projects
|
||||
.active
|
||||
.joins(experiments: :my_modules)
|
||||
|
|
Loading…
Reference in a new issue