mirror of
https://github.com/fspc/BikeShed-1.git
synced 2025-04-04 05:33:22 -04:00
-moved js to customers and users components, in order to use accordion. -Made the transaction form a little prettier
33 lines
687 B
Ruby
33 lines
687 B
Ruby
class Users < Netzke::Basepack::Grid
|
|
def configure(c)
|
|
super
|
|
c.header = false
|
|
c.model = "User"
|
|
|
|
c.columns = [
|
|
:first_name,
|
|
:last_name,
|
|
:nickname,
|
|
:email,
|
|
:user_role__role,
|
|
:bike__serial_number
|
|
]
|
|
end
|
|
|
|
#override with nil to remove actions
|
|
def default_bbar
|
|
[ :apply, :add_in_form, :search ]
|
|
end
|
|
|
|
#needed for transactions customer selection
|
|
js_configure do |c|
|
|
c.mixin :init_component
|
|
end
|
|
|
|
#needed for transactions customer selection
|
|
endpoint :select_customer do |params, this|
|
|
session[:selected_customer_id] = params[:customer_id]
|
|
session[:selected_customer_type] = params[:customer_type]
|
|
end
|
|
end
|