Skip to content

Commit

Permalink
EDX-3094: Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SodhiA1 committed Jan 7, 2025
1 parent 3380815 commit 713618f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
4 changes: 3 additions & 1 deletion backend/src/components/sdc/sdc.js
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,8 @@ function mapPenMatchResult(penMatchResult) {
return 'Review Requested';
case 'MULTI':
return 'Multiple PEN Matches';
case 'CONFLICT':
return 'Conflict';
default:
return penMatchResult;
}
Expand Down Expand Up @@ -435,7 +437,7 @@ function createAssignedPENSearchCriteria(searchParams) {
let searchCriteriaList = [];

if(searchParams.label === 'REVIEW_PEN') {
searchCriteriaList.push({ key: 'penMatchResult', operation: FILTER_OPERATION.IN, value: 'MULTI,INREVIEW', valueType: VALUE_TYPE.STRING, condition: CONDITION.AND });
searchCriteriaList.push({ key: 'penMatchResult', operation: FILTER_OPERATION.IN, value: 'MULTI,INREVIEW,CONFLICT', valueType: VALUE_TYPE.STRING, condition: CONDITION.AND });
} else if(searchParams.label === 'NEW_PEN') {
searchCriteriaList.push({ key: 'penMatchResult', operation: FILTER_OPERATION.IN, value: 'NEW', valueType: VALUE_TYPE.STRING, condition: CONDITION.AND });
}
Expand Down
23 changes: 13 additions & 10 deletions frontend/src/components/data-collection/PenMatchStudentDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ export default {
'MULTI' : '#7737BD',
'MATCH' : '#2E8540',
'NEW' : '#2E8540',
'CONFLICT' : '#7737BD'
},
showPenRequestDialog: false,
showPenMatchDialog: false,
Expand Down Expand Up @@ -304,9 +305,6 @@ export default {
this.setNavigationPage(index);
this.$router.push({name: 'student-detail', params: {studentID: this.selectedIDs[index]}});
},
navigate() {
this.getSdcSchoolCollectionStudentDetail(this.selectedIDs[this.page - 1]);
},
isLoading() {
return this.loadingCount > 0;
},
Expand Down Expand Up @@ -342,7 +340,6 @@ export default {
});
}
this.title = `${this.possibleMatches.length || 0} Matches`;
this.isStudentDataUpdated = false; // pen match result is refreshed now enable the table.
} catch (error) {
console.log(error);
this.setFailureAlert('PEN Match API call failed, please try again.');
Expand Down Expand Up @@ -377,7 +374,11 @@ export default {
this.clonedStudentDetail.assignedStudentId = matchedStudent.studentID;
this.updatePEN('MATCH').finally(() => {
this.isMatchingToStudentRecord = false;
this.getSdcSchoolCollectionStudentDetail(this.$route.params.studentID);
if(!this.nextDisabled) {
this.clickNextBtn();
} else {
this.getSdcSchoolCollectionStudentDetail(this.$route.params.studentID);
}
});
},
async saveNewPen(newPenDetails) {
Expand All @@ -387,7 +388,11 @@ export default {
this.updatePEN('NEW').finally(() => {
this.isIssuingNewPen = false;
this.togglePENRequestDialog();
this.getSdcSchoolCollectionStudentDetail(this.$route.params.studentID);
if(!this.nextDisabled) {
this.clickNextBtn();
} else {
this.getSdcSchoolCollectionStudentDetail(this.$route.params.studentID);
}
});
},
async updatePEN(type) {
Expand All @@ -398,10 +403,6 @@ export default {
} else {
this.setSuccessAlert('PEN has been MATCHED successfully.');
}
if(!this.nextDisabled) {
this.clickNextBtn();
}
})
.catch(error => {
this.setFailureAlert(error?.response?.data?.message ? error?.response?.data?.message : 'An error occurred while updating PEN. Please try again later.');
Expand Down Expand Up @@ -431,6 +432,8 @@ export default {
return 'Review Requested';
case 'MULTI':
return 'Multiple PEN Matches';
case 'CONFLICT':
return 'Conflict';
case 'NEW':
return 'New PEN Assigned';
case 'MATCH':
Expand Down

0 comments on commit 713618f

Please sign in to comment.