Reorder whole days and insert a day (#589) (#1148)

* feat(days): reorder whole days and insert a day at a position

Adds reorderDays + insertDay to the day service and a PUT /days/reorder route
(plus an optional position on create). Day rows stay stable so a day's
assignments, notes, bookings and accommodations ride along by id; on a dated
trip the calendar dates stay pinned to their slots while the content moves
across them, and each booking's date is re-stamped onto its day's new date
(time-of-day preserved) so day_id stays consistent. Renumbering uses the
two-phase write to avoid the UNIQUE(trip_id, day_number) collision, and a move
that would invert an accommodation's check-in/out span is rejected.

* feat(planner): reorder days from a toolbar popup, and add days

A new toolbar button opens a popup listing the days; drag a row by its grip or
use the up/down arrows to reorder, and add a day from there. Reorders apply
optimistically with rollback and sync over WebSocket; the day headers are left
untouched, so the existing place drop-targets are unaffected.

* i18n: add day-reorder strings across all languages
This commit is contained in:
Maurice
2026-06-12 00:17:49 +02:00
committed by GitHub
parent 1378c95078
commit f46cc8a98e
34 changed files with 872 additions and 9 deletions
+9
View File
@@ -45,5 +45,14 @@ const dayplan: TranslationStrings = {
'dayplan.mobile.allAssigned': '모든 장소가 배정되었습니다',
'dayplan.mobile.noMatch': '일치 없음',
'dayplan.mobile.createNew': '새 장소 만들기',
'dayplan.reorderDays': '날짜 순서 변경',
'dayplan.reorderTitle': '날짜 순서 변경',
'dayplan.reorderHint': '해당 날짜의 장소, 메모, 예약이 함께 이동합니다.',
'dayplan.addDay': '날짜 추가',
'dayplan.moveUp': '위로 이동',
'dayplan.moveDown': '아래로 이동',
'dayplan.reorderUndo': '날짜 순서 변경',
'dayplan.reorderError': '날짜 순서를 변경하지 못했습니다',
'dayplan.addDayError': '날짜를 추가하지 못했습니다',
};
export default dayplan;