mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-04 22:16:08 +00:00
34 lines
902 B
Plaintext
34 lines
902 B
Plaintext
.text-right
|
|
%a.button{ href: "#{new_admin_enterprise_voucher_path(@enterprise)}"}
|
|
= t('.add_new')
|
|
%br
|
|
|
|
- if @enterprise.vouchers.where.not(type: "Vouchers::Vine").with_deleted.present?
|
|
%table
|
|
%thead
|
|
%tr
|
|
%th= t('.voucher_code')
|
|
%th= t('.rate')
|
|
%th= t('.active')
|
|
/%th= t('.label')
|
|
/%th= t('.purpose')
|
|
/%th= t('.expiry')
|
|
/%th= t('.use_limit')
|
|
/%th= t('.customers')
|
|
/%th= t('.net_value')
|
|
%tbody
|
|
- @enterprise.vouchers.where.not(type: "Vouchers::Vine").with_deleted.order(deleted_at: :desc, code: :asc).each do |voucher|
|
|
%tr
|
|
%td= voucher.code
|
|
%td= voucher.display_value
|
|
%td= f.check_box :voucher_ids, { :multiple => true }, voucher.id, nil
|
|
/%td
|
|
/%td
|
|
/%td
|
|
/%td
|
|
/%td
|
|
- else
|
|
%p.text-center
|
|
= t('.no_voucher_yet')
|
|
|