From 9ad26cd5b3f5d289ad20543cf34eb3b59dd46a49 Mon Sep 17 00:00:00 2001 From: bledsoef Date: Fri, 22 Nov 2024 15:10:06 -0500 Subject: [PATCH 1/2] fixed links to labor history and form history --- app/controllers/main_routes/main_routes.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/app/controllers/main_routes/main_routes.py b/app/controllers/main_routes/main_routes.py index b4c34ea4..0ae13df8 100755 --- a/app/controllers/main_routes/main_routes.py +++ b/app/controllers/main_routes/main_routes.py @@ -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""" - - - {form.formID.studentSupervisee.FIRST_NAME} {form.formID.studentSupervisee.LAST_NAME} ({form.formID.studentSupervisee.ID}) - + + {form.formID.studentSupervisee.FIRST_NAME} {form.formID.studentSupervisee.LAST_NAME} ({form.formID.studentSupervisee.ID}) {form.status}
- {form.formID.termCode.termName} - {form.formID.POSN_TITLE} ({form.formID.jobType}) - {form.formID.department.DEPT_NAME} + {form.formID.termCode.termName} - {form.formID.POSN_TITLE} ({form.formID.jobType}) - {form.formID.department.DEPT_NAME} """]) return formattedData supervisorHTML = '{} ' - studentHTML = '
{}
{}
' + studentHTML = '
{}
{}
' departmentHTML = ' {}' positionHTML = ' {}' formTypeStatus = ' {}' @@ -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)) @@ -277,7 +274,7 @@ def getFormattedData(filteredSearchResults, view ='simple'): - record.append(f'{form.formID.POSN_TITLE}
{positionField}') + record.append(f'{form.formID.POSN_TITLE}
{positionField}') record.append(hoursField) # Contract Dates record.append("
".join([form.formID.startDate.strftime('%m/%d/%y'), From 9b06346d646c3fd8855c64c44f494084baa0c177 Mon Sep 17 00:00:00 2001 From: bledsoef Date: Fri, 22 Nov 2024 15:18:52 -0500 Subject: [PATCH 2/2] renamed the labor history to form history as it does not actually show the labor history --- app/controllers/main_routes/main_routes.py | 4 ++-- app/static/js/laborhistory.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/main_routes/main_routes.py b/app/controllers/main_routes/main_routes.py index 0ae13df8..14bff875 100755 --- a/app/controllers/main_routes/main_routes.py +++ b/app/controllers/main_routes/main_routes.py @@ -211,7 +211,7 @@ def getFormattedData(filteredSearchResults, view ='simple'): {form.status}
- {form.formID.termCode.termName} - {form.formID.POSN_TITLE} ({form.formID.jobType}) - {form.formID.department.DEPT_NAME} + {form.formID.termCode.termName} - {form.formID.POSN_TITLE} ({form.formID.jobType}) - {form.formID.department.DEPT_NAME} """]) return formattedData @@ -274,7 +274,7 @@ def getFormattedData(filteredSearchResults, view ='simple'): - record.append(f'{form.formID.POSN_TITLE}
{positionField}') + record.append(f'{form.formID.POSN_TITLE}
{positionField}') record.append(hoursField) # Contract Dates record.append("
".join([form.formID.startDate.strftime('%m/%d/%y'), diff --git a/app/static/js/laborhistory.js b/app/static/js/laborhistory.js index 4ad753be..ef01d1a0 100755 --- a/app/static/js/laborhistory.js +++ b/app/static/js/laborhistory.js @@ -11,11 +11,11 @@ $('#positionTable tbody tr td').on('click',function(){ $("#flash_container").html(''); $("#flasher").delay(3000).fadeOut(); } else { - loadLaborHistoryModal(this.id) + loadFormHistoryModal(this.id) } }); -function loadLaborHistoryModal(formHistory) { +function loadFormHistoryModal(formHistory) { $("#modal").modal("show"); $("#modal").find('.modal-content').load('/laborHistory/modal/' + formHistory); setTimeout(function(){ $(".loader").fadeOut("slow"); }, 500);