fix(02): show owner name / Family in event popover footer
Backend: - expand.ts: add ownerName: string | null to CalendarOccurrence interface and expandOccurrences() signature; thread it onto every emitted occurrence. - events.ts: SELECT users.displayName as ownerName in the join; pass it to expandOccurrences(). Frontend: - client.ts: add ownerName: string | null to CalendarOccurrence. - EventDetailPopover.tsx: render isShared ? 'Family' : (ownerName ?? calendarName) in the footer instead of calendarName. Tests: - expand.test.ts: pass ownerName to all expandOccurrences() calls; assert ownerName is carried onto occurrences in the DST test. - events.test.ts: add ownerName to mock rows; assert ownerName present on occurrences; add ownerName assertion to timed-recurring test. - EventDetailPopover.test.tsx: add ownerName to fixtures; split "calendar name in footer" into three targeted tests covering personal-with-owner, shared→Family, and null-owner fallback.
This commit is contained in:
@@ -369,8 +369,12 @@ export function EventDetailPopover(props: ScheduleXEventModalProps = {}) {
|
||||
}}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
{/* Plain text — XSS guard */}
|
||||
{occurrence.calendarName}
|
||||
{/* Plain text — XSS guard (T-02e-01).
|
||||
Show 'Family' for shared-calendar events; owner display name for personal
|
||||
events; fall back to calendarName when ownerName is null. */}
|
||||
{occurrence.isShared
|
||||
? 'Family'
|
||||
: (occurrence.ownerName ?? occurrence.calendarName)}
|
||||
</div>
|
||||
|
||||
{/* Phase 3 footer action area — Phase 3 adds edit/delete actions here (D-08) */}
|
||||
|
||||
Reference in New Issue
Block a user