Verified Commit 60c11739 authored by les's avatar les
Browse files

remove current event from "on same day" list

parent 04cb6a07
......@@ -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:",
......
......@@ -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 () {
......
......@@ -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')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment