feat(dawarich): preselect the stay's day in the accept dialog (#3068)

The accept dialog opened on "not on a day yet" although the stay carries its
local date. It now picks the trip day whose date matches, on open and when the
trip is switched, and falls back to no day when the trip has none that matches.
This commit is contained in:
Maurice
2026-11-13 09:15:20 +01:00
parent 3e98938c95
commit 11e4fe6ae3
4 changed files with 82 additions and 4 deletions
@@ -60,6 +60,7 @@ const PlacesSidebar = React.memo(function PlacesSidebar(props: PlacesSidebarProp
daysForTrip={() => days.map(day => ({
id: day.id,
...formatDayOption(day.day_number, day.date, locale, t),
date: day.date ?? undefined,
}))}
// The place it just created belongs on the map and in the list
// now, not after a reload.