This commit is contained in:
Ross
2021-06-13 21:14:21 +01:00
parent 5c54257065
commit 2b8190efb8
7 changed files with 223 additions and 328 deletions
+2
View File
@@ -61,6 +61,7 @@ class Worker:
for weeks_days in Rota.weeks_days_product[days_to_work:]:
week, day = weeks_days
Rota.unavailable_to_work.add((self.id, week, day))
Rota.unavailable_to_work_reason[(self.id, week, day)] = "END DATE"
if oop is not None:
start_oop, end_oop = oop
@@ -88,6 +89,7 @@ class Worker:
days_until_oop:days_until_oop + oop_length]:
week, day = weeks_days
Rota.unavailable_to_work.add((self.id, week, day))
Rota.unavailable_to_work_reason[(self.id, week, day)] = "OOP ()".format(oop)
if pref_not_to_work is not None:
# loop throught dates converting to week / day combination