From 11f45daf674f95ec3091360a957442f645890384 Mon Sep 17 00:00:00 2001 From: iriska-gri <79623434+iriska-gri@users.noreply.github.com> Date: Fri, 5 Jul 2024 15:42:46 +0300 Subject: [PATCH] =?UTF-8?q?P-47=20=D0=B2=D0=B5=D1=81=D1=8C=20=D0=BE=D0=B1?= =?UTF-8?q?=D1=8A=D0=B5=D0=BA=D1=82=20=D1=81=D0=BE=D0=B1=D1=8B=D1=82=D0=B8?= =?UTF-8?q?=D1=8F=20=D0=B4=D0=BE=20=D0=BE=D1=82=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BA=D0=B8=20=D0=B2=20new=20FormData()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../open_vacancies/ResponseVacancies.vue | 11 ++- .../UI_calendar/timeSelect.vue | 89 +++++++++--------- .../calendar_of_events/event-create.vue | 91 +++++++++++++------ 3 files changed, 119 insertions(+), 72 deletions(-) diff --git a/src/front/src/components/about_inspection/open_vacancies/ResponseVacancies.vue b/src/front/src/components/about_inspection/open_vacancies/ResponseVacancies.vue index 6bd41ee52..297bbb53c 100644 --- a/src/front/src/components/about_inspection/open_vacancies/ResponseVacancies.vue +++ b/src/front/src/components/about_inspection/open_vacancies/ResponseVacancies.vue @@ -4,7 +4,7 @@ Откликнуться на вакансию - + req(val), (val) => - val.match(/^[а-яА-ЯЁё ]+$/) !== null || "хочу имя русскими буквами", + val.match(/^[а-яА-ЯЁё ]+$/) !== null || "Имя должно содержать русские буквы", ], email: [(val) => req(val)], tel: [ (val) => req(val), - (val) => val.match(/^[[\d-]*\d[\d-]*$/) !== null || "хочу цифрами", + (val) => val.match(/^[[\d-]*\d[\d-]*$/) !== null || "Номер должен содержать цифры", ], text: "", }; @@ -86,6 +86,7 @@ export default { const form_vacancies = ref(null) const submit = () => { + if(form_vacancies.value.isValid) { @@ -95,10 +96,11 @@ export default { JSON.stringify({ ...form.value, vacancy_id: props.idVacations }) ); if (file.value !== null) { + console.log(file.value, 'file.valuefile.valuefile.value') postFile.append("file", file.value[0]); } - // Отправляет сообщение об отправлении при отсутсвии валидации!!!!!!!!!!!!!!!!!!!!!!!!! + clearAxios .post(`api/about_inspection/postresponsevacancy/`, postFile) .then((data) => { @@ -115,6 +117,7 @@ export default { file, rules, submit, + form_vacancies }; }, }; diff --git a/src/front/src/components/calendar_of_events/UI_calendar/timeSelect.vue b/src/front/src/components/calendar_of_events/UI_calendar/timeSelect.vue index 1e5d5d370..b66601a33 100644 --- a/src/front/src/components/calendar_of_events/UI_calendar/timeSelect.vue +++ b/src/front/src/components/calendar_of_events/UI_calendar/timeSelect.vue @@ -1,44 +1,7 @@