Trek_CN/server
jubnl a438652a50
fix(trips): preserve day content when trip date range changes
Rewrites generateDays to remap days positionally by day_number instead
of matching by date identity. Previously any date range shift with no
overlap would cascade-delete all day_assignments, day_notes, and
day_accommodations.

New behaviour:
- Shift/partial overlap: existing days remapped to new dates in order
- Shrink: overflow days become dateless (date=NULL) instead of deleted,
  preserving all child data for manual reassignment
- Grow: existing days kept, new empty days appended
- Clear dates: all days nullified, content intact

Also fixes a UNIQUE(trip_id, day_number) collision that would occur when
spare dateless days remained after growing into a partially-dateless trip
(maxAssigned base was wrong).

Closes #646
2026-04-15 01:28:53 +02:00
..
public chore(CRLF): normalize index.html line endings to LF 2026-04-05 04:35:17 +02:00
scripts feat: add encryption key migration script and document it in README 2026-04-01 09:35:32 +02:00
src fix(trips): preserve day content when trip date range changes 2026-04-15 01:28:53 +02:00
tests fix(trips): preserve day content when trip date range changes 2026-04-15 01:28:53 +02:00
.env.example feat(auth): split OIDC_ONLY into granular auth toggles 2026-04-11 20:21:36 +02:00
package-lock.json feat(pwa): implement real offline mode with IndexedDB sync 2026-04-14 23:04:25 +02:00
package.json merge: resolve conflicts with dev, fix 7 Snyk security issues 2026-04-11 19:11:21 +02:00
reset-admin.js Stabilize core: better-sqlite3, versioned migrations, graceful shutdown 2026-03-22 17:52:24 +01:00
tsconfig.json some fixes 2026-03-30 06:59:24 +02:00
vitest.config.ts refactor(mcp): replace direct DB access with service layer calls 2026-04-04 18:12:53 +02:00