clubmanager/templates/shift_reports.rs.html

44 lines
759 B
HTML
Raw Normal View History

2023-10-24 13:17:34 +00:00
@use super::base_html;
2023-11-05 15:03:15 +00:00
@use super::components::return_to_main_html;
2023-10-24 13:17:34 +00:00
@use cm_lib::models::Shift;
@(shifts: Vec<Shift>)
@:base_html({
2023-11-05 15:03:15 +00:00
@:return_to_main_html()
2023-10-24 13:17:34 +00:00
<table>
<thead>
<tr>
<th>Shift ID</th>
<th>Shift Start</th>
<th>Shift End</th>
</tr>
</thead>
<tbody>
@for shift in shifts {
<tr>
<td>@shift.id</td>
<td>@shift.start.format("%Y-%m-%d %H:%M:%S")</td>
<td>
@if let Some(end) = shift.end {
@end.format("%Y-%m-%d %H:%M:%S")
} else {
Currently Open
}
</td>
<td hx-boost="true">
<a href="/shifts/@shift.id/report">
2023-11-05 15:03:15 +00:00
<button type="button">View Shift</button>
2023-10-24 13:17:34 +00:00
</a>
</td>
</tr>
}
</tbody>
</table>
})