disable cable and oqs qty can 0
This commit is contained in:
@@ -6,9 +6,9 @@
|
||||
//= 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,18 +1,18 @@
|
||||
App.order_queue_station = App.cable.subscriptions.create("OrderQueueStationChannel", {
|
||||
connected: function() {},
|
||||
// App.order_queue_station = App.cable.subscriptions.create("OrderQueueStationChannel", {
|
||||
// connected: function() {},
|
||||
|
||||
disconnected: function() {},
|
||||
// disconnected: function() {},
|
||||
|
||||
received: function(message) {
|
||||
alert(message);
|
||||
},
|
||||
// received: function(message) {
|
||||
// alert(message);
|
||||
// },
|
||||
|
||||
order: function(message) {
|
||||
return this.perform('order', {
|
||||
message: message
|
||||
});
|
||||
}
|
||||
});
|
||||
// order: function(message) {
|
||||
// return this.perform('order', {
|
||||
// message: message
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
|
||||
// $(function(){
|
||||
// $("#submit_order").on('click', function(event) {
|
||||
|
||||
@@ -34,6 +34,7 @@ class HomeController < ApplicationController
|
||||
if @employee != nil
|
||||
if @employee.role == "administrator"
|
||||
session[:session_token] = @employee.token_session
|
||||
puts "ADDDDDD"
|
||||
redirect_to dashboard_path
|
||||
elsif @employee.role == "cashier"
|
||||
session[:session_token] = @employee.token_session
|
||||
|
||||
@@ -11,6 +11,7 @@ class Oqs::EditController < BaseOqsController
|
||||
remarks = params[:remarks]
|
||||
|
||||
order_item = OrderItem.find(order_items_id);
|
||||
order_item.item_order_by = current_user.name
|
||||
order_item.qty = qty_weight
|
||||
order_item.remark = remarks
|
||||
order_item.save
|
||||
|
||||
@@ -9,7 +9,7 @@ class OrderItem < ApplicationRecord
|
||||
|
||||
#Validation
|
||||
validates_presence_of :item_code, :item_name, :qty
|
||||
validates :qty, numericality: { :greater_than => 0 }
|
||||
# validates :qty, numericality: { :greater_than => 0 }
|
||||
validates_associated :order
|
||||
|
||||
#This Method - handle how items is added into order
|
||||
|
||||
Reference in New Issue
Block a user