From 713618f4433d045c80064ec4385bd26bd0372e5b Mon Sep 17 00:00:00 2001 From: Avisha Sodhi <38086281+SodhiA1@users.noreply.github.com> Date: Tue, 7 Jan 2025 13:23:43 -0800 Subject: [PATCH] EDX-3094: Bug fix --- backend/src/components/sdc/sdc.js | 4 +++- .../PenMatchStudentDetails.vue | 23 +++++++++++-------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/backend/src/components/sdc/sdc.js b/backend/src/components/sdc/sdc.js index fc52b5db..dc8d9faa 100644 --- a/backend/src/components/sdc/sdc.js +++ b/backend/src/components/sdc/sdc.js @@ -378,6 +378,8 @@ function mapPenMatchResult(penMatchResult) { return 'Review Requested'; case 'MULTI': return 'Multiple PEN Matches'; + case 'CONFLICT': + return 'Conflict'; default: return penMatchResult; } @@ -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 }); } diff --git a/frontend/src/components/data-collection/PenMatchStudentDetails.vue b/frontend/src/components/data-collection/PenMatchStudentDetails.vue index 8bb556f5..a0c628be 100644 --- a/frontend/src/components/data-collection/PenMatchStudentDetails.vue +++ b/frontend/src/components/data-collection/PenMatchStudentDetails.vue @@ -246,6 +246,7 @@ export default { 'MULTI' : '#7737BD', 'MATCH' : '#2E8540', 'NEW' : '#2E8540', + 'CONFLICT' : '#7737BD' }, showPenRequestDialog: false, showPenMatchDialog: false, @@ -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; }, @@ -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.'); @@ -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) { @@ -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) { @@ -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.'); @@ -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':