From ee66b1c8d6e871ddaeb82834c8f7b0fea27d5acb Mon Sep 17 00:00:00 2001 From: Inna Date: Wed, 27 May 2026 10:14:27 +0300 Subject: [PATCH] =?UTF-8?q?feat=20[P-297]:=20=D0=BA=D0=BB=D0=B8=D0=BA?= =?UTF-8?q?=D0=B0=D0=B1=D0=B5=D0=BB=D1=8C=D0=BD=D0=BE=D1=81=D1=82=D1=8C=20?= =?UTF-8?q?=D1=81=D0=BE=D0=B1=D1=8B=D1=82=D0=B8=D0=B9=20=D0=B8=20=D0=BD?= =?UTF-8?q?=D0=B0=D0=B2=D0=B8=D0=B3=D0=B0=D1=86=D0=B8=D1=8F=20=D0=B2=20?= =?UTF-8?q?=D0=BA=D0=B0=D0=BB=D0=B5=D0=BD=D0=B4=D0=B0=D1=80=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../calendar_of_events/BigCalendar.vue | 5 + .../calendar_of_events/EventCreate.vue | 21 +- .../calendar_of_events/EventShow.vue | 350 ++++++------ .../UI_calendar/CalendarDialogs.vue | 16 +- .../UI_calendar/CustomCalendar.vue | 5 + .../UI_calendar/HomeCalendarWidget.vue | 515 +++++++----------- src/front/src/store/calendarStore.js | 23 +- 7 files changed, 403 insertions(+), 532 deletions(-) diff --git a/src/front/src/components/calendar_of_events/BigCalendar.vue b/src/front/src/components/calendar_of_events/BigCalendar.vue index 6fc32e58a..84e8c7e55 100644 --- a/src/front/src/components/calendar_of_events/BigCalendar.vue +++ b/src/front/src/components/calendar_of_events/BigCalendar.vue @@ -15,6 +15,7 @@ import CustomCalendar from '@/components/calendar_of_events/UI_calendar/CustomCa import MiniCalendar from '@/components/calendar_of_events/UI_calendar/MiniCalendar.vue'; import { useCalendarStore } from '@/store/calendarStore'; import { useAccountStore } from '@/store/AccountStore'; +import { useRoute } from 'vue-router'; export default { components: { MiniCalendar, CustomCalendar }, @@ -22,6 +23,7 @@ export default { const calendarStore = useCalendarStore(); const accountStore = useAccountStore(); const calendarKey = ref(0); + const route = useRoute(); onMounted(() => { const currentYear = new Date().getFullYear(); @@ -29,6 +31,9 @@ export default { calendarStore.loadCalendars(); calendarStore.loadDictEmployees(); calendarStore.loadEmployees(); + if (route.query.date) { + calendarStore.setSelectedDate(route.query.date); + } }); watch( diff --git a/src/front/src/components/calendar_of_events/EventCreate.vue b/src/front/src/components/calendar_of_events/EventCreate.vue index b9479dc98..fe5dcd16f 100644 --- a/src/front/src/components/calendar_of_events/EventCreate.vue +++ b/src/front/src/components/calendar_of_events/EventCreate.vue @@ -531,15 +531,18 @@ watch(eventCalendar, (newCalendar) => { } }); -const delEvent = (idev) => { - axiosApiInstance.delete(`api/calendar_of_events/my_events/?delid=${idev}`).then((result) => { - feedalert.alert = true; - feedalert.text = result.data.mess; - feedalert.ico = 'mdi-check'; - feedalert.color = 'orange-accent-1'; - emit('getCalendar'); - }); - emit('closeDialog'); +const delEvent = async (idev) => { + try { + const result = await axiosApiInstance.delete(`api/calendar_of_events/my_events/?delid=${idev}`) + feedalert.alert = true + feedalert.text = result.data.mess + feedalert.ico = 'mdi-check' + feedalert.color = 'orange-accent-1' + emit('getCalendar') + emit('closeDialog') + } catch (e) { + console.error('Ошибка удаления события:', e); + } }; const newFiles = ref([]); diff --git a/src/front/src/components/calendar_of_events/EventShow.vue b/src/front/src/components/calendar_of_events/EventShow.vue index 5f4ca8000..fdd7b1d94 100644 --- a/src/front/src/components/calendar_of_events/EventShow.vue +++ b/src/front/src/components/calendar_of_events/EventShow.vue @@ -1,185 +1,172 @@