diff --git a/areas/__pycache__/views.cpython-38.pyc b/areas/__pycache__/views.cpython-38.pyc index b416f82..09ba9ba 100644 Binary files a/areas/__pycache__/views.cpython-38.pyc and b/areas/__pycache__/views.cpython-38.pyc differ diff --git a/areas/views.py b/areas/views.py index 9b6f172..d838559 100644 --- a/areas/views.py +++ b/areas/views.py @@ -8,6 +8,7 @@ from django.contrib.auth.models import User from django.http import HttpResponse, JsonResponse import json from django.contrib.auth.decorators import login_required +from users.priomodel import Prio @login_required def area_addareas_ajax(request): @@ -68,6 +69,30 @@ def area_neworder(request): if(area.agency == request.user.profile.agency): area.areaorder = ele['neworder'] area.save() - return HttpResponse("UPDATED") + return HttpResponse("UPDATED") + elif request.GET['action'] == 'newtaskorder': + tempuser = User.objects.get(pk=request.GET['userid']) + neworderdata = json.loads(request.GET['finalod']) + for ele in neworderdata: + prio = list(Prio.objects.filter(user__pk=request.GET['userid'], task__pk=ele['id']))[0] + prio.prio = ele['neworder'] + prio.save() + + return HttpResponse("UPDATED") else: - return HttpResponse("Request method is not a GET") \ No newline at end of file + return HttpResponse("Request method is not a GET") + + +''' +@login_required +def UsersPrioUpdate(request): + tempuser = User.objects.get(pk=request.GET['userid']) + if request.method == 'GET' and tempuser.profile.agency.pk == request.user.profile.agency.pk: + prio = Prio.objects.filter(user__pk=request.GET['userid']).filter(task__pk=request.GET['taskid']) + prio = list(prio)[0] + prio.prio = request.GET['value'] + prio.save() + return HttpResponse("udated...") + else: + return HttpResponse("Request method is not a GET") +''' \ No newline at end of file diff --git a/orga/__pycache__/views.cpython-38.pyc b/orga/__pycache__/views.cpython-38.pyc index 26dbe5a..fe87e0b 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 81ce686..a118247 100644 --- a/orga/templates/orga/orga_single.html +++ b/orga/templates/orga/orga_single.html @@ -4,7 +4,7 @@

Bereiche und Aufgaben von {{user_first_name}} {{user_last_name}} {% if user|usergperm:"usermanager" %} - + {% endif %}


@@ -57,13 +57,15 @@ {% for area in areas %} - {%for prio in prios %} +
+ {%for prio in prios %} {% if prio.task.area.pk == area.pk and prio.task.visible %} -
-
{{prio.task.name}}
+ {% endif %} {% endfor %} +
{% endfor %} @@ -76,4 +78,72 @@ }
+ + + {% endblock content %} \ No newline at end of file diff --git a/orga/views.py b/orga/views.py index 3c9a637..ebfa8c8 100644 --- a/orga/views.py +++ b/orga/views.py @@ -52,7 +52,7 @@ def singleorga(request, pk): ''' if(user.profile.agency.pk==request.user.profile.agency.pk): - prios = Prio.objects.filter(user__pk=pk).order_by('-prio') + prios = Prio.objects.filter(user__pk=pk).order_by('prio') areas = list(Areas.objects.filter(agency__pk=request.user.profile.agency.pk).order_by('areaorder')) i = 0 for area in areas: diff --git a/standards/templates/standards/standards_add.html b/standards/templates/standards/standards_add.html index dd4ec34..9a47d68 100644 --- a/standards/templates/standards/standards_add.html +++ b/standards/templates/standards/standards_add.html @@ -182,7 +182,7 @@ Ausführender Vertreter --> -
Verantwortlicher hinzufügen:
+
Verantwortlicher:
@@ -203,7 +203,7 @@ Ausführender Vertreter --> -
Ausführender hinzufügen:
+
Ausführender:
@@ -224,7 +224,7 @@ -
Vertreter hinzufügen:
+
Vertreter:
diff --git a/standards/templates/standards/standards_single.html b/standards/templates/standards/standards_single.html index c8c2a41..cc5e239 100644 --- a/standards/templates/standards/standards_single.html +++ b/standards/templates/standards/standards_single.html @@ -61,7 +61,7 @@

{% if standard.authority.count > 0 %} - Verantwortlich:
+ Verantwortliche
{% for u in standard.authority.all %} {{u.first_name}} {{u.last_name}}{% if forloop.counter < standard.authority.count%} | {% endif %} {% endfor %} @@ -69,7 +69,7 @@ {% endif %} {% if standard.executor.count > 0 %} - Ausführende:
+ Ausführende
{% for u in standard.executor.all %} {{u.first_name}} {{u.last_name}}{% if forloop.counter < standard.executor.count%} | {% endif %} {% endfor %} @@ -77,7 +77,7 @@ {% endif %} {% if standard.representative.count > 0 %} - Vertreter:
+ Vertreter
{% for u in standard.representative.all %} {{u.first_name}} {{u.last_name}}{% if forloop.counter < standard.representative.count%} | {% endif %} {% endfor %} diff --git a/standards/templates/standards/standards_update.html b/standards/templates/standards/standards_update.html index 9dbbfc6..2fbcbad 100644 --- a/standards/templates/standards/standards_update.html +++ b/standards/templates/standards/standards_update.html @@ -177,7 +177,7 @@ Ausführender Vertreter --> -

Verantwortlicher hinzufügen:
+
Verantwortlicher
@@ -201,7 +201,7 @@ Ausführender Vertreter --> -
Ausführende hinzufügen:
+
Ausführende
@@ -223,7 +223,7 @@ -
Vertreter hinzufügen:
+
Vertreter