Merge branch 'ui_ux_changes' of bitbucket.org:code2lab/sxrestaurant into adminbsb_ui_changes

This commit is contained in:
phyusin
2018-05-03 17:43:57 +06:30
17 changed files with 181 additions and 143 deletions

View File

@@ -39,7 +39,7 @@ class Crm::CustomersController < BaseCrmController
@membership_types = Lookup.collection_of("member_group_type")
@taxes = TaxProfile.all.order("order_by asc")
@taxes = TaxProfile.where(:group_type => 'cashier')
@filter = filter

View File

@@ -89,6 +89,7 @@ class Oqs::HomeController < BaseOqsController
# Query for OQS with delivery status
def queue_items_query(status)
byebug
AssignedOrderItem.select("assigned_order_items.assigned_order_item_id, oqs.id as station_id, oqs.station_name, oqs.is_active, oqpz.zone_id, df.name as zone, df.type as type, odt.order_id, odt.item_code, odt.item_name, odt.price, odt.qty, odt.item_order_by, odt.options, cus.name as customer_name, odt.created_at")
.joins(" left join order_queue_stations as oqs on oqs.id = assigned_order_items.order_queue_station_id
left join order_queue_process_by_zones as oqpz on oqpz.order_queue_station_id = oqs.id

View File

@@ -5,7 +5,8 @@ class Oqs::HomeController < BaseOqsController
# @queue_items_details = queue_items_query(false)
# Query for OQS with delivery status true
@tables = DiningFacility.all.active.order('status desc')
# @tables = DiningFacility.all.active.order('status desc')
@tables = DiningFacility.where(:type => 'Table').order('status desc')
@rooms = Room.all.active.order('status desc')
@filter = params[:filter]
@@ -161,9 +162,9 @@ class Oqs::HomeController < BaseOqsController
oqs = "and assigned_order_items.order_queue_station_id = '#{oqs_id}' "
end
if table_id.to_i>0
table = "and df.id = '#{table_id}' "
if !table_id.empty?
tableId = table_id.to_a.map{|h| h}.join(",")
table = "and df.id IN (#{tableId})"
else
table = ''
end

View File

@@ -86,7 +86,7 @@ class Origami::CustomersController < BaseOrigamiController
@crm_customer = Customer.new
@count_customer = Customer.count_customer
@taxes = TaxProfile.all.order("order_by asc")
@taxes = TaxProfile.where(:group_type => 'cashier')
# if flash["errors"]
# @crm_customer.valid?
# end