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

@@ -87,6 +87,8 @@ const ar: Record<string, string | { name: string; category: string }[]> = {
'dashboard.places': 'الأماكن',
'dashboard.members': 'ال חברים',
'dashboard.archive': 'أرشفة',
'dashboard.copyTrip': 'نسخ',
'dashboard.copySuffix': 'نسخة',
'dashboard.restore': 'استعادة',
'dashboard.archived': 'مؤرشفة',
'dashboard.status.ongoing': 'جارية',
@@ -105,6 +107,8 @@ const ar: Record<string, string | { name: string; category: string }[]> = {
'dashboard.toast.archiveError': 'فشل الأرشفة',
'dashboard.toast.restored': 'تمت استعادة الرحلة',
'dashboard.toast.restoreError': 'فشل الاستعادة',
'dashboard.toast.copied': 'تم نسخ الرحلة!',
'dashboard.toast.copyError': 'فشل نسخ الرحلة',
'dashboard.confirm.delete': 'حذف الرحلة "{title}"؟ سيتم حذف جميع الأماكن والخطط نهائيًا.',
'dashboard.editTrip': 'تعديل الرحلة',
'dashboard.createTrip': 'إنشاء رحلة جديدة',