From 3f0f1e8f1a0a2ebce143c2ecdc23315585c77481 Mon Sep 17 00:00:00 2001 From: Inna Date: Mon, 6 Oct 2025 10:24:29 +0300 Subject: [PATCH] =?UTF-8?q?fix=20[P-290]:=20=D1=84=D0=B8=D0=BA=D1=81=20?= =?UTF-8?q?=D0=B2=D1=8B=D0=B1=D0=BE=D1=80=D0=B0=20=D0=BD=D0=B0=D1=87=D0=B0?= =?UTF-8?q?=D0=BB=D1=8C=D0=BD=D0=B8=D0=BA=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../calendar-create-select.vue | 13 +++-- .../calendar_of_events/calendar-create.vue | 48 +++++++++++++------ 2 files changed, 43 insertions(+), 18 deletions(-) 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 e6816708a..11a2fe2b6 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 @@ -162,6 +162,7 @@ export default { return ns; } + return props.staff; }, }); @@ -174,8 +175,14 @@ export default { e[props.okey] = true; selected.push(e); } else if (e.employees.length == 1) { - e[props.okey] = true; - selected.push(...e.employees.filter((n) => n[props.okey] == true)); + const singleEmployee = e.employees[0]; + if (singleEmployee[props.okey] === true) { + selected.push(singleEmployee); + } + // Состояние отдела должно вычисляться на основе сотрудника + e[props.okey] = singleEmployee[props.okey] === true; + // e[props.okey] = true; + // selected.push(...e.employees.filter((n) => n[props.okey] == true)); } else { e[props.okey] = false; selected.push(...e.employees.filter((n) => n[props.okey] == true)); @@ -329,7 +336,7 @@ export default { if (employeesToToggle.length > 0) { employeesToToggle.forEach((employee) => { if (employee[props.okey] !== shouldSelect) { - selectedStaff.value = employee; + emitUp(employee); } }); } 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 d80d55469..2f85f30be 100644 --- a/src/front/src/components/calendar_of_events/calendar-create.vue +++ b/src/front/src/components/calendar_of_events/calendar-create.vue @@ -206,22 +206,40 @@ export default { }, }); + // const color = [ + // '#3788d8', // Синий (аналог default FullCalendar) + // '#4caf50', // Зеленый + // '#ff9800', // Оранжевый + // '#9c27b0', // Фиолетовый + // '#2196f3', // Голубой + // '#795548', // Коричневый + // '#607d8b', // Серо-голубой + // '#e91e63', // Розовый + // '#00bcd4', // Бирюзовый + // '#8bc34a', // Салатовый + // '#ff5722', // Красно-оранжевый + // '#673ab7', // Темно-фиолетовый + // '#3f51b5', // Индиго + // '#009688', // Зелено-бирюзовый + // '#ffc107', // Янтарный + // ]; + const color = [ - '#3788d8', // Синий (аналог default FullCalendar) - '#4caf50', // Зеленый - '#ff9800', // Оранжевый - '#9c27b0', // Фиолетовый - '#2196f3', // Голубой - '#795548', // Коричневый - '#607d8b', // Серо-голубой - '#e91e63', // Розовый - '#00bcd4', // Бирюзовый - '#8bc34a', // Салатовый - '#ff5722', // Красно-оранжевый - '#673ab7', // Темно-фиолетовый - '#3f51b5', // Индиго - '#009688', // Зелено-бирюзовый - '#ffc107', // Янтарный + '#4299e1', // Яркий синий + '#48bb78', // Сочный зеленый + '#ed8936', // Оранжевый + '#9f7aea', // Фиолетовый + '#38b2ac', // Бирюзовый + '#f56565', // Коралловый + '#667eea', // Голубой + '#68d391', // Светло-зеленый + '#f6ad55', // Персиковый + '#b794f4', // Лавандовый + '#4fd1c7', // Яркий бирюзовый + '#fc8181', // Розово-коралловый + '#5a67d8', // Индиго + '#ecc94b', // Золотистый + '#0bc5ea', // Голубой океан ]; const colorPik = (col) => {