diff --git a/frontend/src/components/common/forms/SchoolDetailsForm.vue b/frontend/src/components/common/forms/SchoolDetailsForm.vue index 072e78f06..1cec8cbd2 100644 --- a/frontend/src/components/common/forms/SchoolDetailsForm.vue +++ b/frontend/src/components/common/forms/SchoolDetailsForm.vue @@ -445,7 +445,7 @@ v-if="isGradeOfferedUpdateAllowed && editing" id="schoolGrades" v-model="schoolDetailsCopy.grades" - :items="gradeCodes" + :items="gradeOptions" item-title="label" item-value="schoolGradeCode" variant="underlined" @@ -1062,6 +1062,7 @@ export default { ...mapState(instituteStore, ['provinceCodes']), ...mapState(instituteStore, ['countryCodes']), ...mapState(instituteStore, ['gradeCodes']), + ...mapState(instituteStore, ['gradeOptions']), dataReady: function () { return this.userInfo; }, @@ -1088,7 +1089,7 @@ export default { }, isGradeOfferedUpdateAllowed() { return this.school.schoolCategoryCode !== 'INDP_FNS' && this.school.schoolCategoryCode !== 'INDEPEND'; - }, + } }, watch: { schoolDetailsFormValid(value) { @@ -1389,7 +1390,7 @@ export default { sortGrades() { const gradeList = []; for (const grade of this.schoolGradeTypes) { - if (this.schoolDetailsCopy.grades.find((rawGrade) => rawGrade.schoolGradeCode === grade.schoolGradeCode)) { + if (this.schoolDetailsCopy.grades.find((rawGrade) => rawGrade.schoolGradeCode === grade.schoolGradeCode )) { gradeList.push(grade); } } diff --git a/frontend/src/store/modules/institute.js b/frontend/src/store/modules/institute.js index 58a672d7a..df6c28401 100644 --- a/frontend/src/store/modules/institute.js +++ b/frontend/src/store/modules/institute.js @@ -40,7 +40,8 @@ export const instituteStore = defineStore('institute', { activeCountryCodesGet: state => state.activeCountryCodes, independentAuthoritySchoolContacts: state => state.schoolContactTypeCodes?.filter(type => !type.offshoreOnly), offshoreSchoolContacts: state => state.schoolContactTypeCodes?.filter(type => !type.indOnly), - regularSchoolContactTypes: state => state.schoolContactTypeCodes?.filter(type => !type.indOnly && !type.offshoreOnly) + regularSchoolContactTypes: state => state.schoolContactTypeCodes?.filter(type => !type.indOnly && !type.offshoreOnly), + gradeOptions: state => state.gradeCodes?.filter(grade => !['KINDHALF', 'ELEMUNGR', 'SECUNGR'].includes(grade.schoolGradeCode)) }, actions: { async setFacilityTypeCodes(facilityTypeCodes) {