diff --git a/frontend/src/components/activity/ScheduleEntry.vue b/frontend/src/components/activity/ScheduleEntry.vue index d67404c7337..a77ba2ef669 100644 --- a/frontend/src/components/activity/ScheduleEntry.vue +++ b/frontend/src/components/activity/ScheduleEntry.vue @@ -168,7 +168,11 @@ Displays a single scheduleEntry - @@ -404,6 +432,7 @@ export default { this.$toast.error(errorToMultiLineToast(e)) }) }, + scheduleEntryRoute, countContentNodes(contentType) { return this.contentNodes.items.filter((cn) => { return cn.contentType().id === contentType.id diff --git a/frontend/src/components/activity/dialog/DialogActivityEdit.vue b/frontend/src/components/activity/dialog/DialogActivityEdit.vue index cf68548e1f1..9bd4f9a6036 100644 --- a/frontend/src/components/activity/dialog/DialogActivityEdit.vue +++ b/frontend/src/components/activity/dialog/DialogActivityEdit.vue @@ -19,6 +19,7 @@ diff --git a/frontend/src/components/activity/dialog/DialogActivityForm.vue b/frontend/src/components/activity/dialog/DialogActivityForm.vue index 3e63e9cd1c5..13b0f0ecc5d 100644 --- a/frontend/src/components/activity/dialog/DialogActivityForm.vue +++ b/frontend/src/components/activity/dialog/DialogActivityForm.vue @@ -41,6 +41,7 @@ @@ -69,6 +70,10 @@ export default { type: Object, required: true, }, + currentScheduleEntry: { + type: Object, + required: true, + }, autoselectTitle: { type: Boolean, default: false, diff --git a/frontend/src/components/activity/dialog/FormScheduleEntryItem.vue b/frontend/src/components/activity/dialog/FormScheduleEntryItem.vue index 2726ce06a60..fe35687130d 100644 --- a/frontend/src/components/activity/dialog/FormScheduleEntryItem.vue +++ b/frontend/src/components/activity/dialog/FormScheduleEntryItem.vue @@ -50,7 +50,7 @@ - + @@ -82,9 +82,9 @@ export default { }, // true if current item is the last scheduleEntry - isLastItem: { + deletable: { type: Boolean, - required: true, + required: false, }, }, data() { diff --git a/frontend/src/components/activity/dialog/FormScheduleEntryList.vue b/frontend/src/components/activity/dialog/FormScheduleEntryList.vue index 0b5eaa5a1bf..d296d236003 100644 --- a/frontend/src/components/activity/dialog/FormScheduleEntryList.vue +++ b/frontend/src/components/activity/dialog/FormScheduleEntryList.vue @@ -22,7 +22,11 @@ class="transition-list-item pa-0 mb-4" :schedule-entry="scheduleEntry" :periods="periods" - :is-last-item="scheduleEntriesWithoutDeleted.length === 1" + :deletable=" + scheduleEntriesWithoutDeleted.length > 1 && + ($route.name !== 'activity' || + scheduleEntry.self !== currentScheduleEntry._meta.self) + " @delete="deleteEntry(scheduleEntry)" /> @@ -47,6 +51,11 @@ export default { required: true, }, + currentScheduleEntry: { + type: Object, + required: true, + }, + // all available periods periods: { type: Array,
+ {{ $tc('entity.scheduleEntry.fields.nr') }} @@ -184,8 +188,20 @@ Displays a single scheduleEntry v-for="scheduleEntryItem in scheduleEntries" :key="scheduleEntryItem._meta.self" > - - {{ scheduleEntryItem.number }} + + + {{ scheduleEntryItem.number }} + + {{ @@ -196,7 +212,19 @@ Displays a single scheduleEntry {{ dateShort(scheduleEntryItem.start) }} - {{ rangeLongEnd(scheduleEntryItem.start, scheduleEntryItem.end) }} + + {{ rangeLongEnd(scheduleEntryItem.start, scheduleEntryItem.end) }} + +