numerous improvemts
This commit is contained in:
@@ -111,6 +111,9 @@ class Worker(BaseModel):
|
||||
bank_holiday_extra: int = 0
|
||||
pair: int | str | None = None
|
||||
locum: bool = False
|
||||
allowed_multi_shift_sets: list[set] = [] # or list/set of frozensets
|
||||
prefer_multi_shift_together: int = 0 # Default: no preference
|
||||
# Set to a positive integer to prefer, negative to discourage, 0 for neutral
|
||||
|
||||
shift_fte_overrides: dict[str, int] = {} # Need checks to ensure shifts exist
|
||||
|
||||
@@ -389,3 +392,8 @@ class Worker(BaseModel):
|
||||
if shift in self.fte_adj_shifts:
|
||||
return self.fte_adj_shifts[shift]
|
||||
return self.fte_adj
|
||||
|
||||
def allow_shifts_together(self, *shifts):
|
||||
if not hasattr(self, "allowed_multi_shift_sets"):
|
||||
self.allowed_multi_shift_sets = []
|
||||
self.allowed_multi_shift_sets.append(frozenset(shifts))
|
||||
Reference in New Issue
Block a user