mirror of
https://github.com/internetee/registry.git
synced 2025-07-02 17:23:34 +02:00
Add updated at field for contact search #2866
This commit is contained in:
parent
b154c75106
commit
f5c379ca72
2 changed files with 8 additions and 1 deletions
|
@ -67,6 +67,9 @@ class Admin::ContactsController < AdminController
|
||||||
begin
|
begin
|
||||||
end_time = params[:q][:created_at_lteq].try(:to_date)
|
end_time = params[:q][:created_at_lteq].try(:to_date)
|
||||||
params[:q][:created_at_lteq] = end_time.try(:end_of_day)
|
params[:q][:created_at_lteq] = end_time.try(:end_of_day)
|
||||||
|
# updated at
|
||||||
|
end_time = params[:q][:updated_at_gteq].try(:to_date)
|
||||||
|
params[:q][:updated_at_lteq] = end_time.try(:end_of_day)
|
||||||
rescue
|
rescue
|
||||||
logger.warn('Invalid date')
|
logger.warn('Invalid date')
|
||||||
end
|
end
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
= label_tag t(:contact_type)
|
= label_tag t(:contact_type)
|
||||||
= select_tag '[q][domain_contacts_type_in]', options_for_select([['admin', 'AdminDomainContact'], ['tech', 'TechDomainContact']], params[:q][:domain_contacts_type_in]), { multiple: true, placeholder: t(:choose), class: 'form-control js-combobox' }
|
= select_tag '[q][domain_contacts_type_in]', options_for_select([['admin', 'AdminDomainContact'], ['tech', 'TechDomainContact']], params[:q][:domain_contacts_type_in]), { multiple: true, placeholder: t(:choose), class: 'form-control js-combobox' }
|
||||||
.row
|
.row
|
||||||
.col-md-6
|
.col-md-3
|
||||||
.form-group
|
.form-group
|
||||||
= f.label t(:registrar)
|
= f.label t(:registrar)
|
||||||
= f.select :registrar_id_eq, Registrar.all.map { |x| [x, x.id] }, { include_blank: true }, class: 'form-control selectize', placeholder: t(:choose)
|
= f.select :registrar_id_eq, Registrar.all.map { |x| [x, x.id] }, { include_blank: true }, class: 'form-control selectize', placeholder: t(:choose)
|
||||||
|
@ -51,6 +51,10 @@
|
||||||
.form-group
|
.form-group
|
||||||
= f.label t(:created_at_until)
|
= f.label t(:created_at_until)
|
||||||
= f.search_field :created_at_lteq, value: params[:q][:created_at_lteq], class: 'form-control datepicker', placeholder: t(:created_at_until)
|
= f.search_field :created_at_lteq, value: params[:q][:created_at_lteq], class: 'form-control datepicker', placeholder: t(:created_at_until)
|
||||||
|
.col-md-3
|
||||||
|
.form-group
|
||||||
|
= f.label t(:updated_at)
|
||||||
|
= f.search_field :updated_at_gteq, value: params[:q][:updated_at_gteq], class: 'form-control datepicker', placeholder: t(:updated_at)
|
||||||
.row
|
.row
|
||||||
.col-md-6
|
.col-md-6
|
||||||
.form-group
|
.form-group
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue