.
This commit is contained in:
+5
-1
@@ -128,7 +128,10 @@ class Worker(BaseModel):
|
||||
self.calculated_start_date = Rota.start_date
|
||||
else:
|
||||
# ? test if start date is valid
|
||||
self.calculated_start_date = self.start_date
|
||||
if self.start_date < Rota.start_date:
|
||||
self.calculated_start_date = self.start_date
|
||||
else:
|
||||
self.calculated_start_date = self.start_date
|
||||
|
||||
if self.end_date is None:
|
||||
self.calculated_end_date = Rota.rota_end_date
|
||||
@@ -271,6 +274,7 @@ class Worker(BaseModel):
|
||||
self.fte_adj = 0
|
||||
|
||||
if days_to_work > 0 and (days_to_work - len(unavailable_set)) / days_to_work < 0.3:
|
||||
console.print(f"{ self.name }: {days_to_work}, {Rota.rota_days_length}")
|
||||
console.print(f"Warning {self.name} has excessive unavailability [{len(unavailable_set)}/{days_to_work}, adjusted fte={self.fte_adj}] (this may be infeasible)", style="red")
|
||||
|
||||
def __lt__(self, other) -> bool:
|
||||
|
||||
Reference in New Issue
Block a user