Skip to content

Commit

Permalink
Merge pull request #1847 from bcgov/feature/indies
Browse files Browse the repository at this point in the history
Additional fix for indies
  • Loading branch information
trev-dev authored Jan 3, 2024
2 parents 5572c5c + b8d59a1 commit 78ef3f3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions backend/src/components/institute/institute.js
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,11 @@ async function updateSchool(req, res) {
}
payload.neighborhoodLearning = nlcObjectsArray;
payload.grades=gradesObjectArray;

if(!['OFFSHORE', 'INDEPEND', 'INDP_FNS'].includes(payload.schoolCategoryCode)){
payload.independentAuthorityId = null;
}

const result = await utils.putData(config.get('server:institute:instituteSchoolURL') + '/' + payload.schoolId, payload, utils.getUser(req).idir_username);
return res.status(HttpStatus.OK).json(result);

Expand Down
4 changes: 3 additions & 1 deletion frontend/src/components/institute/common/Details.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
</v-col>
</v-row>
<v-row
v-if="editing && schoolDetailsCopy.independentAuthorityId"
v-if="editing && ['OFFSHORE', 'INDEPEND', 'INDP_FNS'].includes(schoolDetailsCopy.schoolCategoryCode)"
class="d-flex justify-start"
>
<v-col
Expand All @@ -110,6 +110,7 @@
item-value="authorityID"
item-title="authorityCodeName"
:items="activeAuthorities"
:rules="[rules.required()]"
variant="underlined"
class="pt-0"
clearable
Expand Down Expand Up @@ -288,6 +289,7 @@
item-title="label"
variant="underlined"
label="School Category"
@update:model-value="validateForm"
class="mt-n5"
single
required
Expand Down

0 comments on commit 78ef3f3

Please sign in to comment.