139 lines
4.3 KiB
HTML
139 lines
4.3 KiB
HTML
{% extends "users/base.html" %}
|
|
{% block content %}
|
|
{% load counter_tag %}
|
|
{% if request.user.profile.agency.module_timemanagement_ze %}
|
|
<div class="content-section col-12">
|
|
<h3>Zeiterfassung <small><i data-toggle="tooltip" data-placement="top" title="Bearbeiten Sie hier Ihre Zeiterfassung." class="far fa-question-circle"></i></small></h3>
|
|
<hr>
|
|
|
|
<div class="table-responsive ">
|
|
<table class="table table-hover" id="table_timemanagement" >
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">#</th>
|
|
<th scope="col">Start</th>
|
|
<th scope="col">Ende</th>
|
|
<th scope="col">Arbeitszeit</th>
|
|
<th scope="col">Pausen</th>
|
|
<th scope="col">Gesamtzeit</th>
|
|
<th scope="col">Abwesenheit</th>
|
|
<th scope="col">Gleitzeit in h</th>
|
|
|
|
<th scope="col"> </th>
|
|
|
|
</tr>
|
|
</thead>
|
|
<tbody id="table_contacts" >
|
|
{% for workday in workdays %}
|
|
<tr id="wd_{{workday.pk}}">
|
|
<td>
|
|
{{forloop.counter}}
|
|
</td>
|
|
<td>
|
|
{{workday.start}}
|
|
</td>
|
|
<td>
|
|
{{workday.end}}
|
|
</td>
|
|
<td>
|
|
{{ workday.end|timeuntil:workday.start }}
|
|
</td>
|
|
<td>
|
|
{% getsumbreak workday as sumbreakofday %}
|
|
{{sumbreakofday}} min. ({{workday.breaks.all|length}})
|
|
|
|
</td>
|
|
<td>
|
|
{% getsumworkday workday as sumwd %}
|
|
{{sumwd}}
|
|
</td>
|
|
<td>
|
|
DROPDOWN
|
|
</td>
|
|
<td>
|
|
</td>
|
|
<td>
|
|
<button class="btn btn-secondary btn-sm ml-2" onclick="javascript:$('#confirm-delete_{{workday.pk}}').modal('toggle')"><small><i class="fas fa-trash"></i></small></button>
|
|
<button class="btn btn-secondary btn-sm " href=""><small><i class="fas fa-pen"></i></small></button>
|
|
</td>
|
|
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
{% for workday in workdays %}
|
|
<div class="modal fade" id="confirm-delete_{{workday.pk}}" tabindex="-1" role="dialog" aria-labelledby="" aria-hidden="true">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title">Arbeitstag löschen</h5>
|
|
</div>
|
|
<div class="modal-body">
|
|
Möchten Sie wirklich den Arbeitstag am {{workday.start|date:"d.m"}} löschen?
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button class="btn btn-danger" id="dodel_{{workday.pk}}" >Löschen</button>
|
|
<button type="button" class="btn btn-success" data-dismiss="modal">Abbrechen</button>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
|
|
$("#dodel_{{workday.pk}}").click(function(){
|
|
$.ajax(
|
|
{
|
|
type: "GET",
|
|
url: "{% url 'tm-ajax' %}",
|
|
data:{
|
|
action : "remove_workday",
|
|
workday: {{workday.pk}},
|
|
},
|
|
success: function( data )
|
|
{
|
|
$("#wd_{{workday.pk}}").remove();
|
|
$("#confirm-delete_{{workday.pk}}").modal("toggle");
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
{% endfor %}
|
|
<style>
|
|
/* DATATABLES */
|
|
.paginate_button {
|
|
padding: 0px !important;
|
|
border: 0px !important;
|
|
}
|
|
</style>
|
|
<script>
|
|
$(document).ready(function(){
|
|
|
|
$('#table_timemanagement').DataTable({
|
|
"language": {
|
|
"search" : "Suche",
|
|
"info": "Zeige _START_ bis _END_ von _TOTAL_ Einträgen",
|
|
"lengthMenu": "Zeige _MENU_ Einträge",
|
|
"zeroRecords": "Nichts gefunden",
|
|
"infoEmpty": "Keine Einträge",
|
|
"paginate": {
|
|
"first": "Erste",
|
|
"last": "Letzte",
|
|
"next": "Nächste",
|
|
"previous": "Zurück"
|
|
},
|
|
},
|
|
"buttons" : {
|
|
"className" : "btn-danger"
|
|
}
|
|
});
|
|
});
|
|
|
|
</script>
|
|
{% else %}
|
|
<h3>Das Modul Abwesenheits- und Zeiterfassung wurde in ihrer Agentur deaktiviert oder die Zeiterfassung wurde im Modul deaktiviert.</h3>
|
|
{% endif %}
|
|
{% endblock content %}
|