Pull from master
This commit is contained in:
0
app/views/origami/customers/index.html.erb
Executable file → Normal file
0
app/views/origami/customers/index.html.erb
Executable file → Normal file
@@ -5,7 +5,13 @@ json.valid_time_from menu.valid_time_from.strftime("%H:%M")
|
||||
json.valid_time_to menu.valid_time_to.strftime("%H:%M")
|
||||
|
||||
if (menu.menu_categories)
|
||||
json.categories menu.menu_categories do |category|
|
||||
order_by = Lookup.find_by_lookup_type("order_by")
|
||||
if !order_by.nil? && order_by.value == "name"
|
||||
categories = MenuCategory.unscoped.where("menu_id ='#{menu.id}'").order("name asc")
|
||||
else
|
||||
categories = menu.menu_categories
|
||||
end
|
||||
json.categories categories do |category|
|
||||
|
||||
menu_category = MenuCategory.find_by_menu_category_id(category.id)
|
||||
if !menu_category.nil?
|
||||
@@ -25,10 +31,14 @@ if (menu.menu_categories)
|
||||
json.parent_id category.menu_category_id
|
||||
json.is_available category.is_available
|
||||
|
||||
|
||||
if !order_by.nil? && order_by.value == "name"
|
||||
menu_items = MenuItem.unscoped.where("menu_category_id = ?",category.id).order("name asc")
|
||||
else
|
||||
menu_items = category.menu_items
|
||||
end
|
||||
|
||||
if category.menu_items
|
||||
json.items category.menu_items do |item|
|
||||
json.items menu_items do |item|
|
||||
if item.is_available
|
||||
json.partial! 'origami/addorders/menu_item', item: item
|
||||
end
|
||||
|
||||
@@ -113,6 +113,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="sxModal">
|
||||
<div id="sxModal-Content"><h3>Card Tap</h3></div>
|
||||
<div class="m-r-20" align="right">
|
||||
<button type="button" class="btn btn-lg btn-link bg-red waves-effect btn_cancel">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- customer light box -->
|
||||
@@ -256,6 +262,7 @@
|
||||
getCardNo();
|
||||
$("#sxModal").hide();
|
||||
customer_mamber_card_no = $("#paypar_account_no").val();
|
||||
|
||||
if(sale_id != 0 && customer_mamber_card_no != 0){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
@@ -429,7 +436,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
$("#sxModal .btn_cancel").on('click',function(){
|
||||
$(".btn_cancel").on('click',function(){
|
||||
$("#sxModal").hide();
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -108,6 +108,13 @@
|
||||
<button type="button" class="btn bg-default m-t-10 btn-lg btn-block" onclick="window.location.href = '/origami/sale/<%= @sale_id %>/<%= @cashier_type %>/payment/others_payment';"> <i class="material-icons m-t--5">reply</i>Back </button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="sxModal">
|
||||
<div id="sxModal-Content"><h3>Card Tap</h3></div>
|
||||
<div class="m-r-20" align="right">
|
||||
<button type="button" class="btn btn-lg btn-link bg-red waves-effect btn_cancel">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- customer light box -->
|
||||
|
||||
@@ -601,10 +601,11 @@ var customer_name = "<%= @customer.name %>";
|
||||
$("#back").on('click', function() {
|
||||
localStorage.removeItem('cash');
|
||||
customer_display_view(null,"reload");
|
||||
var sale_id = $('#sale_id').text();
|
||||
if (cashier_type=="cashier") {
|
||||
window.location.href = '/origami/table/'+ dining_id;
|
||||
}else{
|
||||
window.location.href = '/origami/quick_service';
|
||||
window.location.href = '/origami/quick_service/pending_order/'+sale_id;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<button type="button" class="btn btn-default btn-block" id='back'><i class="material-icons">reply</i>Back</button>
|
||||
<% if current_user.role != "waiter" || @status != "sale"%>
|
||||
<button type="button" id="addorder" class="btn bg-blue btn-block">Add Order</button>
|
||||
<button type="button" id="addorder" class="btn bg-blue btn-block">Update Order</button>
|
||||
<%end%>
|
||||
<!-- <% if @status != "order"%>
|
||||
<button type="button" id="survey" class="btn btn-block bg-blue waves-effect"><%= t("views.right_panel.detail.survey") %></button>
|
||||
@@ -215,10 +215,11 @@ $(document).ready(function(){
|
||||
$('#addorder').on('click', function () {
|
||||
var table_id = "<%=@table_id%>";
|
||||
var booking_id = "<%=@bookings.booking_id%>";
|
||||
var sale_id = $("#sale_id").val();
|
||||
if (table_id) {
|
||||
window.location.href = '/origami/quick_service/modify_order/' + table_id+"/"+$('#sale_id').val();
|
||||
window.location.href = '/origami/quick_service/modify_order/' + table_id+"/"+sale_id;
|
||||
}else{
|
||||
window.location.href = '/origami/quick_service/modify_order/'+ booking_id+"/" +$('#sale_id').val();
|
||||
window.location.href = '/origami/quick_service/modify_order/'+ booking_id+"/" +sale_id;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -213,7 +213,6 @@
|
||||
<!-- Column Three -->
|
||||
<div class="col-lg-1 col-md-1 col-sm-1">
|
||||
<button type="button" class="btn btn-default btn-block" id='back'><i class="material-icons">reply</i>Back</button>
|
||||
|
||||
<% if @sale.sale_status != 'void' && @sale.sale_status != 'waste' && @sale.sale_status != 'spoile' %>
|
||||
<% if current_login_employee.role == "cashier" %>
|
||||
<a class="btn btn-block bg-blue waves-effect access_modal" data-toggle="modal" data-type="void"> Void</a>
|
||||
@@ -224,6 +223,30 @@
|
||||
<button type="button" id="re-print" class="btn bg-blue btn-block">Re.Print</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="voidModal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="voidModalLabel">Please Enter Reason for Void</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<input type="textarea" name="remark" class="form-control col-md-12 remark" id="remark">
|
||||
</div>
|
||||
<div class="modal-footer ">
|
||||
<div class="row p-r-20">
|
||||
<div class="col-md-5">
|
||||
<button type="button" class="btn btn-link bg-red waves-effect " id="void" active="true">VOID</button>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<button type="button" class="btn btn-link bg-blue waves-effect" data-dismiss="modal">CLOSE</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="AccessCodeModal" tabindex="-1" role="dialog">
|
||||
@@ -344,7 +367,6 @@ $(document).on('click', '.access_modal', function(event){
|
||||
if (isConfirm) {
|
||||
var sale_id = $('#sale_id').val();
|
||||
var ajax_url = "/origami/sale/" + sale_id +'/'+'cashier'+ '/void';
|
||||
// var ajax_url = "/origami/sale/" + sale_id + '/void';
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: ajax_url,
|
||||
|
||||
Reference in New Issue
Block a user