From 1d38024e884291a483fe7cabfd77f799e6eb44ca Mon Sep 17 00:00:00 2001 From: iriska-gri <79623434+iriska-gri@users.noreply.github.com> Date: Tue, 24 Oct 2023 11:15:29 +0300 Subject: [PATCH] =?UTF-8?q?=D0=92=D1=8B=D0=B2=D0=BE=D0=B4=20=D0=BD=D0=B0?= =?UTF-8?q?=20=D1=8D=D0=BA=D1=80=D0=B0=D0=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db.sqlite3 | Bin 376832 -> 376832 bytes front/src/components/UI/Calendar-full.vue | 1 + front/src/views/HomePage.vue | 2 +- general_vacation/views.py | 24 +++++++++++++++------- userauth.sqlite3 | Bin 196608 -> 196608 bytes 5 files changed, 19 insertions(+), 8 deletions(-) diff --git a/db.sqlite3 b/db.sqlite3 index 0e0e7b4671259ff8c59ea37204a914b7b3fc3b4e..cf62897423876884d461361dc696838426be806e 100644 GIT binary patch delta 41 vcmZo@5N~J@pCHZXKT*b+(Z4aFHGy$!0+ZlvM$h)5+e|>ryuIi)OWzX!B@GXy delta 41 vcmZo@5N~J@pCHXBHc`fzQLHhcHGy$!0+ZlvM%nhF+e|>ryuIi)OWzX!6;=-i diff --git a/front/src/components/UI/Calendar-full.vue b/front/src/components/UI/Calendar-full.vue index adbedeec5..012b42b2c 100644 --- a/front/src/components/UI/Calendar-full.vue +++ b/front/src/components/UI/Calendar-full.vue @@ -229,4 +229,5 @@ display: flex; background: white !important; } + \ No newline at end of file diff --git a/front/src/views/HomePage.vue b/front/src/views/HomePage.vue index 71ec9823f..2a591401d 100644 --- a/front/src/views/HomePage.vue +++ b/front/src/views/HomePage.vue @@ -53,7 +53,7 @@ - + diff --git a/general_vacation/views.py b/general_vacation/views.py index ce74565aa..dc4d20726 100644 --- a/general_vacation/views.py +++ b/general_vacation/views.py @@ -1,5 +1,6 @@ from datetime import datetime import os +from django.forms import model_to_dict from openpyxl import load_workbook import openpyxl from rest_framework.response import Response @@ -270,12 +271,21 @@ class DailyRoundUpAPIView(APIView): class DailyloadAPIView(APIView): def get(self, request): daily = DailyRoundUp.objects.filter(todaysDate=datetime.now()) - print(daily, '-----------------------------') + position = BasePosition.objects.all() + print(position, '-------------') + result = [] + n=1 + for x in daily: + a=model_to_dict(x) + # print(x.user, '------------', n) + a['user'] = model_to_dict(DictEmployee.objects.using('user_directory').get(login=x.user)) + # print(x.user, '!!!!!!!!', n) + n=n+1 + result.append(a) + # print(a) + # print(x.user,'222222222222222222') + # user = DictEmployee.objects.using('user_directory').filter(deleted=0).values('login', 'id') - # - serializer_for_daily = DailyRoundUpSerializer( - instance=daily, # Передаём набор записей - many=True # Указываем, что на вход подаётся именно набор записей - ) - return Response(serializer_for_daily.data) + + return Response({"Обход":result}) # return Response({"Обход":serializer_for_daily}) \ No newline at end of file diff --git a/userauth.sqlite3 b/userauth.sqlite3 index 0b7d4c960ae3c2c7759002bde1e218ed8c99a17b..b3941b311ef53a3a68543a5d18c3adf38d5d622f 100644 GIT binary patch delta 123 zcmZo@;Av>!nIO%mJW