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

BUG:Admin CRUD causes server error #170

Closed
mikerae opened this issue Oct 8, 2023 · 0 comments
Closed

BUG:Admin CRUD causes server error #170

mikerae opened this issue Oct 8, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@mikerae
Copy link
Owner

mikerae commented Oct 8, 2023

Describe the bug
When a rota is selected when user is Admin, the edit buttons cause server error

To Reproduce
Steps to reproduce the behaviour:

  1. Log-in as admin
  2. click on Projects
  3. click on a project and section
  4. Click on a CRUD button
  5. See error

Expected behaviour
Admin should be able to edit rotas for a section as if they were a Rota Manager for that section

Screenshots
Screenshot 2023-10-08 at 17 26 40

Additional context
This is an extension of #156 and has the same solution for each of the CRUD views

@mikerae mikerae added the bug Something isn't working label Oct 8, 2023
@mikerae mikerae added this to the Project 4 Resubmission No. 2 milestone Oct 8, 2023
@mikerae mikerae self-assigned this Oct 8, 2023
@mikerae mikerae moved this to 🏗 In progress in String Rota Oct 8, 2023
mikerae added a commit that referenced this issue Oct 8, 2023
Add paths for add_sp_office, with additional section id argument
	modified:   string_rota/urls.py
	modified:   string_rota/templates/string_rota/rota.html

Add logic to add_sp class setting section from sidebar
	modified:   string_rota/views.py

Add testing for Fix Bug-Admin add seating position to README
	modified:   README.md
	new file:   readme_assets/images/testing-issue170-1.png
mikerae added a commit that referenced this issue Oct 8, 2023
For Admin User:
In Views: Each CRUD Class accepts ssection_id as kwargs and sets the
value of section. Each returns to a dedicated 'office' url
	modified:   string_rota/views.py

Fix for Add Seating Position: conditional routing
	modified:   string_rota/templates/string_rota/add_sp.html
    modified:   string_rota/templates/string_rota/rota.html

Fix for Edit Seating position: conditional routing
	modified:   string_rota/templates/string_rota/edit_sp.html

Add dedicated office urls for each CRUD url
	modified:   string_rota/urls.py

Add testing for Fix CRUD for Admin Seating Position in README
	modified:   README.md
	new file:   readme_assets/images/testing-issue170-2.png
mikerae added a commit that referenced this issue Oct 8, 2023
Update message in ToggleSeatingPlanStatus Class
Add accepts section.id as kwargs in ToggleSeatingPlanStatus Class
Add conditional return logic in ToggleSeatingPlanStatus Class
Derive section form kwargs in ToggleSeatingPlanStatus Class
	modified:   string_rota/views.py

Add conditional routing for Draft/Published Button
	modified:   string_rota/templates/string_rota/rota.html

Add toggle_seating_plan_status_office path
	modified:   string_rota/urls.py

Add testing of Admin Toggle Draft/Pubished rotas to README
	modified:   README.md
	new file:   readme_assets/images/testing-issue170-3.png
mikerae added a commit that referenced this issue Oct 9, 2023
Remove Register User from Admin login temporarily to ensure pull request
    is robust.
	modified:   templates/base.html

Add conditional rendering for login as Admin/Rota Manager in
    Reserve class
Add **kwargs to pass section.id into Reserve class
	modified:   string_rota/views.py

Add reserve_office url
	modified:   string_rota/urls.py

Add conditional Allocate Reserve button url
	modified:   string_rota/templates/string_rota/rota.html

Add conditional cancel button url
	modified:   string_rota/templates/string_rota/reserve.html

Add testing for Add Admin Allocate reserve to README
	modified:   README.md
	new file:   readme_assets/images/testing-issue170-4.png
@mikerae mikerae closed this as completed in 54fad29 Oct 9, 2023
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in String Rota Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

1 participant