diff --git a/dasettings/templates/dasettings/agencynetwork_content.html b/dasettings/templates/dasettings/agencynetwork_content.html index 50a336a..347ef4f 100644 --- a/dasettings/templates/dasettings/agencynetwork_content.html +++ b/dasettings/templates/dasettings/agencynetwork_content.html @@ -25,7 +25,7 @@ {% getoutstandinginvites agn.pk as outstanding %} {% ifaginadminagn agn.pk request.user.profile.agency.pk as is_adminag %} - {{agn.name}} + {% if is_adminag %} {% endif %}{{agn.name}}{% if is_adminag %}{% endif %} {% if is_adminag %} diff --git a/dasettings/views.py b/dasettings/views.py index d46655c..e72b9a7 100644 --- a/dasettings/views.py +++ b/dasettings/views.py @@ -93,7 +93,10 @@ def DASettings(request): context.update({"agencyareas" : agencyareas}) # LOAD AGENCYNETWORKS - agencynetworks = AgencyNetwork.objects.filter(creator_agency=request.user.profile.agency) | AgencyNetwork.objects.filter(adminagencys__in=[request.user.profile.agency.pk]) | AgencyNetwork.objects.filter(members__in=[request.user.profile.agency.pk]) | AgencyNetwork.objects.filter(sharemembers__in=[request.user.profile.agency.pk]) + #agencynetworks = AgencyNetwork.objects.filter(creator_agency=request.user.profile.agency) | AgencyNetwork.objects.filter(adminagencys__in=[request.user.profile.agency.pk]) | AgencyNetwork.objects.filter(members__in=[request.user.profile.agency.pk]) | AgencyNetwork.objects.filter(sharemembers__in=[request.user.profile.agency.pk]) + + agencynetworks = AgencyNetwork.objects.filter(adminagencys__in=[request.user.profile.agency.pk]) | AgencyNetwork.objects.filter(members__in=[request.user.profile.agency.pk]) | AgencyNetwork.objects.filter(sharemembers__in=[request.user.profile.agency.pk]) + context.update({"agencynetworks" : agencynetworks}) # LOAD TASKS diff --git a/digitaleagentur/__pycache__/settings.cpython-38.pyc b/digitaleagentur/__pycache__/settings.cpython-38.pyc index 349916f..e12786e 100644 Binary files a/digitaleagentur/__pycache__/settings.cpython-38.pyc and b/digitaleagentur/__pycache__/settings.cpython-38.pyc differ diff --git a/digitaleagentur/settings.py b/digitaleagentur/settings.py index 4ffdfd8..99f1eff 100644 --- a/digitaleagentur/settings.py +++ b/digitaleagentur/settings.py @@ -9,7 +9,6 @@ https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ - import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...) @@ -201,6 +200,4 @@ OPTIONS={ 'libraries': { 'counter_tag': 'standards.tags', }, -} - - +} \ No newline at end of file diff --git a/orga/__pycache__/views.cpython-38.pyc b/orga/__pycache__/views.cpython-38.pyc index fe87e0b..c67ae01 100644 Binary files a/orga/__pycache__/views.cpython-38.pyc and b/orga/__pycache__/views.cpython-38.pyc differ diff --git a/orga/templates/orga/orga_single.html b/orga/templates/orga/orga_single.html index 96cdff7..fa75491 100644 --- a/orga/templates/orga/orga_single.html +++ b/orga/templates/orga/orga_single.html @@ -9,7 +9,23 @@

Bereiche und Aufgaben von {{user_first_name}} {{user_last_name}} {% if user|usergperm:"usermanager" %} - + + + + {% if request.user.profile.agency.dynamicprofile == False %} + + {% endif %} + + {% endif %}


@@ -61,8 +77,38 @@ {% for area in areas %} -
- {%for prio in prios %} +
+ {% if request.user.profile.agency.dynamicprofile == False %} + + {% for ex in executor %} + {% if ex.area == area %} + + {% endif %} + {% endfor %} + + {% for auth in authority %} + {% if auth.area == area %} + + {% endif %} + {% endfor %} + + {% for rep in representative %} + {% if rep.area == area %} + + + {% endif %} + {% endfor %} +
+ + {% else %} + + {% for prio in prios %} {% if prio.task.area.pk == area.pk and prio.task.visible %}
{{prio.task.name}}
@@ -70,8 +116,9 @@ {% endif %} {% endfor %}
- - {% endfor %} + + {% endif %} + {% endfor %} @@ -149,8 +196,21 @@ $( document ).ready(function() { $(".arrows_area_" + sortablearea_ids[i]).hide(); $( "#sortarea_" + sortablearea_ids[i]).sortable("disable"); } + + $(document).find(".view_0").hide(); + $(document).find(".view_1").hide(); + $(document).find(".view_2").hide(); + + $(document).find(".view_2").show(); }); +function changeView(newview){ + $(document).find(".view_0").hide(); + $(document).find(".view_1").hide(); + $(document).find(".view_2").hide(); + $(document).find(".view_" + newview).show(); + +} diff --git a/orga/views.py b/orga/views.py index ebfa8c8..538a617 100644 --- a/orga/views.py +++ b/orga/views.py @@ -6,6 +6,7 @@ from users.priomodel import Prio from tasks.models import Tasks from users.models import AgencyJob import webcolors +from standards.models import Standards @login_required def mainorga(request): @@ -68,6 +69,23 @@ def singleorga(request, pk): except: userfuncname = "Nicht vergeben" + st = Standards.objects.filter(agency=request.user.profile.agency) + + representative = [] + executor = [] + authority = [] + + for s in st: + if request.user in s.representative.all(): + representative.append(s) + + if request.user in s.executor.all(): + executor.append(s) + + if request.user in s.authority.all(): + authority.append(s) + + context = { 'active_link' : 'orga', 'areas' : areas, @@ -80,8 +98,12 @@ def singleorga(request, pk): 'imageurl' : user.profile.get_photo_url, 'compfunc' : user.profile.compfunc, 'phoneland' : user.profile.phoneland, + 'representative' : representative, + 'executor' : executor, + 'authority' : authority, 'phonemobile' : user.profile.phonemobile } + print(context) return render(request, 'orga/orga_single.html', context) else: return redirect('users-dashboard') diff --git a/standards/templates/standards/standards_management.html b/standards/templates/standards/standards_management.html index acde627..9582846 100644 --- a/standards/templates/standards/standards_management.html +++ b/standards/templates/standards/standards_management.html @@ -224,9 +224,8 @@