feat(collections): import a whole trip's places into a list (#1903)

* feat(collections): preview which of a trip's places a list already holds

The bulk import endpoint has been there since the select-mode copy, but nothing
calls it and it only reports duplicates after the fact. A dialog needs the verdict
up front, so /:id/importable/:tripId returns the trip's places with the duplicate
check the import itself applies, plus whether any day holds the place.

* feat(collections): import a whole trip's places into a list

Two steps: pick a trip, then tick its places. Places already on the list are
greyed out and unpickable, and the ones no day holds start selected — those are
the plans a trip left behind, which is the reason to import at all. Sorted so a
mostly-saved trip reads as the two that are left rather than a wall of grey.

* feat(collections): reach the trip import from the filter row and an empty list

* i18n(collections): translate the trip import into all locales

* fix(collections): stop the label dialog's buttons wrapping mid-word

Three actions in a max-w-sm footer wrapped into two lines each. The assign
button also painted white text on the accent, which disappears on a light one.

* docs(collections): document the trip import
This commit is contained in:
Maurice
2026-08-12 11:54:36 +02:00
committed by GitHub
parent b0fd73681b
commit b842d74a5d
37 changed files with 1286 additions and 11 deletions
+20
View File
@@ -36,6 +36,26 @@ const collection: TranslationStrings = {
'collections.addPlace': 'Додати місце',
'collections.addPlaceSearch': 'Пошук місця…',
'collections.addPlaceHint': 'Знайдіть, щоб додати місце до цього списку',
'collections.importFromTrip': 'Імпорт із подорожі',
'collections.importTitle': 'Імпорт із подорожі',
'collections.importDoneTitle': 'Імпорт завершено',
'collections.importPickTripHint': 'Вибери подорож і перенеси її місця до списку {name}.',
'collections.importNoTrips': 'Подорожей поки немає',
'collections.importPlacesCount': '{count} місць',
'collections.importSearchPlaces': 'Пошук місць…',
'collections.importOnlyNew': 'Лише нові',
'collections.importSelectAll': 'Вибрати все',
'collections.importClearSelection': 'Зняти вибір',
'collections.importAlreadySaved': 'Уже збережено',
'collections.importUnscheduled': 'Без дня',
'collections.importOnDay': 'День {count}',
'collections.importSelectedCount': 'Вибрано: {count}',
'collections.importAction': 'Імпортувати {count}',
'collections.importEmptyTrip': 'У цій подорожі ще немає місць',
'collections.importNothingNew': 'Усе з цієї подорожі вже є у списку',
'collections.importDone': 'Додано місць: {count}',
'collections.importDoneSkipped': '{count} уже були у списку й лишилися без змін',
'collections.importDoneClean': 'Тепер усі вони у списку {name}',
'collections.sort.default': 'За замовчуванням',
'collections.sort.nameAsc': 'Назва (А–Я)',
'collections.coordinates': 'Координати',