widget.html (4650B)
1 <section class="agreements"> 2 {% with messages = get_flashed_messages() %} 3 {% if messages %} 4 {% for message in messages %} 5 <div id='messagebanner'><p>{{ message }}</p></div> 6 {% endfor %} 7 {% endif %} 8 {% endwith %} 9 <section class="employee-overlook"> 10 <!--{#<div class="employee-hours"> 11 <table> 12 <tr> 13 <th>Employee</th> 14 <th>Total(hrs)</th> 15 <th>Lunch(#)</th> 16 <th>Per Diem(#)</th> 17 <th>Billable(hrs)</th> 18 </tr> 19 {% for entry in allhours %} 20 <tr> 21 <td><a href="{{url_for('hours',username=entry._id)}}">{{ entry['_id'] }}</a></td> 22 <td><a href="{{url_for('hours',username=entry._id)}}">{{ (entry['totalTime']/(1000*60*60))|round(2) }}</a></td> 23 <td><a href="{{url_for('hours',username=entry._id)}}">{{ entry['lunchCount'] }}</a></td> 24 <td><a href="{{url_for('hours',username=entry._id)}}">{{ entry['perdiemCount'] }}</a></td> 25 <td><a href="{{url_for('hours',username=entry._id)}}">{{ (entry['totalHoursWorked']/(1000*60*60))|round(2) }}</a></td> 26 </tr> 27 {% endfor %} 28 </table> 29 </div>#}--> 30 <!--{#<div>Test Div</br> 31 {% for elmnt in usors %} 32 {{elmnt}}</br> 33 {% endfor %} 34 35 </div>#}--> 36 <!--{#<div>Projours Div</br> 37 {% for elmnt in projours %} 38 {{elmnt}}</br> 39 {% endfor %} 40 </div>#}--> 41 <!--{#<div>Project Lookup Div</br> 42 {% for elmnt in projectlookup %} 43 {{elmnt['modified_by'][0]}} 44 {{elmnt['date']}} 45 {{elmnt['project_data'][0]['project_name']}} 46 {{elmnt}}</br></br> 47 {% endfor %} 48 </div>#}--> 49 <div class="pagebreak"><h2>Reports by User</h2></div> 50 <!-- <div class="pagebreak"></div> --> 51 {% for user in by_user %} 52 {{ user }} 53 {% endfor %} 54 55 {# 56 {% for user, times in by_user %} 57 <div class="pagebreak"> 58 <dl class="user-summary"> 59 <dt><h3>{{ user }}</h3></dt> 60 <dd>Total Hours(hrs):<a href="{{url_for('hours',username=user)}}">{{ (times['totalHoursWorked']/(1000*60*60))|round(2) }}</a></dd> 61 <dd>Total Lunches:<a href="{{url_for('hours',username=user)}}">{{ times['lunchCount'] }}</a></dd> 62 <dd>Total Per Diem:<a href="{{url_for('hours',username=user)}}">{{ times['perdiemCount'] }}</a></dd> 63 </dl> 64 <table> 65 <tr> 66 <th>Date</th> 67 <th>Project</th> 68 <th>Clocked In</th> 69 <th>Clocked Out</th> 70 <th>Lunch</th> 71 <th>Per Diem</th> 72 <th>Time(hrs)</th> 73 </tr> 74 {% for time in times['times'] %} 75 <tr> 76 <td>{{time['date'].date().isoformat()}}</td> 77 <td>{{time['project_data'][0]['project_name']}}</td> 78 <td>{{time['clock_in'][-1].time().isoformat(timespec="minutes")}}</td> 79 {% if time['clock_out'] is defined %} 80 <td>{{time['clock_out'][-1].time().isoformat(timespec="minutes")}}</td> 81 {% else %} 82 <td>Clocked In</td> 83 {% endif %} 84 <td>{{time['lunchCount']}}</td> 85 <td>{{time['perdiemCount']}}</td> 86 <td><a href="{{url_for('hours',username=time['modified_by'][0])}}">{{ (time['totalHoursWorked']/(1000*60*60))|round(2) }}</a></td> 87 </tr> 88 {% endfor %} 89 </table></div> 90 {% endfor %} 91 #} 92 93 <!-- </section> 94 <section class="project-overlook"> --> 95 <div class="pagebreak"><h2>Reports by Project</h2></div> 96 <!-- <div class="pagebreak"></div> --> 97 {% for project in by_project %} 98 {{ project }} 99 {% endfor %} 100 101 {# 102 {% for project, times in by_project.items() %} 103 <div class="pagebreak"> 104 <dl class="user-summary"> 105 <dt><h3>{{ project }}</h3></dt> 106 <dd>Total Hours(hrs):<a href="{{url_for('hours',username='brennentmazur')}}">{{ (times['totalHoursWorked']/(1000*60*60))|round(2) }}</a></dd> 107 <dd>Total Lunches:<a href="{{url_for('hours',username='brennentmazur')}}">{{ times['lunchCount'] }}</a></dd> 108 <dd>Total Per Diem:<a href="{{url_for('hours',username='brennentmazur')}}">{{ times['perdiemCount'] }}</a></dd> 109 </dl> 110 <table> 111 <tr> 112 <th>Date</th> 113 <th>Employee</th> 114 <th>Clocked In</th> 115 <th>Clocked Out</th> 116 <th>Lunch</th> 117 <th>Per Diem</th> 118 <th>Time(hrs)</th> 119 </tr> 120 {% for time in times['times'] %} 121 <tr> 122 <td>{{time['date'].date().isoformat()}}</td> 123 <td>{{time['modified_by'][0]}}</td> 124 <td>{{time['clock_in'][-1].time().isoformat(timespec="minutes")}}</td> 125 {% if time['clock_out'] is defined %} 126 <td>{{time['clock_out'][-1].time().isoformat(timespec="minutes")}}</td> 127 {% else %} 128 <td>Clocked In</td> 129 {% endif %} 130 <td>{{time['lunchCount']}}</td> 131 <td>{{time['perdiemCount']}}</td> 132 <td><a href="{{url_for('hours',username=time['modified_by'][0])}}">{{ (time['totalHoursWorked']/(1000*60*60))|round(2) }}</a></td> 133 </tr> 134 {% endfor %} 135 </table></div> 136 {% endfor %} 137 #} 138 139 </section> 140 </section>