mirror of
https://gitlab.com/little-lines/frontend.git
synced 2024-11-22 05:56:51 +00:00
send data from fav to home (not finished)
This commit is contained in:
parent
b0d6784462
commit
adf008a6be
3 changed files with 11 additions and 45 deletions
|
@ -11,7 +11,6 @@
|
||||||
|
|
||||||
<v-list-item>
|
<v-list-item>
|
||||||
<v-list-item-title class="title-text">{{nearestStructureData.display_name}}</v-list-item-title>
|
<v-list-item-title class="title-text">{{nearestStructureData.display_name}}</v-list-item-title>
|
||||||
<!-- <v-list-item-subtitle class="subtitle-text">{{destination.subTitle}}</v-list-item-subtitle> -->
|
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
|
|
||||||
<v-list-item>
|
<v-list-item>
|
||||||
|
@ -37,18 +36,6 @@
|
||||||
<v-list-item-title class="text-decoration-underline">{{nearestStructureData.lon}} , {{nearestStructureData.lat}}</v-list-item-title>
|
<v-list-item-title class="text-decoration-underline">{{nearestStructureData.lon}} , {{nearestStructureData.lat}}</v-list-item-title>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
|
|
||||||
<!-- <v-list-item>
|
|
||||||
<template v-slot:prepend>
|
|
||||||
<v-avatar>
|
|
||||||
<img :src="detial[2].icon"
|
|
||||||
class="icon"
|
|
||||||
/>
|
|
||||||
</v-avatar>
|
|
||||||
</template>
|
|
||||||
<v-list-item-title>{{detial[2].title}}</v-list-item-title>
|
|
||||||
</v-list-item> -->
|
|
||||||
|
|
||||||
|
|
||||||
</v-list>
|
</v-list>
|
||||||
|
|
||||||
<v-card-actions class="stick-bottom btnlist-height justify-sa">
|
<v-card-actions class="stick-bottom btnlist-height justify-sa">
|
||||||
|
@ -206,11 +193,11 @@
|
||||||
import findLocation from '../../icons/Material/find-location.svg';
|
import findLocation from '../../icons/Material/find-location.svg';
|
||||||
import clock from '../../icons/Material/clock.svg';
|
import clock from '../../icons/Material/clock.svg';
|
||||||
import check from '../../icons/Material/check-round.svg';
|
import check from '../../icons/Material/check-round.svg';
|
||||||
import DestinationInfoCard from '@/components/DestinationInfoCard.vue';
|
// import DestinationInfoCard from '@/components/DestinationInfoCard.vue';
|
||||||
const destination = {
|
// const destination = {
|
||||||
title: "อนุสาวรีย์ชัยสมรภูมิ",
|
// title: "อนุสาวรีย์ชัยสมรภูมิ",
|
||||||
subTitle: "ราชเทวี , กรุงเทพมหานคร"
|
// subTitle: "ราชเทวี , กรุงเทพมหานคร"
|
||||||
}
|
// }
|
||||||
const detial = [
|
const detial = [
|
||||||
{
|
{
|
||||||
icon: check,
|
icon: check,
|
||||||
|
@ -243,7 +230,6 @@ export default {
|
||||||
showRoute: false,
|
showRoute: false,
|
||||||
userLocation: null,
|
userLocation: null,
|
||||||
isLocationRequested: false,
|
isLocationRequested: false,
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -465,7 +451,6 @@ export default {
|
||||||
|
|
||||||
.destination-card .v-field__input
|
.destination-card .v-field__input
|
||||||
{
|
{
|
||||||
/* font-size: 14px; */
|
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,4 @@
|
||||||
<template>
|
<template>
|
||||||
<!-- <h1>Favorites</h1> -->
|
|
||||||
<!-- แสดงข้อมูล favorites ตามความเหมาะสม -->
|
|
||||||
<!-- <ul class="favorite-list">
|
|
||||||
<li v-for="(favorite, index) in favorite" :key="index" class="favorite-item">
|
|
||||||
{{ favorite.place_name }}
|
|
||||||
</li>
|
|
||||||
</ul> -->
|
|
||||||
|
|
||||||
<v-card
|
<v-card
|
||||||
class="mx-auto fav-card">
|
class="mx-auto fav-card">
|
||||||
|
|
||||||
|
@ -32,13 +24,17 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { ref, onMounted } from 'vue';
|
import { ref, onMounted } from 'vue';
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
setup() {
|
setup() {
|
||||||
const favorite = ref([]);
|
const favorite = ref([]);
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
const handleClick = (favoriteItem) => {
|
const handleClick = (favoriteItem) => {
|
||||||
console.log('Clicked:', favoriteItem);
|
console.log('Clicked:', favoriteItem);
|
||||||
|
router.push({ name: 'home', params: { favoriteLocation: favoriteItem } });
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
@ -69,19 +65,6 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
/* CSS เพื่อแสดงแต่ละข้อมูลเป็น block */
|
|
||||||
/* .favorite-list {
|
|
||||||
list-style-type: none;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.favorite-item {
|
|
||||||
display: block;
|
|
||||||
padding: 10px;
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
} */
|
|
||||||
|
|
||||||
.icon-pin{
|
.icon-pin{
|
||||||
background-color: black;
|
background-color: black;
|
||||||
-webkit-mask: url(icons/Adwaita/pin.svg) no-repeat center;
|
-webkit-mask: url(icons/Adwaita/pin.svg) no-repeat center;
|
||||||
|
|
|
@ -114,9 +114,6 @@
|
||||||
|
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
|
||||||
import searchbar from '@/components/searchbar.vue';
|
|
||||||
import Popup from "@/components/Popup.vue"; // Import the Popup componen
|
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import DestinationInfoCard from '@/components/DestinationInfoCard.vue';
|
import DestinationInfoCard from '@/components/DestinationInfoCard.vue';
|
||||||
|
@ -193,6 +190,7 @@ const handleRouting = (res) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
Loading…
Reference in a new issue