remove current event from "on same day" list

This commit is contained in:
les 2021-07-19 12:04:06 +02:00
parent 04cb6a07c5
commit 60c11739b7
No known key found for this signature in database
GPG key ID: 352918250B012177
3 changed files with 5 additions and 4 deletions

View file

@ -129,7 +129,7 @@
"where_description": "Dov'è il gancio? Se il posto non è presente potrai crearlo.",
"confirmed": "Evento confermato",
"not_found": "Evento non trovato",
"remove_confirmation": "Sei sicuro/a di voler eliminare questo evento?",
"remove_confirmation": "Vuoi eliminare questo evento?",
"remove_recurrent_confirmation": "Sei sicura di voler eliminare questo evento ricorrente?\nGli eventi passati verranno mantenuti ma non ne verranno creati altri.",
"recurrent": "Ricorrente",
"edit_recurrent": "Modifica evento ricorrente:",

View file

@ -58,7 +58,8 @@ export default {
name: 'DateInput',
components: { List },
props: {
value: { type: Object, default: () => ({ from: null, due: null, recurrent: null }) }
value: { type: Object, default: () => ({ from: null, due: null, recurrent: null }) },
event: { type: Object, default: () => null }
},
data () {
return {
@ -77,7 +78,7 @@ export default {
todayEvents () {
const start = dayjs(this.value.from).startOf('day').unix()
const end = dayjs(this.value.from).endOf('day').unix()
const events = this.events.filter(e => e.start_datetime >= start && e.start_datetime <= end)
const events = this.events.filter(e => (this.event.id && e.id !== this.event.id) && e.start_datetime >= start && e.start_datetime <= end)
return events
},
attributes () {

View file

@ -33,7 +33,7 @@
WhereInput(ref='where' v-model='event.place')
//- When
DateInput(v-model='date')
DateInput(v-model='date' :event='event')
//- Description
v-col.px-0(cols='12')