This commit is contained in:
yarzar_code
2020-01-12 20:07:28 +06:30
parent 314cc507a3
commit dff2c69627
89 changed files with 492 additions and 469 deletions

View File

@@ -18,8 +18,8 @@ class HomeController < ApplicationController
def index
# @employees = Employee.all_emp_except_waiter.order("name asc")
@employees = Employee.all.where("shop_code='#{@shop.shop_code}' and is_active = true").order("name asc")
@roles = Employee.where("shop_code='#{@shop.shop_code}'").distinct.pluck(:role)
@employees = Employee.all.where("is_active = true").order("name asc")
@roles = Employee.distinct.pluck(:role)
# byebug
# @roles = Lookup.collection_of("employee_roles")