Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grad2 3240 #725

Merged
merged 6 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
</div>
<div>
<strong>School Category:</strong>
{{ item.info.schoolCategoryCode }}
{{ displaySchoolCategoryCode(item.info.schoolCategoryCode) }}
</div>
</template>
<template #bottom> </template>
Expand Down Expand Up @@ -216,7 +216,7 @@ export default {
},

computed: {
...mapState(useAppStore, ["getSchoolsList", "getSchoolById"]),
...mapState(useAppStore, ["getSchoolsList", "getSchoolById", "displaySchoolCategoryCode"]),
isEmpty() {
return this.students.length > 0;
},
Expand Down
6 changes: 2 additions & 4 deletions frontend/src/components/Common/SchoolDetailsDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@
</div>
<div class="my-1">
<strong>School Category </strong
>{{
getInstituteCategoryByCode(school.schoolCategoryCode)?.legacyCode
}}&nbsp;{{ school.schoolCategoryCode }}
>{{ displaySchoolCategoryCode(school.schoolCategoryCode) }}
</div>
<div class="my-1">
<strong>Issue Transcripts </strong
Expand Down Expand Up @@ -65,7 +63,7 @@ export default {
computed: {
...mapState(useAppStore, {
getDistrictById: "getDistrictById",
getInstituteCategoryByCode: "getInstituteCategoryByCode",
displaySchoolCategoryCode: "displaySchoolCategoryCode",
}),
},
methods: {
Expand Down
7 changes: 7 additions & 0 deletions frontend/src/store/modules/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ export const useAppStore = defineStore("app", {
(categoryCode) => code === categoryCode.schoolCategoryCode
);
},
displaySchoolCategoryCode: (state) => (code) => {
const categoryCode = state.instituteCategoryCodes.find(
(categoryCode) => code === categoryCode.schoolCategoryCode
)

return categoryCode?.legacyCode + " - " + categoryCode?.label
},
getInstituteFacilityCodes: (state) => state.instituteFacilityCodes,
getInstituteFacilityCode: (state) => {
return (code) =>
Expand Down
Loading