Initial add
This commit is contained in:
101
templates/index.html
Normal file
101
templates/index.html
Normal file
@@ -0,0 +1,101 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Time Clock</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<h1>Simple Time Clock</h1>
|
||||
|
||||
<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 }}">
|
||||
{{ user.name }}
|
||||
</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>
|
||||
Reference in New Issue
Block a user