Add negative shifts in flex map logic and make it dynamic

This commit is contained in:
2026-03-14 20:52:59 +02:00
parent d7fd717c95
commit 770b0e84c9
4 changed files with 24 additions and 3 deletions

View File

@@ -136,6 +136,14 @@ impl Day {
!self.0.is_multiple_of(2)
}
pub fn shift_types(&self) -> &[ShiftType] {
if self.is_open_shift() {
&[ShiftType::OpenFirst, ShiftType::OpenSecond]
} else {
&[ShiftType::Closed]
}
}
pub fn next(&self) -> Self {
Self(self.0 + 1)
}