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

Fixed links to labor history and form history #464

Merged
merged 2 commits into from
Nov 22, 2024
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
15 changes: 6 additions & 9 deletions app/controllers/main_routes/main_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,19 +206,17 @@ def getFormattedData(filteredSearchResults, view ='simple'):
for form in filteredSearchResults:
# The order in which you append the items to 'record' matters and it should match the order of columns on the table!
formattedData.append([f"""
<a>
<span onclick=loadLaborHistoryModal({form.formID.laborStatusFormID}) value=0>
<span class="h4">{form.formID.studentSupervisee.FIRST_NAME} {form.formID.studentSupervisee.LAST_NAME} ({form.formID.studentSupervisee.ID})</span>
</span>
<a href="/laborHistory/{form.formID.studentSupervisee.ID}">
<span class="h4">{form.formID.studentSupervisee.FIRST_NAME} {form.formID.studentSupervisee.LAST_NAME} ({form.formID.studentSupervisee.ID})</span>
</a>
<span class="pushRight">{form.status}</span>
<br>
<span class="pushLeft h6"> {form.formID.termCode.termName} - {form.formID.POSN_TITLE} ({form.formID.jobType}) - {form.formID.department.DEPT_NAME}</span>
<span class="pushLeft h6"> {form.formID.termCode.termName} - <a><span onclick=loadFormHistoryModal({form.formID.laborStatusFormID})>{form.formID.POSN_TITLE} ({form.formID.jobType})</span></a> - {form.formID.department.DEPT_NAME}</span>
"""])
return formattedData

supervisorHTML = '<span href="#" aria-label="{}">{} </span><a href="mailto:{}"><span class="glyphicon glyphicon-envelope mailtoIcon"></span></span>'
studentHTML = '<div><a><span onclick=loadLaborHistoryModal({}) aria-label="{}">{} </span></a><br>{} <a href="mailto:{}"><span class="glyphicon glyphicon-envelope mailtoIcon"></span></span></a></div>'
studentHTML = '<div><a href="/laborHistory/{}">{}</a><br>{} <a href="mailto:{}"><span class="glyphicon glyphicon-envelope mailtoIcon"></span></span></a></div>'
departmentHTML = '<span href="#" aria-label="{}-{}"> {}</span>'
positionHTML = '<span href="#" aria-label="{}"> {}</span>'
formTypeStatus = '<span href="#" aria-label=""> {}</span>'
Expand All @@ -230,8 +228,7 @@ def getFormattedData(filteredSearchResults, view ='simple'):
record.append(form.formID.termCode.termName)
# Student
record.append(studentHTML.format(
form.formID.laborStatusFormID,
form.formID.studentSupervisee.ID,
form.formID.studentSupervisee.ID,
f'{form.formID.studentSupervisee.preferred_name if form.formID.studentSupervisee.preferred_name else form.formID.studentSupervisee.legal_name} {form.formID.studentSupervisee.LAST_NAME}',
form.formID.studentSupervisee.ID,
form.formID.studentSupervisee.STU_EMAIL))
Expand Down Expand Up @@ -277,7 +274,7 @@ def getFormattedData(filteredSearchResults, view ='simple'):



record.append(f'{form.formID.POSN_TITLE}<br>{positionField}')
record.append(f'<a><span onclick=loadFormHistoryModal({form.formID.laborStatusFormID})>{form.formID.POSN_TITLE}</span></a><br>{positionField}')
record.append(hoursField)
# Contract Dates
record.append("<br>".join([form.formID.startDate.strftime('%m/%d/%y'),
Expand Down
4 changes: 2 additions & 2 deletions app/static/js/laborhistory.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.