Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

156 user story admin and office can view full orch rotas closes #170 #173

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,20 @@ The following manual tests were made:
- [see issue #166 here](https://github.com/mikerae/string-rota/issues/166)
- [Enable Email Server #166 Testing](/readme_assets/images/testing-issue166-3.png)
- [see issue #166 here](https://github.com/mikerae/string-rota/issues/166)
- [Update Sidebar and Welcome Screen #156 Testing](/readme_assets/images/testing-issue156-1.png)
- [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)
- [Admin Add Seating Position View Rotas #170 Testing](/readme_assets/images/testing-issue170-1.png)
- [see issue #170 here](https://github.com/mikerae/string-rota/issues/170)
- [Admin Seating Position CRUD #170 Testing](/readme_assets/images/testing-issue170-2.png)
- [see issue #170 here](https://github.com/mikerae/string-rota/issues/170)
- [Admin Toggle Draft/Published Rotas #170 Testing](/readme_assets/images/testing-issue170-3.png)
- [see issue #170 here](https://github.com/mikerae/string-rota/issues/170)
- [Admin Allocate Reserve Player #170 Testing](/readme_assets/images/testing-issue170-4.png)
- [see issue #170 here](https://github.com/mikerae/string-rota/issues/170)
#### 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.

Expand Down
Binary file added readme_assets/images/testing-issue156-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readme_assets/images/testing-issue156-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readme_assets/images/testing-issue156-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readme_assets/images/testing-issue170-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readme_assets/images/testing-issue170-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readme_assets/images/testing-issue170-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added readme_assets/images/testing-issue170-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions string_rota/templates/string_rota/add_sp.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@ <h1 class="card-title">Add Seating Position</h1>
<span class="col-md-4">{{player_project_form|crispy }}</span>
<div class="text-center">
<button type="submit" class="btn btn-success">Add Position</button>
{% if user.is_staff %}
<a href="{% url 'rota_office' project.slug section.id %}" class="btn btn-secondary">
Cancel</a>
{% else %}
<a href="{% url 'rota' project.slug %}" class="btn btn-secondary">
Cancel</a>
{% endif %}
</div>
</form>

Expand Down
8 changes: 8 additions & 0 deletions string_rota/templates/string_rota/edit_sp.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,18 @@ <h1 class="card-title">Edit Seating Position for <strong>{{player}}</strong>
<span class="col-md-4">{{player_project_form | crispy }}</span>
<div class="text-center">
<button type="submit" class="btn btn-success">Edit Position</button>
{% if user.is_staff %}
<a href="{% url 'rota_office' project.slug section.id %}" class="btn btn-secondary">
Cancel</a>
<a class="btn btn-danger" href="{% url 'delete_sp_office' project.slug position.id section.id %}">
Delete</a>
{% else %}
<a href="{% url 'rota' project.slug %}" class="btn btn-secondary">
Cancel</a>
<a class="btn btn-danger" href="{% url 'delete_sp' project.slug position.id %}">
Delete</a>
{% endif %}

</div>
</form>
<!-- End Rota Form -->
Expand Down
25 changes: 5 additions & 20 deletions string_rota/templates/string_rota/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,38 +17,23 @@ <h2>Welcome {{user.first_name}}!</h2>
<div class="row">
<!-- Left side columns -->
<div class="col-12">
{% if office %}
<div class="col-lg-7">
<div class="card">
<div class="card-body">
<h2 class="card-title">
Site Under Construction!
</h2>
<p class="ps-3">We are very sorry, but the site is currently under construction for the Orchestra Managers
and those with super-user status.
To visit the Admin part of the site, please click on the Admin menu item in the side bar.
There is full functionality for Rota Managers and Players. We will inform you when this part of the site
is ready for use. In the mean time, thank you for your patience.
</p>
</div>
</div>
</div>
{% else %}
<div class="row">
<!-- Project Info -->
<div class="col-lg-7">
<div class="card">
<div class="card-body">
<h2 class="card-title">Select a Project</h2>
<h2 class="card-title">Select a Project {% if office %}and a Section{% endif %} to see your required
Rota</h2>

<div class="ps-3">
<p>Choose a project from the list of projects in the side menu to view a rota for that project.</p>
<p>Choose a project from the list of projects in the side menu {% if office %}, then choose a section
from the drop-down menu {% endif %}to view a rota for that project{% if office %} and
section{% endif %}.</p>
</div>
</div>
</div>
</div>
</div>
{% endif %}
<!-- Messages -->
<div class="row">
<div class="col-12">
Expand Down
7 changes: 6 additions & 1 deletion string_rota/templates/string_rota/reserve.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<main id="main" class="main">

<div class="pagetitle">
<h1>Edit Player Info for {{section}} Section for the {{project.name}}</h1>
<h1>Edit Player Reserve Allocation for {{section}} Section for the {{project.name}}</h1>
<nav>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{% url 'home' %}">Home</a></li>
Expand Down Expand Up @@ -56,8 +56,13 @@ <h2 class="card-title">Project: {{ project }}: {{ section }} Section</h2>
{% csrf_token %}
<div class="text-center">
<button type="submit" class="btn btn-success">Change Reserve Player Status</button>
{% if user.is_staff %}
<a href="{% url 'rota_office' project.slug section.id %}" class="btn btn-secondary">
Cancel</a>
{% else %}
<a href="{% url 'rota' project.slug %}" class="btn btn-secondary">
Cancel</a>
{% endif %}
</div>
</form>
<!-- End Rota Form -->
Expand Down
26 changes: 21 additions & 5 deletions string_rota/templates/string_rota/rota.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,14 @@ <h5 class="text-info">Please contact your Rota Manager</h5>

{% if rota_manager %}
<tr>
<td><a class="bi" href="{% url 'edit_sp' project.slug position.id %}">{{position.player}}</a></td>
{% if user.is_staff %}
<td><a class="bi"
href="{% url 'edit_sp_office' project.slug position.id section.id %}">{{position.player}}</a>
</td>
{% else %}
<td><a class="bi" href="{% url 'edit_sp' project.slug position.id %}">{{position.player}}</a>
</td>
{% endif %}
<td>{{position.position_number}}</td>
</tr>
{% else %}
Expand All @@ -122,15 +129,24 @@ <h5 class="text-info">Please contact your Rota Manager</h5>

<!-- Rota Form Section-->
{% if user.is_authenticated %}
{% if rota_manager %}

{% if user.is_staff %}
<div class="col-12 text-center ">
<span><a href="{% url 'add_sp_office' project.slug seating_plan.id section.id %}"><button
class="btn btn-primary">Add
Player to Seating Plan</button></a></span>
<a href="{% url 'toggle_seating_plan_status_office' project.slug seating_plan.id section.id %}"><button
class="btn btn-success">Draft/Published</button></a>
<a href="{% url 'reserve_office' project.slug section.id %}"><button class="btn btn-primary">Allocate
Reserve
Player</button></a>
</div>
{% elif rota_manager %}
<div class="col-12 text-center ">
<span><a href="{% url 'add_sp' project.slug seating_plan.id %}"><button class="btn btn-primary">Add
Player to Seating Plan</button></a></span>
<a href="{% url 'toggle_seating_plan_status' project.slug seating_plan.id %}"><button
class="btn btn-success">Draft/Published</button></a>
<a href="{% url 'reserve' project.slug %}"><button class="btn btn-primary">Allocate
Reserved
<a href="{% url 'reserve' project.slug %}"><button class="btn btn-primary">Allocate Reserve
Player</button></a>
</div>
{% endif %}
Expand Down
36 changes: 32 additions & 4 deletions string_rota/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,57 @@
urlpatterns = [
path("", views.Home.as_view(), name="home"),
path("<slug:slug>/", views.Rota.as_view(), name="rota"),
path(
"reserve/<slug:slug>/",
views.Reserve.as_view(),
name="reserve",
),
path(
"reserve/<slug:slug>/<section_id>/",
views.Reserve.as_view(),
name="reserve_office",
),
path(
"<slug:slug>/<section_id>/", views.Rota.as_view(), name="rota_office"
), # noqa E501
path(
"add_sp/<slug:slug>/<seating_plan_id>/",
views.AddSeatingPosition.as_view(),
name="add_sp",
),
path(
"add_sp/<slug:slug>/<seating_plan_id>/<section_id>/",
views.AddSeatingPosition.as_view(),
name="add_sp_office",
),
path(
"edit_sp/<slug:slug>/<seating_position_id>/",
views.EditSeatingPosition.as_view(),
name="edit_sp",
),
path(
"reserve/<slug:slug>/",
views.Reserve.as_view(),
name="reserve",
"edit_sp/<slug:slug>/<seating_position_id>/<section_id>/",
views.EditSeatingPosition.as_view(),
name="edit_sp_office",
),
path(
"delete_sp/<slug:slug>/<position_id>/",
views.DeleteSeatingPosition.as_view(),
name="delete_sp",
),
path(
"<slug:slug>/<seating_plan_id>/",
"delete_sp/<slug:slug>/<position_id>/<section_id>/",
views.DeleteSeatingPosition.as_view(),
name="delete_sp_office",
),
path(
"toggle/<slug:slug>/<seating_plan_id>/",
views.ToggleSeatingPlanStatus.as_view(),
name="toggle_seating_plan_status",
),
path(
"toggle/<slug:slug>/<seating_plan_id>/<section_id>/",
views.ToggleSeatingPlanStatus.as_view(),
name="toggle_seating_plan_status_office",
),
]
Loading