diff --git a/src/back/calendar_of_events/models.py b/src/back/calendar_of_events/models.py index 3be12cc60..10b168aa0 100644 --- a/src/back/calendar_of_events/models.py +++ b/src/back/calendar_of_events/models.py @@ -102,7 +102,7 @@ class EventFiles(models.Model): class EventParticipant(models.Model): participant = models.ForeignKey(DictEmployee, on_delete=models.PROTECT, related_name='get_user_event', verbose_name='Участник') - event = models.ForeignKey(Event, blank=True,null=True, on_delete=models.PROTECT, related_name='get_event_participant', verbose_name='Календарь') + event = models.ForeignKey(Event, blank=True,null=True, on_delete=models.CASCADE, related_name='get_event_participant', verbose_name='Календарь') class Meta: verbose_name = "Участники события" diff --git a/src/front/src/components/calendar_of_events/UI_calendar/dialogCreate.vue b/src/front/src/components/calendar_of_events/UI_calendar/dialogCreate.vue index 6b71a72d1..a5be83843 100644 --- a/src/front/src/components/calendar_of_events/UI_calendar/dialogCreate.vue +++ b/src/front/src/components/calendar_of_events/UI_calendar/dialogCreate.vue @@ -42,7 +42,7 @@ width="150" type="transformation" > - {{ title =="Новый календарь" ? "Создать" : "Редактировать" }} + {{ newOrOld ? "Создать" : "Редактировать" }} diff --git a/src/front/src/components/calendar_of_events/calendar-create.vue b/src/front/src/components/calendar_of_events/calendar-create.vue index 1f1900888..0f58370b2 100644 --- a/src/front/src/components/calendar_of_events/calendar-create.vue +++ b/src/front/src/components/calendar_of_events/calendar-create.vue @@ -144,12 +144,7 @@ export default { } } }); - // if (propsCalendar.value.participant.length == 0) { - // propsCalendar.value.participant.push({ - // editor: true, - // participant_calendar: accountStore.user.is_idEmployee, - // }); - // } + }; const propsCalendar = computed({ diff --git a/src/front/src/components/calendar_of_events/event-create.vue b/src/front/src/components/calendar_of_events/event-create.vue index d65fee81d..34643109f 100644 --- a/src/front/src/components/calendar_of_events/event-create.vue +++ b/src/front/src/components/calendar_of_events/event-create.vue @@ -4,6 +4,7 @@ :newOrOld="newEvent" @postData="postData" @closeDialog="$emit('closeDialog')" + @delObject="delEvent(propsEvent.event.id)" >