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:
@@ -272,6 +272,14 @@ export const ccGraphShapeProps = {
|
||||
school_db_name: T.string,
|
||||
school_period_id: T.string,
|
||||
},
|
||||
'cc-journal-node': {
|
||||
...graphBaseProps,
|
||||
path: T.string,
|
||||
},
|
||||
'cc-planner-node': {
|
||||
...graphBaseProps,
|
||||
path: T.string,
|
||||
},
|
||||
} as const
|
||||
|
||||
// Default props getters
|
||||
@@ -640,3 +648,17 @@ export const getDefaultCCUserTeacherTimetableNodeProps = () => ({
|
||||
school_db_name: '',
|
||||
school_timetable_id: '',
|
||||
})
|
||||
|
||||
export const getDefaultCCJournalNodeProps = () => ({
|
||||
...getDefaultBaseProps(),
|
||||
title: 'Journal',
|
||||
__primarylabel__: 'Journal',
|
||||
path: '',
|
||||
})
|
||||
|
||||
export const getDefaultCCPlannerNodeProps = () => ({
|
||||
...getDefaultBaseProps(),
|
||||
title: 'Planner',
|
||||
__primarylabel__: 'Planner',
|
||||
path: '',
|
||||
})
|
||||
Reference in New Issue
Block a user