From 2e3daf1e9c6d795a286b9eb5d84c35c7a7dc8e53 Mon Sep 17 00:00:00 2001 From: Benjamin ter Kuile Date: Thu, 19 Mar 2020 12:50:02 -0500 Subject: [PATCH] changes --- app/controllers/users/tables_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/users/tables_controller.rb b/app/controllers/users/tables_controller.rb index 2c26020f..48544939 100644 --- a/app/controllers/users/tables_controller.rb +++ b/app/controllers/users/tables_controller.rb @@ -47,6 +47,7 @@ module Users table = Table.find(params[:id]) res = {} res[:occupied] = table.occupied? + res[:active] = table.active? res[:reserved] = table.reserved? res[:supplier_closed] = table.supplier.closed? res[:table] = table.attributes @@ -77,6 +78,7 @@ module Users res[:active_list_id] = list.id # used to set the active list in the app order = list.place_order product_orders: product_orders, user: current_user, first_order: true res[:supplier_orders_placed_count] = list.supplier.orders_placed_count + res[:supplier_orders_in_process_count] = list.supplier.orders_in_process_count res[:payload] = Users::OrderSerializer.serialize(order, include: %w[list list.users product_orders]) end render json: res