3.7 KiB
Task EP.1.6.2 - Direct Big Calendar UI Adoption
Date: 2026-07-13
Status: Foundation Implemented
Upstream reviewed: lramos33/big-calendar
Upstream commit: fbb8485e3d54b267261056c784632229ba6f7bc3
License: MIT, upstream concepts retained with local ALLA OS adaptation.
Summary
EP.1.6.2 replaces the CRM calendar workspace's custom tab/grid renderer with a local Big Calendar layer adapted from the upstream component architecture. The implementation preserves ALLA OS backend ownership: Activity, Business Events, Calendar Projection, Projection Runtime, permissions, and API contracts remain unchanged.
The UI now flows through:
CalendarProjectionItem
-> mapCalendarProjectionToBigCalendarEvent()
-> BigCalendarProvider
-> BigCalendarHeader
-> Day / Week / Month / Agenda views
-> Activity reschedule command
Adopted Components And Concepts
- Added
src/features/crm/calendar/big-calendar/provider.tsxfor local calendar state, selected date, selected view, user filter, drag state, working hours, and Activity command dispatch. - Added
src/features/crm/calendar/big-calendar/header.tsxfor upstream-style Today, previous, next, range display, user filter, and view switching. - Added
src/features/crm/calendar/big-calendar/views.tsxfor Day, Week, Month, and Agenda rendering. - Added
src/features/crm/calendar/big-calendar/calendar-slot.tsxfor calendar slots, empty overlays, and HTML5 drop handling. - Added
src/features/crm/calendar/big-calendar/event-card.tsxfor draggable event cards and resize command affordance. - Added
src/features/crm/calendar/big-calendar/helpers.tsandtypes.tsfor local view, slot, date range, and command contracts. - Updated
src/features/crm/calendar/components/calendar-workspace.tsxto use the Big Calendar provider/header/views instead of local custom renderers. - Updated
src/features/crm/calendar/components/calendar-adapter.tswithmapBigCalendarActionToActivityCommand(). - Extended
BigCalendarEvent.sourcewithownerIdandassigneeIdso the provider can support user filtering without reading database rows.
Rejected Upstream Demo Code
- Did not import the upstream app shell, demo stores, or mock data ownership.
- Did not add React Hook Form; this repository forbids new RHF usage.
- Did not add upstream persistence or direct database reads.
- Did not mutate
crm_calendar_projectionrows from UI interactions. - Did not replace the Activity API or Business Event flow.
Interaction Behavior
- Editable Activity events can emit reschedule commands through
rescheduleActivity(). - Drag/drop maps a dropped editable Activity to an Activity reschedule request.
- Resize currently uses a command-based duration extension affordance rather than full upstream edge-resize parity.
- Read-only milestones do not emit Activity commands.
- After successful reschedule, Calendar, Activity, and My Day query groups are invalidated.
- Day, Week, and Month retain EP.1.6.1 behavior by always rendering grid slots, including empty states.
- Agenda keeps list-style empty behavior.
Upgrade Strategy
Future upstream sync should compare against commit fbb8485e3d54b267261056c784632229ba6f7bc3, then port only rendering and interaction improvements into src/features/crm/calendar/big-calendar/**. Keep ALLA OS adapter and command boundaries stable.
Full upstream parity still requires a deliberate dependency review for react-dnd, upstream resize behavior, and any accessibility changes before adding them to this Next.js 16 / React 19 / shadcn / TanStack stack.
Verification
- Passed:
npm run typecheck - Passed:
npx oxlint src/features/crm/calendar - Not run:
npm run db:generatebecause EP.1.6.2 made no schema changes. - Not automated: browser drag/drop, resize, responsive, and screen-reader regression checks.