43 lines
759 B
HTML
43 lines
759 B
HTML
@use super::base_html;
|
|
@use super::components::return_to_main_html;
|
|
@use cm_lib::models::Shift;
|
|
|
|
@(shifts: Vec<Shift>)
|
|
|
|
@:base_html({
|
|
|
|
@:return_to_main_html()
|
|
|
|
<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 type="button">View Shift</button>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
|
|
}
|
|
</tbody>
|
|
</table>
|
|
|
|
})
|