Sha256: e9656138d92a6896f1b99dd6252dc43b42aaebf23ebb7b8f21e487b261fb0d9a
Contents?: true
Size: 1.06 KB
Versions: 20
Compression:
Stored size: 1.06 KB
Contents
module Admin class EffectiveCpdStatementsDatatable < Effective::Datatable filters do scope :all scope :draft, label: 'In Progress' scope :completed, label: 'Submitted' end datatable do order :updated_at col :id, visible: false col :token, visible: false col :created_at, visible: false col :updated_at, visible: false col :cpd_cycle, label: cpd_cycle_label.capitalize, search: Effective::CpdCycle.sorted col :user col :submitted_at, as: :date, label: 'Submitted on' col :score, label: cpd_credits_label.capitalize do |cpd_statement| cpd_score(cpd_statement.score) end if attributes[:user_id].present? col :required_score, label: 'Required' do |cpd_statement| cpd_score(cpd_statement.required_score || cpd_statement.targeted_score) end end col :carry_forward do |cpd_statement| cpd_score(cpd_statement.carry_forward) end actions_col end collection do EffectiveCpd.CpdStatement.all.deep end end end
Version data entries
20 entries across 20 versions & 1 rubygems