Merge branch 'adminbsb_material_ui'
This commit is contained in:
@@ -1434,7 +1434,7 @@ $(function() {
|
|||||||
|
|
||||||
row = '<div class="card custom-card testimonial-card fadeInRight" style="height:100%;background-image:url(../../'+image_path+');background-repeat: no-repeat;">'
|
row = '<div class="card custom-card testimonial-card fadeInRight" style="height:100%;background-image:url(../../'+image_path+');background-repeat: no-repeat;">'
|
||||||
+'<div class="custom-card-head card-head row" style="line-height:14px;margin:0px;" style="">'
|
+'<div class="custom-card-head card-head row" style="line-height:14px;margin:0px;" style="">'
|
||||||
+'<div class="col-md-10 " style="padding-left:10px !important;">'+ menu_items[field].name +'</div>'
|
+'<div class="col-md-10 " style="padding:0px !important;">'+ menu_items[field].name +'</div>'
|
||||||
+"<div class='col-md-2 "+menu_item_box+" ' data-item-code='"
|
+"<div class='col-md-2 "+menu_item_box+" ' data-item-code='"
|
||||||
+ menu_items[field].code +"' data-instance = '"
|
+ menu_items[field].code +"' data-instance = '"
|
||||||
+JSON.stringify(menu_items[field].instances)+"' data-id = '"
|
+JSON.stringify(menu_items[field].instances)+"' data-id = '"
|
||||||
@@ -1442,8 +1442,8 @@ $(function() {
|
|||||||
+JSON.stringify(item_attributes)+"' data-option = '"
|
+JSON.stringify(item_attributes)+"' data-option = '"
|
||||||
+JSON.stringify(menu_items[field].options)+"'data-opt = '"
|
+JSON.stringify(menu_items[field].options)+"'data-opt = '"
|
||||||
+JSON.stringify(menu_items[field].options)+"' data-item-sets = '"
|
+JSON.stringify(menu_items[field].options)+"' data-item-sets = '"
|
||||||
+JSON.stringify(menu_items[field].item_sets)+"' data-toggle='modal' data-target='."+data_target+"' >"
|
+JSON.stringify(menu_items[field].item_sets)+"' data-toggle='modal' data-target='."+data_target+"' style='padding:0px 5px 0px 5px'>"
|
||||||
+"<i class='m-l--10 fa "+fa_plus+" '>"
|
+"<i class='m-l--5 fa "+fa_plus+" '>"
|
||||||
+add+ '</i>'
|
+add+ '</i>'
|
||||||
+'</div>'
|
+'</div>'
|
||||||
+'</div>'
|
+'</div>'
|
||||||
|
|||||||
@@ -56,24 +56,29 @@ section .content{
|
|||||||
.nav-tabs .nav-item {
|
.nav-tabs .nav-item {
|
||||||
border-bottom: 1px solid #fff;
|
border-bottom: 1px solid #fff;
|
||||||
margin-left:2px;
|
margin-left:2px;
|
||||||
|
margin-right: -1.555rem;
|
||||||
}
|
}
|
||||||
#ul-navbar{
|
#ul-navbar{
|
||||||
border-left: 1px solid #54A5AF;
|
border-left: 1px solid #54A5AF;
|
||||||
border-right: 1px solid #54A5AF;
|
border-right: 1px solid #54A5AF;
|
||||||
|
padding-right: 0px;
|
||||||
}
|
}
|
||||||
.nav > li > a{
|
.nav > li > a{
|
||||||
color:#54A5AF;
|
color:#54A5AF;
|
||||||
}
|
}
|
||||||
|
.nav-tabs > li > a {
|
||||||
|
color:#111 !important;
|
||||||
|
}
|
||||||
.nav-tabs {
|
.nav-tabs {
|
||||||
background-color: #eeeeee;
|
background-color: #ccc;
|
||||||
}
|
}
|
||||||
.nav-tabs .nav-link {
|
.nav-tabs .nav-link {
|
||||||
padding: 0.7286rem 0.2575
|
padding: 0.7286rem 0.2575;
|
||||||
|
border-top-left-radius: 0rem;
|
||||||
|
border-top-right-radius: 0rem;
|
||||||
}
|
}
|
||||||
.nav-tabs .nav-link.active, .nav-tabs .nav-item.show .nav-link {
|
.nav-tabs .nav-link.active, .nav-tabs .nav-item.show .nav-link {
|
||||||
background-color: #fff;
|
background-color: #a1aade;
|
||||||
border-left: 6px solid #111;
|
border-left: 6px solid #111;
|
||||||
color:#54A5AF;
|
color:#54A5AF;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@@ -81,7 +86,7 @@ section .content{
|
|||||||
}
|
}
|
||||||
.sub_category_list{
|
.sub_category_list{
|
||||||
background:#fff;
|
background:#fff;
|
||||||
margin-top:8px;
|
margin-top:0px;
|
||||||
}
|
}
|
||||||
.sub_category_list > li{
|
.sub_category_list > li{
|
||||||
list-style:none;
|
list-style:none;
|
||||||
@@ -275,3 +280,13 @@ i.logout_icon{
|
|||||||
.set_add_icon{
|
.set_add_icon{
|
||||||
display:none;
|
display:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nav-tabs > li > a {
|
||||||
|
color:#111 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.ls-closed section.content {
|
||||||
|
margin-left: 15px !important;
|
||||||
|
margin-right: 15px !important;
|
||||||
|
}
|
||||||
@@ -19,7 +19,7 @@ class HomeController < ApplicationController
|
|||||||
|
|
||||||
def index
|
def index
|
||||||
# @employees = Employee.all_emp_except_waiter.order("name asc")
|
# @employees = Employee.all_emp_except_waiter.order("name asc")
|
||||||
@employees = Employee.all.order("name asc")
|
@employees = Employee.all.where("is_active = true").order("name asc")
|
||||||
@login_form = LoginForm.new()
|
@login_form = LoginForm.new()
|
||||||
render "layouts/login_dashboard", layout: false
|
render "layouts/login_dashboard", layout: false
|
||||||
end
|
end
|
||||||
@@ -52,6 +52,7 @@ class HomeController < ApplicationController
|
|||||||
@employee = Employee.login(@login_form.emp_id, @login_form.password)
|
@employee = Employee.login(@login_form.emp_id, @login_form.password)
|
||||||
|
|
||||||
if @employee != nil
|
if @employee != nil
|
||||||
|
if @employee.is_active
|
||||||
if @employee.role == "administrator"
|
if @employee.role == "administrator"
|
||||||
session[:session_token] = @employee.token_session
|
session[:session_token] = @employee.token_session
|
||||||
redirect_to dashboard_path
|
redirect_to dashboard_path
|
||||||
@@ -76,6 +77,9 @@ class HomeController < ApplicationController
|
|||||||
else
|
else
|
||||||
render :index
|
render :index
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
redirect_to root_path, :notice => "This Employee is not active"
|
||||||
|
end
|
||||||
else
|
else
|
||||||
redirect_to root_path, :notice => "Username and Password doesn't match!"
|
redirect_to root_path, :notice => "Username and Password doesn't match!"
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -68,6 +68,6 @@ class Settings::EmployeesController < ApplicationController
|
|||||||
|
|
||||||
# Never trust parameters from the scary internet, only allow the white list through.
|
# Never trust parameters from the scary internet, only allow the white list through.
|
||||||
def employee_params
|
def employee_params
|
||||||
params.require(:employee).permit(:name, :role, :emp_id, :password, :image_path)
|
params.require(:employee).permit(:name, :role, :is_active, :emp_id, :password, :image_path)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<% type = request.path_info.include?('quick_service')%>
|
<% type = request.path_info.include?('quick_service')%>
|
||||||
<% modify_order = request.path_info.include?('modify_order')%>
|
<% modify_order = request.path_info.include?('modify_order')%>
|
||||||
|
|
||||||
<div class="container-fluid ">
|
<div class="container-fluid " style="padding:0px 3px 0px 3px;">
|
||||||
<div id="oqs_loading_wrapper" style="display:none;">
|
<div id="oqs_loading_wrapper" style="display:none;">
|
||||||
<div id="oqs_loading"></div>
|
<div id="oqs_loading"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
<div class="form-inputs p-l-15">
|
<div class="form-inputs p-l-15">
|
||||||
<%= f.input :name %>
|
<%= f.input :name %>
|
||||||
|
<%= f.input :is_active,:input_html=>{:class=>"col-md-9"} %>
|
||||||
<% if current_user.role == "administrator" %>
|
<% if current_user.role == "administrator" %>
|
||||||
<%= f.input :role, :collection => Lookup.collection_of("employee_roles"),:class=>'form-group' %>
|
<%= f.input :role, :collection => Lookup.collection_of("employee_roles"),:class=>'form-group' %>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
|||||||
Reference in New Issue
Block a user