update oqs action cable for order cahnnel and oqs channel

This commit is contained in:
Aung Myo
2017-09-05 14:07:20 +06:30
parent eeb2a91ce9
commit 4a85039170
5 changed files with 11 additions and 4 deletions

View File

@@ -23,6 +23,9 @@ $(document).ready(function(){
// setTimeout(function(){
// window.location.reload(1);
// }, 10000);
// $oqs_count = document.getElementById("oqsBox").style.order =1;
// $("#oqsBox").css("order", 1);
$(".nav-completed").on("click", function(){
$("#completed").removeClass('hide')
$(".oqs_append").addClass('hide')
@@ -54,7 +57,7 @@ $(document).ready(function(){
for(var field in data) {
var price = parseFloat(data[field].price).toFixed(2);
if (data[field]["options"] == "[]") {
if (data[field]["options"] == "[]" || data[field]["options"] == "") {
var options = "";
}else{
var options = data.options;

View File

@@ -11,7 +11,7 @@ App.order_queue_station = App.cable.subscriptions.create('OrderQueueStationChann
items = data.order;
for(var field in items) {
var price = parseFloat(items[field].price).toFixed(2);
if (items[field]["options"] == "[]") {
if (items[field]["options"] == "[]" || data[field]["options"] == "") {
var options = "";
}else{
var options = items.options;
@@ -33,7 +33,8 @@ App.order_queue_station = App.cable.subscriptions.create('OrderQueueStationChann
var show_date = date.getDate() + "-" + date.getMonth() + "-" + date.getFullYear() + ' ' + date.getHours()+ ':' + date.getMinutes();
if (oqs_id == items[field]["order_queue_station_id"]) {
row ='<div class="card queue_station">'
row ='<div class="card queue_station" id="oqsBox" style="order: initial;">'
+'<div class="card-block">'
+'<h4 class="card-title">'
+'<span class="order-zone-type">'+items[field]["table_type"]+'- </span>'

View File

@@ -25,3 +25,5 @@
font-size: 18px;
margin: 0px 0px 5px 0px;
}