47 lines
769 B
HTML
47 lines
769 B
HTML
@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>
|
|
|
|
})
|