From de04c4d7d175bd7559c236536799f70b93e4beb8 Mon Sep 17 00:00:00 2001 From: Denis Voinovich Date: Tue, 3 Jun 2025 10:20:43 +0300 Subject: [PATCH 1/4] =?UTF-8?q?feat=20[P-01]:=20=D0=B4=D0=B5=D1=84=D0=BE?= =?UTF-8?q?=D0=BB=D1=82=D0=BD=D1=8B=D0=B5=20=D0=BA=D0=B0=D1=80=D1=82=D0=B8?= =?UTF-8?q?=D0=BD=D0=BA=D0=B8=20=D0=B2=20=D0=BD=D0=BE=D0=B2=D0=BE=D1=81?= =?UTF-8?q?=D1=82=D0=B8,=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=BE=20=D0=BE=D0=B1=D1=80=D0=B5=D0=B7=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=BA=D0=B0=D1=80=D1=82=D0=B8=D0=BD=D0=BE=D0=BA?= =?UTF-8?q?=20=D0=B2=20=D0=BF=D0=BE=D0=BB=D0=BD=D0=BE=D0=B9=20=D0=BD=D0=BE?= =?UTF-8?q?=D0=B2=D0=BE=D1=81=D1=82=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/front/src/components/UI/NewsCard.vue | 6 ++++-- src/front/src/components/news-full.vue | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/front/src/components/UI/NewsCard.vue b/src/front/src/components/UI/NewsCard.vue index ab150a10d..c956a7d6c 100644 --- a/src/front/src/components/UI/NewsCard.vue +++ b/src/front/src/components/UI/NewsCard.vue @@ -11,7 +11,7 @@ - + @@ -58,11 +58,11 @@ @@ -446,6 +446,7 @@ import { spravURL } from "@/utils/axios-api"; import { useAccountStore } from "@/store/AccountStore"; import { format } from "date-fns"; import icoUser from "@/components/UI/fiousercard/icoUser.vue"; +import defaultImage from '@/assets/emblem.png'; const accountStore = useAccountStore(); @@ -586,6 +587,7 @@ export default { spravURL, splitname, accountStore, + defaultImage, formatText, dateformat, textcomment, From 99661b227181b2453124d4a5f3dd1ec85de822ce Mon Sep 17 00:00:00 2001 From: Denis Voinovich Date: Tue, 3 Jun 2025 10:32:02 +0300 Subject: [PATCH 2/4] =?UTF-8?q?fix=20[P-255]:=20=D1=84=D0=B8=D0=BA=D1=81?= =?UTF-8?q?=20=D0=BA=D0=B0=D1=80=D1=82=D0=B8=D0=BD=D0=BA=D0=B8=20=D0=BF?= =?UTF-8?q?=D1=80=D0=B8=D0=BA=D1=80=D0=B5=D0=BF=D0=BB=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20=D0=BF=D1=80=D0=B8=20=D1=81=D0=BE=D0=B7=D0=B4=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D0=B8=20=D1=82=D0=B5=D1=81=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/front/src/components/vote/VoteConstructor.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/front/src/components/vote/VoteConstructor.vue b/src/front/src/components/vote/VoteConstructor.vue index d6c8d0729..02e27c1e3 100644 --- a/src/front/src/components/vote/VoteConstructor.vue +++ b/src/front/src/components/vote/VoteConstructor.vue @@ -349,6 +349,7 @@ export default { const testImage = ref(null); const imagePreview = ref(null); const selectedEmployees = ref([]); + const imageError = ref(''); const rules = { required: (value) => !!value || 'Это поле обязательно для заполнения', @@ -688,7 +689,8 @@ export default { getImagePreviewUrl, actualQuestionCount, actualTestQuestionCount, - isTest: props.isTest + isTest: props.isTest, + imageError }; }, }; From a39b962d0a56527f1ff7b9d084186c300cf2a775 Mon Sep 17 00:00:00 2001 From: Denis Voinovich Date: Tue, 3 Jun 2025 10:46:23 +0300 Subject: [PATCH 3/4] =?UTF-8?q?fix=20[P-255]:=20=D0=BE=D0=B3=D1=80=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D1=87=D0=B8=D0=BB=20=D0=B2=D0=B2=D0=BE=D0=B4=20?= =?UTF-8?q?=D0=B4=D0=B0=D1=82=20=D0=B2=20=D1=81=D0=B0=D0=BC=D0=BE=D0=BC=20?= =?UTF-8?q?=D0=B4=D0=B0=D1=82=D0=B5=D0=BF=D0=B8=D0=BA=D0=B5=D1=80=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/front/src/components/UI/date-select.vue | 16 ++- .../components/testing/AssignTestDialog.vue | 114 ++++++++---------- 2 files changed, 59 insertions(+), 71 deletions(-) diff --git a/src/front/src/components/UI/date-select.vue b/src/front/src/components/UI/date-select.vue index 4628ca6fd..3688be6bd 100644 --- a/src/front/src/components/UI/date-select.vue +++ b/src/front/src/components/UI/date-select.vue @@ -35,6 +35,7 @@ v-model="selectedDate" show-adjacent-months hide-header + :min="new Date().toISOString().slice(0, 10)" @update:modelValue="dateStart" border /> @@ -53,25 +54,22 @@ export default { props: { datedefault: { type: Date, - default: '' + default: () => new Date() } }, - - setup(props, {emit}) { const appStore = useAppStore() - const maxdate = formatDash(new Date()) const menudate = ref(false) - const selectedDate = ref(null) + const selectedDate = ref(props.datedefault ? formatDash(new Date(props.datedefault)) : formatDash(new Date())) const dateStart = () => { - emit('returndate', selectedDate.value) - menudate.value=false + if (selectedDate.value) { + emit('returndate', selectedDate.value) + menudate.value = false + } } - - return { menudate, selectedDate, diff --git a/src/front/src/components/testing/AssignTestDialog.vue b/src/front/src/components/testing/AssignTestDialog.vue index df2002812..cfb6419e8 100644 --- a/src/front/src/components/testing/AssignTestDialog.vue +++ b/src/front/src/components/testing/AssignTestDialog.vue @@ -178,70 +178,60 @@ export default { }, emits: ['update:modelValue', 'assign', 'unassign'], setup(props, { emit }) { - const selectedEmployees = ref([]); - const publishNews = ref(false); - const defaultEndDate = new Date(); - defaultEndDate.setHours(18, 0, 0, 0); - const defaultStartDate = new Date(); - defaultStartDate.setHours(9, 0, 0, 0); - const completionDate = ref(defaultEndDate); - const startDate = ref(defaultStartDate); - const snackbar = ref({ - show: false, - text: '', - color: 'error' - }); - - const showSnackbar = (text, color = 'error') => { - snackbar.value = { - show: true, - text, - color - }; - }; - - const handleEmployeeSelection = (value) => { - selectedEmployees.value = value; - }; - - const handleDateChange = (date, type = 'end') => { - if (date) { - const newDate = new Date(date); - if (type === 'end') { - newDate.setHours(18, 0, 0, 0); - } else { - newDate.setHours(9, 0, 0, 0); - } + const selectedEmployees = ref([]); + const publishNews = ref(false); - const today = new Date(); - today.setHours(0, 0, 0, 0); - if (newDate < today) { - showSnackbar('Нельзя назначить прошедшую дату'); - if (type === 'end') { - completionDate.value = null; - } else { - startDate.value = null; - } - return; - } + // Устанавливаем начальные даты + const currentDate = new Date(); + const defaultStartDate = new Date(currentDate); + defaultStartDate.setHours(9, 0, 0, 0); + + const defaultEndDate = new Date(currentDate); + defaultEndDate.setHours(18, 0, 0, 0); + + const startDate = ref(defaultStartDate); + const completionDate = ref(defaultEndDate); + + const snackbar = ref({ + show: false, + text: '', + color: 'error' + }); - if (type === 'end') { - if (startDate.value && newDate < startDate.value) { - showSnackbar('Дата окончания не может быть раньше даты начала'); - completionDate.value = null; - return; - } - completionDate.value = newDate; - } else { - if (completionDate.value && newDate > completionDate.value) { - showSnackbar('Дата начала не может быть позже даты окончания'); - startDate.value = null; - return; - } - startDate.value = newDate; - } - } - }; + const showSnackbar = (text, color = 'error') => { + snackbar.value = { + show: true, + text, + color + }; + }; + + const handleEmployeeSelection = (value) => { + selectedEmployees.value = value; + }; + + const handleDateChange = (date, type = 'end') => { + if (!date) return; + + const newDate = new Date(date); + if (type === 'end') { + newDate.setHours(18, 0, 0, 0); + completionDate.value = newDate; + + if (startDate.value && newDate < startDate.value) { + startDate.value = newDate; + startDate.value.setHours(9, 0, 0, 0); + } + } else { + newDate.setHours(9, 0, 0, 0); + startDate.value = newDate; + + if (completionDate.value && newDate > completionDate.value) { + completionDate.value = newDate; + completionDate.value.setHours(18, 0, 0, 0); + } + } + }; const handleAssign = () => { if (!selectedEmployees.value.length) { From 6cc35839ff3fc752e1d372846790cef5822881d5 Mon Sep 17 00:00:00 2001 From: Denis Voinovich Date: Tue, 3 Jun 2025 11:43:11 +0300 Subject: [PATCH 4/4] =?UTF-8?q?fix=20[P-256]:=20=D0=BA=D0=B0=D1=80=D1=82?= =?UTF-8?q?=D0=B8=D0=BD=D0=BA=D0=B8=20=D0=B8=20=D1=81=D0=BA=D1=80=D0=BE?= =?UTF-8?q?=D0=BB=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/testing/BodyDetailTesting.vue | 12 +++++++++++- src/front/src/components/testing/QuestionBlock.vue | 14 ++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/front/src/components/testing/BodyDetailTesting.vue b/src/front/src/components/testing/BodyDetailTesting.vue index 0e4ef3c3e..a9f139cab 100644 --- a/src/front/src/components/testing/BodyDetailTesting.vue +++ b/src/front/src/components/testing/BodyDetailTesting.vue @@ -9,6 +9,14 @@ { 'border-b-thin': !isDialog, 'pa-0': isDialog } ]">
+
+ +
@@ -58,6 +66,7 @@