Trip to {destination}
-{startDate} - {endDate}
-diff --git a/src/lib/components/AddPlaces.svelte b/src/lib/components/AddPlaces.svelte index e04553d..a2adb31 100644 --- a/src/lib/components/AddPlaces.svelte +++ b/src/lib/components/AddPlaces.svelte @@ -210,4 +210,8 @@ :global(.pac-item:hover) { background-color: var(--gray-50); } + + :global(.pac-container:after) { + display: none; + } \ No newline at end of file diff --git a/src/lib/components/DeleteConfirmationPopup.svelte b/src/lib/components/DeleteConfirmationPopup.svelte new file mode 100644 index 0000000..a6d81b5 --- /dev/null +++ b/src/lib/components/DeleteConfirmationPopup.svelte @@ -0,0 +1,91 @@ + + +{#if showPopup} + +
+{/if} + + \ No newline at end of file diff --git a/src/lib/components/ItineraryDate.svelte b/src/lib/components/ItineraryDate.svelte index 622e425..253c85a 100644 --- a/src/lib/components/ItineraryDate.svelte +++ b/src/lib/components/ItineraryDate.svelte @@ -6,7 +6,21 @@ export let date; export let isExpanded = true; - export let places: { name: string; desc?: string; image?: string; time?: string; }[] = []; + export let countryCode = 'tw'; // Default to Taiwan if not provided + + interface Place { + name: string; + desc?: string; + image?: string; + time?: string; + geometry?: { + lat: number; + lng: number; + }; + } + + export let places: Place[] = []; + export let onPlacesUpdate: (places: Place[]) => void; function toggleDate() { isExpanded = !isExpanded; @@ -17,14 +31,22 @@ name: place.name || 'Unknown Place', desc: place.formatted_address || '', image: (place as any).photoUrl || '/placeholder.jpeg', - time: 'Add Time' + time: 'Add Time', + geometry: place.geometry?.location ? { + lat: place.geometry.location.lat(), + lng: place.geometry.location.lng() + } : undefined }; - places = [...places, newPlace]; + const updatedPlaces = [...places, newPlace]; + places = updatedPlaces; + onPlacesUpdate(updatedPlaces); } function handleDeletePlace(index: number) { - places = places.filter((_, i) => i !== index); + const updatedPlaces = places.filter((_, i) => i !== index); + places = updatedPlaces; + onPlacesUpdate(updatedPlaces); } @@ -48,7 +70,7 @@{startDate} - {endDate}
-