From 5f44cd1403aaab4ca01a72b229a4ed978c0f51c0 Mon Sep 17 00:00:00 2001 From: Maurice Date: Sun, 21 Jun 2026 00:00:35 +0200 Subject: [PATCH] feat(planner): bring back the Google Maps route export button (#1255) The day-plan route bar lost its Open in Google Maps action in the 3.1.0 redesign. A small button with the Google logo (monochrome, theme-aware) now sits next to the Route toggle and opens the day stops, in planned order, as a Google Maps directions link in a new tab. --- .../src/components/Planner/DayPlanSidebar.tsx | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/client/src/components/Planner/DayPlanSidebar.tsx b/client/src/components/Planner/DayPlanSidebar.tsx index 0072eb7d..8c168915 100644 --- a/client/src/components/Planner/DayPlanSidebar.tsx +++ b/client/src/components/Planner/DayPlanSidebar.tsx @@ -5,7 +5,7 @@ declare global { interface Window { __dragData: DragDataPayload | null } } import React, { useState, useEffect, useLayoutEffect, useRef, useMemo } from 'react' import { ChevronDown, ChevronRight, ChevronUp, Navigation, RotateCcw, ExternalLink, Clock, Pencil, GripVertical, Ticket, Plus, FileText, Trash2, Car, Lock, Hotel, Footprints, Route as RouteIcon } from 'lucide-react' import { assignmentsApi, reservationsApi } from '../../api/client' -import { calculateRoute, calculateRouteWithLegs, optimizeRoute } from '../Map/RouteCalculator' +import { calculateRoute, calculateRouteWithLegs, optimizeRoute, generateGoogleMapsUrl } from '../Map/RouteCalculator' import PlaceAvatar from '../shared/PlaceAvatar' import ConfirmDialog from '../shared/ConfirmDialog' import { useContextMenu, ContextMenu } from '../shared/ContextMenu' @@ -2168,6 +2168,28 @@ const DayPlanSidebar = React.memo(function DayPlanSidebar(props: DayPlanSidebarP {t('dayplan.route')} + {/* Open the day's stops as a route in Google Maps (planned order). #1255 */} +