| 1 | == Manager creates and assigns shift == |
| 2 | === Actors === |
| 3 | * Manager |
| 4 | === Steps in the Scenario === |
| 5 | **__1. Manager logs in.__** |
| 6 | |
| 7 | SELECT u.email, u.password FROM users u WHERE u.email = ?; -- and password application check |
| 8 | |
| 9 | **__2. Manager sees the created shifts.__** |
| 10 | |
| 11 | SELECT date, start_time, end_time FROM shifts WHERE manager_id = %s AND date >= current_date; |
| 12 | |
| 13 | **__3. Manager creates shift for the following week for employees.__** |
| 14 | |
| 15 | INSERT INTO shifts(id, date, start_time, end_time, manager_id) VALUES (1, '2025-01-05', '08:00:00', '17:00:00', 3); |
| 16 | |
| 17 | **__4. Manager assigns shifts to employees__** |
| 18 | |
| 19 | INSERT INTO assignments(id, manager_id, employee_id, shift_id) VALUES (1, 3, 1, 1); |