mirror of
https://github.com/donpat1to/Schichtenplaner.git
synced 2025-11-30 22:45:46 +01:00
added Validation rules
This commit is contained in:
20
backend/src/middleware/Validation/Assignment.md
Normal file
20
backend/src/middleware/Validation/Assignment.md
Normal file
@@ -0,0 +1,20 @@
|
||||
## 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
|
||||
Reference in New Issue
Block a user