diff --git a/src/front/src/components/calendar_of_events/BigCalendar.vue b/src/front/src/components/calendar_of_events/BigCalendar.vue
index 7542bc65e..6f340090b 100644
--- a/src/front/src/components/calendar_of_events/BigCalendar.vue
+++ b/src/front/src/components/calendar_of_events/BigCalendar.vue
@@ -119,8 +119,8 @@ export default {
const MyMonth = ref(selectdate.value.getMonth() + 1);
const calendarForMy = ref([]);
const eventFromCalendar = ref({})
- const idEvent = ref(null)
- // const idEvent = ref(2)
+ // const idEvent = ref(null)
+ const idEvent = ref(1)
const getMonth = (month) => {
MyMonth.value = month + 1;
@@ -151,6 +151,7 @@ export default {
.get(`api/calendar_of_events/my_events/${idEvent.value==null?'':`?id=${idEvent.value}`}`)
.then((res) => {
eventFromCalendar.value = res.data
+
if (idEvent.value==null) {
eventFromCalendar.value.event = {name:'', participant: [accountStore.user.is_idEmployee], files: [], date_start: new Date(), date_end: new Date(), period: null, description: '', calendar: null}
}
diff --git a/src/front/src/components/calendar_of_events/calendar-create-select.vue b/src/front/src/components/calendar_of_events/calendar-create-select.vue
index 588f5fd63..42b3ea8b3 100644
--- a/src/front/src/components/calendar_of_events/calendar-create-select.vue
+++ b/src/front/src/components/calendar_of_events/calendar-create-select.vue
@@ -117,6 +117,7 @@ export default {
const filtered = ref("");
const accountStore = useAccountStore();
const back = ref([]);
+
const staffed = computed({
get() {
if (props.okey == "editor") {
@@ -141,22 +142,25 @@ export default {
const selectedStaff = computed({
get() {
let selected = [];
+
props.staff.forEach((e) => {
+ // console.log(e, 'eeeeeeeeeeeee')
if (e.employees.every((n) => n[props.okey] == true)) {
+ // console.log(e.employees.length, 'if')
e[props.okey] = true;
selected.push(e);
} else {
+ // console.log(e, 'else eeeeeeeeeeeee')
e[props.okey] = false;
selected.push(...e.employees.filter((n) => n[props.okey] == true));
}
});
- emit("returnIdParticant", {
- okey: props.okey,
- select: selected,
- staff: [],
- });
- console.log(selected, "geet selected");
+ // emit("returnIdParticant", {
+ // okey: props.okey,
+ // select: selected,
+ // staff: [],
+ // });
return selected;
},
@@ -174,7 +178,6 @@ export default {
const emitUp = (part) => {
if ("employees" in part) {
- console.log(part, "1");
part.employees.forEach((e) => {
if (e.id != accountStore.user.is_idEmployee) {
e[props.okey] = !part[props.okey];
@@ -186,7 +189,6 @@ export default {
select: [],
});
} else if (part.length) {
- console.log(part, "2");
if (part[0].id != accountStore.user.is_idEmployee) {
let val = part.every((e) => e[props.okey] == true) ? false : true;
cbstaff(part, val);
@@ -198,7 +200,6 @@ export default {
back.value = [];
}
} else {
- console.log(part, "3");
part[props.okey] = !part[props.okey];
emit("returnIdParticant", {
okey: props.okey,
@@ -240,9 +241,6 @@ export default {
const allUser = () => {
emitUp(staffed.value);
-
- console.log(staffed.value);
- // selectedStaff =
};
return {
diff --git a/src/front/src/components/calendar_of_events/calendar-create.vue b/src/front/src/components/calendar_of_events/calendar-create.vue
index 859148a4b..f2b825606 100644
--- a/src/front/src/components/calendar_of_events/calendar-create.vue
+++ b/src/front/src/components/calendar_of_events/calendar-create.vue
@@ -113,7 +113,7 @@ export default {
const accountStore = useAccountStore();
const returnIdParticant = (idPart) => {
- // console.log(idPart, '2222222222222222222222')
+
idPart.staff.forEach((e) => {
let indx = propsCalendar.value.participant.findIndex(
(l) => l.participant_calendar == e.id
@@ -121,6 +121,7 @@ export default {
let ind = propsCalendar.value.participant.find(
(l) => l.participant_calendar == e.id
);
+ console.log(indx, ind, 'inxind')
if (idPart.okey == "editor") {
ind.editor = e.editor;
} else {
diff --git a/src/front/src/components/calendar_of_events/event-create.vue b/src/front/src/components/calendar_of_events/event-create.vue
index 39e43b6bd..a5be757b5 100644
--- a/src/front/src/components/calendar_of_events/event-create.vue
+++ b/src/front/src/components/calendar_of_events/event-create.vue
@@ -31,12 +31,9 @@
-
-
@@ -53,7 +50,7 @@
density="compact"
class="py-3"
return-object
- >
+ >