fix [P-290]: фикс обновления календарей при удалении

This commit is contained in:
Inna committed 2025-10-02 10:41:43 +03:00
1 parent b110909b33
commit 18caac1bb7
5 files changed
+25 -152

No files matched your search

@@ -76,7 +76,7 @@
</template>
<script>
import { ref } from 'vue';
import { ref, watch } from 'vue';
import calendarCreate from '@/components/calendar_of_events/calendar-create.vue';
import { useAccountStore } from '@/store/AccountStore';
import { storeToRefs } from 'pinia';
@@ -102,7 +102,7 @@ export default {
const accountStore = useAccountStore();
const { user } = storeToRefs(accountStore);
const calendarStore = useCalendarStore();
const { toggleCalendarVisibility } = calendarStore;
const { toggleCalendarVisibility, hiddenCalendarIds } = calendarStore;
const calendar = ref({});
const openGroup = ref([0]);
@@ -124,9 +124,23 @@ export default {
};
const toggleVisiblityEvents = (cal) => {
toggleCalendarVisibility(cal.id, cal.visible);
toggleCalendarVisibility(cal.id);
};
watch(
hiddenCalendarIds,
(newHiddenIds) => {
},
{ deep: true },
);
watch(
() => props.calendars,
(newCalendars) => {
},
{ deep: true },
);
return {
accountStore,
user,