app
This commit is contained in:
@@ -30,22 +30,27 @@
|
||||
<% end %>
|
||||
<div id="custom-slimscroll">
|
||||
<div class="card-columns">
|
||||
<% bk_status ='' %>
|
||||
<% bk_color ='' %>
|
||||
|
||||
<% @bookings.each do |bk|
|
||||
bk_status ='completed'
|
||||
if bk.booking_status =='assign'
|
||||
bk_status ='new'
|
||||
end
|
||||
if !@booking.nil?
|
||||
if bk.booking_id == @booking.booking_id
|
||||
bk_status ='bg-red'
|
||||
bk_color ='bg-red'
|
||||
else
|
||||
bk_status =bk.booking_status
|
||||
bk_color =bk.booking_status
|
||||
end
|
||||
else
|
||||
bk_status =bk.booking_status
|
||||
bk_color =bk.booking_status
|
||||
end %>
|
||||
<%= link_to foodcourt_app_order_by_booking_path(booking_id:bk.booking_id) do %>
|
||||
<div class="card <%= bk_status %> text-white" data-id ="<%= bk.booking_id %>">
|
||||
<div class="card <%= bk_color %> text-white" data-id ="<%= bk.booking_id %>">
|
||||
<div class="card-block">
|
||||
Cus Ph :<%= bk.contact_no %><span style="font-size:12px;float:right;line-height:inherit;">Order Time :<%= bk.checkin_at.utc.getlocal.strftime("%I:%M %p") %></span><br>
|
||||
BK :<%= bk.booking_id %>
|
||||
BK :<%= bk.booking_id %><span style="font-size:12px;float:right;line-height:inherit;"><%= bk_status %></span>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -123,11 +128,11 @@
|
||||
$('#done_order').on('click', function () {
|
||||
swal({
|
||||
title: "Alert !",
|
||||
text: 'This order is really done!',
|
||||
text: 'Order Complete?',
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#DD6B55",
|
||||
confirmButtonText: "Yes!",
|
||||
confirmButtonText: "Yes",
|
||||
cancelButtonClass: 'btn btn-danger',
|
||||
closeOnConfirm: false
|
||||
}, function (isConfirm) {
|
||||
@@ -139,7 +144,13 @@
|
||||
data: {customer_id:"<%=@customer_id %>"},
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
window.location.href ="<%=foodcourt_app_order_by_booking_path %>";
|
||||
swal({
|
||||
title: "Information!",
|
||||
text: 'Send sms to customer ',
|
||||
type: "success",
|
||||
}, function () {
|
||||
window.location.href ="<%=foodcourt_app_order_by_booking_path %>";
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user