fixed conflic

This commit is contained in:
Aung Myo
2017-10-31 12:13:19 +06:30
69 changed files with 618 additions and 506 deletions

View File

@@ -37,7 +37,7 @@
<!--- Panel 1 - Table Orders -->
<div class="tab-pane dining active " id="tables" role="tabpanel">
<div class="card-columns">
<% @tables.each do |table| %>
<% @tables.each do |table| %>
<% if table.status == 'occupied' %>
<% if table.get_booking.nil? %>
@@ -316,8 +316,8 @@
<button type="button" class="btn btn-block btn-default waves-effect" id='back'><i class="fa fa-arrow-left"></i> Back</button>
<button type="button" id="add_order" class="btn btn-block btn- bg-blue waves-effect">Add Order</button>
<% if @dining.bookings.length >= 1 %>
<% if @status_order == 'order' && @status_sale != 'sale' %>
<% if @dining.status != "available" %>
<% if @status_order == 'order' %>
<button type="button" id="customer" class="btn btn-block btn- bg-blue waves-effect" disabled>Customer</button>
<button type="button" class="btn btn-block btn- bg-blue waves-effect" disabled>Edit</button>
<button type="button" id="discount" class="btn btn-block btn- bg-blue waves-effect" disabled>Discount</button>
@@ -327,7 +327,8 @@
<button type="button" id="first_bill" class="btn btn-block btn- bg-blue waves-effect" disabled>First Bill</button>
<button type="button" id="pay" class="btn btn-block btn- bg-blue waves-effect" disabled>Pay</button>
<button type="button" class="btn btn-block btn- bg-blue waves-effect" disabled> Void</button>
<% else %>
<% end %>
<% if @status_sale == 'sale' %>
<button type="button" id="customer" class="btn btn-block btn- bg-blue waves-effect">Customer</button>
<button type="button" class="btn btn-block btn- bg-blue waves-effect" id='edit'>Edit</button>
<button type="button" id="discount" class="btn btn-block btn- bg-blue waves-effect">Discount</button>
@@ -583,8 +584,18 @@
confirmButtonColor: "#DD6B55",
confirmButtonText: "Yes, void it!",
closeOnConfirm: false
}, function () {
window.location.href = '/origami/';
}, function (isConfirm) {
if (isConfirm) {
var sale_id = "<%= @obj_sale.sale_id rescue "" %>"
var ajax_url = "/origami/sale/" + sale_id + '/void';
$.ajax({
type: 'POST',
url: ajax_url,
success: function () {
window.location.href = '/origami/';
}
});
}
});
});