fix(nav): register Journal/Planner shapes, fix headerColor crash, enable academic week expansion

Bugs fixed:
- 'cc-teacher-timetable-node' missing from NODE_TYPE_THEMES caused
  Cannot read properties of undefined (reading 'headerColor') crash
  when clicking My Timetable
- 'cc-journal-node' and 'cc-planner-node' had no shape utils registered,
  causing 'No shape util found for type' error on Journal/Planner click
- Added null safety (?? fallback) to getNodeTheme to prevent future crashes
  from any other unmapped type
- Removed AcademicWeek from canExpand exclusion so weeks can be expanded
  to show individual academic days

Added:
- CCJournalNodeShapeUtil and CCPlannerNodeShapeUtil (stub shapes)
- CCJournalNodeProps and CCPlannerNodeProps types
- Journal/Planner added to CCNodeTypes, ccGraphShapeProps, NODE_TYPE_THEMES
- 'cc-department-structure-node' mapping added to NODE_TYPE_THEMES

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
2026-05-27 10:55:40 +01:00
co-authored by Claude Sonnet 4.6
parent 0f5dbd12bf
commit 61ef95a35e
7 changed files with 117 additions and 2 deletions
+4
View File
@@ -43,6 +43,8 @@ import { CCDepartmentStructureNodeShapeUtil } from './cc-base/cc-graph/CCDepartm
import { CCUserTeacherTimetableNodeShapeUtil } from './cc-base/cc-graph/CCUserTeacherTimetableNodeShapeUtil'
import { CCSearchShapeUtil } from './cc-base/cc-search/CCSearchShapeUtil'
import { CCWebBrowserShapeUtil } from './cc-base/cc-web-browser/CCWebBrowserUtil'
import { CCJournalNodeShapeUtil } from './cc-base/cc-graph/CCJournalNodeShapeUtil'
import { CCPlannerNodeShapeUtil } from './cc-base/cc-graph/CCPlannerNodeShapeUtil'
// Define all shape utils in a single object for easy maintenance
export const ShapeUtils = {
CCSlideShow: CCSlideShowShapeUtil,
@@ -89,6 +91,8 @@ export const ShapeUtils = {
CCUserTeacherTimetableNode: CCUserTeacherTimetableNodeShapeUtil,
CCSearch: CCSearchShapeUtil,
CCWebBrowser: CCWebBrowserShapeUtil,
CCJournalNode: CCJournalNodeShapeUtil,
CCPlannerNode: CCPlannerNodeShapeUtil,
}
export const allShapeUtils = Object.values(ShapeUtils)