Skip to content

Commit

Permalink
Merge pull request #1958 from bcgov/fix/EDX-2947
Browse files Browse the repository at this point in the history
Fix for 2947. Not allow district user to add or remove students after…
  • Loading branch information
SodhiA1 authored Sep 25, 2024
2 parents 9d7fd04 + 7299537 commit 0efc08a
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
class="d-flex justify-end"
>
<v-btn
v-if="isCollectionActive"
v-if="isCollectionActive && !isSubmitted"
id="add"
color="#003366"
text="Add Student"
Expand All @@ -43,7 +43,7 @@
@click="addStudent"
/>
<v-btn
v-if="isCollectionActive"
v-if="isCollectionActive && !isSubmitted"
id="remove"
color="#003366"
class="mr-1 mb-1"
Expand Down Expand Up @@ -83,7 +83,7 @@
:is-loading="isLoading"
:reset="resetFlag"
:school-collection="schoolCollection"
:disable-select="!isCollectionActive"
:disable-select="!isCollectionActive || isSubmitted"
@reload="reload"
@editSelectedRow="editStudent"

Check warning on line 88 in frontend/src/components/sdcCollection/sdcSchoolCollection/stepThreeVerifyData/DetailComponent.vue

View workflow job for this annotation

GitHub Actions / test

v-on event '@editSelectedRow' must be hyphenated
@selections="selectedStudents = $event"
Expand Down Expand Up @@ -217,7 +217,8 @@ export default {
editStudentSheet: false,
addStudentSheet: false,
resetFlag: false,
reloadStudentsFlag: false
reloadStudentsFlag: false,
afterSubmittedStatuses: ['P_DUP_POST', 'P_DUP_VRFD', 'COMPLETED'],
};
},
computed: {
Expand All @@ -228,6 +229,9 @@ export default {
},
hasEditPermission(){
return (this.userInfo?.activeInstitutePermissions?.filter(perm => perm === PERMISSION.SCHOOL_SDC_EDIT).length > 0);
},
isSubmitted(){
return this.afterSubmittedStatuses.includes(this.schoolCollection?.sdcSchoolCollectionStatusCode);
}
},
created() {
Expand Down

0 comments on commit 0efc08a

Please sign in to comment.