Merge branch 'ui_ux_changes' of bitbucket.org:code2lab/sxrestaurant into adminbsb_ui_changes

This commit is contained in:
phyusin
2018-04-11 18:02:23 +06:30
3 changed files with 14 additions and 5 deletions

View File

@@ -71,11 +71,11 @@ class Origami::MovetableController < BaseOrigamiController
booking.booking_orders.each do |booking_order|
order = Order.find(booking_order.order_id)
if order.status == 'new'
if order.status == 'new'
order.order_items.each do |order_item|
order_items.push(order_item)
end
end
end
end
end
end

View File

@@ -488,7 +488,9 @@
<button type="button" class="btn btn-block bg-blue waves-effect" id='edit' <%= (can? :edit, :sale_edit)? ' ': 'disabled=' %> active="true">Edit</button>
<button type="button" class="btn btn-block bg-blue waves-effect" data-toggle="modal" data-target="#voidModal" <%= (can? :overall_void, :void)? ' ': 'disabled=' %> > Void</button>
<% end %>
<% if current_login_employee.role != "waiter" %>
<button type="button" id="discount" class="btn btn-block bg-blue waves-effect" <%= (can? :index, :discount)? ' ': 'disabled=' %> active="true">Discount</button>
<% end %>
<button type="button" id="other-charges" class="btn btn-block bg-blue waves-effect">Charges</button>
<% if !@split_bill.nil? %>

View File

@@ -9,12 +9,12 @@
<div class="row clearfix">
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6 ">
<div class="form-group p-l-10 p-r-10">
<%= f.input :child, input_html: { value: @survey_data.child, class: 'col-md-10' }%>
<%= f.input :child, input_html: { value: @survey_data.child, class: 'col-md-10', :onChange => "total_customer();" }%>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6 ">
<div class="form-group p-l-10 p-r-10">
<%= f.input :adult, input_html: { value: @survey_data.adult, class: 'col-md-10' }%>
<%= f.input :adult, input_html: { value: @survey_data.adult, class: 'col-md-10', :onChange => "total_customer();" }%>
</div>
</div>
</div>
@@ -30,7 +30,7 @@
</div>
</div>
</div>
<%= f.input :total_customer, input_html: { value: @survey_data.total_customer, class: 'col-md-11'} %>
<%= f.input :total_customer, input_html: { value:@survey_data.total_customer , :readonly => true, class: 'col-md-11'} %>
<%= f.input :local , input_html: { value: @survey_data.local, class: 'col-md-11' }%>
<!--<fieldset style="border: 1px solid #BDBDBD;padding: 20px; width: 92%;margin: 20px 0 20px 0;"> -->
<!-- <legend style="font-size: 1.2em !important;font-weight: bold !important;text-align: left !important;border:none;width:100px;">Foreigner</legend> -->
@@ -457,4 +457,11 @@ var cashier_type = "<%= @cashier_type %>";
});
}
}
function total_customer(){
var child = $("#survey_child").val() || 0;
var adult = $("#survey_adult").val() || 0;
var result = parseInt(child) + parseInt(adult);
$("#survey_total_customer").val(result);
}
</script>