updated ui

This commit is contained in:
Yan
2017-06-02 11:28:07 +06:30
parent f28f0bf292
commit 95fd260c76
4 changed files with 43 additions and 25 deletions

View File

@@ -17,32 +17,38 @@
//= require cable
$(document).ready(function(){
$('.queue_station').on('click',function(){
var orderZone=$(this).children().children().children('.order-zone').text();
var orderItem=$(this).children().children().children('.order-item').text();
var orderQty=$(this).children().children().children('.order-qty').text();
var orderBy=$(this).children().children().children().children('.order-by').text();
var orderAt=$(this).children().children().children().children('.order-at').text();
var orderCustomer=$(this).children().children('.order-customer').text();
$('.queue_station').on('click',function(){
var orderZone=$(this).children().children().children('.order-zone').text();
var orderItem=$(this).children().children().children('.order-item').text();
var orderQty=$(this).children().children().children('.order-qty').text();
var orderBy=$(this).children().children().children().children('.order-by').text();
var orderAt=$(this).children().children().children().children('.order-at').text();
var orderCustomer=$(this).children().children('.order-customer').text();
$('#order-title').text("ORDER DETAILS - " + orderZone);
$('#order-by').text(orderBy);
$('#order-at').text(orderAt);
$('#order-customer').text(orderCustomer);
$('#order-from').text(orderZone);
$('#order-title').text("ORDER DETAILS - " + orderZone);
$('#order-by').text(orderBy);
$('#order-at').text(orderAt);
$('#order-customer').text(orderCustomer);
$('#order-from').text(orderZone);
$('#order-items').text(orderItem);
$('#order-qty').text(orderQty);
$('#order-items').text(orderItem);
$('#order-qty').text(orderQty);
});
// complete for queue item
$('.order-complete').on('click',function(){
var assigned_item_id=$(this).attr('id').substr(15);
$.ajax({
url: "",
data: ""
}).done(function(){
});
});
// complete for queue item
$('.order-complete').on('click',function(){
var assigned_item_id=$(this).attr('id').substr(15);
var params = { 'id':assigned_item_id };
// $(this).parent().parent(".queue_station").remove();
$.ajax({
type: 'POST',
url: '/oqs/update_delivery',
data: params,
dataType: 'json',
success: function(data){
$('.order-complete').parent().parent(".queue_station").remove();
alert('updated!');
}
});
});
});