adding endpoints

This commit is contained in:
2026-09-18 12:26:25 -04:00
parent d5c341d1fc
commit f38a178fcd
44 changed files with 1302 additions and 4 deletions
+32
View File
@@ -0,0 +1,32 @@
# Conflict resolution guide.
# Import validator functions before moving employees between shifts or days.
def detect_preferred_shift_conflict(connection, user_id, day_of_week, preferred_shift):
# check if preferred shift is already full for selected day
# check if user already works that day
# check if user already worked five days this week
pass
def resolve_conflict_same_day(connection, user_id, day_of_week):
# loop over other shifts on the same day
# choose the first shift where user can legally work
# assign only after validator confirms the schedule is valid
pass
def resolve_conflict_next_day(connection, user_id, current_day):
# if same-day alternatives fail, move to next day
# loop through next-day shifts by preference priority
# assign only after validator confirms the schedule is valid
pass
def resolve_missing_second_employee(connection, company_id, day_of_week, shift):
# find shifts with only one employee assigned
# loop over available employees in company
# skip employees who already work that day
# skip employees who already worked five days this week
# assign a valid extra employee to satisfy minimum coverage
pass