back btn for pending

This commit is contained in:
phyusin
2018-05-22 10:59:56 +06:30
7 changed files with 42 additions and 30 deletions

View File

@@ -346,12 +346,10 @@
</div>
</div>
<div class="col-lg-1 col-md-1 col-sm-1 col-xs-1">
<% if @cashier_type!="quick_service" %>
<button type="button" class="btn btn-block btn-default waves-effect" id='back'>
<i class="material-icons">reply</i>
Back
</button>
<% end %>
<!-- -->
<% if current_login_employee.role == "cashier" %>
<a class="btn btn-block bg-deep-purple waves-effect access_modal" data-toggle="modal" data-type="foc"> FOC</a>
@@ -603,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;
}
});

View File

@@ -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;
}
});