mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
ef150439f9
Moving a trip's start shifted the owner's vacay entries one row at a time, checking each target against rows that were about to move themselves. A block shifted by less than its own length kept its first days behind and pushed the rest onto the weekend, even with weekends blocked. The shift now decides every day before writing: a day whose target is a blocked weekend or a whole company holiday is dropped, as is one whose target already holds leave that is not moving; a half company holiday leaves half a day. The rest move in the direction of travel inside one transaction. The plan is the one the owner is active in, so a member of a fused plan gets their days moved too, and a trip edit no longer creates a vacay plan for an owner who has none. Open vacay views are notified after the trip update commits. The pure vacay helpers moved to vacay.helpers.ts and the trip window tests to their own suite, so both files stay inside their size budgets. Refs #2604