Sha256: 884581fe189cf68a6305d7b1cdde506b4e78dbbed90ea99bc8465c169e4ea553

Contents?: true

Size: 1.09 KB

Versions: 6

Compression:

Stored size: 1.09 KB

Contents

module Admin
  class EffectiveStampsDatatable < Effective::Datatable
    filters do
      scope :ready_to_issue
      scope :issued
      scope :all
    end

    datatable do
      order :updated_at

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

      col :created_at, as: :date
      col :owner, search: :string

      col :applicant, visible: false
      col :stamp_wizard, visible: false

      col(:email) { |stamp| stamp.owner.email }
      col(:phone) { |stamp| stamp.owner.phone }

      col :member_number, label: 'Member #' do |stamp|
        stamp.owner.try(:membership).try(:number)
      end

      col :name
      col :name_confirmation, visible: false

      col :category, visible: false

      col :shipping_address, label: 'Address'

      col :purchased_order, visible: false
      col :price, visible: false
      col :tax_exempt, visible: false
      col :qb_item_name, visible: false

      col :status, visible: false

      col :issued_at

      actions_col
    end

    collection do
      Effective::Stamp.deep.all
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
effective_products-0.1.2 app/datatables/admin/effective_stamps_datatable.rb
effective_products-0.1.1 app/datatables/admin/effective_stamps_datatable.rb
effective_products-0.1.0 app/datatables/admin/effective_stamps_datatable.rb
effective_products-0.0.9 app/datatables/admin/effective_stamps_datatable.rb
effective_products-0.0.8 app/datatables/admin/effective_stamps_datatable.rb
effective_products-0.0.7 app/datatables/admin/effective_stamps_datatable.rb