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 @@
{% 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
-->
-