447 lines
20 KiB
HTML
447 lines
20 KiB
HTML
{% load counter_tag %}
|
|
|
|
<div class="btn-group" role="group" aria-label="" style="min-width: 100% !important;">
|
|
<a type="button" class="btn btn-primary mr-1" href="{% url 'tm-management' prev_month prev_year %}" ><i class="fas fa-arrow-circle-left"></i></a>
|
|
<button type="button" class="btn btn-primary mr-1" style="min-width: 150px !important;" onclick="javascript:fastChangeModal()">{{active_month}} {{active_year}}</button>
|
|
<a type="button" class="btn btn-primary mr-1" href="{% url 'tm-management' next_month next_year %}"><i class="fas fa-arrow-circle-right"></i></a>
|
|
<span style="width: 100%; margin-top: -10px; float: right">
|
|
{% loadmonthwork next_month user as monthwork %}
|
|
{% loadaccounttime user as actualaccounttime %}
|
|
|
|
<table style="float: right; " cellSpacing='-20' cellPadding='-20'>
|
|
<tr style="text-align: center; ">
|
|
<td style="font-size: 16pt; width: 120px; ">{{monthwork}}</td>
|
|
<td style="font-size: 16pt;">
|
|
{% if actualaccounttime.1 == 0 %}
|
|
<span style="color: green">+{{actualaccounttime.0}}</span>
|
|
{% else %}
|
|
<span style="color: red">-{{actualaccounttime.0}}</span>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
<tr style="text-align: center; font-size: 10pt;">
|
|
<td>Arbeitszeit</td>
|
|
<td>Gleitzeit</td>
|
|
</tr>
|
|
</table>
|
|
</span>
|
|
</div>
|
|
<hr>
|
|
<div class="table-responsive ">
|
|
<table class="table table-hover" id="table_timemanagement" >
|
|
<thead>
|
|
<tr>
|
|
<th scope="col"></th>
|
|
<th scope="col"></th>
|
|
<th scope="col"><i class="fas fa-stopwatch"></i> Start</th>
|
|
<th scope="col"><i class="fas fa-stopwatch"></i> Ende</th>
|
|
<th scope="col"><i class="fas fa-clock"></i> Arbeitszeit</th>
|
|
<th scope="col"><i class="fas fa-coffee"></i> Pausen</th>
|
|
<th scope="col"><i class="fas fa-clock"></i> Gesamtzeit</th>
|
|
<th scope="col"><i class="fas fa-user-clock"></i> Gleitzeit</th>
|
|
<!--<th scope="col">Gleitzeitstand</th>-->
|
|
<th scope="col"> </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="table_contacts" >
|
|
{% for da in days_this_month %}
|
|
|
|
{% isfreedayname request.user da as isfreename %}
|
|
|
|
{% getabscenceday request.user request.user da as abday %}
|
|
<tr id="da_{{da|date:"d-m-y"}}"
|
|
{% if da.weekday == 5 or da.weekday == 6 %}
|
|
style="background-color: #d3d3d3;"
|
|
{% elif abday != False %}
|
|
style="background-color: {{abday.reason.color}}; color: #ffffff"
|
|
{% elif isfreename != False %}
|
|
style="background-color: #d3d3d3;"
|
|
{% else %}
|
|
{% for workday in workdays %}
|
|
{% if workday.start|date:"d-m-y" == da|date:"d-m-y" %}
|
|
{% if workday.lastManualChangeUser != None %}
|
|
style="background-color: #fdcc98;"
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %}>
|
|
<!-- Datum Wochentag -->
|
|
<td>
|
|
{{da|date:"l"}}
|
|
</td>
|
|
<!-- Komplettes Datum -->
|
|
<td>
|
|
{{da|date:"d.m.y"}}
|
|
</td>
|
|
<!-- START -->
|
|
<td {% if abday != False or isfreename != False %} colspan="3" {% endif %}>
|
|
{% if abday != False or isfreename != False %}
|
|
{% if isfreename != False %}
|
|
{{isfreename}}
|
|
{% for workday in workdays %}
|
|
{% if workday.start|date:"d-m-y" == da|date:"d-m-y" %}
|
|
<br />
|
|
{{workday.start|date:"H:i"}} - {{workday.end|date:"H:i"}},
|
|
{% getsumworkdayexcludebreak workday as sumworkday %}
|
|
{{ sumworkday }},
|
|
{% getsumbreak workday as sumbreakofday %}
|
|
{{sumbreakofday}} min. ({{workday.breaks.all|length}}),
|
|
{% getsumworkday workday as sumwd %}
|
|
{{sumwd}},
|
|
{% gettimeoveralldiff workday user as erg%}
|
|
{% if erg.1 == 0 %}
|
|
<span style="color: green">+{{erg.0}}</span>
|
|
{% elif erg.1 == 1 %}
|
|
<span>{{erg.0}}</span>
|
|
{% else %}
|
|
<span style="color: red">-{{erg.0}}</span>
|
|
{% endif %}
|
|
|
|
{% if breakmonthline < da %}
|
|
<button class="btn btn-secondary btn-sm ml-2" onclick="window.location.href='{% url 'tm-update' workday.pk %}'"><small><i class="fas fa-pen"></i></small></button>
|
|
<button class="btn btn-secondary btn-sm " onclick="javascript:$('#confirm-delete_{{workday.pk}}').modal('toggle')"><small><i class="fas fa-trash"></i></small></button>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
|
|
{% else %}
|
|
{{abday.reason}}
|
|
{% endif %}
|
|
{% if abday.start == da%}
|
|
{% if abday.startday_info == "1" %}
|
|
(nur Vormittags)
|
|
{% for workday in workdays %}
|
|
{% if workday.start|date:"d-m-y" == da|date:"d-m-y" %}
|
|
<br />
|
|
{{workday.start|date:"H:i"}} - {{workday.end|date:"H:i"}},
|
|
{% getsumworkdayexcludebreak workday as sumworkday %}
|
|
{{ sumworkday }},
|
|
{% getsumbreak workday as sumbreakofday %}
|
|
{{sumbreakofday}} min. ({{workday.breaks.all|length}}),
|
|
{% getsumworkday workday as sumwd %}
|
|
{{sumwd}},
|
|
{% gettimeoveralldiff workday user as erg%}
|
|
{% if erg.1 == 0 %}
|
|
<span style="color: green">+{{erg.0}}</span>
|
|
{% elif erg.1 == 1 %}
|
|
<span>{{erg.0}}</span>
|
|
{% else %}
|
|
<span style="color: red">-{{erg.0}}</span>
|
|
{% endif %}
|
|
|
|
{% if breakmonthline < da %}
|
|
<button class="btn btn-secondary btn-sm ml-2" onclick="window.location.href='{% url 'tm-update' workday.pk %}'"><small><i class="fas fa-pen"></i></small></button>
|
|
<button class="btn btn-secondary btn-sm " onclick="javascript:$('#confirm-delete_{{workday.pk}}').modal('toggle')"><small><i class="fas fa-trash"></i></small></button>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
|
|
|
|
{% elif abday.startday_info == "2" %}
|
|
(nur Nachmittags)
|
|
|
|
{% for workday in workdays %}
|
|
{% if workday.start|date:"d-m-y" == da|date:"d-m-y" %}
|
|
<br />
|
|
{{workday.start|date:"H:i"}} - {{workday.end|date:"H:i"}}
|
|
{% getsumworkdayexcludebreak workday as sumworkday %}
|
|
{{ sumworkday }},
|
|
{% getsumbreak workday as sumbreakofday %}
|
|
{{sumbreakofday}} min. ({{workday.breaks.all|length}}),
|
|
{% getsumworkday workday as sumwd %}
|
|
{{sumwd}},
|
|
{% gettimeoveralldiff workday user as erg%}
|
|
{% if erg.1 == 0 %}
|
|
<span style="color: green">+{{erg.0}}</span>
|
|
{% elif erg.1 == 1 %}
|
|
<span>{{erg.0}}</span>
|
|
{% else %}
|
|
<span style="color: red">-{{erg.0}}</span>
|
|
{% endif %}
|
|
|
|
{% if breakmonthline < da %}
|
|
<button class="btn btn-secondary btn-sm ml-2" onclick="window.location.href='{% url 'tm-update' workday.pk %}'"><small><i class="fas fa-pen"></i></small></button>
|
|
<button class="btn btn-secondary btn-sm " onclick="javascript:$('#confirm-delete_{{workday.pk}}').modal('toggle')"><small><i class="fas fa-trash"></i></small></button>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
{% elif abday.end == da%}
|
|
{% if abday.endday_info == "1" %}
|
|
(nur Vormittags)
|
|
|
|
|
|
|
|
{% for workday in workdays %}
|
|
{% if workday.start|date:"d-m-y" == da|date:"d-m-y" %}
|
|
<br />
|
|
{{workday.start|date:"H:i"}} - {{workday.end|date:"H:i"}}
|
|
{% getsumworkdayexcludebreak workday as sumworkday %}
|
|
{{ sumworkday }},
|
|
{% getsumbreak workday as sumbreakofday %}
|
|
{{sumbreakofday}} min. ({{workday.breaks.all|length}}),
|
|
{% getsumworkday workday as sumwd %}
|
|
{{sumwd}},
|
|
{% gettimeoveralldiff workday user as erg%}
|
|
{% if erg.1 == 0 %}
|
|
<span style="color: green">+{{erg.0}}</span>
|
|
{% elif erg.1 == 1 %}
|
|
<span>{{erg.0}}</span>
|
|
{% else %}
|
|
<span style="color: red">-{{erg.0}}</span>
|
|
{% endif %}
|
|
|
|
{% if breakmonthline < da %}
|
|
<button class="btn btn-secondary btn-sm ml-2" onclick="window.location.href='{% url 'tm-update' workday.pk %}'"><small><i class="fas fa-pen"></i></small></button>
|
|
<button class="btn btn-secondary btn-sm " onclick="javascript:$('#confirm-delete_{{workday.pk}}').modal('toggle')"><small><i class="fas fa-trash"></i></small></button>
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
{% elif abday.endday_info == "2" %}
|
|
(nur Nachmittags)
|
|
|
|
|
|
|
|
{% for workday in workdays %}
|
|
{% if workday.start|date:"d-m-y" == da|date:"d-m-y" %}
|
|
<br />
|
|
{{workday.start|date:"H:i"}} - {{workday.end|date:"H:i"}}
|
|
{% getsumworkdayexcludebreak workday as sumworkday %}
|
|
{{ sumworkday }},
|
|
{% getsumbreak workday as sumbreakofday %}
|
|
{{sumbreakofday}} min. ({{workday.breaks.all|length}}),
|
|
{% getsumworkday workday as sumwd %}
|
|
{{sumwd}},
|
|
{% gettimeoveralldiff workday user as erg%}
|
|
{% if erg.1 == 0 %}
|
|
<span style="color: green">+{{erg.0}}</span>
|
|
{% elif erg.1 == 1 %}
|
|
<span>{{erg.0}}</span>
|
|
{% else %}
|
|
<span style="color: red">-{{erg.0}}</span>
|
|
{% endif %}
|
|
|
|
{% if breakmonthline < da %}
|
|
<button class="btn btn-secondary btn-sm ml-2" onclick="window.location.href='{% url 'tm-update' workday.pk %}'"><small><i class="fas fa-pen"></i></small></button>
|
|
<button class="btn btn-secondary btn-sm " onclick="javascript:$('#confirm-delete_{{workday.pk}}').modal('toggle')"><small><i class="fas fa-trash"></i></small></button>
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{% else %}
|
|
|
|
{% if abday == False %}
|
|
{% counterWDreset %}
|
|
{% for workday in workdays %}
|
|
{% if workday.start|date:"d-m-y" == da|date:"d-m-y" %}
|
|
|
|
{% getCounterWD as wd_counter %}
|
|
|
|
{% if wd_counter > 0 %}
|
|
<br />
|
|
{% endif %}
|
|
|
|
|
|
{% counterWDUp %}
|
|
|
|
{% if workday.start == workday.end %}
|
|
Nichts gebucht
|
|
{% else %}
|
|
{{workday.start|date:"H:i"}}
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endif %}
|
|
</td>
|
|
{% if abday == False and isfreename == False %}
|
|
<!-- ENDE -->
|
|
<td>
|
|
{% counterWDreset %}
|
|
{% for workday in workdays %}
|
|
{% if workday.end|date:"d-m-y" == da|date:"d-m-y" %}
|
|
|
|
{% getCounterWD as wd_counter %}
|
|
|
|
{% if wd_counter > 0 %}
|
|
<br />
|
|
{% endif %}
|
|
|
|
|
|
{% counterWDUp %}
|
|
{% if workday.start != workday.end %}
|
|
{{workday.end|date:"H:i"}}
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
{% endfor %}
|
|
</td>
|
|
<!-- ARBEITSZEIT -->
|
|
<td>
|
|
{% counterWDreset %}
|
|
{% for workday in workdays %}
|
|
{% if workday.start|date:"d-m-y" == da|date:"d-m-y" %}
|
|
|
|
{% getCounterWD as wd_counter %}
|
|
|
|
{% if wd_counter > 0 %}
|
|
<br />
|
|
{% endif %}
|
|
{% counterWDUp %}
|
|
{% if workday.start != workday.end %}
|
|
{% getsumworkday workday as sumwd %}
|
|
{% endif %}
|
|
{{sumwd}}
|
|
{% endif %}
|
|
{% endfor %}
|
|
</td>
|
|
<!-- PAUSEN -->
|
|
<td>
|
|
{% counterWDreset %}
|
|
{% for workday in workdays %}
|
|
{% if workday.start|date:"d-m-y" == da|date:"d-m-y" %}
|
|
|
|
{% getCounterWD as wd_counter %}
|
|
|
|
{% if wd_counter > 0 %}
|
|
<br />
|
|
{% endif %}
|
|
|
|
{% counterWDUp %}
|
|
|
|
{% getsumbreak workday as sumbreakofday %}
|
|
{% if workday.start != workday.end %}
|
|
{% if workday.breaks.all|length > 0 %}
|
|
{{sumbreakofday}} min. ({{workday.breaks.all|length}})
|
|
{% else %}
|
|
Keine Pausen
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
</td>
|
|
<!-- GESAMT -->
|
|
<td>
|
|
{% counterWDreset %}
|
|
{% for workday in workdays %}
|
|
{% if workday.start|date:"d-m-y" == da|date:"d-m-y" %}
|
|
|
|
{% getCounterWD as wd_counter %}
|
|
|
|
{% if wd_counter > 0 %}
|
|
<br />
|
|
{% endif %}
|
|
|
|
|
|
{% counterWDUp %}
|
|
|
|
{% getsumworkdayexcludebreak workday as sumworkday %}
|
|
{% if workday.start != workday.end %}
|
|
{{ sumworkday }}
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
{% endfor %}
|
|
</td>
|
|
<!-- Gleitzeit -->
|
|
<td>
|
|
{% counterWDreset %}
|
|
{% for workday in workdays %}
|
|
{% if workday.start|date:"d-m-y" == da|date:"d-m-y" %}
|
|
|
|
{% getCounterWD as wd_counter %}
|
|
|
|
{% if wd_counter > 0 %}
|
|
<br />
|
|
{% endif %}
|
|
{% counterWDUp %}
|
|
{% gettimeoveralldiff workday user as erg%}
|
|
{% if erg.1 == 0 %}
|
|
<span style="color: green">+{{erg.0}}</span>
|
|
{% elif erg.1 == 1 %}
|
|
<span>{{erg.0}}</span>
|
|
{% else %}
|
|
<span style="color: red">-{{erg.0}}</span>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
</td>
|
|
<!-- <td style="text-align: center;">
|
|
</td>-->
|
|
<!-- BUTTONS -->
|
|
<td style="text-align: right;">
|
|
{% counterWDreset %}
|
|
{% for workday in workdays %}
|
|
{% if workday.start|date:"d-m-y" == da|date:"d-m-y" %}
|
|
{% getCounterWD as wd_counter %}
|
|
{% if wd_counter > 0 %}
|
|
<br />
|
|
{% endif %}
|
|
{% counterWDUp %}
|
|
{% getWorkDayHistory workday as wd_history %}
|
|
{% if wd_history.history_user != None %}
|
|
<a href="#/" onclick="javascript:$('#wd_history_{{workday.pk}}').modal('toggle');"><i class="fas fa-user-edit"></i></a>
|
|
<div class="modal fade" id="wd_history_{{workday.pk}}" tabindex="-1" role="dialog" data-backdrop="static">
|
|
<div class="modal-dialog" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title">Manuelle Änderung vom {{workday.start|date:"d.m.Y"}}</h5>
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body" style="text-align: left;">
|
|
<p>Geändert am {{wd_history.history_date|date:"d.m.Y, H:i"}} von {{wd_history.history_user.first_name}} {{wd_history.history_user.last_name}}</p>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-primary" data-dismiss="modal">Schließen</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% if workday.freefield != "" %}
|
|
<a href="#/" onclick="javascript:$('#wd_freefield_{{workday.pk}}').modal('toggle');"><i class="fas fa-eye"></i></a>
|
|
<div class="modal fade" id="wd_freefield_{{workday.pk}}" tabindex="-1" role="dialog" data-backdrop="static">
|
|
<div class="modal-dialog" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title">Notiz zum Arbeitstag {{workday.start|date:"d.m.Y"}}</h5>
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body" style="text-align: left;">
|
|
<p>{{workday.freefield}}</p>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-primary" data-dismiss="modal">Schließen</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% if breakmonthline < da %}
|
|
<button class="btn btn-secondary btn-sm ml-2" onclick="window.location.href='{% url 'tm-update' workday.pk %}'"><small><i class="fas fa-pen"></i></small></button>
|
|
<button class="btn btn-secondary btn-sm " onclick="javascript:$('#confirm-delete_{{workday.pk}}').modal('toggle')"><small><i class="fas fa-trash"></i></small></button>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
</td>
|
|
{% else %}
|
|
<td></td><td></td><td></td><td></td><td style="display: none;"></td><td style="display: none;"></td>
|
|
{% endif %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div> |