Refaktoring verejneho profilu, pridani zobrazeni udalosti

This commit is contained in:
Michal Kváček
2023-10-14 22:43:16 +02:00
parent 5b47c56c6f
commit 4c8952117b
12 changed files with 228 additions and 49 deletions
+7 -2
View File
@@ -5,7 +5,12 @@ const props = defineProps({
items: {
type: Array,
required: true
}
},
routeDetail: {
type: Object,
required: false,
default: () => ({name: 'eventDetail', params: {}})
},
});
const getCoverPhotos = (item) => item.flights.filter(f => !!f.coverPhoto).map(f => f.coverPhoto.thumbnailUrl);
@@ -15,7 +20,7 @@ const getCoverPhotos = (item) => item.flights.filter(f => !!f.coverPhoto).map(f
<q-list bordered separator>
<q-item
clickable
:to="{name: 'eventDetail', params: {id: event.id }}"
:to="{name: routeDetail.name, params: {...routeDetail.params, id: event.id}}"
v-ripple
v-for="event of items" :key="event"
>
@@ -0,0 +1,15 @@
<script setup>
const props = defineProps({
username: {
type: String,
required: true
}
})
</script>
<template>
<q-tabs class="q-mb-md">
<q-route-tab icon="flight_takeoff" :to="{name: 'publicProfileDetail', params: {username: username}}">Lety</q-route-tab>
<q-route-tab icon="event" :to="{name: 'publicEventsList', params: {username: username}}">Události</q-route-tab>
</q-tabs>
</template>