.
This commit is contained in:
@@ -35,7 +35,8 @@ def load_leave(Rota, use_live_rota):
|
||||
workers[name]["leave"] = []
|
||||
workers[name]["requests"] = []
|
||||
workers[name]["site_pref"] = []
|
||||
workers[name]["shift_balance_extra"]
|
||||
workers[name]["shift_balance_extra"] = {}
|
||||
workers[name]["bank_holiday_extra"] = 0
|
||||
|
||||
for i in range(len(r)):
|
||||
try:
|
||||
@@ -88,7 +89,16 @@ def load_leave(Rota, use_live_rota):
|
||||
elif row_title.startswith("Extra_"):
|
||||
if lower_item:
|
||||
shift = row_title[len("Extra_") :]
|
||||
worker["shift_balance_extra"] = shift
|
||||
if shift == "twilight":
|
||||
shift = f"{worker['site']}_{shift}"
|
||||
elif shift == "weekend":
|
||||
shift = f"weekend_{worker['site']}"
|
||||
worker["shift_balance_extra"][shift] = float(lower_item)
|
||||
|
||||
elif row_title == "bank_holidays_worked":
|
||||
if lower_item:
|
||||
print("BH", lower_item)
|
||||
worker["bank_holiday_extra"] = int(lower_item)
|
||||
|
||||
elif re.match(date_re, row_title) is not None:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user