From 679aafcb8f6560eec9b6d4a7b15f4fd785296f0b Mon Sep 17 00:00:00 2001 From: Mike Rae Date: Sun, 8 Oct 2023 16:52:24 +0000 Subject: [PATCH] [#156] Add View Rotas for Admin/Orch Manager Add sidebar Links logic dependant on Group Office/Rota Manager modified: templates/base.html Update logic in Rota View to receive a section argument as **kwargs modified: string_rota/views.py Update path for toggle published/draft Add url for Rota_admin modified: string_rota/urls.py Add testing for 'Add View Rotas for Admin/Orch Manager' to README - NB. basic functionality works, but CRUD links do not work in this commit. The resolution of the CRUD server errors is the same as for Rota class view ie pass in the Section as **kwargs and isolate calls to request.user - player and section modified: README.md new file: readme_assets/images/testing-issue156-3.png --- README.md | 2 ++ readme_assets/images/testing-issue156-3.png | Bin 0 -> 23686 bytes string_rota/urls.py | 6 ++++- string_rota/views.py | 25 +++++++++++++------- templates/base.html | 4 ++-- 5 files changed, 25 insertions(+), 12 deletions(-) create mode 100644 readme_assets/images/testing-issue156-3.png diff --git a/README.md b/README.md index 73efe1b..5e7dfc5 100644 --- a/README.md +++ b/README.md @@ -276,6 +276,8 @@ The following manual tests were made: - [see issue #156 here](https://github.com/mikerae/string-rota/issues/156) - [Show sections in sidebar #156 Testing](/readme_assets/images/testing-issue156-2.png) - [see issue #156 here](https://github.com/mikerae/string-rota/issues/156) +- [Admin/Orch Manager View Rotas #156 Testing](/readme_assets/images/testing-issue156-3.png) + - [see issue #156 here](https://github.com/mikerae/string-rota/issues/156) #### Human Testing No human testing was done for this MVP, but once office manager functionality, and the hiding of draft rotas is implemented, user feedback will be sort. diff --git a/readme_assets/images/testing-issue156-3.png b/readme_assets/images/testing-issue156-3.png new file mode 100644 index 0000000000000000000000000000000000000000..2a1574c3dded610ef745cf4fb1e4094ee2f9fedc GIT binary patch literal 23686 zcmZ^q1yo$Ix~PFdvEmeWr?|TmiaV5Ha4+r-gS)%Cm*Q5Sz~F8z?t{C#^XRdA)_eEO zT6=bOl0Pngk}u)Pic%;@1V~U&P$)9eUsR!>U@PCuya?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RQ;!qC7!C}ejTW3JnfD)DB_Tc+z#vMGYr zdk$P_0Ys&6(W3~_6qt^;|{|S3pij>!`DfXd$4HUeNKX;ZE3dAPEQjo zZ|Wlf~Yg8$F2@W0dlO+2cq{k0RNx(a9IAMhtSjvzup`e1%6ndCpYRh(;S5p=dzl&R6k z3Ei1^mLye#_2gNEDx#+?d=|bKhz@i8*U8tDJ5ryT4&P>&zixIYub(P;=~ZgxwUD&) zUlxQ%t6&ZOQuhW22m}3FB(Zzwz~jUkrx6m!Te4u|@o)2uB`NTg&$`E!{@Z|?V3NjQ m2Qg4x`g;AB_bEu@{h_?>zPnxdMkMOSA`uMIQK?X}4*MVad_Z0R literal 0 HcmV?d00001 diff --git a/string_rota/urls.py b/string_rota/urls.py index e4ba062..4917bdc 100644 --- a/string_rota/urls.py +++ b/string_rota/urls.py @@ -1,10 +1,14 @@ """ Urls for string-rota app """ +from django.contrib import admin from django.urls import path from . import views urlpatterns = [ path("", views.Home.as_view(), name="home"), path("/", views.Rota.as_view(), name="rota"), + path( + "//", views.Rota.as_view(), name="rota_office" + ), # noqa E501 path( "add_sp///", views.AddSeatingPosition.as_view(), @@ -26,7 +30,7 @@ name="delete_sp", ), path( - "//", + "toggle///", views.ToggleSeatingPlanStatus.as_view(), name="toggle_seating_plan_status", ), diff --git a/string_rota/views.py b/string_rota/views.py index 445b6f1..33ebc30 100644 --- a/string_rota/views.py +++ b/string_rota/views.py @@ -84,17 +84,23 @@ class Rota(View): def dispatch(self, *args, **kwargs): return super(Rota, self).dispatch(*args, **kwargs) - def get(self, request, slug): + def get(self, request, slug, **kwargs): """Creates rota view for selected project""" - - try: - player = get_object_or_404(Player, users_django=request.user.id) - except player.DoesNotExist: - messages.warning(request, "You are not logged in as a player.") - return redirect(reverse("home")) - projects = Project.objects.all() + office = request.user.groups.filter(name="Office") + sections = Section.objects.all() project = get_project(slug) - section = get_section(player) + if office: + section = get_object_or_404(Section, pk=kwargs["section_id"]) + else: + try: + player = get_object_or_404( + Player, users_django=request.user.id + ) # noqa E501 + except player.DoesNotExist: + messages.warning(request, "You are not logged in as a player.") + return redirect(reverse("home")) + section = get_section(player) + projects = Project.objects.all() # no seating_plan record? try: @@ -157,6 +163,7 @@ def get(self, request, slug): context = { "projects": projects, + "sections": sections, "project": project, "seating_plan": seating_plan, "seating_positions": seating_positions, diff --git a/templates/base.html b/templates/base.html index bad0f19..5add55b 100644 --- a/templates/base.html +++ b/templates/base.html @@ -140,7 +140,7 @@
{{user.first_name}} {{user.last_name}}