feat: add copy/duplicate trip from dashboard (#270)

New POST /api/trips/:id/copy endpoint that deep copies all trip
planning data (days, places, assignments, reservations, budget,
packing, accommodations, day notes) with proper FK remapping
inside a transaction. Skips files, collab data, and members.

Copy button on all dashboard card types (spotlight, grid, list,
archived) gated by trip_create permission. Translations for all
12 languages.

Also adds reminder_days to Trip interface (removes as-any casts).
This commit is contained in:
Gérnyi Márk
2026-04-03 12:38:45 +02:00
committed by GitHub
parent a0db42fbfe
commit d48714d17a
16 changed files with 253 additions and 11 deletions

View File

@@ -82,6 +82,8 @@ const de: Record<string, string | { name: string; category: string }[]> = {
'dashboard.places': 'Orte',
'dashboard.members': 'Reise-Buddies',
'dashboard.archive': 'Archivieren',
'dashboard.copyTrip': 'Kopieren',
'dashboard.copySuffix': 'Kopie',
'dashboard.restore': 'Wiederherstellen',
'dashboard.archived': 'Archiviert',
'dashboard.status.ongoing': 'Laufend',
@@ -100,6 +102,8 @@ const de: Record<string, string | { name: string; category: string }[]> = {
'dashboard.toast.archiveError': 'Fehler beim Archivieren',
'dashboard.toast.restored': 'Reise wiederhergestellt',
'dashboard.toast.restoreError': 'Fehler beim Wiederherstellen',
'dashboard.toast.copied': 'Reise kopiert!',
'dashboard.toast.copyError': 'Fehler beim Kopieren der Reise',
'dashboard.confirm.delete': 'Reise "{title}" löschen? Alle Orte und Pläne werden unwiderruflich gelöscht.',
'dashboard.editTrip': 'Reise bearbeiten',
'dashboard.createTrip': 'Neue Reise erstellen',