mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-22 23:16:46 +00:00
fix(roadtrip): a night booked into the next morning holds that morning
Every day was scheduled from nothing, so a booking that runs into the next day ended at midnight as far as the chain was concerned. Check in at 08:00 and out at 08:00 the next day, and the rail was happy to put you somewhere else at 07:00 that morning, with no sign that the room was still yours. The day a check-out falls in now starts at the check-out rather than at nothing. A floor, never a move: a stop with a clock of its own keeps it and collects the late finding any leg it cannot make in time would give it, so a plan that says 07:00 still says 07:00 and merely admits it does not add up. A stop with no clock starts at the check-out instead of having no time at all. Only that one day. A stay running Monday to Thursday leaves Tuesday and Wednesday alone, because you sleep there, you do not sit there. The departure chip takes the door-out mark instead of a clock face. Beside an arrival time, a second clock read as a second arrival.
This commit is contained in:
@@ -3,7 +3,7 @@ import { useRoadtripSettings } from '../../hooks/useRoadtripSettings'
|
||||
import React, { useState } from 'react'
|
||||
import {
|
||||
CarFront, Footprints, Bike, Zap, AlertTriangle,
|
||||
ParkingSquare, Shuffle, Fuel, Clock, Spline, Ban, Plus, RotateCcw, X, BatteryCharging, Moon, Milestone,
|
||||
ParkingSquare, Shuffle, Fuel, Clock, Spline, Ban, Plus, RotateCcw, X, BatteryCharging, Moon, Milestone, LogOut,
|
||||
type LucideIcon,
|
||||
} from 'lucide-react'
|
||||
import MDancingTrek from '../../mobile/components/MDancingTrek'
|
||||
@@ -965,7 +965,10 @@ function CheckoutDeparture({ stop, entry }: { stop: RoadtripStop; entry?: Schedu
|
||||
if (stop.checkoutAt === undefined || !entry?.departure) return null
|
||||
return <Tooltip label={t('roadtrip.spill.departs', { time: formatClockTime(entry.departure, is12h) })}>
|
||||
<span dir="ltr" tabIndex={0} className="inline-flex shrink-0 items-center gap-1 rounded bg-surface-secondary px-1 py-0.5 align-middle whitespace-nowrap font-medium text-[length:calc(10px*var(--fs-scale-caption,1))] leading-none tabular-nums text-content-muted">
|
||||
<Clock size={10} aria-hidden />{formatClockTime(entry.departure, is12h)}
|
||||
{/* Leaving, not just a time of day: this chip is the one clock in the rail that
|
||||
says when you give the room back, and beside an arrival it read as a second
|
||||
arrival. The door-out mark is what a hotel desk calls check-out. */}
|
||||
<LogOut size={10} aria-hidden />{formatClockTime(entry.departure, is12h)}
|
||||
</span>
|
||||
</Tooltip>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user