Skip to content

feat: Add Core Scheduling UI Components#95

Merged
roncodes merged 1 commit intodev-v0.3.11from
feature/scheduling-components
Nov 16, 2025
Merged

feat: Add Core Scheduling UI Components#95
roncodes merged 1 commit intodev-v0.3.11from
feature/scheduling-components

Conversation

@roncodes
Copy link
Member

Summary

Implements reusable scheduling UI components for the Fleetbase platform.

Changes

Components (3)

  • ScheduleCalendar: Full-featured calendar with FullCalendar integration
  • ScheduleItemCard: Card display for schedule items with named blocks
  • AvailabilityEditor: Availability management interface

Models (5 Ember Data models)

  • Schedule: Master schedule with polymorphic subject
  • ScheduleItem: Individual scheduled items with polymorphic assignee/resource
  • ScheduleTemplate: Reusable schedule patterns
  • ScheduleAvailability: Availability windows for resources
  • ScheduleConstraint: Scheduling constraint definitions

Service

  • Scheduling: Comprehensive service for scheduling operations
    • CRUD operations for schedules and items
    • Availability checking and management
    • Constraint loading and validation
    • Uses ember-concurrency for async operations

Features

  • Named Blocks: Customization via :content, :actions, :item blocks
  • Tailwind CSS: Styling following Fleetbase UI standards
  • Dark Mode: Full dark mode support
  • Status Colors: Status-based color coding for schedule items
  • Drag-and-Drop: Calendar supports drag-and-drop editing
  • Resource Views: Timeline views for resource-based scheduling
  • Event-Driven: Event callbacks for user interactions

Component Architecture

ScheduleCalendar

Uses FullCalendar for rendering with support for:

  • Resource timeline views
  • Drag-and-drop editing
  • Custom event rendering via named blocks
  • Date and event click handlers

Usage:

<ScheduleCalendar
  @resources={{this.drivers}}
  @items={{this.scheduleItems}}
  @view="resourceTimeline"
  @onItemClick={{this.handleItemClick}}
  @onItemDrop={{this.handleItemDrop}}
>
  <:item as |item|>
    <div>{{item.title}}</div>
  </:item>
</ScheduleCalendar>

ScheduleItemCard

Flexible card layout with named blocks:

<ScheduleItemCard @item={{this.scheduleItem}}>
  <:content>
    <div>Custom content</div>
  </:content>
  <:actions>
    <button>Edit</button>
  </:actions>
</ScheduleItemCard>

AvailabilityEditor

Form-based availability management:

<AvailabilityEditor
  @subjectType="driver"
  @subjectUuid={{@driver.id}}
  @onSave={{this.handleSave}}
/>

Usage Across Extensions

These components can be used by any Fleetbase extension:

  • FleetOps: Driver scheduling with HOS constraints
  • Storefront: Delivery window management
  • Ledger: Payment schedule tracking
  • Pallet: Warehouse operations scheduling

Dependencies

Requires FullCalendar packages (not included):

pnpm add @fullcalendar/core @fullcalendar/resource-timeline @fullcalendar/interaction

Documentation

See SCHEDULING_COMPONENTS.md for detailed documentation and examples.

Testing

  • Component integration tests
  • Service unit tests
  • Model tests

Related PRs

  • core-api: #168 (Core Scheduling Module)
  • fleetops: #TBD (Driver Scheduling with HOS Compliance)

Implements reusable scheduling components for the Fleetbase platform.

Components (3):
- ScheduleCalendar: Full-featured calendar with FullCalendar integration
- ScheduleItemCard: Card display for schedule items with named blocks
- AvailabilityEditor: Availability management interface

Models (5 Ember Data models):
- Schedule: Master schedule with polymorphic subject
- ScheduleItem: Individual scheduled items with polymorphic assignee/resource
- ScheduleTemplate: Reusable schedule patterns
- ScheduleAvailability: Availability windows for resources
- ScheduleConstraint: Scheduling constraint definitions

Service:
- Scheduling: Comprehensive service for scheduling operations
  - CRUD operations for schedules and items
  - Availability checking and management
  - Constraint loading and validation
  - Uses ember-concurrency for async operations

Features:
- Named blocks for customization (content, actions, item)
- Tailwind CSS styling following Fleetbase UI standards
- Dark mode support
- Status-based color coding
- Drag-and-drop support (ScheduleCalendar)
- Resource timeline views
- Event-driven architecture

Component Architecture:
- ScheduleCalendar uses FullCalendar for rendering
- ScheduleItemCard provides flexible card layout
- All components support customization via named blocks
- Consistent with existing ember-ui component patterns

Usage:
Components can be used by any Fleetbase extension:
- FleetOps: Driver scheduling with HOS constraints
- Storefront: Delivery window management
- Ledger: Payment schedule tracking
- Pallet: Warehouse operations scheduling

See SCHEDULING_COMPONENTS.md for detailed documentation and examples.
@roncodes roncodes changed the base branch from main to dev-v0.3.11 November 15, 2025 03:30
@roncodes roncodes merged commit c612da7 into dev-v0.3.11 Nov 16, 2025
3 of 4 checks passed
@roncodes roncodes deleted the feature/scheduling-components branch November 16, 2025 03:42
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