feat: smart assign person dialog with conflict details and assignable-persons endpoint
Add GET /events/{event}/shifts/{shift}/assignable-persons endpoint that
returns approved persons with availability status, conflict details, and
already-assigned flags. Improve ShiftAssignmentService conflict errors to
include section name, time slot, and time range. Replace both assign
dialogs with a new AssignPersonDialog featuring search, crowd type
filtering, availability toggle, and inline conflict warnings.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -180,6 +180,46 @@ Auth: org_admin or event_manager on the event's organisation.
|
||||
- `POST /events/{event}/shift-assignments/{shiftAssignment}/reject` — reject pending assignment
|
||||
- `POST /events/{event}/shift-assignments/{shiftAssignment}/cancel` — cancel assignment
|
||||
- `POST /events/{event}/shift-assignments/bulk-approve` — bulk approve multiple assignments
|
||||
- `GET /events/{event}/shifts/{shift}/assignable-persons` — list approved persons with availability status
|
||||
|
||||
### Assignable Persons
|
||||
|
||||
`GET /events/{event}/shifts/{shift}/assignable-persons`
|
||||
|
||||
Returns all approved persons for the event with availability status for this shift's time slot.
|
||||
Persons are sorted: available first, then unavailable (conflict), then already assigned.
|
||||
|
||||
```json
|
||||
{
|
||||
"data": [
|
||||
{
|
||||
"id": "ulid",
|
||||
"name": "Jan de Vries",
|
||||
"email": "jan@gmail.com",
|
||||
"status": "approved",
|
||||
"crowd_type": { "id": "ulid", "name": "Vrijwilliger", "system_type": "VOLUNTEER" },
|
||||
"is_available": true,
|
||||
"already_assigned": false,
|
||||
"conflict": null
|
||||
},
|
||||
{
|
||||
"id": "ulid",
|
||||
"name": "Ahmed Hassan",
|
||||
"email": "ahmed.h@gmail.com",
|
||||
"status": "approved",
|
||||
"crowd_type": { "id": "ulid", "name": "Vrijwilliger", "system_type": "VOLUNTEER" },
|
||||
"is_available": false,
|
||||
"already_assigned": false,
|
||||
"conflict": {
|
||||
"section_name": "EHBO",
|
||||
"shift_title": "EHBO Post",
|
||||
"time_slot_name": "Zaterdag Dag",
|
||||
"time": "10:00–18:00"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Query Parameters (index)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user