Sha256: d51f4f340c52c7a7b8825e3c87ba81db82695b475f4483ed0cdd5710ad9f4be3

Contents?: true

Size: 909 Bytes

Versions: 28

Compression:

Stored size: 909 Bytes

Contents

# Displays cpd audits for this auditee user

class EffectiveCpdAvailableAuditsDatatable < Effective::Datatable
  datatable do
    order :due_date

    col :token, visible: false

    col :cpd_audit_level, label: cpd_audit_level_label
    col :due_date
    col :status
    col :determination

    actions_col(actions: []) do |cpd_audit|
      if cpd_audit.opened?
        dropdown_link_to('Start', effective_cpd.cpd_audit_build_path(cpd_audit, cpd_audit.next_step))
      elsif cpd_audit.was_submitted?
        dropdown_link_to('Show', effective_cpd.cpd_audit_build_path(cpd_audit, cpd_audit.last_completed_step))
      else
        dropdown_link_to('Continue', effective_cpd.cpd_audit_build_path(cpd_audit, cpd_audit.next_step))
      end
    end
  end

  collection do
    raise('expected a current_user') unless current_user.present?
    EffectiveCpd.CpdAudit.available.where(user: current_user)
  end

end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
effective_cpd-1.7.2 app/datatables/effective_cpd_available_audits_datatable.rb
effective_cpd-1.7.1 app/datatables/effective_cpd_available_audits_datatable.rb
effective_cpd-1.7.0 app/datatables/effective_cpd_available_audits_datatable.rb
effective_cpd-1.6.5 app/datatables/effective_cpd_available_audits_datatable.rb
effective_cpd-1.6.4 app/datatables/effective_cpd_available_audits_datatable.rb
effective_cpd-1.6.3 app/datatables/effective_cpd_available_audits_datatable.rb
effective_cpd-1.6.2 app/datatables/effective_cpd_available_audits_datatable.rb
effective_cpd-1.6.1 app/datatables/effective_cpd_available_audits_datatable.rb
effective_cpd-1.6.0 app/datatables/effective_cpd_available_audits_datatable.rb
effective_cpd-1.5.1 app/datatables/effective_cpd_available_audits_datatable.rb
effective_cpd-1.5.0 app/datatables/effective_cpd_available_audits_datatable.rb
effective_cpd-1.4.8 app/datatables/effective_cpd_available_audits_datatable.rb
effective_cpd-1.4.7 app/datatables/effective_cpd_available_audits_datatable.rb
effective_cpd-1.4.6 app/datatables/effective_cpd_available_audits_datatable.rb
effective_cpd-1.4.5 app/datatables/effective_cpd_available_audits_datatable.rb
effective_cpd-1.4.4 app/datatables/effective_cpd_available_audits_datatable.rb
effective_cpd-1.4.3 app/datatables/effective_cpd_available_audits_datatable.rb
effective_cpd-1.4.2 app/datatables/effective_cpd_available_audits_datatable.rb
effective_cpd-1.4.1 app/datatables/effective_cpd_available_audits_datatable.rb
effective_cpd-1.4.0 app/datatables/effective_cpd_available_audits_datatable.rb