Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

1.7 KB
Raw Blame
import { defineScreen } from '../defineScreen'

/**
 * Help for the day details panel of a trip's plan: the panel a day header
 * opens over the map, with the day's name and date, the weather where you
 * will be, the bookings that fall on the day and the nights booked for it.
 * A screen under `trip`; the step actions live in `e2e/help/trip-day-detail.guide.ts`.
 */

const DAYS = 'Day-Plans-and-Notes'
const STAY = 'Accommodations'
const WEATHER = 'Weather-Forecasts'
const PANEL = { slug: DAYS, anchor: 'day-detail-panel' }
const IN_PANEL = { slug: STAY, anchor: 'in-the-day-detail-panel' }

export const { context: tripDayDetailContext, guides: tripDayDetailGuides } = defineScreen({
  id: 'trip-day-detail',
  parent: 'trip',
  route: '/trips/:id?tab=plan',
  icon: 'panelRight',
  bullets: 6,
  docs: [PANEL, IN_PANEL, { slug: WEATHER }],
  guides: [
    ['day-panel', 'panelRight', 'guide', 6, 3, PANEL, ['day-weather', 'day-bookings', 'read-day-plan'], true],
    ['day-weather', 'eye', 'quick', 4, 3, { slug: WEATHER, anchor: 'what-is-shown' }, ['day-panel', 'read-day-plan']],
    ['rename-day', 'tags', 'quick', 4, 3, PANEL, ['manage-days', 'day-note'], true],
    ['add-accommodation', 'building', 'guide', 6, 5, { slug: STAY, anchor: 'creating-an-accommodation' }, ['create-place', 'edit-accommodation', 'booking-hotel'], true],
    ['edit-accommodation', 'pencil', 'guide', 5, 3, IN_PANEL, ['add-accommodation', 'confirm-stay-booking', 'day-bookings']],
    ['confirm-stay-booking', 'checkCircle', 'quick', 4, 2, IN_PANEL, ['edit-accommodation', 'day-bookings', 'booking-hotel'], true],
    ['day-bookings', 'ticket', 'quick', 4, 2, { slug: DAYS, anchor: 'multi-day-reservations' }, ['bookings-in-plan', 'create-booking', 'confirm-stay-booking']],
  ],
})