Created an Individual Positions Detail Page - #660
Conversation
…l and css for the page
…SoftwareDevTeam/lsf into individual_pos_page_JA
…a, and adjusted a few line of demp_data to provide more than one example of accurate data.
…dd the pdf format in download.py
| positions = positionsList, | ||
| posURL = posURL) | ||
|
|
||
| @main_bp.route('/department/<org>/<account>/positions/<positionCode>', methods=['GET']) |
There was a problem hiding this comment.
this whole route should be in departmentportal.py route not in main_route
| posURL = posURL) | ||
|
|
||
| @main_bp.route('/department/<org>/<account>/positions/<positionCode>', methods=['GET']) | ||
| def individualPosition(org, account, positionCode): |
There was a problem hiding this comment.
instead of individualPosition it should be positionDescription as we are basically displaying the content of PDF
| position=position | ||
| ) | ||
|
|
||
| @main_bp.route('/department/<org>/<account>/positions/<positionCode>/download', methods=['GET']) |
There was a problem hiding this comment.
in departmentPortal.py route
| except (NameError, DoesNotExist): | ||
| return render_template('errors/404.html'), 404 | ||
|
|
||
| position = PositionHistory.get_or_none( |
There was a problem hiding this comment.
turn this into one line and the positionHisotry.status="active" shouldn't be there as the issue description says: Display whether the position is:
-Active
-Requested
-Inactive
Notes:
This page displays only the current version. meaning we will display either active or requested or inactive but we will only show the current one meaning the most recent one. so your filter here should be the most recent instead of active filter. this mean if the most recent one is a requested status that should be shown.
|
|
||
| return None | ||
|
|
||
| def makePositionDescriptionPDF(department, position, revisionAuthor): |
There was a problem hiding this comment.
revisionAuthor is an extra parameter that is not use that mean you should also remove it from the function called in main routes: makePositionDescriptionPDF(dept, position, position.revisedBy) so remove the positions.revisedBY as the parameter revisionauthor is never used.
| ('Position Code', position.positionCode), | ||
| ('WLS Level', position.wls), | ||
| ('Status', position.status), | ||
| ('Last Revision Date', position.revisionDate), |
There was a problem hiding this comment.
create a test for the makepositionsdescriptionPDF you can find there are modules that read pdf and traverse and you can assert those.
…escription and downloadPositionDescription out of main_routes.py and into departmentPortal.py.
…nd accounts for revision dates. Added checks for revision dates to account for positions that have status' other than active in departmentPortal.py. Modified parameters in downloads.py.
… the new getPositionRevision function in the test_getPosition.py.
…instances accordingly. Began work on a test function for download,py
Issue Description
Fixes Issue #611
Changes
Implemented the following requirements:
Testing
Getting to the Individual Positions Detail Page
Downloading a Position Description PDF
Back Button
Rational for Implementation Decisions