mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-23 05:21:15 +00:00
fix(vacay): leave days follow a moved trip as a whole block and never land on blocked days
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
This commit is contained in:
@@ -18,5 +18,5 @@
|
||||
"src/nest/plugins/runtime/plugin-sdk.ts": 1093,
|
||||
"src/nest/reservations/reservations.service.ts": 1239,
|
||||
"src/nest/trips/trips.service.ts": 1009,
|
||||
"src/nest/vacay/vacay.service.ts": 1433
|
||||
"src/nest/vacay/vacay.service.ts": 1420
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user