mirror of
https://github.com/donpat1to/Schichtenplaner.git
synced 2025-11-30 22:45:46 +01:00
1.2 KiB
1.2 KiB
Shift Assignment
[ACTION: update scheduled shift]
- Requires valid scheduled shift ID
- Only updates assignedEmployees array
- Requires authentication with valid token
- Handles both JSON and non-JSON responses
[ACTION: assign shifts automatically]
- Requires shift plan, employees, and availabilities
- Availability preferenceLevel must be 1, 2, or 3
- Constraints must be an array (converts non-array to empty array)
- All employees must have valid availability data
[ACTION: get scheduled shifts]
- Requires valid plan ID
- Automatically fixes data structure inconsistencies:
- timeSlotId mapping (handles both naming conventions)
- requiredEmployees fallback to 2 if missing
- assignedEmployees fallback to empty array if missing
Availability
[UPDATE] availability
- planId: required valid UUID
- availabilities: required array with strict validation:
- shiftId: valid UUID
- preferenceLevel: 0 (unavailable), 1 (available), or 2 (preferred)
- notes: optional, max 500 characters
Scheduling
[ACTION: generate schedule]
- shiftPlan: required object with id (valid UUID)
- employees: required array with at least one employee, each with valid UUID
- availabilities: required array
- constraints: optional array