Skip to content

Commit

Permalink
Add attendance to committee sales page (#463)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdijk authored Jan 6, 2024
1 parent d81dd86 commit 9f69989
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
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

0 comments on commit 9f69989

Please sign in to comment.