Skip to content

Commit

Permalink
Add form 7 to report page
Browse files Browse the repository at this point in the history
  • Loading branch information
ranven committed Oct 1, 2024
1 parent e9b3a10 commit 36f43f2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions client/components/Generic/FormFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const FormFilter = ({ version = null }) => {
// { text: t('degree-reform-individual'), value: 3 },
{ text: t('common:formFilter:evaluation'), value: 4 },
{ text: t('evaluationFaculty'), value: 5 },
{ text: t('metaevaluation'), value: 7 },
])

const filterForm = useSelector(({ filters }) => filters.form)
Expand Down
13 changes: 12 additions & 1 deletion client/components/ReportPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,18 @@ export default () => {
programmes = filteredProgrammes(lang, usersProgrammes, picked, debouncedFilter, filters)
}

const questionsList = modifiedQuestions(lang, filters.form)
let questionsList = modifiedQuestions(lang, filters.form)

if (filters.form === formKeys.META_EVALUATION) {
questionsList = questionsList.filter(q => {
if (filters.level === 'doctoral') {
return q.id.startsWith('T')
} else if (filters.level !== 'allProgrammes') {
return !q.id.startsWith('T')
}
return true
})
}

const handleTabChange = (e, { activeIndex }) => setActiveTab(activeIndex)

Expand Down
2 changes: 1 addition & 1 deletion client/util/locales/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export default {
noSelections: 'No selected measures',

doctoralToggle: 'Doctoral Programmes',
bachelorMasterToggle: `Bachelor's & master's Programmes`,
bachelorMasterToggle: `Bachelor's & Master's Programmes`,
},

aboutPage: {
Expand Down

0 comments on commit 36f43f2

Please sign in to comment.