Changed bus roll to be a pdf view. Small changes needed to be able to email to companies.

Dropdown selection in admin > buses > Email Bus Roll To Company
Will email bus roll only to the company the route is a member of. Will show all to the admin in a pdf file.

Recipients are currently hardcoded for testing purposes.
This commit is contained in:
John Mullins
2023-08-29 12:40:34 +10:00
parent 2f1ae0586b
commit 0c8de0285a
7 changed files with 119 additions and 74 deletions
@@ -6,35 +6,24 @@
width: 100%;
}
table.traveller th {
text-align: left;
border-bottom: 2px solid #000;
}
table.traveller td {
table-layout: fixed;
border-bottom: 2px solid #000;
border-right-style: dashed;
width: 100%;
min-width: 30px;
border: 2px solid #000;
}
hr {
border: 2px solid;
border: 3px solid;
}
</style>
{% for route in routes %}
<h1>{{ route.route_name }}</h1>
<h1 style="font-size: 2.5em">{{ route.bus.route_name }}</h1>
{% for stop in route.stops %}
<hr>
<hr style="border: 5px">
<table class="stopHeader">
<tr>
<th>Stop Number #{{ stop.stop_num }}</th>
<th>Pickup Time</th>
<th>Drop-off Time</th>
<th style="width: 100%">Stop Number #{{ stop.stop_num }}</th>
<th style="width: 20%">Pickup Time</th>
<th style="width: 25%">Drop-off Time</th>
</tr>
<tr>
<td>{{ stop.name }}</td>
@@ -44,23 +33,23 @@
</table>
<table class="traveller">
<tr>
<th>Student</th>
<th>Fare</th>
<th>Mon AM</th>
<th>Mon PM</th>
<th>Tue AM</th>
<th>Tue PM</th>
<th>Wed AM</th>
<th>Wed PM</th>
<th>Thu AM</th>
<th>Thu PM</th>
<th>Fri AM</th>
<th>Fri PM</th>
<th style="width: 100%; text-align: left">Student</th>
<th style="width: 10%">Fare</th>
<th style="width: 8%">Mon AM</th>
<th style="width: 8%">Mon PM</th>
<th style="width: 8%">Tue AM</th>
<th style="width: 8%">Tue PM</th>
<th style="width: 8%">Wed AM</th>
<th style="width: 8%">Wed PM</th>
<th style="width: 8%">Thu AM</th>
<th style="width: 8%">Thu PM</th>
<th style="width: 8%">Fri AM</th>
<th style="width: 8%">Fri PM</th>
</tr>
{% for traveller in stop.travellers %}
<tr>
<td>{{ traveller.display }}</td>
<td><b>{{ traveller.isFared }}</b></td>
<td style="padding-top: 3px; padding-left: 2px; text-align: left">{{ traveller.display }}</td>
<td style="padding-top: 3px; text-align: center"><b>{{ traveller.isFared }}</b></td>
<td> </td>
<td> </td>
<td> </td>