fix [P-57]: тестовый запрос

This commit is contained in:
Inna committed 2025-09-17 15:56:05 +03:00
1 parent 3143d266ee
commit 1279835ab1
6 files changed
+139 -123

No files matched your search

@@ -45,9 +45,7 @@
v-if="
x.author == user.is_idEmployee ||
x.participant.some(
(e) =>
e.editor == true &&
e.participant_calendar == user.is_idEmployee,
(e) => e.editor == true && e.participant_calendar == user.is_idEmployee,
)
"
size="x-small"
@@ -81,6 +79,7 @@ import { ref } from 'vue';
import calendarCreate from '@/components/calendar_of_events/calendar-create.vue';
import { useAccountStore } from '@/store/AccountStore';
import { storeToRefs } from 'pinia';
import { axiosApiInstance } from '../../utils/axios-api';
export default {
components: { calendarCreate },
@@ -123,13 +122,25 @@ export default {
const chekUpdate = (cal) => {
let setcal = new Set(userCalendar.value);
if (cal.visible == false) {
setcal.add(cal.id);
} else {
testRequest();
setcal.delete(cal.id);
}
userCalendar.value = Array.from(setcal);
};
async function testRequest() {
try {
const response = await axiosApiInstance.get('api/calendar_of_events/my_events/?id=1');
console.log(response.data); // response.data, а не response.body!
} catch (error) {
console.error('Ошибка:', error);
}
}
return {
accountStore,
user,