66 lines
1.6 KiB
HTML
66 lines
1.6 KiB
HTML
{% extends "layout.html" %}
|
|
{% block body %}
|
|
|
|
<h1>Time Entries</h1>
|
|
Filter:
|
|
<form action="{{ url_for('show_time') }}" method="post">
|
|
<input type="date" name="start_date" id="datePicker" class="datePicker">
|
|
<input type="date" name="end_date" id="datePicker" class="datePicker">
|
|
<button type="submit">Filter</button>
|
|
<br>
|
|
Start: {{ dates[0] }}<br>
|
|
End: {{ dates[1] }}
|
|
</form>
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
{% if messages %}
|
|
<ul class=flashes>
|
|
{% for category, message in messages %}
|
|
<li class="{{ category }}">{{ message }}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
{% endwith %}
|
|
{% if time_entries %}
|
|
<table class="table table-condensed table-bordered table-striped">
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>Name</th>
|
|
<th>Start Date</th>
|
|
<th>Start Time</th>
|
|
<th>End Date</th>
|
|
<th>End Time</th>
|
|
<th>Total</th>
|
|
</tr>
|
|
{% for time in time_entries %}
|
|
<tr>
|
|
<td>{{ time.employee_id }}</td>
|
|
<td>
|
|
{% for employee in employees %}
|
|
{% if employee.id == time.employee_id %}
|
|
{{employee.first_name}} {{employee.last_name}}
|
|
{% endif %}
|
|
{% endfor %}
|
|
</td>
|
|
<td>{{ time.date_start }}</td>
|
|
<td>{{ time.start }}</td>
|
|
<td>{{ time.date_end }}</td>
|
|
<td>{{ time.end }}</td>
|
|
<td>{{ time.total }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
<!--Total Time-->
|
|
<tr>
|
|
<td></td>
|
|
<td></td>
|
|
<td></td>
|
|
<td></td>
|
|
<td></td>
|
|
<th>Total</th>
|
|
<td>{{ total[0] }}:{{ total[1] }}:00</td>
|
|
</tr>
|
|
</table>
|
|
{% else %}
|
|
<b>There is no data in time entry land!</b>
|
|
{% endif %}
|
|
|
|
{% endblock %} |