Skip to content

Commit e533fb8

Browse files
committed
feat(manage-courses): increase semester filter tabs from 3 to 6 and add missing translation
- Increase maxOtherPrograms from 3 to 6 to show last 6 semesters - Add 'all_programs' translation key in German (Alle) and English (All) - Update 'All' tab to use translation instead of hardcoded string - Add translation dependency to useMemo for proper reactivity
1 parent 58aa219 commit e533fb8

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

frontend-nx/apps/edu-hub/components/pages/ManageCoursesContent/index.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ const ManageCoursesContent: FC<IProps> = ({ programs }) => {
8686

8787
// Menubar configuration
8888
const allTabId = -1;
89-
const maxOtherPrograms = 3;
89+
const maxOtherPrograms = 6;
9090

91-
// Create programs list for menubar: EVENTS + DEGREES + 3 most recent others + All
91+
// Create programs list for menubar: EVENTS + DEGREES + 6 most recent others + All
9292
const menubarPrograms: Programs_Program[] = useMemo(() => {
9393
const programs: Programs_Program[] = [];
9494

@@ -109,13 +109,13 @@ const ManageCoursesContent: FC<IProps> = ({ programs }) => {
109109
// Add "All" option as a pseudo-program
110110
programs.push({
111111
id: allTabId,
112-
shortTitle: 'All',
113-
title: 'All',
112+
shortTitle: t('all_programs'),
113+
title: t('all_programs'),
114114
__typename: 'Program',
115115
} as Programs_Program);
116116

117117
return programs;
118-
}, [sortedPrograms, allTabId, maxOtherPrograms]);
118+
}, [sortedPrograms, allTabId, maxOtherPrograms, t]);
119119

120120
// Derive current program ID from filter (single source of truth)
121121
const currentProgramId = filter.where?.programId?._eq ?? allTabId;

frontend-nx/apps/edu-hub/locales/de/manageCourses.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"not_published": "Nicht veröffentlicht",
1515
"default_course_title": "Unbenannter Kurs",
1616
"title": "Kurse verwalten",
17+
"all_programs": "Alle",
1718
"tile_slider_group": {
1819
"label": "Kachel-Slider Gruppe",
1920
"placeholder": "Kachel-Slider Gruppen auswählen"

frontend-nx/apps/edu-hub/locales/en/manageCourses.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"not_published": "Not Published",
1515
"default_course_title": "Untitled Course",
1616
"title": "Manage Courses",
17+
"all_programs": "All",
1718
"tile_slider_group": {
1819
"label": "Tile Slider Group",
1920
"placeholder": "Select tile slider groups"

0 commit comments

Comments
 (0)