mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-19 21:46:49 +00:00
0dd07befa7
The Plan tab was the last trip tab still in the old design. It now reads like Bookings, Costs, Lists, Files and Collab, without losing a function: - Day plan: each day is a card with a head band (day tile with weather, stay and rental pills, a "+" menu for place, stay, transport, transit and note), rows with "..." menus, white badges and a white route bar. - Places column: add, search and filters in three rows, a show dropdown, category and rating filters, and a selection bar at the foot. - Place inspector, day details and the stay editor on the shared dialog frame; the place form in the editor look with the name in the head band. - Clicking a booking or transport anywhere on the plan opens the booking detail popup first; Edit leads to the editor. The popup is one host shared with the Bookings and Transports tabs. - Files and Collab dialogs, notes, polls, links and chat moved to the same frame; shared DialogShell and dialogParts hold the building blocks. - The map hover card shows the place photo and follows the theme. Every new and reworded string is translated into all locales, and a few older English leftovers (help center, cost split, import hints) with them. Phone screens keep their own look.
39 lines
1.2 KiB
TypeScript
39 lines
1.2 KiB
TypeScript
import ConfirmDialog from '../shared/ConfirmDialog'
|
|
|
|
interface TimeConfirmState {
|
|
dayId: number
|
|
fromId: number
|
|
time: string
|
|
fromType?: string
|
|
toType?: string
|
|
toId?: number
|
|
insertAfter?: boolean
|
|
reorderIds?: number[]
|
|
}
|
|
|
|
interface DayPlanSidebarTimeConfirmModalProps {
|
|
timeConfirm: TimeConfirmState | null
|
|
setTimeConfirm: (v: TimeConfirmState | null) => void
|
|
confirmTimeRemoval: () => void
|
|
t: (key: string, params?: Record<string, string | number>) => string
|
|
}
|
|
|
|
/**
|
|
* Asks before a move drops a place's time: a timed place moved out of the
|
|
* day's time order cannot keep its time there. The shared question dialog
|
|
* carries the look, Escape and the backdrop.
|
|
*/
|
|
export function DayPlanSidebarTimeConfirmModal({ timeConfirm, setTimeConfirm, confirmTimeRemoval, t }: DayPlanSidebarTimeConfirmModalProps) {
|
|
return (
|
|
<ConfirmDialog
|
|
isOpen={!!timeConfirm}
|
|
onClose={() => setTimeConfirm(null)}
|
|
onConfirm={confirmTimeRemoval}
|
|
title={t('dayplan.confirmRemoveTimeTitle')}
|
|
message={timeConfirm ? t('dayplan.confirmRemoveTimeBody', { time: timeConfirm.time }) : ''}
|
|
confirmLabel={t('common.confirm')}
|
|
cancelLabel={t('common.cancel')}
|
|
/>
|
|
)
|
|
}
|