diff --git a/frontend/src/components/Batch/Forms/FormInputs/DistrictInput.vue b/frontend/src/components/Batch/Forms/FormInputs/DistrictInput.vue index 26c65c81..024c999b 100644 --- a/frontend/src/components/Batch/Forms/FormInputs/DistrictInput.vue +++ b/frontend/src/components/Batch/Forms/FormInputs/DistrictInput.vue @@ -242,7 +242,7 @@ export default { methods: { districtTitle(item) { if (item) { - return `${item.districtNumber} - ${item.districtName}`; + return `${item.districtNumber} - ${item.displayName}`; } else { return null; } @@ -291,8 +291,8 @@ export default { ); this.districtInfo = { districtNumber: info.districtNumber, - districtName: info.districtName, - activeFlag: info.activeFlag, + districtName: info.displayName, + activeFlag: info.districtStatusCode, }; this.districts.splice(0, 0, { district: this.district, @@ -334,7 +334,7 @@ export default { }, computed: { - ...mapState(useAppStore, ["getDistrictList"]), + ...mapState(useAppStore, ["getDistrictList", "getDistrictById"]), ...mapState(useBatchRequestFormStore, [ "getDistricts", "getBatchRequest", diff --git a/frontend/src/components/Batch/Forms/FormInputs/SchoolInput.vue b/frontend/src/components/Batch/Forms/FormInputs/SchoolInput.vue index d8685c96..96997989 100644 --- a/frontend/src/components/Batch/Forms/FormInputs/SchoolInput.vue +++ b/frontend/src/components/Batch/Forms/FormInputs/SchoolInput.vue @@ -175,15 +175,15 @@ export default { //if (this.mincode === "") return true; if (!!this.schoolId.length) { try { - let schoolInfo = await SchoolService.getSchoolInfo(this.schoolId); - if (schoolInfo.data) { + let schoolInfo = this.getSchoolById(this.schoolId); + if (schoolInfo) { this.mincodeSchoolInfo = { - displayName: schoolInfo.data.displayName, - canIssueTranscripts: schoolInfo.data.canIssueTranscripts, - canIssueCertificates: schoolInfo.data.canIssueCertificates, - schoolCategoryCode: schoolInfo.data.schoolCategoryCode, + displayName: schoolInfo.displayName, + canIssueTranscripts: schoolInfo.canIssueTranscripts, + canIssueCertificates: schoolInfo.canIssueCertificates, + schoolCategoryCode: schoolInfo.schoolCategoryCode, }; - this.mincode = schoolInfo.data.mincode; //set mincode to add to batch request here since schoolId is now the v-model + this.mincode = schoolInfo.mincode; //set mincode to add to batch request here since schoolId is now the v-model this.schools.splice(0, 0, { mincode: this.mincode, info: this.mincodeSchoolInfo, @@ -216,7 +216,7 @@ export default { }, computed: { - ...mapState(useAppStore, ["getSchoolsList"]), + ...mapState(useAppStore, ["getSchoolsList", "getSchoolById"]), isEmpty() { return this.students.length > 0; },