remove current event from "on same day" list
This commit is contained in:
@@ -129,7 +129,7 @@
|
|||||||
"where_description": "Dov'è il gancio? Se il posto non è presente potrai crearlo.",
|
"where_description": "Dov'è il gancio? Se il posto non è presente potrai crearlo.",
|
||||||
"confirmed": "Evento confermato",
|
"confirmed": "Evento confermato",
|
||||||
"not_found": "Evento non trovato",
|
"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.",
|
"remove_recurrent_confirmation": "Sei sicura di voler eliminare questo evento ricorrente?\nGli eventi passati verranno mantenuti ma non ne verranno creati altri.",
|
||||||
"recurrent": "Ricorrente",
|
"recurrent": "Ricorrente",
|
||||||
"edit_recurrent": "Modifica evento ricorrente:",
|
"edit_recurrent": "Modifica evento ricorrente:",
|
||||||
|
|||||||
@@ -58,7 +58,8 @@ export default {
|
|||||||
name: 'DateInput',
|
name: 'DateInput',
|
||||||
components: { List },
|
components: { List },
|
||||||
props: {
|
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 () {
|
data () {
|
||||||
return {
|
return {
|
||||||
@@ -77,7 +78,7 @@ export default {
|
|||||||
todayEvents () {
|
todayEvents () {
|
||||||
const start = dayjs(this.value.from).startOf('day').unix()
|
const start = dayjs(this.value.from).startOf('day').unix()
|
||||||
const end = dayjs(this.value.from).endOf('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
|
return events
|
||||||
},
|
},
|
||||||
attributes () {
|
attributes () {
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
WhereInput(ref='where' v-model='event.place')
|
WhereInput(ref='where' v-model='event.place')
|
||||||
|
|
||||||
//- When
|
//- When
|
||||||
DateInput(v-model='date')
|
DateInput(v-model='date' :event='event')
|
||||||
|
|
||||||
//- Description
|
//- Description
|
||||||
v-col.px-0(cols='12')
|
v-col.px-0(cols='12')
|
||||||
|
|||||||
Reference in New Issue
Block a user