mirror of
https://github.com/fspc/BikeShed-1.git
synced 2026-09-16 08:31:36 -04:00
Changing UserRole to UserRoleJoin
Beware, this breaks the view for some reason
This commit is contained in:
@@ -37,7 +37,8 @@ class AppTabPanel < Netzke::Basepack::TabPanel
|
||||
wrappedComponent: :transactions_border,
|
||||
title: "Transactions"},
|
||||
:logs,
|
||||
:user_roles]
|
||||
:user_roles
|
||||
]
|
||||
end
|
||||
|
||||
@@app_tab_panel_items.each do |item|
|
||||
|
||||
@@ -53,7 +53,7 @@ class UserLogs < Netzke::Basepack::Grid
|
||||
bike_store = Bike.all.map { |b| [b.id, b.shop_id] }
|
||||
current_user ||= User.find_by_id(session[:selected_user_id]) || controller.current_user
|
||||
bike_id = current_user.bike.nil? ? nil : current_user.bike.id
|
||||
action_id = current_user.user_role.id
|
||||
action_id = ::ActsAsLoggable::UserAction.all.first.id
|
||||
[
|
||||
{ :name => :start_date},
|
||||
{ :name => :end_date},
|
||||
|
||||
@@ -2,9 +2,9 @@ class UserRoles < Netzke::Basepack::Grid
|
||||
|
||||
def configure(c)
|
||||
super
|
||||
c.model = "UserRole"
|
||||
c.model = "UserRoleJoin"
|
||||
c.title = "User Roles"
|
||||
c.columns = [ :role, :created_at, :updated_at, :ends ]
|
||||
#c.columns = [ :user__first_name, :role__role, :created_at, :updated_at, :ends ]
|
||||
end
|
||||
|
||||
#override with nil to remove actions
|
||||
|
||||
@@ -9,7 +9,6 @@ class Users < Netzke::Basepack::Grid
|
||||
:last_name,
|
||||
:nickname,
|
||||
:email,
|
||||
:user_role__role,
|
||||
:bike__shop_id
|
||||
]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user