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