update admin bsb crm layou
This commit is contained in:
@@ -12,6 +12,7 @@ class ApplicationController < ActionController::Base
|
||||
#all token authentication must be done here
|
||||
#response format must be set to JSON
|
||||
|
||||
#change locallization
|
||||
def set_locale
|
||||
I18n.locale = params[:locale] || I18n.default_locale
|
||||
end
|
||||
|
||||
@@ -10,6 +10,16 @@ class BaseCrmController < ActionController::Base
|
||||
redirect_to root_path
|
||||
end
|
||||
|
||||
#change locallization
|
||||
def set_locale
|
||||
I18n.locale = params[:locale] || I18n.default_locale
|
||||
end
|
||||
|
||||
# RESTful url for localize
|
||||
def default_url_options
|
||||
{ locale: I18n.locale }
|
||||
end
|
||||
|
||||
def current_user
|
||||
@current_user ||= Employee.find_by_token_session(session[:session_token]) if session[:session_token]
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Crm::BookingsController < ApplicationController
|
||||
class Crm::BookingsController < BaseCrmController
|
||||
load_and_authorize_resource
|
||||
def update_booking
|
||||
booking = Booking.find(params[:booking_id])
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Crm::CustomersController < ApplicationController #BaseCrmController
|
||||
class Crm::CustomersController < BaseCrmController
|
||||
load_and_authorize_resource except: [:create]
|
||||
before_action :set_crm_customer, only: [:show, :edit, :update, :destroy]
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Crm::DiningQueuesController < ApplicationController #BaseCrmController
|
||||
class Crm::DiningQueuesController < BaseCrmController
|
||||
load_and_authorize_resource
|
||||
before_action :set_dining_queue, only: [:show, :edit, :update, :destroy]
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Crm::HomeController < ApplicationController
|
||||
class Crm::HomeController < BaseCrmController
|
||||
def index
|
||||
|
||||
@booking = Booking.all
|
||||
|
||||
Reference in New Issue
Block a user