Skip to content

Commit d939c42

Browse files
authored
Merge pull request #2321 from bcgov/feature/eac-11
EAC-11, EAC-29
2 parents f6e0841 + af1517c commit d939c42

File tree

8 files changed

+79
-117
lines changed

8 files changed

+79
-117
lines changed

frontend/src/components/DashboardTable.vue

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -485,11 +485,6 @@
485485
</h4>
486486
</v-col>
487487
</v-row>
488-
<v-row no-gutters>
489-
<v-col>
490-
School Year: {{ schoolYear }}
491-
</v-col>
492-
</v-row>
493488
</v-col>
494489
</v-row>
495490
</v-card>
@@ -610,9 +605,6 @@ export default {
610605
}
611606
this.isDistrictActive();
612607
}
613-
if (!this.disableAssessmentFunctionality && (this.hasRequiredPermission(PERMISSION.EAS_SCH_EDIT) || this.hasRequiredPermission(PERMISSION.EAS_DIS_EDIT))) {
614-
this.getActiveSessionsForSchoolYear();
615-
}
616608
},
617609
methods: {
618610
...mapActions(sdcCollectionStore, ['setCurrentCollectionTypeCode', 'setCollectionMetaData']),
@@ -802,23 +794,11 @@ export default {
802794
},
803795
redirectToAssessment() {
804796
if(this.isLoggedInDistrictUser) {
805-
router.push({name: 'district-assessment-sessions', params: {institutionID: this.userInfo.activeInstituteIdentifier}});
797+
router.push({name: 'district-assessment-session-detail'});
806798
} else if (this.isLoggedInSchoolUser) {
807-
router.push({name: 'school-assessment-sessions', params: {institutionID: this.userInfo.activeInstituteIdentifier}});
799+
router.push({name: 'school-assessment-session-detail'});
808800
}
809801
},
810-
getActiveSessionsForSchoolYear() {
811-
ApiService.apiAxios.get(ApiRoutes.assessments.GET_ASSESSMENT_SESSIONS+'/active/'+this.userInfo.activeInstituteType).then(response => {
812-
if(response.data?.length >0) {
813-
this.schoolYear = response.data[0].schoolYear;
814-
}
815-
}).catch(error => {
816-
console.error(error);
817-
this.setFailureAlert(error.response?.data?.message || error.message);
818-
}).finally(() => {
819-
this.loadingTable = false;
820-
});
821-
},
822802
isSchoolActive(){
823803
appStore().getInstitutesData().finally(() => {
824804
this.isTableLoading = false;

frontend/src/components/assessments/AssessmentSessionDetail.vue

Lines changed: 47 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,30 @@
11
<template>
22
<v-container class="containerSetup" :fluid="true">
3-
<v-row class="d-flex justify-start">
4-
<v-col>
5-
<h2 class="subjectHeading">School Year: {{ schoolYear.replace('-','/') }}</h2>
6-
</v-col>
7-
</v-row>
8-
<v-row no-gutters>
9-
<v-col>
10-
<v-divider class="divider" />
11-
</v-col>
12-
</v-row>
133
<v-row v-if="isLoading" class="mt-0">
144
<v-col>
155
<Spinner />
166
</v-col>
177
</v-row>
188
<v-row v-else>
19-
<v-col class="border">
20-
<v-tabs v-model="tab" color="#38598a">
21-
<v-tab :value="1"> Registrations and Results </v-tab>
22-
</v-tabs>
23-
<v-window v-model="tab">
24-
<v-window-item :value="1" transition="false" reverse-transition="false">
25-
<StudentRegistrations v-if="schoolYearSessions.length > 0" :school-year="schoolYear"
26-
:school-year-sessions="schoolYearSessions" :session-ID="sessionID" />
27-
</v-window-item>
28-
<v-window-item :value="2" transition="false" reverse-transition="false"/>
29-
<v-window-item :value="3" transition="false" reverse-transition="false"/>
30-
</v-window>
31-
</v-col>
32-
</v-row>
9+
<v-col>
10+
<v-tabs v-model="tab" color="#38598a">
11+
<v-tab
12+
:value="1"
13+
prepend-icon="mdi-account-multiple-outline"
14+
>
15+
Registrations and Results
16+
</v-tab>
17+
</v-tabs>
18+
<v-window v-model="tab">
19+
<v-window-item :value="1" transition="false" reverse-transition="false">
20+
<StudentRegistrations v-if="schoolYearSessions.length > 0" :school-year="schoolYear"
21+
:school-year-sessions="schoolYearSessions" :session-ID="sessionID" />
22+
</v-window-item>
23+
<v-window-item :value="2" transition="false" reverse-transition="false"/>
24+
<v-window-item :value="3" transition="false" reverse-transition="false"/>
25+
</v-window>
26+
</v-col>
27+
</v-row>
3328
</v-container>
3429
</template>
3530
<script>
@@ -49,10 +44,6 @@ export default {
4944
},
5045
mixins: [alertMixin],
5146
props: {
52-
schoolYear: {
53-
type: String,
54-
required: true,
55-
},
5647
sessionID: {
5748
type: String,
5849
required: false,
@@ -64,17 +55,33 @@ export default {
6455
assessmentStudents: [],
6556
schoolYearSessions: [],
6657
isLoading: false,
67-
tab: ''
58+
tab: '',
59+
schoolYear: '',
60+
session: ''
6861
};
6962
},
7063
computed: {
7164
...mapState(authStore, ['userInfo']),
7265
},
73-
created() {
66+
async created() {
7467
this.loading = true;
75-
this.getAllSessionsforYear();
68+
await this.getActiveSessionsForSchoolYear();
7669
},
7770
methods: {
71+
async getActiveSessionsForSchoolYear() {
72+
ApiService.apiAxios.get(ApiRoutes.assessments.GET_ASSESSMENT_SESSIONS+'/active/'+this.userInfo.activeInstituteType).then(response => {
73+
if(response.data?.length >0) {
74+
this.schoolYear = response.data[0].schoolYear.replace(/\//g, '-');
75+
this.session = response.data[0].courseYear + '/' + response.data[0].courseMonth;
76+
}
77+
}).catch(error => {
78+
console.error(error);
79+
this.setFailureAlert(error.response?.data?.message || error.message);
80+
}).finally(() => {
81+
this.loadingTable = false;
82+
this.getAllSessionsforYear();
83+
});
84+
},
7885
async getAllSessionsforYear() {
7986
this.loading = true;
8087
ApiService.apiAxios
@@ -90,14 +97,7 @@ export default {
9097
.finally(() => {
9198
this.loading = false;
9299
});
93-
},
94-
backToAssesmentSessions() {
95-
if(this.userInfo.activeInstituteType === 'DISTRICT'){
96-
this.$router.push({name: 'district-assessment-sessions', params: {institutionID: this.userInfo.activeInstituteIdentifier}});
97-
} else {
98-
this.$router.push({name: 'school-assessment-sessions', params: {institutionID: this.userInfo.activeInstituteIdentifier}});
99-
}
100-
},
100+
}
101101
},
102102
};
103103
</script>
@@ -108,10 +108,14 @@ export default {
108108
padding: 35px;
109109
margin-bottom: 2em;
110110
}
111-
.divider {
112-
border-color: #fcba19;
113-
border-width: 3px;
114-
opacity: unset;
111+
.heading {
112+
margin-top: 12px;
113+
margin-bottom: 1em;
114+
font-weight: bold;
115+
text-align: start;
116+
line-height: 1.5;
117+
font-size: 1rem;
118+
color: #38598AFF;
115119
}
116120
.containerSetup {
117121
padding-right: 5em !important;

frontend/src/components/assessments/registrations/StudentRegistrations.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<v-btn
1313
id="addStudentReg"
1414
color="#003366"
15-
text="Add Record"
15+
text="Add Registration"
1616
class="mr-1 mb-1"
1717
variant="outlined"
1818
@click="openCreateStudentRegDialog"

frontend/src/components/assessments/registrations/StudentRegistrationsCustomTable.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,14 @@
3939
@click="rowClicked(props.item)"
4040
>
4141
<td v-for="column in headers" :key="column.key" class="td-data">
42-
<div>
43-
<span v-if="props.item[column.key]">{{props.item[column.key] }}</span>
44-
</div>
42+
<span v-if="column.key === 'session'">
43+
{{ props.item['courseYear'] }}/{{ props.item['courseMonth'] }}
44+
</span>
45+
<span v-else-if="column.key === 'name'">
46+
{{ props.item['surname'] }}, {{ props.item['givenName'] }}
47+
</span>
48+
<span v-else-if="props.item[column.key]">{{props.item[column.key] }}</span>
49+
<span v-else>-</span>
4550
</td>
4651
</tr>
4752
</template>

frontend/src/components/util/NavBar.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,8 @@ export default {
235235
authorized: this.hasRequiredPermission(PERMISSION.GRAD_SCH_UPLOAD) && this.userInfo.activeInstituteType === 'SCHOOL',
236236
},
237237
{
238-
title: PAGE_TITLES.ASSESSMENT_SESSIONS,
239-
link: { name: 'school-assessment-sessions', params: {institutionID: this.userInfo.activeInstituteIdentifier}},
238+
title: PAGE_TITLES.ASSESSMENT,
239+
link: {name: 'school-assessment-session-detail'},
240240
authorized: this.hasRequiredPermission(PERMISSION.EAS_SCH_EDIT) && this.userInfo.activeInstituteType === 'SCHOOL',
241241
},
242242
{
@@ -265,8 +265,8 @@ export default {
265265
authorized: this.hasRequiredPermission(PERMISSION.GRAD_DIS_UPLOAD) && this.userInfo.activeInstituteType === 'DISTRICT',
266266
},
267267
{
268-
title: PAGE_TITLES.ASSESSMENT_SESSIONS,
269-
link: { name: 'district-assessment-sessions', params: {institutionID: this.userInfo.activeInstituteIdentifier}},
268+
title: PAGE_TITLES.ASSESSMENT,
269+
link: {name: 'district-assessment-session-detail'},
270270
authorized: this.hasRequiredPermission(PERMISSION.EAS_DIS_EDIT) && this.userInfo.activeInstituteType === 'DISTRICT',
271271
},
272272
{

frontend/src/router.js

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import ApiService from './common/apiService';
3333
import SDCDistrictCollectionView from './components/sdcCollection/sdcDistrictCollection/SDCDistrictCollectionView.vue';
3434
import {PERMISSION} from './utils/constants/Permission';
3535
import GraduationSchoolTabs from './components/graduation/school/GraduationSchoolTabs.vue';
36-
import AssessmentSessions from './components/assessments/AssessmentSessions.vue';
3736
import AssessmentSessionDetail from './components/assessments/AssessmentSessionDetail.vue';
3837
import GradReportsAndTranscripts from './components/graduation/school/reports/GradSchoolReportsAndTranscripts.vue';
3938
import GradErrorsView from './components/graduation/school/upload/GradErrorsView.vue';
@@ -369,45 +368,23 @@ const router = createRouter({
369368
},
370369
},
371370
{
372-
path: '/assessment-sessions/:institutionID',
373-
name: 'district-assessment-sessions',
374-
component: AssessmentSessions,
375-
props: true,
376-
meta: {
377-
pageTitle: PAGE_TITLES.ASSESSMENT_SESSIONS,
378-
requiresAuth: true,
379-
permission: PERMISSION.EAS_DIS_EDIT
380-
},
381-
},
382-
{
383-
path: '/assessment-sessions/:institutionID',
384-
name: 'school-assessment-sessions',
385-
component: AssessmentSessions,
386-
props: true,
387-
meta: {
388-
pageTitle: PAGE_TITLES.ASSESSMENT_SESSIONS,
389-
requiresAuth: true,
390-
permission: PERMISSION.EAS_SCH_EDIT
391-
},
392-
},
393-
{
394-
path: '/assessment-sessions/details/:schoolYear/:sessionID?',
371+
path: '/assessment-sessions/details',
395372
name: 'district-assessment-session-detail',
396373
component: AssessmentSessionDetail,
397374
props: true,
398375
meta: {
399-
pageTitle: PAGE_TITLES.ASSESSMENT_SESSION_DETAIL,
376+
pageTitle: PAGE_TITLES.ASSESSMENT,
400377
requiresAuth: true,
401378
permission: PERMISSION.EAS_DIS_EDIT
402379
},
403380
},
404381
{
405-
path: '/assessment-sessions/details/:schoolYear/:sessionID?',
382+
path: '/assessment-sessions/details',
406383
name: 'school-assessment-session-detail',
407384
component: AssessmentSessionDetail,
408385
props: true,
409386
meta: {
410-
pageTitle: PAGE_TITLES.ASSESSMENT_SESSION_DETAIL,
387+
pageTitle: PAGE_TITLES.ASSESSMENT,
411388
requiresAuth: true,
412389
permission: PERMISSION.EAS_SCH_EDIT
413390
},

frontend/src/utils/constants.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,7 @@ export const PAGE_TITLES = Object.freeze({
173173
GRADUATION: 'Graduation',
174174
GRAD_DATA_COLLECTION: 'Graduation Records and Achievement Data Collection',
175175
GRAD_UPLOAD_ERRORS: 'Graduation Errors and Warnings',
176-
ASSESSMENT: 'Assessments',
177-
ASSESSMENT_SESSIONS: 'Assessment Sessions',
178-
ASSESSMENT_SESSION_DETAIL: 'Assessment Session Detail',
176+
ASSESSMENT: 'Graduation Assessments',
179177
GRAD_PROJECTIONS: 'Transcript Verification Reports',
180178
GRAD_SCHOOL_STUDENT_SEARCH: 'Student Search',
181179
GRAD_SCHOOL_CURRENT_STUDENTS: 'Current Students',

frontend/src/utils/eas/StudentRegistrationTableConfiguration.js

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,15 @@ export const PROFICIENCY_SCORE_RANGE_FILTER = Object.freeze(
8686
export const SCHOOL_YEAR_REGISTRATIONS_VIEW_DISTRICT = Object.freeze(
8787
{
8888
tableHeaders: [
89-
{ title: 'Session', key: 'sessionName_desc'},
89+
{ title: 'Session', key: 'session'},
9090
{ title: 'School', key: 'schoolName_desc' },
91-
{ title: 'Assessment Center', key: 'assessmentCenterName_desc' },
9291
{ title: 'PEN', key: 'pen' },
92+
{ title: 'Assessment Center', key: 'assessmentCenterName_desc' },
9393
{ title: 'Local ID', key: 'localID' },
94-
{ title: 'Surname', key: 'surName' },
95-
{ title: 'Given Name', key: 'givenName' },
96-
{ title: 'Course Name (Code)', key: 'assessmentTypeName_desc' },
97-
{ title: 'Special Case', key: 'provincialSpecialCaseName_desc' },
98-
{ title: 'Proficiency Score', key: 'proficiencyScore' },
94+
{ title: 'Surname, Given Name', key: 'name' },
95+
{ title: 'AssessmentCode', key: 'assessmentTypeCode' },
96+
{ title: 'Score', key: 'score' },
97+
{ title: 'ISR', key: 'isr' },
9998
],
10099
allowedFilters: {
101100
session: SESSION_CODE_FILTER,
@@ -109,15 +108,14 @@ export const SCHOOL_YEAR_REGISTRATIONS_VIEW_DISTRICT = Object.freeze(
109108
export const SCHOOL_YEAR_REGISTRATIONS_VIEW_SCHOOL = Object.freeze(
110109
{
111110
tableHeaders: [
112-
{ title: 'Session', key: 'sessionName_desc'},
113-
{ title: 'Assessment Center', key: 'assessmentCenterName_desc' },
111+
{ title: 'Session', key: 'session'},
114112
{ title: 'PEN', key: 'pen' },
113+
{ title: 'Assessment Center', key: 'assessmentCenterName_desc' },
115114
{ title: 'Local ID', key: 'localID' },
116-
{ title: 'Surname', key: 'surName' },
117-
{ title: 'Given Name', key: 'givenName' },
118-
{ title: 'Course Name (Code)', key: 'assessmentTypeName_desc' },
119-
{ title: 'Special Case', key: 'provincialSpecialCaseName_desc' },
120-
{ title: 'Proficiency Score', key: 'proficiencyScore' },
115+
{ title: 'Surname, Given Name', key: 'name' },
116+
{ title: 'AssessmentCode', key: 'assessmentTypeCode' },
117+
{ title: 'Score', key: 'score' },
118+
{ title: 'ISR', key: 'isr' },
121119
],
122120
allowedFilters: {
123121
session: SESSION_CODE_FILTER,

0 commit comments

Comments
 (0)