diff --git a/app/assets/javascripts/OQS.js b/app/assets/javascripts/OQS.js index 609fdfc2..ce844239 100755 --- a/app/assets/javascripts/OQS.js +++ b/app/assets/javascripts/OQS.js @@ -70,26 +70,26 @@ $(document).on('turbolinks:load', function() { row ='
' +'
' - +'
' - +''+data[field]["table_type"]+'- ' - +''+ data[field]["zone"] +'' - +''+ data[field]["order_id"] +'' - +'
' + // +'
' + +''+data[field]["table_type"]+'- '+ data[field]["zone"] +' ' + // +''+ data[field]["zone"] +'' + +''+ data[field]["order_id"] +'' + // +'
' - +'
' - +''+ data[field]["item_name"] +'- ' + // +'
' + +''+ data[field]["item_name"] +'- ' +''+ data[field]["qty"] +' ' - +'
' + // +'' +'

'+ options +'

' - +'

' - +'Order at' + +'' + +'Order at' +''+ show_date +' - ' +''+ data[field]["item_order_by"] +' ' - +' ' - +'

' + +' ' + +'' +' ' +' ' diff --git a/app/assets/javascripts/channels/order_queue_station.js b/app/assets/javascripts/channels/order_queue_station.js index 4fb7d214..6c8166d4 100755 --- a/app/assets/javascripts/channels/order_queue_station.js +++ b/app/assets/javascripts/channels/order_queue_station.js @@ -37,26 +37,26 @@ App.order_queue_station = App.cable.subscriptions.create('OrderQueueStationChann row ='
' +'' +'
' - +'

' - +''+items[field]["table_type"]+'- ' - +''+ items[field]["zone"] +'' - +''+ items[field]["order_id"] +'- ' - +'

' + // +'

' + +''+items[field]["table_type"]+'- ' + +''+ items[field]["zone"] +'' + +''+ items[field]["order_id"] +'- ' + // +'

' - +'

' - +''+ items[field]["item_name"] +'- ' + // +'

' + +''+ items[field]["item_name"] +'- ' +''+ items[field]["qty"] +'- ' - +'

' + // +'' +'

'+ options +'

' - +'

' - +'Order at' + +'' + +'Order at' +''+ show_date +' - ' +''+ items[field]["item_order_by"] +' ' - +' ' - +'

' + +' ' + +'' +' ' +' ' diff --git a/app/assets/stylesheets/OQS.scss b/app/assets/stylesheets/OQS.scss index f6211dec..bd62ff95 100755 --- a/app/assets/stylesheets/OQS.scss +++ b/app/assets/stylesheets/OQS.scss @@ -22,10 +22,5 @@ background-color: blue; } -.order-item { - width: 49%; - font-size: 18px; - margin: 0px 0px 5px 0px; -} diff --git a/app/models/dining_facility.rb b/app/models/dining_facility.rb index ba01afb6..24a3e47b 100755 --- a/app/models/dining_facility.rb +++ b/app/models/dining_facility.rb @@ -33,7 +33,6 @@ class DiningFacility < ApplicationRecord def get_current_booking booking = Booking.where("dining_facility_id = #{self.id} and booking_status ='assign' and checkin_at between '#{DateTime.now.utc - 5.hours}' and '#{DateTime.now.utc}' and checkout_at is null").limit(1) - if booking.count > 0 then return booking[0] else diff --git a/app/views/oqs/home/index.html.erb b/app/views/oqs/home/index.html.erb index 3e03f84d..896dfae7 100755 --- a/app/views/oqs/home/index.html.erb +++ b/app/views/oqs/home/index.html.erb @@ -73,7 +73,7 @@ -
+
@@ -83,31 +83,31 @@ %>
-
- <%= qid.type %> - - <%= qid.zone %> - <%= qid.order_id %> -
-
- + + <%= qid.type %> - + <%= qid.zone %> + <%= qid.order_id %> + + + <%= qid.item_name %> [x <%= qid.qty %> ] -
+

<%= qid.options == "[]"? "" : qid.options %>

- Order at + Order at <%= qid.created_at.utc.getlocal.strftime("%d-%m-%Y %I:%M %p") %> - <%= qid.item_order_by %> - +

@@ -140,9 +140,9 @@ - - + diff --git a/app/views/origami/home/index.html.erb b/app/views/origami/home/index.html.erb index 4dd97cda..845c3a95 100755 --- a/app/views/origami/home/index.html.erb +++ b/app/views/origami/home/index.html.erb @@ -43,6 +43,7 @@ <% if table.get_booking.nil? %>
+ <%= table.get_booking %> Zone <%= table.zone_id %>
Table <%= table.name %> ( <%= table.seater %> Seat )
@@ -50,6 +51,7 @@ <% else %>
+ <%= table.get_booking %> Zone <%= table.zone_id %>
Table <%= table.name %> ( <%= table.seater %> Seat )
@@ -58,6 +60,7 @@ <% else %>
+ <%= table.get_booking %> Zone <%= table.zone_id %>
Table <%= table.name %> ( <%= table.seater %> Seat )
diff --git a/app/views/settings/promotions/_form.html.erb b/app/views/settings/promotions/_form.html.erb index f8e54317..ab8172f7 100755 --- a/app/views/settings/promotions/_form.html.erb +++ b/app/views/settings/promotions/_form.html.erb @@ -85,7 +85,7 @@
- <%= f.hidden_field :promo_day, :class => "form-control" %> + <%= f.hidden_field :promo_day, :class => "form-control", :id => "promotion_promo_day" %>
      @@ -97,15 +97,9 @@
- - <%= f.input :promo_type, collection: %w{Quantity Net_off Net_price Percentage},:input_html=>{:class => 'col-md-5 form-control select'} ,:label => "Promotion Type", :include_blank => 'Choose Promotion Type', :selected => '' %> + + <%= f.input :promo_type,input_html: { :class => 'form-control col-md-5 form-control select' }, + collection: %w{Quantity Net_off Net_price Percentage},:label => "Promotion Type" %> @@ -147,7 +141,7 @@ <% end %>
<%= f.input :original_product,collection: sample %>
-
<%= f.input :min_qty %>
+
<%= f.input :min_qty ,label: "Qualified Qty" %>

@@ -155,10 +149,10 @@
Item Code
Item Instance
-
Min Qty
+
Qualified Qty
Net off
Net Price
-
Percentage
+
Percentage
@@ -183,10 +177,10 @@ <%= pro.input :item_code, :class => 'promoproduct', collection:[],input_html: { selected: 2 }, label: false %>
-
<%= pro.input :min_qty , label: false%>
+
<%= pro.input :min_qty , label: false%>
<%= pro.input :net_off , label: false %>
<%= pro.input :net_price , label: false %>
-
<%= pro.input :percentage , label: false %>
+
<%= pro.input :percentage , label: false %>
<%= pro.link_to_remove "X" ,:class=>"btn-primary btn m-r-25"%>
<% end %> @@ -250,58 +244,56 @@ $(document).ready(function(){ - // $('#promotion_promo_start_date').datetimepicker({ - // timepicker:false, - // format:'Y-m-d' - // }); - // $('#promotion_promo_end_date').datetimepicker({ - // timepicker:false, - // format:'Y-m-d' - // }); - // $('#promotion_promo_start_hour').datetimepicker({ - // datepicker:false, - // format:'H:m' - // }); - // $('#promotion_promo_end_hour').datetimepicker({ - // datepicker:false, - // format:'H:m' - // }); - // $('#promotion_promo_start_hour').on('change', function(event) { - // $('#promotion_promo_start_hour').val($('#promotion_promo_start_hour').val().split(":")[0]+":00"); - // }); + $('#promotion_promo_start_hour').on('change', function(event) { + $('#promotion_promo_start_hour').val($('#promotion_promo_start_hour').val().split(":")[0]+":00"); + }); - // $('#promotion_promo_end_hour').on('change', function(event) { - // $('#promotion_promo_end_hour').val($('#promotion_promo_end_hour').val().split(":")[0]+":00"); - // }); + $('#promotion_promo_end_hour').on('change', function(event) { + $('#promotion_promo_end_hour').val($('#promotion_promo_end_hour').val().split(":")[0]+":00"); + }); - // $('.datepicker').bootstrapMaterialDatePicker({ - // format: 'dddd DD MM YYYY', - // clearButton: true, - // weekStart: 1, - // time: false - // }); + $('.datepicker').bootstrapMaterialDatePicker({ + format: 'dddd DD MM YYYY', + clearButton: true, + weekStart: 1, + time: false + }); - // $('.timepicker').bootstrapMaterialDatePicker({ - // format: 'HH:mm', - // clearButton: true, - // date: false - // }); + $('.timepicker').bootstrapMaterialDatePicker({ + format: 'HH:mm', + clearButton: true, + date: false + }); - // var dayy = $("#promotion_promo_day").val().replace("[","").replace("]",""); - // jQuery.each( dayy.split(","), function( i, d ) { - // $("input.selectDay[value='"+d+"']").prop( "checked", true ); - // }); + var dayy = $("#promotion_promo_day").val().replace("[","").replace("]",""); + jQuery.each( dayy.split(","), function( i, d ) { + $("input.selectDay[value='"+d+"']").prop( "checked", true ); + }); - var form = document.getElementById("new_promotion"); + /*var form = document.getElementById("new_promotion"); var inputs = $("input"); var arr = []; var count = 0; - var day = "["; + var day = "[";*/ + $(".selectDay").click(function() { // debugger; - day = "["; + var item_row = $('.selectDay'); + console.log(item_row); + check = $(item_row).prop("checked"); + var attribute_arr = []; + $(item_row).each(function(i){ + if ($(item_row[i]).prop("checked")) { + value = $(item_row[i]).val(); + str = value; + attribute_arr.push(str); + } + }); + + + /*day = "["; for (var j = 8; j <=15; j += 1){ if (inputs[j].type === "checkbox" && inputs[j].checked) { @@ -316,9 +308,10 @@ $(".selectDay").click(function() { { day = day + "]"; } - } + }*/ + document.getElementById("promotion_promo_day").value = ''; - document.getElementById("promotion_promo_day").value = day; + document.getElementById("promotion_promo_day").value = "["+attribute_arr+"]"; }); // $("#promotion_original_product").select2();
Order ByOrder At - Customer + Order ByOrder At + Customer