Supplier section management improvements
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user