diff --git a/README.md b/README.md index 63eb6514..33001a98 100644 --- a/README.md +++ b/README.md @@ -98,8 +98,8 @@ Voyage aims to be simple, beautiful, and open to everyone — inheriting Adventu - Upload trails and activities to your locations to remember your experiences with detailed maps and stats. - **Plan Your Next Trip** 📃: Take the guesswork out of planning your next adventure with an easy-to-use itinerary planner. - Itineraries can be created for any number of days and can include multiple destinations. - - A timeline-style day view shows ordered stops with numbered markers and compact location cards (no image banners) for a dense overview. Lodging appears as boundary anchors — before the first stop and after the last stop of each day — giving a clear at-a-glance view of where you're staying. Lodging cards use the same compact style (no image header) as location cards within the itinerary. - - Connector rows between consecutive locations display distance and travel time powered by [OSRM](https://project-osrm.org/) routing (walking if ≤ 20 min, driving otherwise), with automatic haversine fallback when OSRM is unavailable. Self-hosted OSRM instances are supported via the `OSRM_BASE_URL` environment variable. Transportation items appear as separate compact connector rows showing mode, duration, and distance. Boundary transitions between lodging and the first/last stop of the day are also shown as connector rows. + - A timeline-style day view shows ordered stops with numbered markers and compact location cards (no image banners) for a dense overview. Lodging placement follows directional rules: on check-in day lodging appears after the last stop, on check-out day it appears before the first stop, and on days with no locations a single lodging card is shown (or two cards when a checkout and checkin are different lodgings). Lodging cards use the same compact style (no image header) as location cards within the itinerary. + - Connector rows between consecutive locations display distance and travel time powered by [OSRM](https://project-osrm.org/) routing (walking if ≤ 20 min, driving otherwise), with automatic haversine fallback when OSRM is unavailable. Self-hosted OSRM instances are supported via the `OSRM_BASE_URL` environment variable. Transportation items appear as separate compact connector rows showing mode, duration, and distance. Boundary transitions between lodging and adjacent stops are also shown as connector rows. - Each day has a single `+ Add` control to insert new places, and day-level quick actions include Auto-fill and an Optimize placeholder. Lodging added from within a day is automatically scheduled to that day. - Itineraries include many planning features like flight information, notes, checklists, and links to external resources. - Itineraries can be shared with friends and family for collaborative planning. diff --git a/documentation/docs/intro/voyage_overview.md b/documentation/docs/intro/voyage_overview.md index 188b9941..37f72aad 100644 --- a/documentation/docs/intro/voyage_overview.md +++ b/documentation/docs/intro/voyage_overview.md @@ -14,8 +14,8 @@ Voyage is a full-fledged travel companion. With Voyage, you can log your adventu - Upload trails and activities to your locations to remember your experiences with detailed maps and stats. - **Plan Your Next Trip** 📃: Take the guesswork out of planning your next adventure with an easy-to-use itinerary planner. - Itineraries can be created for any number of days and can include multiple destinations. - - A timeline-style day view shows ordered stops with numbered markers and compact location cards (no image banners) for a dense overview. Lodging appears as boundary anchors — before the first stop and after the last stop of each day — giving a clear at-a-glance view of where you're staying. Lodging cards use the same compact style (no image header) as location cards within the itinerary. - - Connector rows between consecutive locations display distance and travel time powered by [OSRM](https://project-osrm.org/) routing (walking if ≤ 20 min, driving otherwise), with automatic haversine fallback when OSRM is unavailable. Self-hosted OSRM instances are supported via the `OSRM_BASE_URL` environment variable. Transportation items appear as separate compact connector rows showing mode, duration, and distance. Boundary transitions between lodging and the first/last stop of the day are also shown as connector rows. + - A timeline-style day view shows ordered stops with numbered markers and compact location cards (no image banners) for a dense overview. Lodging placement follows directional rules: on check-in day lodging appears after the last stop, on check-out day it appears before the first stop, and on days with no locations a single lodging card is shown (or two cards when a checkout and checkin are different lodgings). Lodging cards use the same compact style (no image header) as location cards within the itinerary. + - Connector rows between consecutive locations display distance and travel time powered by [OSRM](https://project-osrm.org/) routing (walking if ≤ 20 min, driving otherwise), with automatic haversine fallback when OSRM is unavailable. Self-hosted OSRM instances are supported via the `OSRM_BASE_URL` environment variable. Transportation items appear as separate compact connector rows showing mode, duration, and distance. Boundary transitions between lodging and adjacent stops are also shown as connector rows. - Each day has a single `+ Add` control to insert new places, and day-level quick actions include Auto-fill and an Optimize placeholder. Lodging added from within a day is automatically scheduled to that day. - Itineraries include many planning features like flight information, notes, checklists, and links to external resources. - Itineraries can be shared with friends and family for collaborative planning. diff --git a/documentation/docs/usage/usage.md b/documentation/docs/usage/usage.md index 5f7dd3a6..1fb907d0 100644 --- a/documentation/docs/usage/usage.md +++ b/documentation/docs/usage/usage.md @@ -22,9 +22,9 @@ The term "Location" is now used instead of "Adventure" - the usage remains the s #### Collections -- **Collection**: a collection is a way to group locations together. Collections are flexible and can be used in many ways. When no start or end date is added to a collection, it acts like a folder to group locations together. When a start and end date is added to a collection, it acts like a trip to group locations together that were visited during that time period. With start and end dates, the collection is transformed into a full itinerary with a timeline-style day view — each day displays numbered stops as compact cards (without image banners), connector rows between consecutive locations showing distance and travel time via OSRM routing (walking if ≤ 20 min, driving otherwise) with automatic haversine fallback when OSRM is unavailable, and a single `+ Add` control for inserting new places. Lodging appears as boundary anchors at the start and end of each day (before the first stop and after the last stop), with connector rows linking them to adjacent locations. Day-level quick actions include Auto-fill (populates an empty itinerary from dated records) and an Optimize placeholder for future route optimization. The itinerary also includes a map showing the route taken between locations. Your most recently updated collections also appear on the dashboard. For example, you could have a collection for a trip to Europe with dates so you can plan where you want to visit, a collection of local hiking trails, or a collection for a list of restaurants you want to try. +- **Collection**: a collection is a way to group locations together. Collections are flexible and can be used in many ways. When no start or end date is added to a collection, it acts like a folder to group locations together. When a start and end date is added to a collection, it acts like a trip to group locations together that were visited during that time period. With start and end dates, the collection is transformed into a full itinerary with a timeline-style day view — each day displays numbered stops as compact cards (without image banners), connector rows between consecutive locations showing distance and travel time via OSRM routing (walking if ≤ 20 min, driving otherwise) with automatic haversine fallback when OSRM is unavailable, and a single `+ Add` control for inserting new places. Lodging placement follows directional rules: on check-in day it appears after the last stop, on check-out day it appears before the first stop, and on days with no locations a single lodging card is shown (or two cards when a checkout and checkin are different lodgings). Connector rows link lodging to adjacent locations. Day-level quick actions include Auto-fill (populates an empty itinerary from dated records) and an Optimize placeholder for future route optimization. The itinerary also includes a map showing the route taken between locations. Your most recently updated collections also appear on the dashboard. For example, you could have a collection for a trip to Europe with dates so you can plan where you want to visit, a collection of local hiking trails, or a collection for a list of restaurants you want to try. - **Transportation**: a transportation is a collection exclusive feature that allows you to add transportation information to your trip. In the itinerary timeline view, transportation items appear as compact connector rows between stops — showing the travel mode, duration, and distance. This can be used to show the route taken between locations and the mode of transportation used. It can also be used to track flight information, such as flight number and departure time. -- **Lodging**: a lodging is a collection exclusive feature that allows you to add lodging information to your trip. This can be used to plan where you will stay during your trip and add notes about the lodging location. It can also be used to track reservation information, such as reservation number and check-in time. In the itinerary timeline view, lodging is displayed as compact cards (without image headers) positioned as boundary anchors — before the first stop and after the last stop of each day. Lodging added from within a specific day is automatically scheduled to that day. Connector rows show boundary transitions between lodging and adjacent locations. +- **Lodging**: a lodging is a collection exclusive feature that allows you to add lodging information to your trip. This can be used to plan where you will stay during your trip and add notes about the lodging location. It can also be used to track reservation information, such as reservation number and check-in time. In the itinerary timeline view, lodging is displayed as compact cards (without image headers) using directional placement: on check-in day the lodging card appears after the last stop, on check-out day it appears before the first stop, and on days with no locations a single card is shown unless the checkout and checkin are different lodgings (in which case both appear). Lodging added from within a specific day is automatically scheduled to that day. Connector rows show boundary transitions between lodging and adjacent locations. - **Note**: a note is a collection exclusive feature that allows you to add notes to your trip. This can be used to add additional information about your trip, such as a summary of the trip or a list of things to do. Notes can be assigned to a specific day of the trip to help organize the information. - **Checklist**: a checklist is a collection exclusive feature that allows you to add a checklist to your trip. This can be used to create a list of things to do during your trip or for planning purposes like packing lists. Checklists can be assigned to a specific day of the trip to help organize the information. diff --git a/frontend/src/lib/components/cards/LodgingCard.svelte b/frontend/src/lib/components/cards/LodgingCard.svelte index c643cb88..1c5cdb25 100644 --- a/frontend/src/lib/components/cards/LodgingCard.svelte +++ b/frontend/src/lib/components/cards/LodgingCard.svelte @@ -69,6 +69,14 @@ return stars; } + export let lodging: Lodging; + export let user: User | null = null; + export let collection: Collection | null = null; + export let readOnly: boolean = false; + export let itineraryItem: CollectionItineraryItem | null = null; + export let showImage: boolean = true; + export let compact: boolean = false; + const localTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone ?? 'UTC'; const getTimezoneLabel = (zone?: string | null) => zone ?? localTimeZone; const getTimezoneTip = (zone?: string | null) => { @@ -85,9 +93,27 @@ }; const hasTimePortion = (date: string | null) => !!date && !isAllDay(date); const isTimedStay = (date: string | null) => hasTimePortion(date); + const formatStayDateTime = (date: string | null) => { + if (!date) return null; + return isAllDay(date) ? formatAllDayDate(date) : formatDateInTimezone(date, lodging.timezone); + }; $: lodgingPriceLabel = formatMoney( toMoneyValue(lodging.price, lodging.price_currency, DEFAULT_CURRENCY) ); + $: compactStayMeta = [ + lodging.check_in + ? { + label: 'IN', + value: formatStayDateTime(lodging.check_in) + } + : null, + lodging.check_out + ? { + label: 'OUT', + value: formatStayDateTime(lodging.check_out) + } + : null + ].filter((entry): entry is { label: string; value: string | null } => Boolean(entry)); let showMoreDetails = false; $: hasExpandableDetails = Boolean( @@ -95,14 +121,6 @@ ); $: if (!hasExpandableDetails) showMoreDetails = false; - export let lodging: Lodging; - export let user: User | null = null; - export let collection: Collection | null = null; - export let readOnly: boolean = false; - export let itineraryItem: CollectionItineraryItem | null = null; - export let showImage: boolean = true; - export let compact: boolean = false; - let isWarningModalOpen: boolean = false; function editTransportation() { @@ -328,16 +346,50 @@ - - {#if lodging.location} -