initial commit
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
class DashboardController < ApplicationController
|
||||
|
||||
def home
|
||||
|
||||
end
|
||||
|
||||
# Testing action
|
||||
def select_qrcode
|
||||
@tables = Table.all
|
||||
end
|
||||
|
||||
def create_list
|
||||
@table = Table.find(params[:table_id])
|
||||
if @table.occupied?
|
||||
redirect_to root_path, alert: t('table.is_occupied')
|
||||
else
|
||||
@list = List.new(table: @table)
|
||||
#@list.add_user(current_user)
|
||||
@list.save
|
||||
session[:list_id] = @list.id
|
||||
redirect_to root_path
|
||||
end
|
||||
end
|
||||
|
||||
def show_products
|
||||
@supplier = Supplier.first
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user