Sha256: 53ac6cf644379656d35a0d0f909cfcf48fe4abb0e58422ae0f38ebb133b0b5eb

Contents?: true

Size: 1.22 KB

Versions: 24

Compression:

Stored size: 1.22 KB

Contents

# Dashboard Event Registrations
class EffectiveEventRegistrationsDatatable < Effective::Datatable
  datatable do
    order :created_at

    col :token, visible: false
    col :created_at, visible: false

    col(:submitted_at, label: 'Registered on') do |er|
      er.submitted_at&.strftime('%F') || 'Incomplete'
    end

    col :event, search: :string do |er|
      er.event.to_s
    end

    col :owner, visible: false, search: :string
    col :status, visible: false
    col :event_registrants, label: 'Registrants', search: :string
    col :event_addons, label: 'Add-ons', search: :string
    col :orders, action: :show, visible: false, search: :string

    actions_col(actions: []) do |er|
      if er.draft?
        dropdown_link_to('Continue', effective_events.event_event_registration_build_path(er.event, er, er.next_step), 'data-turbolinks' => false)
        dropdown_link_to('Delete', effective_events.event_event_registration_path(er.event, er), 'data-confirm': "Really delete #{er}?", 'data-method': :delete)
      else
        dropdown_link_to('Show', effective_events.event_event_registration_path(er.event, er))
      end
    end
  end

  collection do
    EffectiveEvents.EventRegistration.deep.where(owner: current_user)
  end

end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
effective_events-0.5.6 app/datatables/effective_event_registrations_datatable.rb
effective_events-0.5.5 app/datatables/effective_event_registrations_datatable.rb
effective_events-0.5.4 app/datatables/effective_event_registrations_datatable.rb
effective_events-0.5.3 app/datatables/effective_event_registrations_datatable.rb
effective_events-0.5.2 app/datatables/effective_event_registrations_datatable.rb
effective_events-0.5.1 app/datatables/effective_event_registrations_datatable.rb
effective_events-0.5.0 app/datatables/effective_event_registrations_datatable.rb
effective_events-0.4.2 app/datatables/effective_event_registrations_datatable.rb
effective_events-0.4.1 app/datatables/effective_event_registrations_datatable.rb
effective_events-0.4.0 app/datatables/effective_event_registrations_datatable.rb
effective_events-0.3.1 app/datatables/effective_event_registrations_datatable.rb
effective_events-0.3.0 app/datatables/effective_event_registrations_datatable.rb
effective_events-0.2.8 app/datatables/effective_event_registrations_datatable.rb
effective_events-0.2.7 app/datatables/effective_event_registrations_datatable.rb
effective_events-0.2.6 app/datatables/effective_event_registrations_datatable.rb
effective_events-0.2.5 app/datatables/effective_event_registrations_datatable.rb
effective_events-0.2.4 app/datatables/effective_event_registrations_datatable.rb
effective_events-0.2.3 app/datatables/effective_event_registrations_datatable.rb
effective_events-0.2.2 app/datatables/effective_event_registrations_datatable.rb
effective_events-0.2.1 app/datatables/effective_event_registrations_datatable.rb