toggle destination card and move when click location on search bar list

This commit is contained in:
SRP-mango 2023-11-21 00:39:14 +07:00
parent 9cff6bd7ec
commit 58fcf52cd4
2 changed files with 39 additions and 0 deletions

View file

@ -0,0 +1,38 @@
<template>
<v-card
class="stick-bottom card-height"
width="100%"
height="60vh"
style="padding-top: 15px; font-weight:bold;"
:title="nearestStructureData.display_name"
:subtitle="destination.subTitle"
>
</v-card>
</template>
<script>
export default {
props: {
nearestStructureData: Object,
onClose: Function,
},
data() {
return {
showPopup: true,
};
},
methods: {
closePopup() {
this.showPopup = false;
this.onClose();
},
viewRoute() {
this.$emit('changeComponent', { userLocation: this.userLocation, destination: this.destination });
},
},
};
</script>

View file

@ -121,6 +121,7 @@ const moveToLocation = (result) => {
const lon = parseFloat(result.lon);
center.value = [lon, lat];
showSearchBar.value = false;
popupData.value = result; // Set the selected search result as popupData
};
const performSearch = async () => {