Fix embedded courses showing up as invalid theory/lab entries

Offen
#256 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
68/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
react, typescript
Bereich
frontend

Rechercherichtung

Start in src/components/cards/FacultySelector.tsx to trace how courses marked E are split, then read the relevant helpers in src/lib/utils.ts and mappings in src/lib/course_codes_map.ts. Add test coverage for BACHY105 and a few other new-syllabus courses, then check that timetables display and save without an extra lab entry or empty course code.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

bug

Some of the new curriculum's embedded courses aren't being handled correctly.

In FacultySelector.tsx, courses marked E are treated as combined theory + lab courses. But courses like BACHY105 have a single entry (D1+TD1) rather than a separate lab slot. The current fallback can end up using the course code as a lab slot, and generateTT() may then produce an extra entry with an empty course code.

What needs to be done

  • Handle embedded courses separately from normal theory + lab pairs.
  • Don't create an extra lab entry when no separate lab exists.
  • Check that the resulting timetable displays and saves properly.
  • Cover a few actual new-syllabus courses in tests, including BACHY105.

Files: src/components/cards/FacultySelector.tsx, src/lib/utils.ts, src/lib/course_codes_map.ts.

Vorherrschende Sprache
TypeScript
Sterne
7
Forks
39
Ø Merge
4 Std. 24 Min.
Gemergte PRs (30 T.)
53

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus CodeChefVIT/ffcs

Alle Issues in CodeChefVIT/ffcs

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.