diff --git a/.idea/workspace.xml b/.idea/workspace.xml index e58b34db..2cb0533a 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,7 +2,11 @@ + + + + @@ -19,81 +23,53 @@ - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -151,13 +127,11 @@ @@ -234,6 +211,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -591,22 +605,21 @@ - + - - - + @@ -633,8 +646,6 @@ - - @@ -765,13 +776,6 @@ - - - - - - - @@ -786,13 +790,6 @@ - - - - - - - @@ -836,13 +833,6 @@ - - - - - - - @@ -930,14 +920,6 @@ - - - - - - - - @@ -962,14 +944,6 @@ - - - - - - - - @@ -986,10 +960,68 @@ + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/controllers/origami/commissions_controller.rb b/app/controllers/origami/commissions_controller.rb index 3e4f3301..f5a91ad9 100644 --- a/app/controllers/origami/commissions_controller.rb +++ b/app/controllers/origami/commissions_controller.rb @@ -76,6 +76,11 @@ class Origami::CommissionsController < BaseOrigamiController sale_item_id = params[:sale_item_id] @sale_item = SaleItem.find_by_sale_item_id(sale_item_id) @commissioners = Commissioner.active.all + + respond_to do |format| + format.json {render json: @commissioners} + # format.html {render @commissioners} + end end private diff --git a/app/views/origami/commissioners/_commissioners_form.html.erb b/app/views/origami/commissions/_commissioners.html.erb similarity index 72% rename from app/views/origami/commissioners/_commissioners_form.html.erb rename to app/views/origami/commissions/_commissioners.html.erb index 10637a82..ed9da369 100644 --- a/app/views/origami/commissioners/_commissioners_form.html.erb +++ b/app/views/origami/commissions/_commissioners.html.erb @@ -3,7 +3,7 @@
COMMISSIONERS
-
+
<% @commissioners.each do |commissioner| %>
diff --git a/app/views/origami/commissions/load_commissioners.html.erb b/app/views/origami/commissions/load_commissioners.html.erb index 5252b1bd..748fb4ef 100644 --- a/app/views/origami/commissions/load_commissioners.html.erb +++ b/app/views/origami/commissions/load_commissioners.html.erb @@ -1,7 +1,7 @@
- <%= render 'origami/commissioners/commissioners_form', commissioners: @commissioners %> + <%= render 'origami/commissions/commissioners', commissioners: @commissioners %>
@@ -210,7 +210,11 @@ url: ajax_url, data: 'sale_item_id=' + sale_item_id, success: function (result) { -// window.location.href = '/origami/table/' + table_id; + $('#commissioners').empty(); + result.forEach(function (t) { + sale_item = "
" + "
" + t.name + "
" + "
" + $('#commissioners').append(sale_item); + }) } }); }) diff --git a/app/views/origami/home/show.html.erb b/app/views/origami/home/show.html.erb index dfaa9e45..e08f5d3d 100644 --- a/app/views/origami/home/show.html.erb +++ b/app/views/origami/home/show.html.erb @@ -310,39 +310,40 @@
- -
- + +
+ - - - <% if @dining.bookings.length >= 1 %> - <% if @status_order == 'order' && @status_sale != 'sale' %> - - - - - - - - - - <% else %> - - - - - - - - - - <% end %> - + + + <% if @dining.bookings.length >= 1 %> + <% if @status_order == 'order' && @status_sale != 'sale' %> + + + + + + + + + + <% else %> + + + + + + + + + + + <% end %> + - - <% end %> -
+ + <% end %> +