Add support for requesting shifts
This commit is contained in:
@@ -33,7 +33,8 @@ rota_collections = {
|
||||
"no weekends": deepcopy(Rota),
|
||||
"no twighlights": deepcopy(Rota),
|
||||
"no nights": deepcopy(Rota),
|
||||
"nights + proc twighlights + normal weekends": deepcopy(Rota),
|
||||
"nights + proc twighlights3 + normal weekends": deepcopy(Rota),
|
||||
"nights + proc twighlights4 + normal weekends": deepcopy(Rota),
|
||||
"nights + proc twighlights + proc weekends": deepcopy(Rota),
|
||||
}
|
||||
|
||||
@@ -211,7 +212,7 @@ rota_collections['no nights'].add_shifts(
|
||||
#SingleShift((sites), "night", 12.5, days, balance_weighting=1, workers_required=3, rota_on_nwds=True),
|
||||
)
|
||||
|
||||
rota_collections['nights + proc twighlights + normal weekends'].add_shifts(
|
||||
rota_collections['nights + proc twighlights4 + normal weekends'].add_shifts(
|
||||
SingleShift((sites), "proc_twilight", 12.5, days[:5], workers_required=4),
|
||||
SingleShift(("exeter", ),
|
||||
"weekend_exeter",
|
||||
@@ -257,17 +258,55 @@ rota_collections['nights + proc twighlights + normal weekends'].add_shifts(
|
||||
constraints=["night"]),
|
||||
)
|
||||
|
||||
rota_collections['nights + proc twighlights + proc weekends'].add_shifts(
|
||||
SingleShift((sites),
|
||||
"proc_twilight",
|
||||
12.5,
|
||||
days[:5],
|
||||
workers_required=3),
|
||||
SingleShift((sites),
|
||||
"proc_weekends",
|
||||
rota_collections['nights + proc twighlights3 + normal weekends'].add_shifts(
|
||||
SingleShift((sites), "proc_twilight", 12.5, days[:5], workers_required=3),
|
||||
SingleShift(("exeter", ),
|
||||
"weekend_exeter",
|
||||
12.5,
|
||||
days[5:],
|
||||
workers_required=3),
|
||||
assign_as_block=True),
|
||||
SingleShift(("truro", ),
|
||||
"weekend_truro",
|
||||
12.5,
|
||||
days[5:],
|
||||
assign_as_block=True),
|
||||
SingleShift(("torquay", ),
|
||||
"weekend_torquay",
|
||||
12.5,
|
||||
days[5:],
|
||||
assign_as_block=True),
|
||||
SingleShift(("plymouth", ),
|
||||
"weekend_plymouth",
|
||||
8,
|
||||
days[5:],
|
||||
workers_required=2,
|
||||
assign_as_block=True),
|
||||
#SingleShift((sites), "night", 12.5, days, balance_weighting=1, workers_required=3, rota_on_nwds=True),
|
||||
SingleShift((sites),
|
||||
"night_weekday",
|
||||
12.25,
|
||||
days[:4],
|
||||
balance_offset=5,
|
||||
balance_weighting=1,
|
||||
workers_required=3,
|
||||
force_as_block=False,
|
||||
rota_on_nwds=True,
|
||||
constraints=["night"]),
|
||||
SingleShift((sites),
|
||||
"night_weekend",
|
||||
12.25,
|
||||
days[4:],
|
||||
balance_offset=4,
|
||||
balance_weighting=1,
|
||||
workers_required=3,
|
||||
force_as_block=False,
|
||||
rota_on_nwds=True,
|
||||
constraints=["night"]),
|
||||
)
|
||||
|
||||
rota_collections['nights + proc twighlights + proc weekends'].add_shifts(
|
||||
SingleShift((sites), "proc_twilight", 12.5, days[:5], workers_required=3),
|
||||
SingleShift((sites), "proc_weekends", 12.5, days[5:], workers_required=3),
|
||||
#SingleShift((sites), "night", 12.5, days, balance_weighting=1, workers_required=3, rota_on_nwds=True),
|
||||
SingleShift((sites),
|
||||
"night_weekday",
|
||||
|
||||
Reference in New Issue
Block a user