small changes

This commit is contained in:
phyusin
2018-10-02 15:06:32 +06:30
parent 4a2f7b0e4b
commit 6e24b8a5b5
3 changed files with 39 additions and 12 deletions

View File

@@ -21,6 +21,23 @@ class Origami::QuickServiceController < ApplicationController
@customer = Customer.all
@tables = Table.all.active.order('status desc')
@rooms = Room.all.active.order('status desc')
#checked quick_service only
@quick_service_only = true
lookup_dine_in = Lookup.collection_of('dinein_cashier')
if !lookup_dine_in.empty?
lookup_dine_in.each do |dine_in|
if dine_in[0].downcase == "dineincashier"
if dine_in[1] == '1'
@quick_service_only = false
end
end
end
end
puts "@quick_service_only"
puts @quick_service_only
render "origami/addorders/detail"
end

View File

@@ -165,12 +165,15 @@
Back
</button>
<button type="button" class="btn btn-lg btn-primary waves-effect col-md-6" id='pending_order' style="padding: .5rem 0.15rem !important;">Pending Order
</button>
<a class="btn btn-lg bg-blue waves-effect select_table col-md-3" data-toggle="modal" data-target="#TableModal" style=" padding: .5rem 0.15rem !important;">Select</a>
<input type="hidden" name="table_id" value="" id="table_id">
<% if @quick_service_only %>
<button type="button" class="btn btn-lg btn-primary waves-effect col-md-9" id='pending_order' style="padding: .5rem 0.15rem !important;">Pending Order
</button>
<% else %>
<button type="button" class="btn btn-lg btn-primary waves-effect col-md-6" id='pending_order' style="padding: .5rem 0.15rem !important;">Pending Order
</button>
<a class="btn btn-lg bg-blue waves-effect select_table col-md-3" data-toggle="modal" data-target="#TableModal" style=" padding: .5rem 0.15rem !important;">Select</a>
<input type="hidden" name="table_id" value="" id="table_id">
<% end %>
<%else%>
<button type="button" class="btn btn-lg btn-block btn-default waves-effect" id='back'>
<i class="material-icons">reply</i>Back
@@ -270,14 +273,21 @@
<%elsif !modify_order && type%>
<input type="hidden" name="customer_id" id="customer_id" value="CUS-000000000001">
<% if current_user.role != "waiter"%>
<button type="button" class="btn btn-primary action-btn create col-md-4" id="create_pay_order" disabled="disabled" style="padding-top:4px !important;padding-bottom:4px !important;"><i class="material-icons" style="font-size:34px;width:34px">attach_money</i></button>
<button type="button" class="btn btn-primary action-btn create col-md-7" id="create_order" disabled="disabled" style="padding-top:15px !important;padding-bottom:15px !important;">Add Order</button>
<% if @quick_service_only %>
<button type="button" class="btn btn-primary action-btn create col-md-12" id="create_pay_order" disabled="disabled" style="padding-top:4px !important;padding-bottom:4px !important;"><i class="material-icons" style="font-size:34px;width:34px">attach_money</i></button>
<% else %>
<button type="button" class="btn btn-primary action-btn create col-md-4" id="create_pay_order" disabled="disabled" style="padding-top:4px !important;padding-bottom:4px !important;"><i class="material-icons" style="font-size:34px;width:34px">attach_money</i></button>
<button type="button" class="btn btn-primary action-btn create col-md-7" id="create_order" disabled="disabled" style="padding-top:15px !important;padding-bottom:15px !important;">Add Order</button>
<% end %>
<%end%>
<% if current_user.role == "waiter"%>
<button type="button" class="btn btn-primary action-btn create col-md-7" id="create_order" disabled="disabled" style="padding-top:15px !important;padding-bottom:15px !important;">Add Order</button>
<% if !@quick_service_only && current_user.role == "waiter"%>
<button type="button" class="btn btn-primary action-btn create col-md-7" id="create_order" disabled="disabled" style="padding-top:15px !important;padding-bottom:15px !important;">Add Order</button>
<%end%>
<%else%>
<button type="button" class="btn btn-primary action-btn create col-md-11" id="create_order" disabled="disabled" style="padding-top:15px !important;padding-bottom:15px !important;">Add Order</button>
<% if !@quick_service_only %>
<button type="button" class="btn btn-primary action-btn create col-md-11" id="create_order" disabled="disabled" style="padding-top:15px !important;padding-bottom:15px !important;">Add Order</button>
<%end%>
<%end%>

View File

@@ -18,7 +18,7 @@
<option value="Default">Default</option>
</select>
</div> -->
<%= f.input :gateway_communication_type,:class=>'gateway_type', collection: [ "Api", "Default", "Device"] %>
<%= f.input :gateway_communication_type,:class=>'gateway_type', collection: [ "Api", "Device", "Manual"] %>
<%= f.input :gateway_url ,:class=>'gateway_type', :required => true %>
<%= f.input :auth_token ,:class=>'auth_token', :required => true %>
<%= f.input :merchant_account_id ,:class=>'merchant_id', :required => true%>