stc

a simple time card webapp
git clone _git@git.brennen.work:stc.git
Log | Files | Refs | README

widget.html (2218B)


      1 <section class="agreements">
      2 	<section class="employee-overlook">
      3 		<h3>Employee Overlook</h3>
      4 		{% for user in by_user %}
      5 			{{ user }}
      6 		{% endfor %}
      7 		<div class="usercard">
      8 			<h4>{{ user.fname }} {{ user.mname }}. {{ user.lname }}</h3>
      9 			<table>
     10 				<tr><td>Username</td><td>{{ user.username }}</td></tr>
     11 				<tr><td>Birthday</td><td>{{ user.birthday }}</td></tr>
     12 				<tr><td>Role</td><td>{{ user.role }}</td></tr>
     13 				<tr><td>Branch</td><td>{{ user.branch }}</td></tr>
     14 				<tr><td>Phone Number</td><td>{{ user.phonenumber }}</td></tr>
     15 				<tr><td>Address</td><td>{{ user.address }}</td></tr>
     16 				<tr><td>Email</td><td>{{ user.email }}</td></tr>
     17 				<tr><td>Pay Value</td><td>{{ user.pay_value }}</td></tr>
     18 				<tr><td>Pay Period</td><td>{{ user.pay_period }}</td></tr>
     19 				<tr><td>Active</td><td>{% if user.is_active %} Employee is active {% else %} Employee is inactive {% endif %}</td></tr>
     20 			</table>
     21 		</div>
     22 		{% for project in thw %}
     23 		{{project['totalHoursWorked']/(1000*60*60)}} Total Hours worked this payperiod
     24 		{% endfor %}
     25 		<div class="employee-hours">
     26 			<table>
     27 				<tr>
     28 					<th>Date</th>
     29 					<th>Project</th>
     30 					<th>Total Time</th>
     31 					<th>Clocked In</th>
     32 					<th>Clocked Out</th>
     33 					<th>Lunch</th>
     34 					<th>Per Diem</th>
     35 				</tr>
     36 			{% for entry in hours %}
     37 			<tr>
     38 				<td>{{ entry['date'].date().isoformat() }}</td>
     39 				{% if entry['project_data'] %}<td>{{ entry['project_data']['project_name'] }}</td>{% else %}<td>{{entry['project']}}</td>{% endif %}
     40 				{% if entry['clock_out'] %}<td>{{entry['clock_out'][-1]-entry['clock_in'][-1]}}</td>{% else %}<td>Clocked In</td>{% endif %}
     41 				<td>{{ entry['clock_in'][-1].time().isoformat(timespec='minutes')}}</td>
     42 				{% if entry['clock_out'] %}<td>{{entry['clock_out'][-1].time().isoformat(timespec='minutes')}}</td>{% else %}<td>Clocked In</td>{% endif %}
     43 				{% if entry['lunch'] %}<td>{{entry['lunch']}}</td>{% else %}<td>&nbsp;</td>{% endif %}
     44 				{% if entry['perdiem'] %}<td>{{entry['perdiem']}}</td>{% else %}<td>&nbsp;</td>{% endif %}
     45 			</tr>
     46 			{% endfor %}
     47 			</table>
     48 		</div>
     49 		{% for project in tspp %}
     50 		{{project['totalHoursWorked']/(1000*60*60)}} Hours on {{project['_id']}}</br>
     51 		{% endfor %}
     52 	</section>
     53 </section>