Skip to content

feat(scheduler): migrate resource timeline to EventCalendar (MIT) — replace FullCalendar Premium plugins#220

Merged
roncodes merged 1 commit intodev-v0.6.39from
feat/scheduler-event-calendar-integration
Apr 6, 2026
Merged

feat(scheduler): migrate resource timeline to EventCalendar (MIT) — replace FullCalendar Premium plugins#220
roncodes merged 1 commit intodev-v0.6.39from
feat/scheduler-event-calendar-integration

Conversation

@roncodes
Copy link
Copy Markdown
Member

@roncodes roncodes commented Apr 6, 2026

Summary

Migrates the order scheduler's resource timeline from FullCalendar (Premium) to the new EventCalendar component backed by @event-calendar/core (MIT licensed).

Why this change is necessary

The resourceTimelineDay / resourceTimelineWeek views require FullCalendar's @fullcalendar/resource-timeline and @fullcalendar/resource Premium plugins. These plugins are not MIT licensed — they are tri-licensed (Commercial / CC Non-Commercial / GPLv3). Because Fleetbase is dual-licensed (AGPL v3 + Commercial), shipping FullCalendar Premium plugins would create a license conflict. This was surfacing at runtime as:

Error: viewType "resourceTimelineWeek" is not available.
Please make sure you've loaded all necessary plugins.

Depends on

fleetbase/ember-uifeat/event-calendar-component PR must be merged first (adds the EventCalendar component and @event-calendar/core dependency to ember-ui).


Changes

addon/templates/operations/scheduler/index.hbs

Before After
<FullCalendar … /> <EventCalendar … />
@eventDrop={{…}} @onEventDrop={{…}}
@eventClick={{…}} @onEventClick={{…}}
<FullCalendar::Draggable> wrappers Native draggable="true" + {{on "dragstart" …}} on each sidebar card
No drop handler on timeline {{on "dragover" …}} + {{on "drop" …}} on the timeline container

addon/controllers/operations/scheduler/index.js

FullCalendar API (removed) @event-calendar/core API (added)
calendar.today() calendar.setOption('date', new Date())
calendar.getDate() calendar.getOption('date')
calendar.changeView(name) calendar.setOption('view', name)
event.getResources()[0]?.id event.resourceIds[0]
event.remove() calendar.removeEventById(event.id)
event.setProp(key, val) calendar.updateEvent({...event, [key]: val})
onDrop / eventReceive (FullCalendar external drag) onSidebarDragStart + onCalendarDragOver + onCalendarDrop using calendar.dateFromPoint(x, y)

Testing checklist

  • Scheduler loads without the viewType not available error
  • Resource timeline renders drivers as rows with shift background events
  • Dragging a sidebar order card onto a driver row assigns the order
  • Dragging an existing event to a different driver/time reschedules it
  • Day / Week view toggle works
  • Prev / Next / Today navigation works
  • Event click opens the order detail panel

Replace FullCalendar Premium resource-timeline views with the new
EventCalendar component backed by @event-calendar/core (MIT licensed).

This resolves the 'viewType resourceTimelineWeek is not available'
error which was caused by FullCalendar Premium plugins (@fullcalendar/
resource-timeline, @fullcalendar/resource) being required but not
registered — and which cannot be included in Fleetbase due to the
dual-license commercial restriction.

Changes:
- Template: replace <FullCalendar> with <EventCalendar>; fix callback
  arg names to match EventCalendar API (@Eventdrop → @onEventDrop,
  @eventClick → @onEventClick); replace <FullCalendar::Draggable>
  wrappers with native HTML5 draggable="true" + dragstart handlers;
  add dragover/drop listeners on the timeline container div
- Controller: replace all FullCalendar-specific API calls with
  @event-calendar/core equivalents:
    calendar.today()           → calendar.setOption('date', new Date())
    calendar.getDate()         → calendar.getOption('date')
    calendar.changeView(name)  → calendar.setOption('view', name)
    event.getResources()[0].id → event.resourceIds[0]
    event.remove()             → calendar.removeEventById(event.id)
    event.setProp(k, v)        → calendar.updateEvent({...event, [k]: v})
  Add onSidebarDragStart / onCalendarDragOver / onCalendarDrop actions
  for native HTML5 external drag-and-drop using calendar.dateFromPoint()

Depends on: fleetbase/ember-ui#PR feat/event-calendar-component
@roncodes roncodes merged commit 53b729d into dev-v0.6.39 Apr 6, 2026
@roncodes roncodes deleted the feat/scheduler-event-calendar-integration branch April 6, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant