Skip to content

Commit 1181bc2

Browse files
Merge remote-tracking branch 'origin/master'
2 parents 6a4d4bb + 0b94231 commit 1181bc2

File tree

2 files changed

+48
-82
lines changed

2 files changed

+48
-82
lines changed

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

Lines changed: 47 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,21 @@
2121
<v-row>
2222
<v-col class="d-flex justify-start">
2323
<PrimaryButton
24-
id="clear-filter"
25-
secondary
24+
id="applyPenLocalIdNameFilter"
2625
large-icon
27-
icon="mdi-filter-off-outline"
28-
text="Clear All"
29-
:click-action="clear"
26+
icon="mdi-magnify"
27+
text="Search Name and ID"
28+
:click-action="($event) => setPenLocalIdNameFilter($event, 'click')"
3029
/>
3130
</v-col>
3231
<v-col class="d-flex justify-end">
3332
<PrimaryButton
34-
id="applyPenLocalIdNameFilter"
33+
id="clear-filter"
34+
secondary
3535
large-icon
36-
icon="mdi-magnify"
37-
text="Search Name and ID"
38-
:click-action="($event) => setPenLocalIdNameFilter($event, 'click')"
36+
icon="mdi-filter-off-outline"
37+
text="Clear All"
38+
:click-action="clear"
3939
/>
4040
</v-col>
4141
</v-row>
@@ -65,18 +65,18 @@
6565
<v-row>
6666
<v-col class="py-0" cols="6">
6767
<v-text-field
68-
id="givenName"
69-
v-model="givenName"
70-
label="Given Name"
68+
id="pen"
69+
v-model="pen"
70+
label="PEN"
7171
color="primary"
7272
variant="underlined"
7373
/>
7474
</v-col>
7575
<v-col class="py-0" cols="6">
7676
<v-text-field
77-
id="surName"
78-
v-model="surName"
79-
label="Surname"
77+
id="localID"
78+
v-model="localID"
79+
label="Local ID"
8080
color="primary"
8181
variant="underlined"
8282
/>
@@ -85,43 +85,25 @@
8585
<v-row>
8686
<v-col class="py-0" cols="6">
8787
<v-text-field
88-
id="pen"
89-
v-model="pen"
90-
label="PEN"
88+
id="givenName"
89+
v-model="givenName"
90+
label="First Name"
9191
color="primary"
9292
variant="underlined"
9393
/>
9494
</v-col>
9595
<v-col class="py-0" cols="6">
9696
<v-text-field
97-
id="localID"
98-
v-model="localID"
99-
label="Local ID"
97+
id="surName"
98+
v-model="surName"
99+
label="Last Name"
100100
color="primary"
101101
variant="underlined"
102102
/>
103103
</v-col>
104104
</v-row>
105105
</div>
106-
<div >
107-
<v-row>
108-
<v-col id="schoolDistrictFilters" class="filter-heading pb-0">
109-
District, School and Assessment Center
110-
</v-col>
111-
</v-row>
112-
<v-row>
113-
<v-col cols="12" class="pt-0">
114-
<v-row v-if="false">
115-
<v-text-field
116-
id="searchInput"
117-
v-model="penLocalIdNameFilter"
118-
label="PEN or Local ID or Name"
119-
color="primary"
120-
variant="underlined"
121-
/>
122-
</v-row>
123-
</v-col>
124-
</v-row>
106+
<div>
125107
<v-row v-if="userInfo.activeInstituteType === 'DISTRICT'">
126108
<v-col cols="12" class="pt-0">
127109
<slot name="text-search">
@@ -145,7 +127,7 @@
145127
</v-col>
146128
</v-row>
147129
<v-row>
148-
<v-col cols="12" class="pt-0">
130+
<v-col cols="12" class="mt-n8">
149131
<slot name="text-search">
150132
<v-autocomplete
151133
id="selectSchool"
@@ -213,7 +195,22 @@
213195
</v-btn>
214196
</span>
215197
</div>
216-
<div v-else-if="filter?.id === 'specialCaseCode'">
198+
<div v-else-if="filter?.id === 'proficiencyScoreValue'">
199+
200+
<span
201+
v-for="(option, i) in filter?.filterOptions"
202+
:key="option.value"
203+
>
204+
<v-btn
205+
:id="option?.id"
206+
:value="option"
207+
class="filter-button"
208+
rounded="lg"
209+
>
210+
{{ option?.title }}
211+
</v-btn>
212+
</span>
213+
217214
<span
218215
v-for="(option, i) in specialCaseSearchNames"
219216
:key="option.value"
@@ -356,7 +353,7 @@ export default {
356353
session.assessments.forEach(assessment => {
357354
let existingItem = this.assessmentTypeSearchNames.find(item => item.id === assessment.assessmentTypeCode);
358355
if (!existingItem) {
359-
this.assessmentTypeSearchNames.push({title: assessment.assessmentTypeName, id: assessment.assessmentTypeCode, value: assessment.assessmentTypeCode, displayOrder: assessment.displayOrder});
356+
this.assessmentTypeSearchNames.push({title: assessment.assessmentTypeCode, id: assessment.assessmentTypeCode, value: assessment.assessmentTypeCode, displayOrder: assessment.displayOrder});
360357
}
361358
});
362359
});
@@ -365,10 +362,12 @@ export default {
365362
},
366363
setupSpecialCaseCodes() {
367364
this.specialCaseSearchNames = [];
365+
console.log(this.specialCaseCodes);
368366
Object.keys(this.specialCaseCodes).forEach(key => {
369367
this.specialCaseSearchNames.push({title: this.specialCaseCodes[key], id: key, value: key});
370368
});
371-
this.specialCaseSearchNames = sortBy(this.specialCaseSearchNames, ['title']);
369+
this.specialCaseSearchNames.push({title: 'No Result', id: 'noResults', value: 'false'});
370+
this.specialCaseSearchNames = sortBy(this.specialCaseSearchNames, ['id']);
372371
},
373372
setupSchoolLists() {
374373
this.schoolSearchNames = [];
@@ -465,7 +464,10 @@ export default {
465464
color: #003366;
466465
margin-top: 1em;
467466
}
468-
467+
.filter-card {
468+
height: 100%;
469+
overflow-y: auto;
470+
}
469471
.filter-button {
470472
color: #003366;
471473
padding: 5px;

frontend/src/utils/eas/StudentRegistrationTableConfiguration.js

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -20,41 +20,9 @@ export const ASSESSMENT_TYPE_CODE_FILTER = Object.freeze(
2020
}
2121
);
2222

23-
export const SPECIAL_CASE_FILTER = Object.freeze(
24-
{
25-
heading: 'Special Case',
26-
id: 'specialCaseCode',
27-
multiple: true,
28-
key: 'specialCaseCode',
29-
filterOptions: [
30-
]
31-
}
32-
);
33-
34-
export const PROFICIENCY_SCORE_FILTER = Object.freeze(
35-
{
36-
heading: 'Proficiency Score',
37-
id: 'proficiencyScore',
38-
multiple: false,
39-
key: 'proficiencyScore',
40-
filterOptions: [
41-
{
42-
title: 'Have Results',
43-
id: 'results',
44-
value: 'true'
45-
},
46-
{
47-
title: 'No Results Received',
48-
id: 'noResults',
49-
value: 'false'
50-
}
51-
]
52-
}
53-
);
54-
5523
export const PROFICIENCY_SCORE_RANGE_FILTER = Object.freeze(
5624
{
57-
heading: '',
25+
heading: 'Score',
5826
id: 'proficiencyScoreValue',
5927
multiple: true,
6028
key: 'proficiencyScoreValue',
@@ -99,8 +67,6 @@ export const SCHOOL_YEAR_REGISTRATIONS_VIEW_DISTRICT = Object.freeze(
9967
allowedFilters: {
10068
session: SESSION_CODE_FILTER,
10169
assessmentTypeCode: ASSESSMENT_TYPE_CODE_FILTER,
102-
specialCaseCode: SPECIAL_CASE_FILTER,
103-
proficiencyScore: PROFICIENCY_SCORE_FILTER,
10470
proficiencyScoreValue: PROFICIENCY_SCORE_RANGE_FILTER
10571
}
10672
});
@@ -120,8 +86,6 @@ export const SCHOOL_YEAR_REGISTRATIONS_VIEW_SCHOOL = Object.freeze(
12086
allowedFilters: {
12187
session: SESSION_CODE_FILTER,
12288
assessmentTypeCode: ASSESSMENT_TYPE_CODE_FILTER,
123-
specialCaseCode: SPECIAL_CASE_FILTER,
124-
proficiencyScore: PROFICIENCY_SCORE_FILTER,
12589
proficiencyScoreValue: PROFICIENCY_SCORE_RANGE_FILTER
12690
}
12791
});

0 commit comments

Comments
 (0)