diff --git a/standards/templatetags/__pycache__/counter_tag.cpython-38.pyc b/standards/templatetags/__pycache__/counter_tag.cpython-38.pyc index a7482e8..92dfcc9 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 185a289..ffa623b 100644 --- a/standards/templatetags/counter_tag.py +++ b/standards/templatetags/counter_tag.py @@ -430,9 +430,9 @@ def getabscenceday(loggeduser, user, daytocheck): returnstat = False if(loggeduser.has_perm("users.absencemanager")): - absencedays = Absence.objects.filter(agency=user.profile.agency, user=user, start=daytocheck) | (Absence.objects.filter(agency=user.profile.agency, user=user, start__lt=daytocheck) & Absence.objects.filter(agency=user.profile.agency, user=user, end__gt=daytocheck)) | Absence.objects.filter(agency=user.profile.agency, user=user, end=daytocheck) + absencedays = Absence.objects.filter(confirm_status=0, agency=user.profile.agency, user=user, start=daytocheck) | (Absence.objects.filter(confirm_status=0, agency=user.profile.agency, user=user, start__lt=daytocheck) & Absence.objects.filter(confirm_status=0, agency=user.profile.agency, user=user, end__gt=daytocheck)) | Absence.objects.filter(confirm_status=0, agency=user.profile.agency, user=user, end=daytocheck) else: - absencedays = (Absence.objects.filter(agency=user.profile.agency, user=loggeduser, confirm_status=1) | Absence.objects.filter(agency=user.profile.agency, user=user, confirm_status=0)) & (Absence.objects.filter(agency=user.profile.agency, user=user, start=daytocheck) | (Absence.objects.filter(agency=user.profile.agency, user=user, start__lt=daytocheck) & Absence.objects.filter(agency=user.profile.agency, user=user, end__gt=daytocheck)) | Absence.objects.filter(agency=user.profile.agency, user=user, end=daytocheck) ) + absencedays = (Absence.objects.filter(agency=user.profile.agency, user=loggeduser, confirm_status=1) | Absence.objects.filter(agency=user.profile.agency, user=user, confirm_status=0)) & (Absence.objects.filter(agency=user.profile.agency, user=user, start=daytocheck) | (Absence.objects.filter(agency=user.profile.agency, user=user, start__lt=daytocheck, confirm_status=0) & Absence.objects.filter(agency=user.profile.agency, user=user, end__gt=daytocheck)) | Absence.objects.filter(agency=user.profile.agency, user=user, end=daytocheck, confirm_status=0) ) if(len(absencedays) > 0): returnstat = list(absencedays)[0] diff --git a/timemanagement/templates/timemanagement/rendered_table.html b/timemanagement/templates/timemanagement/rendered_table.html index 957f917..16b5c86 100644 --- a/timemanagement/templates/timemanagement/rendered_table.html +++ b/timemanagement/templates/timemanagement/rendered_table.html @@ -1,6 +1,6 @@ {% load counter_tag %}
|
@@ -9,71 +9,71 @@
|
{% for da in days_this_month %}
- {% isfreeday user da as isfree %}
+ {% isfreeday user da as isfree %}
{{da|date:"d D"}} | {% endfor %} -||||||||||||||||
|
- |
+ |
- {% for da in days_this_month %}
+ {% for da in days_this_month %}
{% isfreeday user da as isfree %}
{% isfreedayname user da as isfreename %}
- {% getabscenceday user us da as abday %}
- {% startdatecheck us da as startdatecheck %}
- {% getthisdaynotworking us da as thisdaynotworking %}
+ {% getabscenceday user us da as abday %}
+ {% startdatecheck us da as startdatecheck %}
+ {% getthisdaynotworking us da as thisdaynotworking %}
{% if isfree %}
- + | {% elif startdatecheck == False %} | {% elif thisdaynotworking == True %} - | - {% elif abday != False %} - + | + {% elif abday != False %} + {% if abday.confirm_status == 0 %} - {% if user|usergperm:"absencemanager" %} + {% if user|usergperm:"absencemanager" %} | {% elif abday.user == user %} - | + {% endif %} data-toggle="tooltip" data-placement="top" title="{% if abday.user == user %} {{abday.reason.name}} {% else %} Abwesend {% endif %} {% if abday.representator != None %} | Vertreter {{abday.representator.first_name}} {{abday.representator.last_name}} {% endif %} "> {% else %} - | - {% endif %} + {% endif %} data-toggle="tooltip" data-placement="top" title="{% if abday.user == user %} {{abday.reason.name}} {% else %} Abwesend {% endif %} {% if abday.representator != None %} | Vertreter {{abday.representator.first_name}} {{abday.representator.last_name}} {% endif %} "> + {% endif %} {% elif abday.confirm_status == 1 %} - {% if user|usergperm:"absencemanager" %} - | {% else %} - | + {% endif %} data-toggle="tooltip" data-placement="top" title="Nicht bestätigt | {% if abday.user == user %} {{abday.reason.name}} {% else %} Abwesend {% endif %} {% if abday.representator != None %} | Vertreten durch {{abday.representator.first_name}} {{abday.representator.last_name}} {% endif %}"> {% endif %} {% else %} | {% endif %} - + {% elif today == da %} | @@ -158,13 +158,13 @@ {% else %} {% if da.weekday == 5 or da.weekday == 6 %} - | - {% else %} - | + | + {% else %} + | {% endif %} {% endif %} | - {% endfor %} + {% endfor %}