This commit is contained in:
les 2021-01-25 01:17:25 +01:00
parent f6f4ef9b1c
commit bf95c26394
6 changed files with 21 additions and 17 deletions

View file

@ -1,7 +1,7 @@
<template lang="pug" functional>
v-card.h-event.event
nuxt-link(:to='`/event/${props.event.id}`')
v-img.align-end.white--text(:src="`/media/thumb/${props.event.image_path}`"
v-img.align-end.white--text(:src="`/media/thumb/${props.event.image_path || 'logo.png' }`"
gradient="to bottom, rgba(0,0,0,.1), rgba(0,0,0,.7), rgba(0,0,0,.9)"
height="250" position="top top" )
v-card-title.text-h6.p-name {{props.event.title}}

View file

@ -4,6 +4,7 @@
v-card-subtitle {{$t('admin.event_confirm_description')}}
v-card-text
v-data-table(
:hide-default-footer='unconfirmedEvents.length<10'
:items='unconfirmedEvents'
:headers='headers')
template(v-slot:item.actions='{ item }')

View file

@ -66,16 +66,17 @@ export default {
try {
const users = await $axios.$get('/users')
const unconfirmedEvents = await $axios.$get('/event/unconfirmed')
return { users, unconfirmedEvents }
return { users, unconfirmedEvents, selectedTab: 0 }
} catch (e) {
console.error(e)
return { users: [], unconfirmedEvents: [] }
return { users: [], unconfirmedEvents: [], selectedTab: 0 }
}
},
data () {
return {
description: '',
unconfirmedEvents: []
unconfirmedEvents: [],
selectedTab: 0
}
},
computed: {

View file

@ -4,7 +4,7 @@ v-row
mode='dateTime'
is24hr
:input-debounce="200"
:min='today'
:min-date='new Date()'
:minute-increment="5"
is-dark
is-expanded
@ -25,9 +25,9 @@ v-row
v-date-picker.col-md-4(
mode='dateTime'
is24hr
:min-date='new Date()'
:minute-increment="5"
:input-debounce="200"
:min='today'
is-dark
is-expanded
@input='v => change("due", v)'
@ -90,7 +90,6 @@ export default {
},
data () {
return {
today: dayjs().format('YYYY-MM-DD'),
frequency: '',
frequencies: [
{ value: '1w', text: this.$t('event.each_week') },

View file

@ -15,6 +15,8 @@ v-container
:src='imgPath'
:lazy-src='thumbImgPath'
v-if='event.image_path')
.p-description.text-body-1.px-5.mt-5(v-else v-html='event.description')
//- template(v-slot:placeholder)
//- v-row(
//- class="fill-height ma-0"
@ -33,13 +35,13 @@ v-container
time.dt-start.text-h6(:datetime='event.start_datetime|unixFormat("YYYY-MM-DD HH:mm")')
v-icon mdi-calendar
b.ml-2 {{event|when}}
div.subtitle-1 {{event.start_datetime|from}}
div.text-subtitle-1 {{event.start_datetime|from}}
small(v-if='event.parentId') ({{event|recurrentDetail}})
.text-h6.p-location
v-icon mdi-map-marker
b.vcard.ml-2 {{event.place.name}}
p.adr {{event.place.address}}
.text-subtitle-1.adr {{event.place.address}}
//- info & actions
v-toolbar
@ -59,7 +61,7 @@ v-container
:href='`/api/event/${event.id}.ics`')
v-icon mdi-calendar-export
.p-description.text-body-1.px-5(v-html='event.description')
.p-description.text-body-1.px-5(v-if='event.image_path' v-html='event.description')
v-chip.p-category.ml-1(v-for='tag in event.tags' color='primary'
outlined :key='tag' v-text='tag')
@ -236,11 +238,7 @@ export default {
return '/media/' + this.event.image_path
},
thumbImgPath () {
if (this.event.image_path) {
return this.settings.baseurl + '/media/thumb/' + this.event.image_path
} else {
return this.settings.baseurl + '/logo.png'
}
},
is_mine () {
if (!this.$auth.user) {

View file

@ -40,16 +40,17 @@ export default {
end: null,
filters: { show_recurrent: store.state.settings.allow_recurrent_event && store.state.settings.recurrent_event_visible }
})
return { events }
return { events, first: true }
},
data ({ $store }) {
return {
first: true,
date: dayjs().format('YYYY-MM-DD'),
events: [],
start: dayjs().unix(),
end: null,
filters: { tags: [], places: [], show_recurrent: $store.state.settings.allow_recurrent_event && $store.state.settings.recurrent_event_visible },
selectedDay: null,
selectedDay: null
// intersecting: {}
}
},
@ -94,6 +95,10 @@ export default {
this.updateEvents()
},
monthChange ({ year, month }) {
if (this.first) {
this.first = false
return
}
this.selectedDay = null
// check if current month is selected