stc

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

index.html (2789B)


      1 {% extends 'base.html' %}
      2 
      3 {% block title %}{{ project['project_name'] }}{% endblock %}
      4 {% block content %}
      5 
      6 {% with messages = get_flashed_messages() %}
      7 {% if messages %}
      8 	{% for message in messages %}
      9 	<div id="messagebanner"><p>{{ message }}</p></div>
     10 	{% endfor %}
     11 {% endif %}
     12 {% endwith %}
     13 
     14 <section class="project-grid">
     15 	<dl>
     16 		<dt>{{ project['project_name'] }}<a href="{{url_for('rename_project', project_id=project['_id'])}}"style="color:var(--accent);"> change</a></dt>
     17 		<dd>ID: {{ project['_id'] }}</dd>
     18 		<dd>A_ID:{{ project['agreement']}}<a href="{{url_for('move_project',project_id=project['_id'])}}"style="color:var(--accent);"> change</a></dd>
     19 		<dd>Branch:{{ project['branch']}}<a href="{{url_for('change_branch',collection='project',document_id=project['_id'])}}"style="color:var(--accent);"> change</a></dd>
     20 		<dd>Budget:{{ project['budget']}}</dd>
     21 		<dd>Costs:{{ project['costs']}}</dd>
     22 		<dd><a href="{{url_for('remove_project',project_id=project['_id'])}}" style="color:var(--accent);">REMOVE</a></dd>
     23 	</dl>
     24 
     25 	<div class="current-pay-period">
     26 	<table>
     27 		<tr>
     28 			<th>Date</th>
     29 			<th>Employee</th>
     30 			<th>Time</th>
     31 			<th>In</th>
     32 			<th>Out</th>
     33 			<th>Lunch</th>
     34 			<th>Perdiem</th>
     35 			<th>Note</th>
     36 		</tr>
     37 	{% for entry in payperiod_times %}
     38 		<tr>
     39 			<td><a href="{{url_for('updateDate',mod_username=current_user.username,timeid=entry._id)}}">{{entry['date'].date().isoformat()}}</a></td>
     40 			<td>{{entry.modified_by.0}}</td>
     41 			{% if entry['clock_out'] %}<td>{{(entry['clock_out'][-1]-entry['clock_in'][-1])}}</td>{% else %}<td>Clocked In</td>{% endif %}
     42 			<td><a href="{{url_for('updateStartTime',mod_username=current_user.username,timeid=entry._id)}}">{{entry['clock_in'][-1].time().isoformat(timespec='minutes')}}</a></td>
     43 			{% if entry['clock_out'] %}<td><a href="{{url_for('updateEndTime',mod_username=current_user.username,timeid=entry._id)}}">{{entry['clock_out'][-1].time().isoformat(timespec='minutes')}}</a></td>{% else %}<td><a href="{{url_for('updateEndTime',mod_username=current_user.username,timeid=entry._id)}}">Clocked In</a></td>{% endif %}
     44 			{% if entry['lunch'] %}<td><a href="{{url_for('toggle_lunch',timeid=entry._id)}}">{{entry['lunch']}}</a></td>{% else %}<td><a href="{{url_for('toggle_lunch',timeid=entry._id)}}">&nbsp;</a></td>{% endif %}<!-- make this an image of checkbox so can link to toggle route... -->
     45 			{% if entry['perdiem'] %}<td><a href="{{url_for('toggle_per_diem',timeid=entry._id)}}">{{entry['perdiem']}}</a></td>{% else %}<td><a href="{{url_for('toggle_per_diem',timeid=entry._id)}}">&nbsp;</a></td>{% endif %}<!-- make this an image of checkbox so can link to toggle route... -->
     46 			<td>{{entry['note']}}</td>
     47 		</tr>
     48 	{% endfor %}
     49 	</table>
     50 	</div>
     51 
     52 	<div class="non-pay-period">
     53 	</div>
     54 </section>
     55 
     56 {% endblock %}