clubmanager/templates/shift_reports.rs.html

47 lines
768 B
HTML
Raw Normal View History

2023-10-24 13:17:34 +00:00
@use super::base_html;
@use cm_lib::models::Shift;
@(shifts: Vec<Shift>)
@:base_html({
<div hx-boost="true">
<a href="/">
<button>Return to Main Page</button>
</a>
</div>
<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">
<button>View Shift</button>
</a>
</td>
</tr>
}
</tbody>
</table>
})