Commit Graph

35 Commits

Author SHA1 Message Date
Ross 0f31dfe1a9 feat: add exact shifts functionality to Worker class and update related logic in RotaBuilder 2026-07-08 22:33:33 +01:00
Ross e288585cd3 feat: add max days per week block constraint to Worker class
- Introduced a new method `add_max_days_per_week_block_constraint` to the Worker class.
- This method allows for the addition of constraints that limit the number of days a worker can be assigned within a specified sliding block of weeks.
- The method accepts parameters for maximum days, the week block size, and optional dates to ignore.
2026-06-02 13:50:31 +01:00
Ross 935b4baaba Add ignore_dates field to worker constraints and implement related tests 2026-05-19 21:31:05 +01:00
Ross dee80ed4fa Add constraints for maximum days and unique shifts per week block in worker model 2026-05-19 21:23:09 +01:00
Ross 64c4189d5f Add functionality to handle missing shifts in RotaBuilder and include worker grades in the timetable 2026-01-07 22:14:43 +00:00
Ross c71ae4285a Change weekend_shift_target_number type from int to float for improved precision 2026-01-07 20:38:21 +00:00
Ross c248e67304 Refactor site title rendering in RotaBuilder to improve clarity and consistency in timetable display 2026-01-07 20:37:04 +00:00
Ross 628114ad91 Refactor timetable and shifts generation to ensure proper HTML structure with sticky headers 2026-01-07 20:26:18 +00:00
ross e7f27a8ee6 Refactor process title handling in RotaBuilder for improved clarity and functionality 2026-01-06 22:15:12 +00:00
ross 1d7202bf04 Add shift filtering and rendering functionality in shifts settings 2026-01-06 17:02:26 +00:00
ross 82868f8c22 Add float support to balarce offset modified 2026-01-06 09:57:29 +00:00
Ross d66ddf29ad Add support for avoiding shifts on specific dates with reasons 2026-01-05 22:07:23 +00:00
Ross e6bdd4a09e Add support for avoiding shifts on specific dates for workers
- Introduced AvoidShiftOnDates model to define constraints for workers.
- Enhanced Worker class to register avoid-shift rules with the rota builder.
- Implemented logic in RotaBuilder to enforce these constraints during shift assignment.
- Added tests to verify functionality for avoiding shifts on single dates and date ranges.
2026-01-05 21:44:34 +00:00
Ross fe1414a7bf Merge branch 'master' of git.xkjq.uk:ross/proc-rota 2025-12-19 22:06:00 +00:00
Ross 1bae1246f9 Update rota configuration for February 2026 and refine shift constraints handling 2025-12-18 22:06:31 +00:00
Ross 8458279e19 Enhance constraint handling with safe accessors to avoid Pydantic errors and improve compatibility with legacy data structures 2025-12-17 17:16:19 +00:00
Ross ba154f680a Enhance shift constraints validation and error handling in forms and templates 2025-12-17 15:35:20 +00:00
Ross 9d187dfa75 Refactor weekend day balancing logic by commenting out unused option and storing adjusted targets on worker objects 2025-12-17 12:39:11 +00:00
Ross a54b5db5d2 Enhance weekend shift balancing by adding quadratic penalty and adjusting deviation handling 2025-12-17 12:24:26 +00:00
Ross 0851b992fb Enhance weekend shift handling by adding per-day adjustments and improving prior allocation parsing 2025-12-17 12:13:56 +00:00
Ross 710a2aa7c8 Add weekend shift adjustment calculations and update worker summary display 2025-12-17 11:44:13 +00:00
Ross a347ad7777 . 2025-12-17 11:27:16 +00:00
Ross bf3b685923 Add prior adjustments summary to worker display and enhance data attributes 2025-12-17 11:09:33 +00:00
Ross 83444ac402 Add weekend day balancing options and summary counts for shifts 2025-12-17 10:43:37 +00:00
Ross 81b2c85d61 Add exclude_dates option to PreShiftConstraint and PostShiftConstraint 2025-12-17 09:19:45 +00:00
Ross 108bb572a7 Enhance hard day dependency handling with ignore dates and improve warning visibility 2025-12-16 22:41:43 +00:00
Ross 51ed25d04c Add warning for forced assignments in HardDayDependency 2025-12-16 22:35:21 +00:00
Ross 8e580440e0 . 2025-12-16 21:34:11 +00:00
Ross 00c737becf Add guard against division by zero in target_shifts calculation with warning logging 2025-12-15 20:51:19 +00:00
Ross 18a45ff87e refactor: change days type to Optional[int] in PreShiftConstraint and PostShiftConstraint 2025-12-12 22:35:06 +00:00
Ross dfd37a7a62 update tests 2025-12-09 14:29:54 +00:00
Ross 069da08f5a start switching constraint options 2025-12-09 14:09:41 +00:00
Ross 05edb93427 start improving constraint options 2025-12-09 13:41:26 +00:00
Ross 40135a282d . 2025-12-09 12:36:18 +00:00
Ross eb95f5fa6d . 2025-12-09 11:55:00 +00:00