fix(mobile): place a timed stop moved to another day among every stored row of that day

The slot is counted over the stored rows, booked nights and hidden service stops included, as the desktop move does, so the stop no longer lands ahead of them.
This commit is contained in:
Maurice
2026-11-28 00:33:27 +01:00
parent ff676c8fc2
commit 46a2fd2bbb
2 changed files with 19 additions and 2 deletions
@@ -99,7 +99,7 @@ export default function MPlaceSheet({ planner, shell }: MTripSheetsProps) {
// Lands where its time belongs on the new day, as a move on the desktop does;
// without a time it goes to the end.
const moveToDay = ({ assignment, fromDayId }: { assignment: Assignment; fromDayId: number }, toDayId: number) => {
const slot = timedSlot(planner.assignments[String(toDayId)] || [], planner.tripAccommodations, assignment.place?.place_time) ?? undefined
const slot = timedSlot(planner.storedAssignments[String(toDayId)] || [], planner.tripAccommodations, assignment.place?.place_time) ?? undefined
planner.handleMoveToDay(assignment.id, fromDayId, toDayId, slot)
.catch((err: unknown) => planner.toast.error(err instanceof Error ? err.message : t('common.unknownError')))
}