diff --git a/frontend/src/lib/components/EditAdventure.svelte b/frontend/src/lib/components/EditAdventure.svelte index fb476dc..05d4688 100644 --- a/frontend/src/lib/components/EditAdventure.svelte +++ b/frontend/src/lib/components/EditAdventure.svelte @@ -120,6 +120,7 @@ {#if isPointModalOpen} (isPointModalOpen = false)} @@ -184,6 +185,16 @@ bind:value={adventureToEdit.location} class="input input-bordered w-full max-w-xs mt-1" /> +
+ +

@@ -283,16 +294,6 @@ bind:value={adventureToEdit.longitude} class="input input-bordered w-full max-w-xs mt-1" /> -
- -
{#if adventureToEdit.collection === null}
) { + function setLongLat(event: CustomEvent) { console.log(event.detail); - newAdventure.latitude = event.detail[1]; - newAdventure.longitude = event.detail[0]; - isPointModalOpen = false; } @@ -165,6 +169,7 @@ query={newAdventure.name} on:close={() => (isPointModalOpen = false)} on:submit={setLongLat} + bind:adventure={newAdventure} latitude={newAdventure.latitude || null} longitude={newAdventure.longitude || null} /> @@ -238,9 +243,7 @@ />
- Location
+
+ +
diff --git a/frontend/src/lib/components/PointSelectionModal.svelte b/frontend/src/lib/components/PointSelectionModal.svelte index fa1b7d6..7d7ccd2 100644 --- a/frontend/src/lib/components/PointSelectionModal.svelte +++ b/frontend/src/lib/components/PointSelectionModal.svelte @@ -1,6 +1,6 @@ @@ -120,7 +138,9 @@ markers = [ { lngLat: { lng: Number(place.lon), lat: Number(place.lat) }, - name: place.display_name + location: place.display_name, + name: place.name, + activity_type: place.type } ]; }}