User flow updates

This commit is contained in:
2026-02-10 11:38:56 -05:00
parent 63b19cb78a
commit e624ec2d0b
38 changed files with 242 additions and 214 deletions
+20 -20
View File
@@ -1,20 +1,20 @@
class WaiterController < ApplicationController
layout 'waiter'
def index
end
def product_categories
respond_to do |format|
format.html { redirect_to '/waiter'}
format.json { render json: ProductCategory.all.include_relation(:product), root: 'product_categories', each_serializer: ProductCategorySerializer }
end
end
def order_products
@table= Table.find_by_supplier_id_and_id!(current_supplier.id, params[:table_id])
@list = List.from_table_by_employee(@table, current_employee)
@list.place_order products: params[:order], employee: current_employee
render nothing: true
end
end
# class WaiterController < ApplicationController
# layout 'waiter'
# def index
#
# end
#
# def product_categories
# respond_to do |format|
# format.html { redirect_to '/waiter'}
# format.json { render json: ProductCategory.all.include_relation(:product), root: 'product_categories', each_serializer: ProductCategorySerializer }
# end
# end
#
# def order_products
# @table= Table.find_by_supplier_id_and_id!(current_supplier.id, params[:table_id])
# @list = List.from_table_by_employee(@table, current_employee)
# @list.place_order products: params[:order], employee: current_employee
# render nothing: true
# end
# end