Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
28 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.row | ||
.col-12 | ||
.card | ||
.card-header Usage | ||
.card-body | ||
= bar_chart Registration.where(id: discount_code.registrations.pluck(:id)).joins(:participant).group('participants.email').count |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
= content_for :admin_area_title do | ||
Discount Codes | ||
= link_to new_admin_discount_code_path, class: "ml-4 btn btn-sm btn-success" do | ||
%i.fa.fa-plus | ||
New | ||
.row | ||
.col | ||
.card | ||
.card-header | ||
Usage Summary | ||
= column_chart Registration.joins(:discount_code).group('discount_codes.code').count | ||
|
||
= render "table" | ||
.row.mt-3 | ||
.col-12 | ||
.float-right | ||
= link_to new_admin_discount_code_path, class: "btn btn-sm btn-success" do | ||
%i.fa.fa-plus | ||
Create New Discount Code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,10 @@ | ||
= render "admin/registrations/card", registration: @registration.decorate | ||
= content_for :admin_area_title do | ||
Discount Code ##{@discount_code.id} | ||
%nav{"aria-label" => "breadcrumb"} | ||
%ol.breadcrumb | ||
%li.breadcrumb-item | ||
%a{href: admin_discount_codes_path} Discount Codes | ||
%li.breadcrumb-item.active{"aria-current" => "page"} ##{@discount_code.id} | ||
.row | ||
.col-12 | ||
= render "card", discount_code: @discount_code |