Commit 8fd106ac by Thanh Hung Pham

Fix bug

parent 3b185cde
...@@ -10,7 +10,7 @@ class AdminsController < ApplicationController ...@@ -10,7 +10,7 @@ class AdminsController < ApplicationController
@from_date_default = Date.new(params[:from_date]['(1i)'].to_i, params[:from_date]['(2i)'].to_i, params[:from_date]['(3i)'].to_i) if params[:from_date].present? @from_date_default = Date.new(params[:from_date]['(1i)'].to_i, params[:from_date]['(2i)'].to_i, params[:from_date]['(3i)'].to_i) if params[:from_date].present?
@to_date_default = Date.new(params[:to_date]['(1i)'].to_i, params[:to_date]['(2i)'].to_i, params[:to_date]['(3i)'].to_i) if params[:to_date].present? @to_date_default = Date.new(params[:to_date]['(1i)'].to_i, params[:to_date]['(2i)'].to_i, params[:to_date]['(3i)'].to_i) if params[:to_date].present?
@applied_jobs = Apply.search_email(@email).search_city(@city_id).search_city(@category_id).applied_at_between(@from_date_default, @to_date_default).page params[:page] @applied_jobs = Apply.search_email(@email).search_city(@city_id).search_city(@category_id).applied_at_between(@from_date_default, @to_date_default).order(:applied_at).page params[:page]
end end
def export def export
...@@ -21,7 +21,7 @@ class AdminsController < ApplicationController ...@@ -21,7 +21,7 @@ class AdminsController < ApplicationController
@from_date_default = params[:from_date] if params[:from_date].present? @from_date_default = params[:from_date] if params[:from_date].present?
@to_date_default = params[:to_date] if params[:to_date].present? @to_date_default = params[:to_date] if params[:to_date].present?
@data = Apply.search_email(@email).search_city(@city_id).search_city(@category_id).applied_at_between(@from_date_default, @to_date_default) @data = Apply.search_email(@email).search_city(@city_id).search_city(@category_id).applied_at_between(@from_date_default, @to_date_default).order(:applied_at)
attributes_to_apply = %w[id applied_at] attributes_to_apply = %w[id applied_at]
attributes_to_job = %w[id name] attributes_to_job = %w[id name]
attributes_to_user = %w[id fullname] attributes_to_user = %w[id fullname]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment