src/app/tools/calendar/MasterCalendar.tsx reads schedule settings from schedule-settings/${user._companyId} and renders one row per inspector from a flat inspector list, with no workspace-mode or multi-company data path.src/components/calendar/CalendarRow.tsx fetches its own data from GET /calendar?employeeId=... and does not carry or render _companyId, company chips, or any other cross-company identifier in the row label or event UI.src/routes/calendar.ts builds the main calendar feed with queries scoped to res.locals.company._id. The underlying models include _companyId, but the returned payload does not currently expose it on calendar rows, so the frontend cannot disambiguate source company from the existing response.src/routes/schedule.ts exposes /schedule/optimal-slots, but that logic is also scoped to one company for inspectors, services, holidays, slots, inspections, events, and vacations.src/routes/ccDashboard.ts already accepts companyIds, intersects them with permitted companies, and queries with _companyId: { $in: companyIds }. That is a relevant pattern for federated calendar reads.res.locals.company._id.src/routes/calendar.ts, where the current aggregations for vacations, events, inspections, available slots, recurring calendar events, and related calendar data are all single-company. A federated version needs to validate a companyIds set against allowed companies and query with _companyId: { $in: companyIds } where appropriate._companyId on each returned calendar row so the frontend can label and group events correctly. That field already exists on the underlying Event, Inspection, Vacation, HistoricSlots or Slots, and ReoccuringCalendarEvent models, but it is not surfaced in the current response projections.src/routes/ccDashboard.ts rather than inventing a separate authorization model.calendar.ts or keep separate per-company fetches and merge them in the client.src/routes/schedule.ts and /schedule/optimal-slots are relevant because they remain single-company today. Multi-company booking optimization is not required for v1, but any federated calendar read should avoid creating expectations that this endpoint can book across companies in one pass.src/app/tools/calendar/MasterCalendar.tsx so workspace mode can request and render multi-company calendar data rather than relying on user._companyId only.src/components/calendar/CalendarRow.tsx and related event rendering components so rows and events visibly identify source company. The current row label supports inspector avatar and name only, and there is no company badge, chip, or company-aware filter in the calendar UI.src/components/calendar/CalendarFilterPopover.tsx should gain a company filter in addition to the existing team and service filters.src/components/scheduling/SchedulingSlideOutSheet.tsx, but the create-slot flow is not wired through from calendar slot clicks. MasterCalendar.tsx currently redirects to /schedule instead of opening the slide-out, and the slide-out interface does not include any company-selection input./schedule/optimal-slots to find the best booking opportunity across multiple companies in one request.src/app/tools/calendar/MasterCalendar.tsxsrc/components/calendar/CalendarRow.tsxsrc/components/calendar/CalendarFilterPopover.tsxsrc/components/scheduling/SchedulingSlideOutSheet.tsxsrc/routes/calendar.tssrc/routes/schedule.tssrc/routes/scheduleSettings.tssrc/routes/ccDashboard.tsPlease authenticate to join the conversation.
Planned
Main App
17 days ago
Linear
Get notified by email when there are changes.
Planned
Main App
17 days ago
Linear
Get notified by email when there are changes.