|
|
@@ -16,11 +16,13 @@
|
|
|
<v-container class="content">
|
|
|
<v-row>
|
|
|
<v-col cols="12" sm="6" class="pr-6">
|
|
|
- <img
|
|
|
- :src="publicEvent.imageId ? 'https://api.opentalent.fr/app.php/_internal/secure/files/' + publicEvent.imageId + '/raw' : '/images/event-default.jpg'"
|
|
|
+ <v-img
|
|
|
+ :src="publicEvent.imageUrl || '/images/event-default.jpg'"
|
|
|
alt="banner"
|
|
|
- style="max-width: 100%"
|
|
|
- >
|
|
|
+ max-width="100%"
|
|
|
+ max-height="100%"
|
|
|
+ lazy-src="/images/event-default.jpg"
|
|
|
+ />
|
|
|
</v-col>
|
|
|
<v-col cols="12" sm="6" class="pl-6">
|
|
|
<div class="d-flex flex-column" style="min-height: 100%">
|
|
|
@@ -35,7 +37,7 @@
|
|
|
</td>
|
|
|
<td class="pa-1">
|
|
|
<span>
|
|
|
- {{ dateUtils.formatDateIntervalFor(new Date(publicEvent.datetimeStart), new Date(publicEvent.datetimeEnd), false) }}
|
|
|
+ {{ dateUtils.formatDateIntervalFor(new Date(publicEvent.datetimeStart), new Date(publicEvent.datetimeEnd)) }}
|
|
|
</span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
@@ -85,7 +87,7 @@
|
|
|
attribution="© <a href='http://osm.org/copyright'>OpenStreetMap</a> contributors"
|
|
|
/>
|
|
|
<l-marker
|
|
|
- :key="publicEvent.id"
|
|
|
+ :key="publicEvent.uuid"
|
|
|
:lat-lng="[publicEvent.address.latitude, publicEvent.address.longitude]"
|
|
|
>
|
|
|
<l-popup>
|
|
|
@@ -122,7 +124,7 @@
|
|
|
:title="publicEvent.name"
|
|
|
:description="publicEvent.description"
|
|
|
hashtags="opentalent,event"
|
|
|
- :media="publicEvent.imageId ? 'https://api.opentalent.fr/app.php/_internal/secure/files/' + publicEvent.imageId + '/raw' : '/images/event-default.jpg'"
|
|
|
+ :media="publicEvent.imageUrl || '/images/event-default.jpg'"
|
|
|
class="social-link"
|
|
|
>
|
|
|
<a
|
|
|
@@ -149,7 +151,6 @@
|
|
|
|
|
|
<script lang="ts">
|
|
|
import Vue from 'vue'
|
|
|
-// eslint-disable-next-line import/no-named-as-default
|
|
|
import EventsProvider from '~/services/data/EventsProvider'
|
|
|
import DatesUtils from "~/services/utils/dateUtils";
|
|
|
|
|
|
@@ -158,6 +159,7 @@ export default Vue.extend({
|
|
|
return {
|
|
|
theme: this.$route.query.theme ?? 'orange',
|
|
|
organization: this.$route.query.organization ?? null,
|
|
|
+ publicEvent: null as PublicEvent | null,
|
|
|
dateUtils: new DatesUtils(this.$dateFns, this.$t, this.$i18n),
|
|
|
localUrl: location.href,
|
|
|
socialNetworks: [
|
|
|
@@ -180,9 +182,7 @@ export default Vue.extend({
|
|
|
return q
|
|
|
}
|
|
|
},
|
|
|
- async asyncData ({
|
|
|
- params, $axios
|
|
|
- }): Promise<{ publicEvent: PublicEvent }> {
|
|
|
+ async asyncData ({params, $axios}): Promise<{ publicEvent: PublicEvent }> {
|
|
|
return await new EventsProvider($axios).getById(params.id).then((res) => {
|
|
|
return { publicEvent: res }
|
|
|
})
|