update
This commit is contained in:
@@ -276,6 +276,7 @@ $(function(){
|
||||
disabled = ""
|
||||
status ="";
|
||||
|
||||
|
||||
if(parseInt(jQuery.inArray(value[i], selected_item))!== -1){
|
||||
status = "selected-attribute";
|
||||
}
|
||||
@@ -417,7 +418,7 @@ $(function(){
|
||||
}); //End Add Icon Click
|
||||
|
||||
function show_item_detail(data){
|
||||
console.log(data)
|
||||
|
||||
qty = parseInt(data.attr('data-qty'));
|
||||
append = 0;
|
||||
price = parseFloat(data.attr('data-price')).toFixed(2);
|
||||
@@ -599,7 +600,7 @@ $(function(){
|
||||
var item_row = $('.summary-items tbody tr');
|
||||
$(item_row).each(function(i){
|
||||
var order_item = {};
|
||||
console.log($(item_row[i]).attr('data-options'));
|
||||
|
||||
order_item.order_item_id = $(item_row[i]).attr('data-row');
|
||||
order_item.item_instance_code = $(item_row[i]).attr('data-instance-code');
|
||||
order_item.quantity = $(item_row[i]).children('#item_qty').text();
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// Action Cable provides the framework to deal with WebSockets in Rails.
|
||||
// You can generate new channels where WebSocket features live using the `rails generate channel` command.
|
||||
//
|
||||
|
||||
//= require action_cable
|
||||
//= require_self
|
||||
//= require_tree ./channels
|
||||
|
||||
// Temp Disable
|
||||
// (function() {
|
||||
// this.App || (this.App = {});
|
||||
(function() {
|
||||
this.App || (this.App = {});
|
||||
|
||||
// App.cable = ActionCable.createConsumer();
|
||||
App.cable = ActionCable.createConsumer();
|
||||
|
||||
// }).call(this);
|
||||
}).call(this);
|
||||
|
||||
@@ -1,24 +1,29 @@
|
||||
// App.order_queue_station = App.cable.subscriptions.create("OrderQueueStationChannel", {
|
||||
// connected: function() {},
|
||||
App.order_queue_station = App.cable.subscriptions.create('OrderQueueStationChannel', {
|
||||
// App.messages = App.cable.subscriptions.create('MessagesChannel', {
|
||||
|
||||
// disconnected: function() {},
|
||||
connected: function() {},
|
||||
|
||||
// received: function(message) {
|
||||
// alert(message);
|
||||
// },
|
||||
disconnected: function() {},
|
||||
|
||||
// order: function(message) {
|
||||
// return this.perform('order', {
|
||||
// message: message
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
received: function(data) {
|
||||
console.log(data);
|
||||
alert(data);
|
||||
console.log("hiiiiiiiiiiii");
|
||||
$('#test').append(data);
|
||||
},
|
||||
|
||||
// $(function(){
|
||||
// $("#submit_order").on('click', function(event) {
|
||||
// var orderData=$("#new_order").serializeObject();
|
||||
// App.order_station.order(orderData);
|
||||
// //orderData='';
|
||||
// return event.preventDefault();
|
||||
// });
|
||||
// });
|
||||
order: function(message) {
|
||||
return this.perform('order', {
|
||||
message: message
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$(function(){
|
||||
$("#submit_order").on('click', function(event) {
|
||||
var orderData=$("#new_order").serializeObject();
|
||||
App.order_station.order(orderData);
|
||||
//orderData='';
|
||||
return event.preventDefault();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user