Supplier section management improvements

This commit is contained in:
2014-07-01 15:18:51 +02:00
parent 588139eb54
commit de576d54d9
23 changed files with 180 additions and 25 deletions
@@ -132,10 +132,10 @@ module Suppliers
table = Table.new(number: table_number)
table.supplier = current_supplier
table.section = @section
table.save
end
@section.arrange_tables_in_grid
render json: {ok: true}
table_json = ActiveModel::ArraySerializer.new(@section.tables, each_serializer: SupplierTableSerializer, root: false).as_json
render json: {tables: table_json}
end
# POST /sections/1/arrange_tables {number_start: 1423, number_end: 234234}