Ember temp commit
This commit is contained in:
@@ -86,10 +86,9 @@ module Suppliers
|
||||
end
|
||||
|
||||
def preview_products
|
||||
@date = Date.parse(params[:date]) rescue Date.today
|
||||
product_categories = ProductCategory.for_supplier_in_time(current_supplier, @date.to_time)
|
||||
@time = Time.parse(params[:date]) rescue Time.now
|
||||
product_categories = ProductCategory.for_supplier_in_time(current_supplier, @time)
|
||||
render json: {categories: product_categories.map(&:to_client_format).select(&:present?)}
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user