Commit 70f5ac5
Ronald A Richardson
feat: add schedule, schedule-item and availability relationships to Driver model
Connects the Driver Ember Data model to the core-api scheduling system by
adding three hasMany relationships:
- schedules: polymorphic Schedule records where the driver is the subject
- schedule_items: individual shift records (ScheduleItem) where the driver
is the assignee (assignee_type='driver', assignee_uuid=driver.id)
- availabilities: ScheduleAvailability records for time-off and preferred
working hours
These relationships are required by:
1. The new driver/schedule panel component which renders a per-driver
FullCalendar shift management view
2. The Intelligent Order Allocation Engine AllocationPayloadBuilder which
queries active schedule_items to inject shift time_window constraints
into the VROOM optimization payload
Refs: fleetbase/fleetops#2141 parent 332dc42 commit 70f5ac5
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
34 | 39 | | |
35 | 40 | | |
36 | 41 | | |
| |||
0 commit comments