General functionality improvement
This commit is contained in:
@@ -3,7 +3,9 @@ module Suppliers
|
||||
# GET /lists
|
||||
# GET /lists.json
|
||||
def index
|
||||
if params[:date].present?
|
||||
if params[:state] == 'active'
|
||||
@lists = List.active_for_supplier(current_supplier, page: params[:page], per_page: params[:per_page] || 25)
|
||||
elsif params[:date].present?
|
||||
@date = params[:date].present? ? (Date.parse(params[:date]) rescue Date.today) : Date.today
|
||||
@time = @date.to_time(:utc)
|
||||
@start_time = @time.beginning_of_day
|
||||
|
||||
Reference in New Issue
Block a user