+
Übersicht Arbeitstag und Abwesenheit
+
+
+
+
+ | Name |
+ Relevante Arbeitstage |
+
+
+
+ {% for user in users %}
+ {% getADMAbsenceWorkdays user as workdays %}
+
+ | {{user.username}} |
+
+ {% for wd in workdays %} {{wd.pk}}, {% endfor %}
+ |
+
+ {% endfor %}
+
+
+
+{% endblock content %}
\ No newline at end of file
diff --git a/adm/urls.py b/adm/urls.py
index 2f0acda..b2d9a46 100644
--- a/adm/urls.py
+++ b/adm/urls.py
@@ -23,4 +23,5 @@ urlpatterns = [
path('wd/
/delete', AdmWorkdayDelete.as_view(), name="adm-workday-delete"),
path('wd/break//delete', AdmBreakDelete.as_view(), name="adm-break-delete"),
path('wd//break/add', AdmAddBreak.as_view(), name="adm-break-add"),
+ path('tmbug/', AdmTmWorkdayColl.as_view(), name="adm-tm-wd-bug"),
]
diff --git a/adm/views.py b/adm/views.py
index 39651ea..42ef70a 100644
--- a/adm/views.py
+++ b/adm/views.py
@@ -29,9 +29,20 @@ from django.template.loader import render_to_string
from cloud.models import DataFile
import math
import requests
+from digitaleagentur.timemanagement_utils import *
# TODO: ADM-Oberfläche Auswertung machen, an welchen Tagen eines Mitarbeiters auch eine Abwesenheit
+class AdmTmWorkdayColl(TemplateView):
+ template_name = "adm/adm_tmworkday.html"
+
+ def get_context_data(self, **kwargs):
+ context = super().get_context_data(**kwargs)
+ context.update({'active_link' : "adm-tm-wd-bug"})
+
+ context.update({'users' : User.objects.all().order_by('username') })
+ return context
+
'''
Prüfung, ob angemeldeter User Mitarbeiterstatus hat. IMMER PER DISPATCH EINBAUEN!
'''
diff --git a/standards/templatetags/__pycache__/counter_tag.cpython-38.pyc b/standards/templatetags/__pycache__/counter_tag.cpython-38.pyc
index 55e1de7..c550ae1 100644
Binary files a/standards/templatetags/__pycache__/counter_tag.cpython-38.pyc and b/standards/templatetags/__pycache__/counter_tag.cpython-38.pyc differ
diff --git a/standards/templatetags/counter_tag.py b/standards/templatetags/counter_tag.py
index 7ecf0b6..e4c2bbc 100644
--- a/standards/templatetags/counter_tag.py
+++ b/standards/templatetags/counter_tag.py
@@ -1110,3 +1110,17 @@ def getAbsenceLastHistory(absence):
return absence.history.first()
+# Gibt die Arbeitstage zurück, an denen auch eine Abwesenheit liegt
+from digitaleagentur.timemanagement_utils import *
+@register.simple_tag
+def getADMAbsenceWorkdays(user):
+ workdays_final = []
+ for absence in Absence.objects.filter(user=user):
+ for day in daterange(absence.start, absence.end):
+ # Arbeitstage an diesem Tag werden geladen
+ workdays = Workday.objects.filter(user=absence.user, start__day=day.day, start__month=day.month, start__year=day.year)
+
+ # Wenn es Arbeitstage gibt, dann wird geprüft, ob die Abwesenheit diesen verändert hat.
+ for workday in workdays:
+ workdays_final.append(workday)
+ return workdays_final
\ No newline at end of file