diff --git a/digitaleagentur/__pycache__/settings.cpython-38.pyc b/digitaleagentur/__pycache__/settings.cpython-38.pyc
index 898d79a..3e03d8d 100644
Binary files a/digitaleagentur/__pycache__/settings.cpython-38.pyc and b/digitaleagentur/__pycache__/settings.cpython-38.pyc differ
diff --git a/orga/templates/orga/orga_single.html b/orga/templates/orga/orga_single.html
index 597b684..e604503 100644
--- a/orga/templates/orga/orga_single.html
+++ b/orga/templates/orga/orga_single.html
@@ -69,7 +69,7 @@
{% if request.user.profile.agency.dynamicprofile %}
- als Verantwortlicher
+ als Verantwortlicher
Ausführender
Vertreter
{% endif %}
@@ -90,21 +90,21 @@
{% if request.user.profile.agency.dynamicprofile %}
{% for task in tasks %}
- {% isUserInAuth task area request.user as checkIsUserAuth %}
+ {% isUserInAuth task area user_id as checkIsUserAuth %}
{% if task.area.pk == area.pk and task.visible and checkIsUserAuth %}
@@ -204,7 +204,8 @@ $( document ).ready(function() {
}
- $(document).find(".view_0").show();
+ $(document).find(".view_1").show();
+ $(document).find("#view_info_1").show();
});
diff --git a/standards/templatetags/__pycache__/counter_tag.cpython-38.pyc b/standards/templatetags/__pycache__/counter_tag.cpython-38.pyc
index 59ca8c1..c6cff32 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 a341a8d..5753233 100644
--- a/standards/templatetags/counter_tag.py
+++ b/standards/templatetags/counter_tag.py
@@ -218,44 +218,46 @@ def getifuserdidcomment(standard, user):
@register.simple_tag
-def isUserInAuth(task, area, user):
- st_auth = Standards.objects.filter(agency=user.profile.agency, task=task, area=area)
+def isUserInAuth(task, area, user_id):
+ user = User.objects.get(pk=user_id)
+
+ #st_auth = Standards.objects.filter(agency=user.profile.agency, task=task, area=area)
+ st_auth = Standards.objects.filter(agency=user.profile.agency, task=task, area=area, authority__in=[user])
found = False
- for st in st_auth:
- if user in st.authority.all():
- found = True
- print("AUTH FOUND")
- break
+ if len(st_auth) > 0:
+ found = True
return found
@register.simple_tag
-def isUserInEx(task, area, user):
- st_auth = Standards.objects.filter(agency=user.profile.agency, task=task, area=area)
+def isUserInEx(task, area, user_id):
+
+ user = User.objects.get(pk=user_id)
+
+
+ #st_auth = Standards.objects.filter(agency=user.profile.agency, task=task, area=area)
+ st_auth = Standards.objects.filter(agency=user.profile.agency, task=task, area=area, executor__in=[user])
found = False
- for st in st_auth:
- if user in st.executor.all():
- found = True
- print("EX FOUND")
- break
+ if len(st_auth) > 0:
+ found = True
return found
@register.simple_tag
-def isUserInRep(task, area, user):
- st_auth = Standards.objects.filter(agency=user.profile.agency, task=task, area=area)
+def isUserInRep(task, area, user_id):
+ user = User.objects.get(pk=user_id)
+
+ #st_auth = Standards.objects.filter(agency=user.profile.agency, task=task, area=area)
+ st_auth = Standards.objects.filter(agency=user.profile.agency, task=task, area=area, representative__in=[user])
found = False
- for st in st_auth:
- if user in st.representative.all():
- found = True
- print("REP FOUND")
- break
+ if len(st_auth) > 0:
+ found = True
return found
\ No newline at end of file