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 31d041164..9dfd96e3c 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 @@ -142,12 +142,16 @@ export default { }); const cbstaff = (item, value) => { + item.forEach((e) => { + if (e.id != accountStore.user.is_idEmployee) { e.selected = value; + } if ("employees" in e) { cbstaff(e.employees, value); } }); + }; const allman = () => { @@ -156,7 +160,11 @@ export default { }; function toggledep(item) { - item.employees.forEach((e) => (e.selected = !item.selected)); + item.employees.forEach((e) => { + if (e.id != accountStore.user.is_idEmployee) { + e.selected = !item.selected; + } + }); item.selected = !item.selected; } 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 52c259c8e..4d5c8a020 100644 --- a/src/front/src/components/calendar_of_events/calendar-create.vue +++ b/src/front/src/components/calendar_of_events/calendar-create.vue @@ -120,13 +120,21 @@ export default { setup(props, { emit }) { const postParticant = {}; const form_calendar = ref(null); - const for_edit = ref([]) + const for_editor = ref([]) const accountStore = useAccountStore(); const returnIdParticant = (idPart, selected) => { + + selected.forEach((val, key) => { + for_editor.value[key] = val + + }) + - // selected + // for_edit = selected.slice() + + // for_editor.value // .forEach((e)=> { // e.selected = false @@ -145,6 +153,8 @@ export default { // } // }) + + console.log(for_editor.value, 'for_edit.value') postParticant.value = { ...props.calendar, participant: idPart }; }; @@ -198,6 +208,7 @@ export default { .then((res) => { staff.value = res.data.filter((e) => e.employees.length > 0); staff.value.forEach((e) => { + console.log(propsCalendar.value.participant, 'propsCalendar.value.participant') if (propsCalendar.value.participant.length > 0) { e.employees.forEach((empl) => { @@ -207,6 +218,7 @@ export default { ) ) { empl.selected = true; + // empl.editor = } }); }