From e1e2f55c938a92fd1bd6c5c3dc91011a902d7c79 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 29 Jun 2026 20:32:08 -0400 Subject: [PATCH] add list of cities for car pick drop off locations --- .../src/app/(dashboard)/fleet/[id]/page.tsx | 43 +- .../src/app/(dashboard)/fleet/page.tsx | 49 +- .../dashboard/src/components/I18nProvider.tsx | 22 +- .../src/components/LocationDropdownField.tsx | 215 + .../src/data/morocco-cities-rgph-2024.json | 10451 ++++++++++++++++ apps/dashboard/src/lib/moroccanCities.ts | 31 + 6 files changed, 10757 insertions(+), 54 deletions(-) create mode 100644 apps/dashboard/src/components/LocationDropdownField.tsx create mode 100644 apps/dashboard/src/data/morocco-cities-rgph-2024.json create mode 100644 apps/dashboard/src/lib/moroccanCities.ts diff --git a/apps/dashboard/src/app/(dashboard)/fleet/[id]/page.tsx b/apps/dashboard/src/app/(dashboard)/fleet/[id]/page.tsx index b7e1ed7..d3f1a99 100644 --- a/apps/dashboard/src/app/(dashboard)/fleet/[id]/page.tsx +++ b/apps/dashboard/src/app/(dashboard)/fleet/[id]/page.tsx @@ -9,6 +9,8 @@ import { apiFetch } from '@/lib/api' import VehicleCalendar from '@/components/VehicleCalendar' import VehiclePricingManager from '@/components/VehiclePricingManager' import { useDashboardI18n } from '@/components/I18nProvider' +import LocationDropdownField from '@/components/LocationDropdownField' +import { getMoroccanCityOptions } from '@/lib/moroccanCities' interface VehicleDetail { id: string @@ -287,6 +289,7 @@ export default function FleetDetailPage() { const { dict, language } = useDashboardI18n() const vd = dict.vehicleDetail const fl = dict.fleet + const cityOptions = getMoroccanCityOptions(language) const [vehicle, setVehicle] = useState(null) const [error, setError] = useState(null) @@ -754,17 +757,15 @@ export default function FleetDetailPage() {
-
- -