Sha256: e70e8217ec04f063c4209412a1873f479894580febbed6c2ab4468f99b7df228

Contents?: true

Size: 899 Bytes

Versions: 6

Compression:

Stored size: 899 Bytes

Contents

module Admin
  class EffectiveCpdAuditReviewsDatatable < Effective::Datatable
    filters do
      scope :all
      scope :completed
      scope :available, label: 'In Progress'
    end

    datatable do
      col :created_at, visible: false
      col :updated_at, visible: false
      col :id, visible: false

      col :cpd_audit
      col :cpd_audit_level, search: EffectiveCpd.CpdAuditLevel.all.sorted

      col :auditee do |cpd_audit_review|
        user = cpd_audit_review.cpd_audit.user
        url = "/admin/users/#{user.to_param}/edit"
        link_to(user, url)
      end

      col :user, label: 'Audit Reviewer'

      col :due_date
      col :submitted_at, as: :date, label: 'Submitted'
      col :conflict_of_interest
      col :recommendation
      col :comments

      actions_col(edit: false)
    end

    collection do
      EffectiveCpd.CpdAuditReview.all.deep
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
effective_cpd-1.2.1 app/datatables/admin/effective_cpd_audit_reviews_datatable.rb
effective_cpd-1.2.0 app/datatables/admin/effective_cpd_audit_reviews_datatable.rb
effective_cpd-1.1.3 app/datatables/admin/effective_cpd_audit_reviews_datatable.rb
effective_cpd-1.1.2 app/datatables/admin/effective_cpd_audit_reviews_datatable.rb
effective_cpd-1.1.1 app/datatables/admin/effective_cpd_audit_reviews_datatable.rb
effective_cpd-1.1.0 app/datatables/admin/effective_cpd_audit_reviews_datatable.rb