Trek_CN/client/src
Julien G. 4436b6f673
fix(journey,pdf): journey reorder sort_order + PDF multi-day transport (#848)
* fix(journey): make sort_order authoritative for within-day entry ordering

Reorder buttons appeared broken because the server ORDER BY put entry_time
before sort_order, so entries synced from trip places with differing times
would always sort by time regardless of sort_order writes. The client store
mirrored the same comparator, making even the optimistic update invisible.

- Change ORDER BY to (entry_date, sort_order, id) in getJourneyFull and listEntries
- Fix syncTripPlaces and onPlaceCreated to assign MAX+1 sort_order per day instead of day_number/0
- Update client store comparator to match
- Add DB migration to backfill sort_order using old effective key (entry_time, id) so existing journeys retain their visual order
- Add tests: JOURNEY-SVC-089–093, FE-STORE-JOURNEY-018–019

Closes #846

* fix(pdf): include multi-day transport return/arrival in PDF itinerary (#847)

Reservations were matched to days by pickup date only, so the end-day
card (e.g. car Return, flight Arrival) was silently dropped from the PDF.
Add span-aware helpers mirroring DayPlanSidebar logic: match by day_id/end_day_id
span, show reservation_end_time on end days, prefix title with phase label
(Return/Arrival/etc.), and use per-day position for sort order.

* test(pdf): add missing day_id to transport reservation fixture
2026-04-23 10:53:32 +02:00
..
api feat: journey gallery 1-to-N model with M:N entry-photo junction table 2026-04-22 15:58:31 +02:00
components fix(journey,pdf): journey reorder sort_order + PDF multi-day transport (#848) 2026-04-23 10:53:32 +02:00
db fix(offline): cache accommodations, trip members, tags, and categories for full offline support 2026-04-14 23:50:52 +02:00
hooks fix(test): initialize useCountUp to target immediately in jsdom to fix AdminPage stat test 2026-04-19 14:27:08 +02:00
i18n feat(journey/settings): warn on unsaved changes before closing modal 2026-04-21 22:42:31 +02:00
pages fix: restore map share toggle and fix public journey horizontal scroll 2026-04-22 17:05:15 +02:00
repo feat(import): selective GPX/KML element import and performance improvements 2026-04-18 01:28:37 +02:00
services feat(import): selective GPX/KML element import and performance improvements 2026-04-18 01:28:37 +02:00
store fix(journey,pdf): journey reorder sort_order + PDF multi-day transport (#848) 2026-04-23 10:53:32 +02:00
sync fix(offline): cache accommodations, trip members, tags, and categories for full offline support 2026-04-14 23:50:52 +02:00
utils fix(files): open attachments only in new tab (#840) 2026-04-23 10:06:56 +02:00
App.test.tsx test(client): expand frontend test suite to 69.1% coverage 2026-04-07 21:56:08 +02:00
App.tsx feat(auth): add email-based password reset with MFA + session invalidation 2026-04-20 14:06:42 +02:00
index.css hotfix: offline banner as bottom pill instead of full-width top bar 2026-04-21 22:30:50 +02:00
main.tsx refactoring: TypeScript migration, security fixes, 2026-03-27 18:40:18 +01:00
types.ts fix(reservations): show day date range on accommodation cards 2026-04-21 18:12:40 +02:00