From 6c94ba54573655490fe720866d4379b1429c7874 Mon Sep 17 00:00:00 2001 From: Zin Lin Phyo Date: Mon, 4 Sep 2017 14:47:58 +0630 Subject: [PATCH] in_juty ui update --- .idea/workspace.xml | 395 +++++++++--------- .../origami/in_juties_controller.rb | 8 +- .../origami/product_commissions_controller.rb | 2 +- .../inventory_definitions/_form.html.erb | 41 ++ .../in_juties/_assign_in_juty.html.erb | 11 - app/views/origami/in_juties/_form.html.erb | 13 +- .../origami/in_juties/index_in_juty.html.erb | 14 +- .../load_commissioners.html.erb | 1 + 8 files changed, 260 insertions(+), 225 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 8b9f5d0a..cd4a6736 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -3,8 +3,13 @@ - - + + + + + + + @@ -49,28 +54,70 @@ - - + + + + + + + + + + + + + + - - + + - - + + - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -79,58 +126,18 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + - - + + @@ -171,7 +178,6 @@ @@ -292,14 +299,14 @@ - + - + @@ -307,6 +314,21 @@ + + + + + + + + + + + + + + + @@ -320,7 +342,7 @@ - + @@ -330,21 +352,6 @@ - - - - - - - - - - - - - - - @@ -358,18 +365,7 @@ - - - - - - - - - - - - + + <% if !@inventory_definition.item_code.nil? %> + <% menuiteminstance = MenuItemInstance.find_by_item_instance_code(@inventory_definition.item_code) %> + <% if menuiteminstance.nil?%> + <% code = @inventory_definition.item_code %> + <% else %> + <% code = menuiteminstance.menu_item.item_code %> + <% end %> + <% end %> + <% arr.each do |a| %> + <% if a[1] == code %> + + <% else %> + + <% end %> + <% end %> + + + + + <% sample = [] %> + <% if @inventory_definition.item_code.nil? %> + <% if !MenuItemInstance.find_by_item_instance_code(@inventory_definition.item_code).nil? %> + <% sample = MenuItemInstance.where("item_instance_code=?",@inventory_definition.item_code).pluck(:item_instance_name,:item_instance_code)%> + <% else %> + <% sample = Product.where("item_code=?",@inventory_definition.item_code).pluck(:name,:item_code)%> + <% end %> + <% end %> +
<%= f.input :item_code, collection: sample %>
+ +
<%= f.input :min_qty %>
+ + <%= f.input :min_order_level %> <%= f.input :max_stock_level %> diff --git a/app/views/origami/in_juties/_assign_in_juty.html.erb b/app/views/origami/in_juties/_assign_in_juty.html.erb index b6363195..21bf2e2d 100644 --- a/app/views/origami/in_juties/_assign_in_juty.html.erb +++ b/app/views/origami/in_juties/_assign_in_juty.html.erb @@ -4,22 +4,11 @@ <%= f.hidden_field :id, :class => "form-control col-md-6 " %>
- <%= f.hidden_field :dinning_id, :value => @table.id, :class => "form-control col-md-4 " %> - - - <%= @table.name %> -
-
- <%= f.collection_select :commissioner_ids, Commissioner.all, :id, :name, {prompt: 'Select Commissioner'}, {class: 'form-control'} %> -

- <%= f.input :in_time, :placeholder => "From Date", :class => "form-control" %> - <%= f.input :out_time, :placeholder => "To Date", :class => "form-control" %> -

diff --git a/app/views/origami/in_juties/_form.html.erb b/app/views/origami/in_juties/_form.html.erb index 9bed9152..61342d7b 100644 --- a/app/views/origami/in_juties/_form.html.erb +++ b/app/views/origami/in_juties/_form.html.erb @@ -4,22 +4,15 @@ <%= f.hidden_field :id, :class => "form-control col-md-6 " %>
- - <%= f.hidden_field :dinning_id, :value => @table.id, :class => "form-control col-md-4 " %> - <%= @table.name %> -
-
- +

+ <%= f.hidden_field :dinning_id, :value => @table.id, :class => "form-control col-md-4 " %> <%= f.collection_select :commissioner_ids, Commissioner.all, :id, :name, {prompt: 'Select Commissioner'}, {class: 'form-control'} %> -

- +
<%= f.input :in_time, :placeholder => "From Date", :class => "form-control" %> - <%= f.input :out_time, :placeholder => "To Date", :class => "form-control" %> -

diff --git a/app/views/origami/in_juties/index_in_juty.html.erb b/app/views/origami/in_juties/index_in_juty.html.erb index 52d79c89..421e8a7f 100644 --- a/app/views/origami/in_juties/index_in_juty.html.erb +++ b/app/views/origami/in_juties/index_in_juty.html.erb @@ -1,6 +1,10 @@
-
+
+ + <%= @table.name %> +
+ @@ -33,11 +37,11 @@
<%= render 'form', in_juty: @in_juty, table: @table %>
- -
-      - +
+ + +