diff --git a/gen_proc.py b/gen_proc.py index 01c8760..e084842 100644 --- a/gen_proc.py +++ b/gen_proc.py @@ -49,8 +49,8 @@ def main( time_to_run: int = 60 * 60 * 8, ratio: float = 0.001, start_date: datetime.datetime = "2026-03-02", - weeks: int = 26, - bom: float = 1.5, + weeks: int = 27, + bom: float = 1, ): rota_start_date = start_date.date() suspend_on_finish = suspend @@ -59,7 +59,7 @@ def main( rota_start_date, weeks_to_rota=weeks, balance_offset_modifier=bom, - name="proc_rota1", + name="proc_rota2", ) # Rota = RotaBuilder(start_date, weeks_to_rota=20, balance_offset_modifier=1) Rota.constraint_options["balance_shifts"] = False @@ -95,7 +95,7 @@ def main( length=12.5, days=days[:5], balance_offset=2, - constraints=[MaxShiftsPerWeekConstraint(max_shifts=2)], + constraints=[MaxShiftsPerWeekConstraint(max_shifts=1)], ), SingleShift( sites=( @@ -110,6 +110,7 @@ def main( length=12.5, days=days[:4], balance_offset=4, + constraints=[MaxShiftsPerWeekConstraint(max_shifts=1)], ), SingleShift( sites=("torbay", "torbay twilights", "torbay twilights and weekends"), @@ -131,7 +132,7 @@ def main( days=days[:5], balance_offset=2, workers_required=1, - constraints=[MaxShiftsPerWeekConstraint(max_shifts=2)], + constraints=[MaxShiftsPerWeekConstraint(max_shifts=1)], ), SingleShift( sites=( @@ -139,12 +140,12 @@ def main( "exeter twilights and weekends", "exeter no nights", "exeter weekends", - "exeter twilights", + #"exeter twilights", ), name="weekend_exeter", length=12.5, days=days[5:], - balance_offset=2, + #balance_offset=2, rota_on_nwds=True, force_as_block=True, constraints=[PostShiftConstraint(days=2), PreShiftConstraint(days=2)], @@ -161,10 +162,10 @@ def main( name="weekend_truro", length=12.5, days=days[4:], - balance_offset=3, - # rota_on_nwds=True, - # force_as_block=True, - assign_as_block=True, + #balance_offset=3, + rota_on_nwds=True, + force_as_block=True, + #assign_as_block=True, constraints=[PreShiftConstraint(days=2), PostShiftConstraint(days=2)], # force_as_block_unless_nwd=True ), @@ -173,7 +174,7 @@ def main( name="weekend_torbay", length=12.5, days=days[4:], - balance_offset=2, + #balance_offset=2, rota_on_nwds=True, force_as_block=True, constraints=[PreShiftConstraint(days=2), PostShiftConstraint(days=2)], @@ -189,7 +190,7 @@ def main( name="weekend_plymouth1", length=8, days=days[5:], - balance_offset=2.9, + #balance_offset=2.9, workers_required=1, rota_on_nwds=True, force_as_block=True, @@ -204,7 +205,7 @@ def main( name="weekend_plymouth2", length=8, days=days[5:], - balance_offset=2.9, + #balance_offset=2.9, workers_required=1, rota_on_nwds=True, force_as_block=True, @@ -231,7 +232,7 @@ def main( name="night_weekday", length=12.25, days=days[:4], - balance_offset=3.9, + #balance_offset=3.9, balance_weighting=1, # hard_constrain_shift=False, workers_required=4, @@ -258,7 +259,7 @@ def main( name="night_weekend", length=12.25, days=days[4:], - balance_offset=2.9, + #balance_offset=2.9, balance_weighting=1, # hard_constrain_shift=False, workers_required=4, diff --git a/output/timetable.js b/output/timetable.js index d9bfc20..f8a7ec1 100644 --- a/output/timetable.js +++ b/output/timetable.js @@ -466,6 +466,36 @@ renderWorkerList(); // Column for prior-adjustment (hidden by default) h.append(`
`); +// Ensure header styles for visibility and stickiness are present +if ($('#tsummary-style').length === 0) { + $('head').append(` + + `); +} + $(".table-div .worker-row .worker").each((n, tr) => {