Edit position page - #664
Conversation
… its going to work because its not going to be active its going to be pending so i need to work my way around it
…ition and make changes.these are the bones, html,css,and js
…ion so the revise position page actually works. Submitting the form now creates a new pending (Requested) revision of the position with updated title, WLS, and description sections.
| transaction.rollback() | ||
|
|
||
|
|
||
| @pytest.mark.integration |
There was a problem hiding this comment.
These tests still create PositionHistory records with description="", but the model no longer has a description field and now requires revisedBy.
Can you update the tests to use revisedBy instead? Several creates in this file may fail because revisedBy is required and not provided.
… revision is immediately visible instead of redirecting back to a list that only shows Active positions.
| revisionDate = None | ||
| if revisionDateParam: | ||
| try: | ||
| revisionDate = datetime.strptime(revisionDateParam, '%Y-%m-%d').date() |
There was a problem hiding this comment.
Currently, when a section is added and saved, it works. But if the page is reloaded to check if it saves in the database, it breaks with an unexpected error. I believe it might be a routing issue or simply simply just an exception handler problem
| position=position, | ||
| sections=sections | ||
| ) | ||
|
|
There was a problem hiding this comment.
make sure the WLS number entered should not be more than 6. until it gets revised to the new 1-3 system. currently, any number input is accepted, even if the number is a 10000 etc.
Issue Description -
Added a Revise Position page for admins to edit a position's details and description.
Changes -
Added revisepositionpage.html, the new revise page. It's a form pre-filled with the position's title, WLS level, last revision date, revised-by, and all of its existing description sections so admins aren't starting from a blank page.
Added revisepositionpage.js so admins can add or remove description sections
Added revisepositionpage.css for the section-row and action-button styling the form needed that Bootstrap didn't already cover.
Added a link on the "Revise Position" button in managePositions.html so it takes you to the revise page for that exact position.
Test -
Went to Manage Positions and clicked "Revise Position" on a row, confirmed it opens the revise page and pulls in that position's title, code, WLS level, last revision date, revised-by, and its existing sections correctly.
Clicked "Add Section" a few times and confirmed each click adds a fresh, empty section row.
Clicked "Remove Section" and confirmed it only removes that one row, not the others.
Clicked "Cancel" and confirmed it takes you back to Manage Positions for the right department.
Reloaded the page to make sure the pre-filled data still shows up the same way.