mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-28 07:30:04 +00:00
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:
@@ -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')))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user