diff --git a/src/back/about_inspection/views.py b/src/back/about_inspection/views.py index 07749f4ba..9220c4234 100644 --- a/src/back/about_inspection/views.py +++ b/src/back/about_inspection/views.py @@ -50,8 +50,10 @@ class GetVacancies(ListAPIView): class PostResponseVacancies(ListAPIView): def post(self, request): - + a = ResponseVacancy.objects.create(**json.loads(request.data['data']), file = request.data['file'] if 'file' in request.data else None) + print(request.data, 'aaaaaaaaaaaaaa') + okib = DictDepartment.objects.get(id=22) data = {'sendto':[a.vacancy.department.id_chief.lotus, okib.id_chief.lotus], 'subject': f'Отклик на вакансию {a.vacancy.name} от {a.fio}', 'body_text':f'Почта:{a.email} ----- Телефон: {a.tel} ---- Сопроводительное письмо: {a.text}'} diff --git a/src/back/calendar_of_events/views.py b/src/back/calendar_of_events/views.py index 81ce8d024..de734a193 100644 --- a/src/back/calendar_of_events/views.py +++ b/src/back/calendar_of_events/views.py @@ -146,17 +146,25 @@ class MyEvents(APIView): # 'files':[] # }) created=True + try: event = json.loads(request.data['event']) # event = json.loads(event) filesadd = request.FILES.getlist('files') + # participant=request.POST['participant'] + participant= event['participant'] + + + event['calendar']=Calendar(id=event['calendar']) - participant = event['participant'] + files = [x['id'] for x in event['files']] + del event['files'] del event['participant'] + evnt=None if 'id' in event: 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 297bbb53c..0eb36c5c8 100644 --- a/src/front/src/components/about_inspection/open_vacancies/ResponseVacancies.vue +++ b/src/front/src/components/about_inspection/open_vacancies/ResponseVacancies.vue @@ -96,7 +96,7 @@ 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]); } diff --git a/src/front/src/components/calendar_of_events/BigCalendar.vue b/src/front/src/components/calendar_of_events/BigCalendar.vue index f026f86c9..d1a3349eb 100644 --- a/src/front/src/components/calendar_of_events/BigCalendar.vue +++ b/src/front/src/components/calendar_of_events/BigCalendar.vue @@ -152,14 +152,9 @@ export default { .then((res) => { eventFromCalendar.value = res.data if (idEvent.value==null) { - eventFromCalendar.value.event = {name:'', participant: [accountStore.user.is_idEmployee], files: [], date_start: "", date_end: "", period: null, description: '', calendar: null} + eventFromCalendar.value.event = {name:'', participant: [accountStore.user.is_idEmployee], files: [], date_start: new Date(), date_end: new Date(), period: null, description: '', calendar: null} } - // res.data.forEach( - // (e) => - // (e.visible = accountStore.calendar.includes(e.id) ? false : true) - // ); - // calendarForMy.value = res.data; }); }; 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 b66601a33..05d6191d4 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 @@ -39,7 +39,7 @@ border no-time :max="new Date(max_date)" - :min="new Date(min_date)" + :min="new Date(min_date).setDate(new Date(min_date).getDate()-1)" > @@ -86,12 +86,12 @@ export default { default: "2024-07-01", }, max_date: { - type: Date, - default: new Date('2555-07-01') + type: String, + default: '2555-07-01' }, min_date: { - type: Date, - default: new Date("1970-01-01") + type: String, + default: "1970-01-01" }, order: { @@ -106,7 +106,8 @@ export default { const myDate = computed({ get() { - return new Date(props.date); + + return props.date; }, set(newValue) { // console.log( , 'newValue') 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 6f271fde4..f6e5e033d 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 @@ -17,7 +17,7 @@