diff --git a/src/front/src/components/calendar_of_events/BigCalendar.vue b/src/front/src/components/calendar_of_events/BigCalendar.vue index fdf10ef47..d82d4756b 100644 --- a/src/front/src/components/calendar_of_events/BigCalendar.vue +++ b/src/front/src/components/calendar_of_events/BigCalendar.vue @@ -75,27 +75,27 @@ export default { getCalendar(); - // const getEvents = (idEvent, clik) => { - // axiosApiInstance - // .get(`api/calendar_of_events/my_events/${idEvent === undefined ? '' : `?id=${idEvent}`}`) - // .then((res) => { - // if (idEvent === undefined) { - // res.data.event = { - // name: '', - // participant: [accountStore.user.is_idEmployee], - // files: [], - // date_start: new Date(), - // date_end: new Date(), - // period: null, - // description: '', - // calendar: null, - // }; - // } - // eventFromCalendar.value = res.data; - // }); - // }; + const getEvents = (idEvent, clik) => { + axiosApiInstance + .get(`api/calendar_of_events/my_events/${idEvent === undefined ? '' : `?id=${idEvent}`}`) + .then((res) => { + if (idEvent === undefined) { + res.data.event = { + name: '', + participant: [accountStore.user.is_idEmployee], + files: [], + date_start: new Date(), + date_end: new Date(), + period: null, + description: '', + calendar: null, + }; + } + eventFromCalendar.value = res.data; + }); + }; - // getEvents(); + getEvents(); onMounted(() => { week.getWeekend(MyYear.value); diff --git a/src/front/src/components/calendar_of_events/UI_calendar/CustomCalendar.vue b/src/front/src/components/calendar_of_events/UI_calendar/CustomCalendar.vue index 7e409071a..32f869cf0 100644 --- a/src/front/src/components/calendar_of_events/UI_calendar/CustomCalendar.vue +++ b/src/front/src/components/calendar_of_events/UI_calendar/CustomCalendar.vue @@ -270,7 +270,7 @@ export default { visibleEvents.value.forEach((event) => { api.addEvent({ id: event.id, - title: event.title, + title: event.name, start: event.date_start, end: event.date_end, allDay: event.all_day, @@ -328,7 +328,6 @@ export default { // Следим за изменениями событий в Pinia watch( - // () => calendarStore.loadEvents(), () => { updateCalendarEvents(); }, diff --git a/src/front/src/components/calendar_of_events/UI_calendar/MiniCalendar.vue b/src/front/src/components/calendar_of_events/UI_calendar/MiniCalendar.vue index 9951c7194..03d8d1167 100644 --- a/src/front/src/components/calendar_of_events/UI_calendar/MiniCalendar.vue +++ b/src/front/src/components/calendar_of_events/UI_calendar/MiniCalendar.vue @@ -24,7 +24,7 @@ @click="openEventDialog" >Создать событие - {{eventFromCalendar}} + @@ -43,14 +43,12 @@ @@ -71,6 +69,7 @@ export default { const calendarStore = useCalendarStore(); const accountStore = useAccountStore(); // const calendarForMy = ref([]); + const { selectedDate, myCalendars, subscribedCalendars } = storeToRefs(calendarStore); const { user } = storeToRefs(accountStore); @@ -89,7 +88,6 @@ export default { onMounted(() => { loadCalendars(); - }); // Реакция на изменения пользователя diff --git a/src/front/src/components/calendar_of_events/calendar-my.vue b/src/front/src/components/calendar_of_events/calendar-my.vue index 68f73e90f..95b8cbff6 100644 --- a/src/front/src/components/calendar_of_events/calendar-my.vue +++ b/src/front/src/components/calendar_of_events/calendar-my.vue @@ -30,10 +30,11 @@ +