This commit is contained in:
Nukeap committed 2025-02-05 09:00:16 +03:00
1 parent 8afb476ba9
commit 5fe912e8c4
2 files changed
+40 -53

No files matched your search

+4
View File
@@ -9,4 +9,8 @@ export default [
{languageOptions: { globals: {...globals.browser, ...globals.node} }},
pluginJs.configs.recommended,
...pluginVue.configs["flat/essential"],
{rules: {
'no-console': 'warn',
}}
];
@@ -15,7 +15,6 @@
no-resize
variant="outlined"
/>
</v-col>
<v-col class="flex-grow-0 px-2">
<v-btn
@@ -47,14 +46,12 @@
</v-locale-provider>
</v-col>
<v-col class="flex-column d-flex">
<v-col class="flex-column d-flex">
<v-row no-gutters class="h-0 overflow-auto flex-column flex-nowrap">
<v-col>
<calendar-my
:calendars="
calendarForMy.filter(
(e) => e.author == accountStore.user.is_idEmployee
)
calendarForMy.filter((e) => e.author == accountStore.user.is_idEmployee)
"
title="Мои календари"
@getCalendar="getCalendar"
@@ -62,9 +59,7 @@
<calendar-my
:calendars="
calendarForMy.filter(
(e) => e.author != accountStore.user.is_idEmployee
)
calendarForMy.filter((e) => e.author != accountStore.user.is_idEmployee)
"
title="Подписки"
/>
@@ -104,13 +99,13 @@
</template>
<script>
import { ref, onMounted, watch } from "vue";
import { useWeekendsStore } from "@/store/WeekendsStore";
import EventCreate from "@/components/calendar_of_events/event-create.vue";
import CalendarMy from "@/components/calendar_of_events/calendar-my.vue";
import { axiosApiInstance } from "@/utils/axios-api";
import { useAccountStore } from "@/store/AccountStore";
import CalendarFull from "@/components/calendar_of_events/UI_calendar/calendarFull.vue";
import { ref, onMounted, watch } from 'vue';
import { useWeekendsStore } from '@/store/WeekendsStore';
import EventCreate from '@/components/calendar_of_events/event-create.vue';
import CalendarMy from '@/components/calendar_of_events/calendar-my.vue';
import { axiosApiInstance } from '@/utils/axios-api';
import { useAccountStore } from '@/store/AccountStore';
import CalendarFull from '@/components/calendar_of_events/UI_calendar/calendarFull.vue';
export default {
components: { EventCreate, CalendarMy, CalendarFull },
@@ -136,36 +131,27 @@ export default {
};
const getCalendar = () => {
axiosApiInstance
.get(`api/calendar_of_events/my_calendars/`)
.then((res) => {
res.data.forEach(
(e) =>
(e.visible = accountStore.calendar.includes(e.id) ? false : true)
);
calendarForMy.value = res.data;
});
axiosApiInstance.get(`api/calendar_of_events/my_calendars/`).then((res) => {
res.data.forEach((e) => (e.visible = accountStore.calendar.includes(e.id) ? false : true));
calendarForMy.value = res.data;
});
};
getCalendar();
const getEvents = (idEvent, clik) => {
axiosApiInstance
.get(
`api/calendar_of_events/my_events/${
idEvent === undefined ? "" : `?id=${idEvent}`
}`
)
.get(`api/calendar_of_events/my_events/${idEvent === undefined ? '' : `?id=${idEvent}`}`)
.then((res) => {
if (idEvent === undefined) {
res.data.event = {
name: "",
name: '',
participant: [accountStore.user.is_idEmployee],
files: [],
date_start: new Date(),
date_end: new Date(),
period: null,
description: "",
description: '',
calendar: null,
};
}
@@ -185,28 +171,25 @@ export default {
};
const weekendsData = () => {
cal.value.$el
.querySelectorAll(".v-date-picker-month__day")
.forEach((e) => {
let datas = e.getAttribute("data-v-date");
let weeks =
new Date(datas).getDay() === 6 || new Date(datas).getDay() === 0;
if (weeks) {
e.querySelectorAll("span").forEach((n) => {
n.classList.add("text-red");
cal.value.$el.querySelectorAll('.v-date-picker-month__day').forEach((e) => {
let datas = e.getAttribute('data-v-date');
let weeks = new Date(datas).getDay() === 6 || new Date(datas).getDay() === 0;
if (weeks) {
e.querySelectorAll('span').forEach((n) => {
n.classList.add('text-red');
});
}
if (MyMonth.value in week.week[MyYear.value]) {
if (week.week[MyYear.value][MyMonth.value].includes(datas)) {
e.querySelectorAll('span').forEach((n) => {
n.classList.add('text-red');
if (n.classList.contains('text-red') && weeks) {
n.classList.replace('text-red', 'text-black');
}
});
}
if (MyMonth.value in week.week[MyYear.value]) {
if (week.week[MyYear.value][MyMonth.value].includes(datas)) {
e.querySelectorAll("span").forEach((n) => {
n.classList.add("text-red");
if (n.classList.contains("text-red") && weeks) {
n.classList.replace("text-red", "text-black");
}
});
}
}
});
}
});
};
onMounted(() => {
@@ -219,7 +202,7 @@ export default {
if (newValue) {
weekendsData();
}
}
},
);
const CheckingStore = () => {
@@ -231,7 +214,7 @@ export default {
};
const infoEvent = (i) => {
console.log(i, "iiiiiiiiii");
console.log(i, 'iiiiiiiiii');
};
return {