Skip to content

Commit

Permalink
Merge pull request #2156 from bcgov/feature/pen-review
Browse files Browse the repository at this point in the history
EDX:3081 - PR to assign PEN manually.
  • Loading branch information
arcshiftsolutions authored Dec 20, 2024
2 parents 742db10 + 130d706 commit 28aef9c
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 3 deletions.
9 changes: 7 additions & 2 deletions frontend/src/components/common/AddStudent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@
/>
<PrimaryButton
id="addStudentToNewMessageBtn"
:width="primaryButtonName === 'Add' ? '5rem' : '10rem'"
:disabled="!studentExist"
text="Add"
width="5rem"
:text="primaryButtonName"
@click-action="addStudentToMessage"
/>
</v-col>
Expand Down Expand Up @@ -114,6 +114,11 @@ export default {
type: String,
required: false,
default: ''
},
primaryButtonName: {
type: String,
default: 'Add',
required: false
}
},
data() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@
:disabled="studentDetails?.penMatchResult === 'NEW' || studentDetails?.penMatchResult === 'MATCH'"
@click-action="[clickOpenSearch(), openSearchDemographicsModal()]"
/>
<PrimaryButton
id="modify-search-action"
:secondary="true"
class="mx-2"
text="Manually assign PEN"
:disabled="studentDetails?.penMatchResult === 'NEW' || studentDetails?.penMatchResult === 'MATCH'"
@click-action="togglePENMatchDialog"
/>
<PrimaryButton
id="issue-pen-action"
class="mr-2"
Expand Down Expand Up @@ -160,6 +168,20 @@
@save-new-pen="saveNewPen"
/>
</v-dialog>
<v-dialog
v-model="showPenMatchDialog"
:max-width="600"
>
<AddStudent
style="min-width: 35em"
:institute-type-value="{}"
:additional-student-add-warning="addStudentWarningMessage"
:primary-button-name="'Use PEN'"
@addStudent="matchStudent"
@close:form="togglePENMatchDialog"
@updateAdditionalStudentAddWarning="updateAddStudentWarningMessage"
/>
</v-dialog>
</template>
<script>
Expand All @@ -179,6 +201,7 @@ import PrimaryButton from '../util/PrimaryButton.vue';
import _ from 'lodash';
import SDCIssueNewPEN from './SDCIssueNewPEN.vue';
import {constructPenMatchObjectFromSdcStudent} from '../../utils/common';
import AddStudent from '../common/AddStudent.vue';
export default {
name: 'PenMatchStudentDetails',
Expand All @@ -187,7 +210,8 @@ export default {
StudentDetailsPanel,
PenMatchResults,
PrimaryButton,
SDCIssueNewPEN
SDCIssueNewPEN,
AddStudent,
},
mixins: [alertMixin],
async beforeRouteUpdate(to, from) {
Expand Down Expand Up @@ -224,6 +248,8 @@ export default {
'NEW' : '#2E8540',
},
showPenRequestDialog: false,
showPenMatchDialog: false,
addStudentWarningMessage: '',
};
},
beforeUnmount() {
Expand Down Expand Up @@ -251,6 +277,12 @@ export default {
togglePENRequestDialog(){
this.showPenRequestDialog = !this.showPenRequestDialog;
},
togglePENMatchDialog(){
this.showPenMatchDialog = !this.showPenMatchDialog;
},
updateAddStudentWarningMessage(newValue) {
this.addStudentWarningMessage = newValue;
},
backButtonClick() {
this.$router.push({name: 'collection-view', query: {penMatch: true}, params: {collectionID: this.activeCollection?.collectionID}});
},
Expand Down

0 comments on commit 28aef9c

Please sign in to comment.