Shop name in navbar,linke to shop info

This commit is contained in:
San Wai Lwin
2018-02-05 18:11:45 +06:30
parent 2821f4bb1c
commit 3f247f731e
64 changed files with 400 additions and 55 deletions

View File

@@ -6,7 +6,7 @@ class ApplicationController < ActionController::Base
# lookup domain for db from provision
before_action :lookup_domain, :set_locale
helper_method :current_company,:current_login_employee,:current_user
helper_method :current_company,:current_login_employee,:current_user,:shop_detail
# alias_method :current_user, :current_login_employee,:current_user
#this is base api base controller to need to inherit.
#all token authentication must be done here
@@ -101,6 +101,10 @@ class ApplicationController < ActionController::Base
end
def shop_detail
@shop = Shop.first
end
def current_login_employee
if (!session[:session_token].nil?)
@employee = Employee.find_by_token_session(session[:session_token])