Bugfixy
This commit is contained in:
@@ -10,6 +10,8 @@ import {successObject} from "src/composables/dialog";
|
||||
import {usePointsOfInterestTypeStore} from "stores/PointOfInterestType";
|
||||
import {storeToRefs} from "pinia";
|
||||
import POIForm from "components/poi/POIForm.vue";
|
||||
import {useUserStore} from "stores/User";
|
||||
import AccessDeniedBanner from "components/AccessDeniedBanner.vue";
|
||||
|
||||
const poiId = parseInt(useRoute().params.id);
|
||||
|
||||
@@ -27,6 +29,7 @@ onMounted(() => {
|
||||
})
|
||||
|
||||
const poiTypes = storeToRefs(usePointsOfInterestTypeStore()).items;
|
||||
const loggedUser = storeToRefs(useUserStore()).user;
|
||||
|
||||
const $q = useQuasar();
|
||||
const router = useRouter();
|
||||
@@ -40,6 +43,6 @@ const handleSave = (data) => {
|
||||
|
||||
<template>
|
||||
<POIEditSkeleton v-if="loading"/>
|
||||
|
||||
<AccessDeniedBanner v-else-if="poi.createdbyId !== loggedUser.id" :route-back="{name: 'poiDetail', params: {id: poiId}}"/>
|
||||
<POIForm :poi="poi" :types="poiTypes" v-else @save="handleSave"/>
|
||||
</template>
|
||||
|
||||
@@ -29,7 +29,7 @@ onMounted(() => {
|
||||
<POIDetailSkeleton v-if="loading || !poi"/>
|
||||
|
||||
<template v-else>
|
||||
<article v-html="poi.description" />
|
||||
<article v-html="poi.description" class="q-my-lg" />
|
||||
|
||||
<EmbeddedMap
|
||||
v-if="poi.gpsLatitude && poi.gpsLongitude"
|
||||
@@ -51,7 +51,7 @@ onMounted(() => {
|
||||
Pokud přidáš toto místo k nějaké fotce, zobrazí se tu.
|
||||
</BasicInfoBanner>
|
||||
|
||||
<FlightsList :items="poi.flights" />
|
||||
<FlightsList :items="poi.flights" v-if="poi.flights.length > 0 && loggedUser.id === poi.createdById"/>
|
||||
|
||||
<FAB v-if="poi.createdById === loggedUser.id" :router-link="{name: 'poiEdit', params:{id: poi.id}}" mode="edit"/>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user