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

EDX-3094: Bug fix #2163

Merged
merged 1 commit into from
Jan 7, 2025
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
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
Loading