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

EDX-2451: displaying the school name and mincode when a district user… #1506

Merged
merged 1 commit into from
May 1, 2024
Merged
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 @@ -7,7 +7,11 @@
no-gutters
class="mt-1 d-flex justify-start"
>
<v-col>
<v-col v-if="this.userInfo.activeInstituteType === 'DISTRICT'">
<h2>{{ sdcSchoolSchool?.schoolName }} ({{ sdcSchoolSchool?.mincode }})</h2>
<h3>{{ currentCollectionTypeCode }} {{ currentCollectionYear }} Collection</h3>
</v-col>
<v-col v-else>
<h2>{{ currentCollectionTypeCode }} {{ currentCollectionYear }} Collection</h2>
</v-col>
</v-row>
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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;
Expand Down
Loading