fix addorder UI
This commit is contained in:
@@ -254,14 +254,29 @@
|
||||
$('.close_cashier').on('click',function(e){
|
||||
e.preventDefault(); // Prevent the href from redirecting directly
|
||||
var linkURL = '/foodcourt/shift/cashier/close';
|
||||
swal({
|
||||
title: "Alert!",
|
||||
text: "Are you sure you want to close cashier?",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
html: true
|
||||
}, function() {
|
||||
window.location.href = linkURL;
|
||||
});
|
||||
var count = ''
|
||||
var text = ''
|
||||
$.ajax({
|
||||
url: '/foodcourt/current_shift_order_count',
|
||||
method: 'get',
|
||||
success: function(data) {
|
||||
count = JSON.stringify(data)
|
||||
console.log(count)
|
||||
if (count > 0) {
|
||||
text = "<h5><span style=\"color: #CC0000\"> We have "+count+" pending orders and sales</span> </h5>.<br>Are you sure you want to close cashier? ";
|
||||
}else{
|
||||
text = "Are you sure you want to close cashier?";
|
||||
}
|
||||
swal({
|
||||
title: "Alert!",
|
||||
text: text,
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
html: true
|
||||
}, function() {
|
||||
window.location.href = linkURL;
|
||||
});
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -38,14 +38,9 @@
|
||||
<!-- #END# Overlay For Sidebars -->
|
||||
<%= render 'layouts/header' %>
|
||||
<section>
|
||||
<%food_court = Lookup.find_by_lookup_type_and_value("food_court", "1")%>
|
||||
<% if food_court && current_user.role=='cashier'%>
|
||||
<%= render 'layouts/foodcourt_left_sidebar' %>
|
||||
<% else %>
|
||||
<%= render 'layouts/left_sidebar' %>
|
||||
<%end%>
|
||||
|
||||
<%= render 'layouts/right_sidebar' %>
|
||||
<%= render 'layouts/left_sidebar' %>
|
||||
|
||||
<%= render 'layouts/right_sidebar' %>
|
||||
</section>
|
||||
|
||||
<!-- Main Content -->
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<!-- #END# Overlay For Sidebars -->
|
||||
<%= render 'layouts/header' %>
|
||||
<section>
|
||||
<%= render 'layouts/foodcourt_left_sidebar' %>
|
||||
<%= render 'layouts/left_sidebar' %>
|
||||
<%= render 'layouts/right_sidebar' %>
|
||||
</section>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user