styling reports table

This commit is contained in:
Zynh0722 2023-11-05 08:38:15 -08:00
parent 79fd0f680e
commit cb6e9d1889

View file

@ -6,9 +6,16 @@
@:base_html({ @:base_html({
<div class="fixed right-0 top-0 pr-4 pt-4">
@:return_to_main_html() @:return_to_main_html()
</div>
<table> <h1 class="text-4xl underline text-center pt-4 pb-6">
Shift Reports
</h1>
<div class="flex">
<table class="m-auto table-auto w-4/5">
<thead> <thead>
<tr> <tr>
<th>Shift ID</th> <th>Shift ID</th>
@ -19,19 +26,19 @@
<tbody> <tbody>
@for shift in shifts { @for shift in shifts {
<tr> <tr class="odd:bg-neutral-200">
<td>@shift.id</td> <td class="text-center">@shift.id</td>
<td>@shift.start.format("%Y-%m-%d %H:%M:%S")</td> <td class="text-center">@shift.start.format("%Y-%m-%d %H:%M:%S")</td>
<td> <td class="text-center">
@if let Some(end) = shift.end { @if let Some(end) = shift.end {
@end.format("%Y-%m-%d %H:%M:%S") @end.format("%Y-%m-%d %H:%M:%S")
} else { } else {
Currently Open Currently Open
} }
</td> </td>
<td hx-boost="true"> <td hx-boost="true" class="flex justify-end">
<a href="/shifts/@shift.id/report"> <a href="/shifts/@shift.id/report">
<button type="button">View Shift</button> <button type="button" class=" text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5">View Shift</button>
</a> </a>
</td> </td>
</tr> </tr>
@ -39,5 +46,6 @@
} }
</tbody> </tbody>
</table> </table>
</div>
}) })