update login To show dashboard screen with available features based on user type
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
class Crm::HomeController < BaseCrmController
|
||||
def index
|
||||
|
||||
@booking = Booking.all
|
||||
@customer = Customer.all
|
||||
from = Time.now.beginning_of_day.utc
|
||||
to = Time.now.end_of_day.utc
|
||||
@queue = DiningQueue.where('created_at BETWEEN ? AND ?', from, to).order('queue_no ASC')
|
||||
# redirect_to crm_customers_path
|
||||
# .where("dining_facilities.is_active=? and orders.date between ? and ?",true,from,to)
|
||||
@booking = Booking.all
|
||||
@customer = Customer.all
|
||||
from = Time.now.beginning_of_day.utc
|
||||
to = Time.now.end_of_day.utc
|
||||
@queue = DiningQueue.where('created_at BETWEEN ? AND ?', from, to).order('queue_no ASC')
|
||||
redirect_to crm_customers_path
|
||||
# .where("dining_facilities.is_active=? and orders.date between ? and ?",true,from,to)
|
||||
|
||||
end
|
||||
|
||||
|
||||
@@ -42,9 +42,12 @@ class HomeController < ApplicationController
|
||||
elsif @employee.role == "manager"
|
||||
session[:session_token] = @employee.token_session
|
||||
redirect_to dashboard_path
|
||||
elsif @employee.role == "accountant"
|
||||
elsif @employee.role == "supervisour"
|
||||
session[:session_token] = @employee.token_session
|
||||
redirect_to dashboard_path
|
||||
redirect_to origami_root_path
|
||||
elsif @employee.role == "account"
|
||||
session[:session_token] = @employee.token_session
|
||||
redirect_to reports_dailysale_index_path
|
||||
else
|
||||
render :index
|
||||
end
|
||||
@@ -96,12 +99,15 @@ class HomeController < ApplicationController
|
||||
redirect_to new_origami_shift_path
|
||||
end
|
||||
elsif employee.role == "manager"
|
||||
redirect_to oqs_root_path
|
||||
redirect_to dashboard_path
|
||||
elsif employee.role == "waiter"
|
||||
redirect_to oqs_root_path
|
||||
elsif employee.role == "crm"
|
||||
redirect_to crm_root_path
|
||||
|
||||
elsif @employee.role == "supervisour"
|
||||
redirect_to origami_root_path
|
||||
elsif @employee.role == "account"
|
||||
redirect_to reports_dailysale_index_path
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user