mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-23 23:35:00 +08:00
Added experiment code to experiment cards filter [SCI-5829]
This commit is contained in:
parent
a9d6c4bb94
commit
879cf5081d
1 changed files with 4 additions and 1 deletions
|
@ -49,7 +49,10 @@ class ExperimentsOverviewService
|
||||||
records = records.archived if @view_mode == 'archived' && @project.active?
|
records = records.archived if @view_mode == 'archived' && @project.active?
|
||||||
records = records.active if @view_mode == 'active'
|
records = records.active if @view_mode == 'active'
|
||||||
if @params[:search].present?
|
if @params[:search].present?
|
||||||
records = records.where_attributes_like(%w(experiments.name experiments.description), @params[:search])
|
records = records.where_attributes_like(
|
||||||
|
["experiments.name", "experiments.description", "('EX' || experiments.id)"],
|
||||||
|
@params[:search]
|
||||||
|
)
|
||||||
end
|
end
|
||||||
if @params[:created_on_from].present?
|
if @params[:created_on_from].present?
|
||||||
records = records.where('experiments.created_at > ?', @params[:created_on_from])
|
records = records.where('experiments.created_at > ?', @params[:created_on_from])
|
||||||
|
|
Loading…
Reference in a new issue