commit 4ca9acc214ed47aeca65e743c8811aa76d3fd423
parent 4599dbf09e9c0af5da86e5e83db230590628455a
Author: Youth Employment Program Production <youthemployment22@gmail.com>
Date: Sat, 5 Aug 2023 13:27:31 -0600
datatype bugfixes, print media structure
Diffstat:
1 file changed, 27 insertions(+), 66 deletions(-)
diff --git a/app/templates/admin/total_timedata_report/widget.html b/app/templates/admin/total_timedata_report/widget.html
@@ -7,47 +7,6 @@
{% endif %}
{% endwith %}
<section class="employee-overlook">
- <h3>Employee Overlook</h3>
- <div class="employee-hours">
- <table>
- <tr>
- <th>Employee</th>
- <th>Total(hrs)</th>
- <th>Lunch(#)</th>
- <th>Per Diem(#)</th>
- <th>Billable(hrs)</th>
- </tr>
- {# {% for entry in hours %}
- <tr>
- <td><a href="{{url_for('hours',username=entry._id)}}">{{ entry['_id'] }}</a></td>
- <td><a href="{{url_for('hours',username=entry._id)}}">{{ (entry['totalTime']/(1000*60*60))|round(2) }}</a></td>
- <td><a href="{{url_for('hours',username=entry._id)}}">{{ entry['lunchCount'] }}</a></td>
- <td><a href="{{url_for('hours',username=entry._id)}}">{{ entry['perdiemCount'] }}</a></td>
- <td><a href="{{url_for('hours',username=entry._id)}}">{{ (entry['totalHoursWorked']/(1000*60*60))|round(2) }}</a></td>
- </tr>
- {% endfor %} #}
- </table>
- </div>
- <div class="employee-hours">
- <table>
- <tr>
- <th>Project</th>
- <th>Total(hrs)</th>
- <th>Lunch(#)</th>
- <th>Per Diem(#)</th>
- <th>Billable(hrs)</th>
- </tr>
- {% for project in tspp %}
- <tr>
- <td>{{project['_id']}}</td>
- <td>{{(project['laborHoursWorked']/(1000*60*60))|round(2)}}</td>
- <td>{{project['lunchCount']}}</td>
- <td>{{project['perdiemCount']}}</td>
- <td>{{(project['totalHoursWorked']/(1000*60*60))|round(2)}}</td>
- </tr>
- {% endfor %}
- </table>
- </div>
<!--{#<div class="employee-hours">
<table>
<tr>
@@ -87,16 +46,16 @@
{{elmnt}}</br></br>
{% endfor %}
</div>#}-->
- <div><h2>Reports by User</h2></br>
+ <div class="pagebreak"><h2>Reports by User</h2></div>
+ <!-- <div class="pagebreak"></div> -->
{% for user, times in by_user.items() %}
- <h3>{{ user }}</h3>
- <div class="user-summarp">
- {% for entry in hours %}
- {% if entry['_id'] == user %}
- Total Hours(hrs)<a href="{{url_for('hours',username=entry._id)}}">{{ (entry['totalHoursWorked']/(1000*60*60))|round(2) }}</a>
- {% endif %}
- {% endfor %}
- </div>
+ <div class="pagebreak">
+ <dl class="user-summary">
+ <dt><h3>{{ user }}</h3></dt>
+ <dd>Total Hours(hrs):<a href="{{url_for('hours',username=user)}}">{{ (times['totalHoursWorked']/(1000*60*60))|round(2) }}</a></dd>
+ <dd>Total Lunches:<a href="{{url_for('hours',username=user)}}">{{ times['lunchCount'] }}</a></dd>
+ <dd>Total Per Diem:<a href="{{url_for('hours',username=user)}}">{{ times['perdiemCount'] }}</a></dd>
+ </dl>
<table>
<tr>
<th>Date</th>
@@ -107,7 +66,7 @@
<th>Per Diem</th>
<th>Time(hrs)</th>
</tr>
- {% for time in times %}
+ {% for time in times['times'] %}
<tr>
<td>{{time['date'].date().isoformat()}}</td>
<td>{{time['project_data'][0]['project_name']}}</td>
@@ -118,14 +77,21 @@
<td><a href="{{url_for('hours',username=time['modified_by'][0])}}">{{ (time['totalHoursWorked']/(1000*60*60))|round(2) }}</a></td>
</tr>
{% endfor %}
- </table>
- <!--<div class="pagebreak"></div>-->
+ </table></div>
{% endfor %}
- </div>
- <!--<div class="pagebreak"></div>-->
- <div><h2>Reports by Project</h2></br>
+
+ <!-- </section>
+ <section class="project-overlook"> -->
+ <div class="pagebreak"><h2>Reports by Project</h2></div>
+ <!-- <div class="pagebreak"></div> -->
{% for project, times in by_project.items() %}
- <h3>{{ project }}</h3>
+ <div class="pagebreak">
+ <dl class="user-summary">
+ <dt><h3>{{ project }}</h3></dt>
+ <dd>Total Hours(hrs):<a href="{{url_for('hours',username='brennentmazur')}}">{{ (times['totalHoursWorked']/(1000*60*60))|round(2) }}</a></dd>
+ <dd>Total Lunches:<a href="{{url_for('hours',username='brennentmazur')}}">{{ times['lunchCount'] }}</a></dd>
+ <dd>Total Per Diem:<a href="{{url_for('hours',username='brennentmazur')}}">{{ times['perdiemCount'] }}</a></dd>
+ </dl>
<table>
<tr>
<th>Date</th>
@@ -134,8 +100,9 @@
<th>Clocked Out</th>
<th>Lunch</th>
<th>Per Diem</th>
+ <th>Time(hrs)</th>
</tr>
- {% for time in times %}
+ {% for time in times['times'] %}
<tr>
<td>{{time['date'].date().isoformat()}}</td>
<td>{{time['modified_by'][0]}}</td>
@@ -143,17 +110,11 @@
<td>{{time['clock_out'][-1].time().isoformat(timespec="minutes")}}</td>
<td>{{time['lunchCount']}}</td>
<td>{{time['perdiemCount']}}</td>
+ <td><a href="{{url_for('hours',username=time['modified_by'][0])}}">{{ (time['totalHoursWorked']/(1000*60*60))|round(2) }}</a></td>
</tr>
{% endfor %}
- </table>
- <!--<div class="pagebreak"></div>-->
+ </table></div>
{% endfor %}
- {#{% for elmnt in by_project %}
- {{elmnt}}</br>
- {% endfor %}#}
- </div>
- </section>
- <section id="data-by-project">
</section>
</section>