diff --git a/db.sqlite3 b/db.sqlite3 index 93d254748..c3f627de2 100644 Binary files a/db.sqlite3 and b/db.sqlite3 differ diff --git a/front/package-lock.json b/front/package-lock.json index 2d41a28b5..58d710878 100644 --- a/front/package-lock.json +++ b/front/package-lock.json @@ -1,17 +1,18 @@ { "name": "front", - "version": "0.0.10", + "version": "0.0.11", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "front", - "version": "0.0.10", + "version": "0.0.11", "dependencies": { "@fullcalendar/core": "^6.1.8", "@fullcalendar/daygrid": "^6.1.8", "@fullcalendar/interaction": "^6.1.8", "@fullcalendar/list": "^6.1.8", + "@fullcalendar/multimonth": "^6.1.9", "@fullcalendar/timegrid": "^6.1.8", "@fullcalendar/vue3": "^6.1.8", "@mdi/font": "7.0.96", @@ -2695,19 +2696,19 @@ "dev": true }, "node_modules/@fullcalendar/core": { - "version": "6.1.8", - "resolved": "https://registry.npmjs.org/@fullcalendar/core/-/core-6.1.8.tgz", - "integrity": "sha512-i8JBIvZCWGO9dsMEDcx9bnsQZ9PtGSJdOXGgWbhLaGq2iq41OBdp9g9gM4b/Otv2oK8bL5Gl6CsMmb/HkDtA6Q==", + "version": "6.1.9", + "resolved": "https://registry.npmjs.org/@fullcalendar/core/-/core-6.1.9.tgz", + "integrity": "sha512-eeG+z9BWerdsU9Ac6j16rpYpPnE0wxtnEHiHrh/u/ADbGTR3hCOjCD9PxQOfhOTHbWOVs7JQunGcksSPu5WZBQ==", "dependencies": { "preact": "~10.12.1" } }, "node_modules/@fullcalendar/daygrid": { - "version": "6.1.8", - "resolved": "https://registry.npmjs.org/@fullcalendar/daygrid/-/daygrid-6.1.8.tgz", - "integrity": "sha512-kCZxQFKb9Vqa3CZRX0v7rMSJ2mlTt4gDpyLfiNJKxUAq7W51uKurPaFZWicaXy1ESHVBxKNlbx5uNjBpyu50JQ==", + "version": "6.1.9", + "resolved": "https://registry.npmjs.org/@fullcalendar/daygrid/-/daygrid-6.1.9.tgz", + "integrity": "sha512-o/6joH/7lmVHXAkbaa/tUbzWYnGp/LgfdiFyYPkqQbjKEeivNZWF1WhHqFbhx0zbFONSHtrvkjY2bjr+Ef2quQ==", "peerDependencies": { - "@fullcalendar/core": "~6.1.8" + "@fullcalendar/core": "~6.1.9" } }, "node_modules/@fullcalendar/interaction": { @@ -2726,6 +2727,17 @@ "@fullcalendar/core": "~6.1.8" } }, + "node_modules/@fullcalendar/multimonth": { + "version": "6.1.9", + "resolved": "https://registry.npmjs.org/@fullcalendar/multimonth/-/multimonth-6.1.9.tgz", + "integrity": "sha512-YpH1NL6RzdM1wO2nFJ3pNMo9xhd6i2WuE+e7SnGi7q1lO+ZZ77h5Fja5JKcpuIQUFHpi+m6vTzihIV8DT44NnQ==", + "dependencies": { + "@fullcalendar/daygrid": "~6.1.9" + }, + "peerDependencies": { + "@fullcalendar/core": "~6.1.9" + } + }, "node_modules/@fullcalendar/timegrid": { "version": "6.1.8", "resolved": "https://registry.npmjs.org/@fullcalendar/timegrid/-/timegrid-6.1.8.tgz", diff --git a/front/package.json b/front/package.json index a74da2078..c2a2ec82a 100644 --- a/front/package.json +++ b/front/package.json @@ -1,6 +1,6 @@ { "name": "front", - "version": "0.0.10", + "version": "0.0.11", "scripts": { "dev": "vite", "build": "vite build", @@ -14,6 +14,7 @@ "@fullcalendar/daygrid": "^6.1.8", "@fullcalendar/interaction": "^6.1.8", "@fullcalendar/list": "^6.1.8", + "@fullcalendar/multimonth": "^6.1.9", "@fullcalendar/timegrid": "^6.1.8", "@fullcalendar/vue3": "^6.1.8", "@mdi/font": "7.0.96", diff --git a/front/src/components/UI/Calendar.vue b/front/src/components/UI/Calendar.vue index 2c1cec827..9c0b50ffe 100644 --- a/front/src/components/UI/Calendar.vue +++ b/front/src/components/UI/Calendar.vue @@ -3,13 +3,16 @@ \ No newline at end of file diff --git a/front/src/components/carousel-list.vue b/front/src/components/carousel-list.vue index b7a096f0d..baf6c152a 100644 --- a/front/src/components/carousel-list.vue +++ b/front/src/components/carousel-list.vue @@ -2,7 +2,7 @@ - + > --> {{n.status}} @@ -45,7 +45,7 @@ - + @@ -82,7 +82,7 @@ export default { diff --git a/general_vacation/serializers.py b/general_vacation/serializers.py new file mode 100644 index 000000000..1c6508707 --- /dev/null +++ b/general_vacation/serializers.py @@ -0,0 +1,8 @@ +from rest_framework import serializers +from .models import * + +class GeneralVacationSerializer(serializers.ModelSerializer): + + class Meta: + model = GeneralVacation + fields ='__all__' \ No newline at end of file diff --git a/general_vacation/urls.py b/general_vacation/urls.py index e69de29bb..cd8845de1 100644 --- a/general_vacation/urls.py +++ b/general_vacation/urls.py @@ -0,0 +1,7 @@ +from django.urls import path +from .views import * + + +urlpatterns = [ + path('generalvacation/', GeneralVacationAPIView.as_view(), name='generalvacation'), +] \ No newline at end of file diff --git a/general_vacation/views.py b/general_vacation/views.py index 91ea44a21..cf0ffb23e 100644 --- a/general_vacation/views.py +++ b/general_vacation/views.py @@ -1,3 +1,17 @@ -from django.shortcuts import render +from rest_framework.response import Response +import datetime +from .serializers import * +from .models import * -# Create your views here. +from rest_framework.views import APIView + +class GeneralVacationAPIView(APIView): + def get(self, request): + general = GeneralVacation.objects.all() + + # Сериализуем извлечённый набор записей + serializer_for_basecrit = GeneralVacationSerializer( + instance=general, # Передаём набор записей + many=True # Указываем, что на вход подаётся именно набор записей + ) + return Response({"Отпуск": serializer_for_basecrit.data})