update for new run
This commit is contained in:
+14
-11
@@ -121,6 +121,7 @@ class Worker(BaseModel):
|
||||
|
||||
if self.name == "Steph bailey":
|
||||
print(self.start_date, self.end_date)
|
||||
print(self.oop)
|
||||
|
||||
# if no start date default to the start of the rota
|
||||
if self.start_date is None:
|
||||
@@ -187,6 +188,7 @@ class Worker(BaseModel):
|
||||
start_oop_date = Rota.start_date
|
||||
|
||||
oop_length = (end_oop_date - start_oop_date).days
|
||||
print(f"oop length {oop_length}")
|
||||
days_to_work = days_to_work - oop_length
|
||||
|
||||
days_until_oop = (start_oop_date - Rota.start_date).days
|
||||
@@ -280,18 +282,19 @@ class Worker(BaseModel):
|
||||
)
|
||||
|
||||
def __str__(self) -> str:
|
||||
return f"{self.name}, {self.site}, {self.oop}"
|
||||
|
||||
nwds = (
|
||||
", ".join([str(i) for i, start, end in self.non_working_day_list])
|
||||
if self.non_working_day_list is not None
|
||||
else ""
|
||||
)
|
||||
return "{} {} [{}] REMOTE SITE:{}".format(
|
||||
self.name,
|
||||
(self.site, self.grade, self.fte_adj),
|
||||
nwds,
|
||||
self.remote_site,
|
||||
)
|
||||
#nwds = (
|
||||
# ", ".join([str(i) for i, start, end in self.non_working_day_list])
|
||||
# if self.non_working_day_list is not None
|
||||
# else ""
|
||||
#)
|
||||
#return "{} {} [{}] REMOTE SITE:{}".format(
|
||||
# self.name,
|
||||
# (self.site, self.grade, self.fte_adj),
|
||||
# nwds,
|
||||
# self.remote_site,
|
||||
#)
|
||||
|
||||
def get_details(self) -> str:
|
||||
return "{} {} {}".format(self.id, self.site[0], self.grade)
|
||||
|
||||
Reference in New Issue
Block a user