add survey
This commit is contained in:
@@ -319,6 +319,7 @@
|
||||
Back
|
||||
</button>
|
||||
<button type="button" id="add_order" class="btn btn-block bg-blue waves-effect">Add Order</button>
|
||||
<button type="button" id="survey" class="btn btn-block bg-blue waves-effect">Survey</button>
|
||||
<% if @dining.status != "available" %>
|
||||
<% if @status_order == 'order' %>
|
||||
<button type="button" id="customer" class="btn btn-block bg-blue waves-effect" disabled>Customer</button>
|
||||
@@ -395,6 +396,19 @@
|
||||
window.location.href = '/origami/order/' + order_id;
|
||||
});
|
||||
|
||||
// bind survey to order or sale
|
||||
$("#survey").on('click', function () {
|
||||
var sale = $('#sale_id').val();
|
||||
if (sale) {
|
||||
var sale_id = sale
|
||||
} else {
|
||||
var sale_id = $('#save_order_id').attr('data-order');
|
||||
}
|
||||
var table_id = $('.tables').attr("data-id");
|
||||
|
||||
window.location.href = '/origami/' + sale_id + "/survey"
|
||||
});
|
||||
|
||||
// bind customer to order or sale
|
||||
$("#customer").on('click', function () {
|
||||
var sale = $('#sale_id').val();
|
||||
|
||||
Reference in New Issue
Block a user