2026-05-19 18:14:39 -04:00
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html>
|
|
|
|
|
<head>
|
|
|
|
|
<title>Time Clock</title>
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
|
|
<h1>Simple Time Clock</h1>
|
|
|
|
|
|
2026-05-20 17:09:45 -04:00
|
|
|
<h2>Currently Clocked In</h2>
|
|
|
|
|
|
|
|
|
|
{% if clocked_in_users %}
|
|
|
|
|
<ul>
|
|
|
|
|
{% for user in clocked_in_users %}
|
|
|
|
|
<li>{{ user.name }}</li>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</ul>
|
|
|
|
|
{% else %}
|
|
|
|
|
<p>No users are currently clocked in.</p>
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
|
<hr/>
|
|
|
|
|
<br/>
|
|
|
|
|
|
2026-05-19 18:14:39 -04:00
|
|
|
<form method="POST">
|
|
|
|
|
|
|
|
|
|
<table border="1" cellpadding="5">
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
<td>User</td>
|
|
|
|
|
<td>
|
|
|
|
|
<select name="user_id">
|
|
|
|
|
|
|
|
|
|
{% for user in users %}
|
|
|
|
|
<option value="{{ user.id }}">
|
2026-05-20 17:09:45 -04:00
|
|
|
{{ user.name }}
|
2026-05-19 18:14:39 -04:00
|
|
|
</option>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
<td>Clock Actions</td>
|
|
|
|
|
|
|
|
|
|
<td>
|
|
|
|
|
<button type="submit" name="action" value="clock_in">
|
|
|
|
|
Clock In
|
|
|
|
|
</button>
|
|
|
|
|
|
|
|
|
|
<button type="submit" name="action" value="clock_out">
|
|
|
|
|
Clock Out
|
|
|
|
|
</button>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
<td>Begin Date</td>
|
|
|
|
|
|
|
|
|
|
<td>
|
|
|
|
|
<input
|
|
|
|
|
type="datetime-local"
|
|
|
|
|
name="begin_date"
|
|
|
|
|
value=""
|
|
|
|
|
>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
<td>End Date</td>
|
|
|
|
|
|
|
|
|
|
<td>
|
|
|
|
|
<input
|
|
|
|
|
type="datetime-local"
|
|
|
|
|
name="end_date"
|
|
|
|
|
value=""
|
|
|
|
|
>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
<td>Report</td>
|
|
|
|
|
|
|
|
|
|
<td>
|
|
|
|
|
<button type="submit" name="action" value="report">
|
|
|
|
|
Generate Report
|
|
|
|
|
</button>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
<br>
|
|
|
|
|
|
|
|
|
|
{% if report_hours is not none %}
|
|
|
|
|
|
|
|
|
|
<table border="1" cellpadding="5">
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
<th>Total Hours Worked</th>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
<td>{{ report_hours }}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|