From ab01920bc007c977967a5e74a9b96f46d3518131 Mon Sep 17 00:00:00 2001 From: keeganbcgov Date: Wed, 1 May 2024 14:26:27 -0700 Subject: [PATCH] EDX-2451: displaying the school name and mincode when a district user is viewing a SDC School Collection. --- .../sdcSchoolCollection/SDCCollectionView.vue | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/sdcCollection/sdcSchoolCollection/SDCCollectionView.vue b/frontend/src/components/sdcCollection/sdcSchoolCollection/SDCCollectionView.vue index 7f3a43cf9..72c781ab4 100644 --- a/frontend/src/components/sdcCollection/sdcSchoolCollection/SDCCollectionView.vue +++ b/frontend/src/components/sdcCollection/sdcSchoolCollection/SDCCollectionView.vue @@ -7,7 +7,11 @@ no-gutters class="mt-1 d-flex justify-start" > - + +

{{ sdcSchoolSchool?.schoolName }} ({{ sdcSchoolSchool?.mincode }})

+

{{ currentCollectionTypeCode }} {{ currentCollectionYear }} Collection

+
+

{{ currentCollectionTypeCode }} {{ currentCollectionYear }} Collection

@@ -179,6 +183,8 @@ import StepThreeVerifyData from './stepThreeVerifyData/StepThreeVerifyData.vue'; import StepFiveSchoolDetails from './StepFiveSchoolDetails.vue'; import StepSixSchoolContacts from './StepSixSchoolContacts.vue'; import StepSevenSubmitData from './StepSevenSubmitData.vue'; +import {authStore} from '../../../store/modules/auth'; +import {appStore} from '../../../store/modules/app'; export default { name: 'SDCCollectionView', @@ -210,16 +216,25 @@ export default { }, computed: { ...mapState(sdcCollectionStore, ['currentCollectionTypeCode', 'schoolCollection','currentCollectionYear']), + ...mapState(appStore, ['activeSchoolsMap']), + ...mapState(authStore, ['userInfo']), stepInCollection() { return this.getIndexOfSDCCollectionByStatusCode(this.schoolCollection?.sdcSchoolCollectionStatusCode); }, isStepComplete() { let indexCurrentCollection = this.getIndexOfSDCCollectionByStatusCode(this.schoolCollection.sdcSchoolCollectionStatusCode); return this.currentStep < indexCurrentCollection; + }, + sdcSchoolSchool() { + if (!this.schoolID) { + return null; + } + return this.activeSchoolsMap.get(this.schoolID); } }, created() { this.isLoading = !this.isLoading; + appStore().getInstitutesData(); sdcCollectionStore().getSchoolCollection(this.$route.params.schoolCollectionID).finally(() => { this.schoolCollectionObject = this.schoolCollection; this.schoolID = this.schoolCollection.schoolID;