Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add attendance to committee sales page #463

Merged
merged 1 commit into from
Jan 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ public String eventSalesView(Model model, @PathVariable String key) throws Event
model.addAttribute("ticketsSold", ticketsSold);
model.addAttribute("event", event);
model.addAttribute("key", event.getKey());
model.addAttribute("attendance", eventService.getAttendance(event));

return "sales/stats/event/index";
}
Expand Down
22 changes: 20 additions & 2 deletions src/main/resources/templates/sales/stats/event/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<main class="col-sm-9 ml-sm-auto col-md-10 p-5" role="main">
<h1 th:text="${event.getTitle()}"/>
<div class="row">
<div class="col">
<div class="col-md">
<div class="card mb-3">
<h6 class="card-header">Total number of tickets sold:</h6>
<div class="card-body text-primary">
Expand All @@ -60,7 +60,7 @@ <h4 class="card-title">
</div>
</div>
</div>
<div class="col">
<div class="col-sm">
<div class="card mb-3">
<h6 class="card-header">Amount of money earned:</h6>
<div class="card-body text-primary">
Expand All @@ -70,6 +70,24 @@ <h4 class="card-title">
</div>
</div>
</div>
<div class="col-md">
<div class="card mb-3">
<h6 class="card-header">Number of tickets scanned:</h6>
<div class="card-body text-primary">
<h4 class="card-title">
[[${attendance.getScannedCount()}]] <small>out of [[${attendance.getTicketsCount()}]]</small>
</h4>
<div class="progress mb-2">
<div class="progress-bar" role="progressbar"
th:aria-valuenow="${attendance.getPercentageScanned()}"
aria-valuemin="0" aria-valuemax="100"
th:style="'width: ' + ${attendance.getPercentageScanned()} + '%;'"
th:text="${attendance.getPercentageScanned()} + '%'">
</div>
</div>
</div>
</div>
</div>
<div class="table-responsive">
<table id="orderTable" class="table table-striped">
<thead class="thead-dark bg-primary">
Expand Down
Loading