-
+
+
@@ -390,11 +391,11 @@ export default {
name: 'Справочник',
link: 'http://10.252.44.33/accounting6/members.php'
},
- {
- name: 'О пользователе',
- ico: 'mdi-account',
- path: "/userinfo"
- },
+ // {
+ // name: 'О пользователе',
+ // ico: 'mdi-account',
+ // path: "/userinfo"
+ // },
]
},
{
diff --git a/src/front/src/views/FnsHol.vue b/src/front/src/views/FnsHol.vue
index e7f59beac..23f556259 100644
--- a/src/front/src/views/FnsHol.vue
+++ b/src/front/src/views/FnsHol.vue
@@ -1,5 +1,5 @@
-
+
-
-
+
-
-
- {{x.title}}
-
-
-
-
-
-
-
-
-
-
+
+
+ {{x.title}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+ class="text-text_carous mt-n3 text-black textareas pt-2 font-weight-medium"
+ :model-value=x.text
+ variant='plain'
+ readonly
+ auto-grow
+ rows="1"
+
+ hide-details
+
+
+
+
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -80,7 +100,7 @@
import { ref, computed } from 'vue'
import {getfromserver} from '@/utils/universal_functions'
import { baseURL } from '@/utils/axios-api'
-
+ import { axiosApiInstance } from '@/utils/axios-api'
@@ -90,8 +110,15 @@
const burl = baseURL.slice(0,-1)
const carous=ref([{link: ""}])
-
- getfromserver("api/navigation/carousels/", carous)
+ axiosApiInstance.get(`api/fns/links/`).then(data => {
+ carous.value= data.data
+
+ // t_dailyRound.value = data.data
+
+ // result.value=JSON.parse(JSON.stringify(data.data.daily))
+
+ })
+ // getfromserver("api/fns/links/", carous)
const carushi = computed(()=> {
console.log(window.innerHeight, window.innerHeight-50);
@@ -116,7 +143,7 @@
.bgText {
background: #ffffffb0;
- line-height: 2.1rem!important;
+ line-height: 3.1rem!important;
}
@@ -127,6 +154,6 @@
.textareas .v-field__input {
- font-size: 1.3em!important;
+ font-size: 3.3em!important;
}
\ No newline at end of file
diff --git a/src/garbage/admin.py b/src/garbage/admin.py
index 8d23542d4..c6819a37b 100644
--- a/src/garbage/admin.py
+++ b/src/garbage/admin.py
@@ -32,4 +32,4 @@ class MultiDBModelAdmin(admin.ModelAdmin):
db_field, request, using=self.using, **kwargs
)
-# admin.site.register(Carousels, MultiDBModelAdmin)
\ No newline at end of file
+admin.site.register(Carousels, MultiDBModelAdmin)
\ No newline at end of file
diff --git a/src/garbage/models.py b/src/garbage/models.py
index 695125315..83ce6c863 100644
--- a/src/garbage/models.py
+++ b/src/garbage/models.py
@@ -8,11 +8,14 @@
from django.db import models
-# class Carousels(models.Model):
-# title = models.CharField(max_length=255)
-# text = models.TextField(blank=True, null=True)
-# link = models.ImageField(upload_to='fns/%Y/%m/%d', null=True, verbose_name='Изображение', db_comment = 'Картинка к новости')
-# class Meta:
-# managed = False
-# db_table = 'carousels'
\ No newline at end of file
+
+class Carousels(models.Model):
+ title = models.CharField(max_length=255)
+ text = models.TextField(blank=True, null=True)
+ link = models.ImageField(upload_to='fns/%Y/%m/%d', default="newsimage/default.jpg", null=True, verbose_name='Картинка')
+ order = models.IntegerField(blank=True, null=True)
+ link2 = models.ImageField(upload_to='fns/%Y/%m/%d', default="newsimage/default.jpg", null=True, verbose_name='Картинка2')
+ class Meta:
+ managed = False
+ db_table = 'carousels'
diff --git a/src/garbage/serializers.py b/src/garbage/serializers.py
new file mode 100644
index 000000000..6175382f6
--- /dev/null
+++ b/src/garbage/serializers.py
@@ -0,0 +1,11 @@
+
+from rest_framework import serializers
+from .models import *
+
+
+
+class CarouselsSerializer(serializers.ModelSerializer):
+ class Meta:
+
+ model = Carousels
+ fields = '__all__'
diff --git a/src/garbage/urls.py b/src/garbage/urls.py
index b4f8a51d2..945102048 100644
--- a/src/garbage/urls.py
+++ b/src/garbage/urls.py
@@ -10,7 +10,7 @@ from rest_framework_simplejwt.views import (
urlpatterns = [
- # path('links/', CaorusAPIView.as_view(), name='LinkAPIView'),
+ path('links/', CaorusAPIView.as_view(), name='CaorusAPIView'),
]
\ No newline at end of file
diff --git a/src/garbage/views.py b/src/garbage/views.py
index a36fdaaa7..982a5d3cd 100644
--- a/src/garbage/views.py
+++ b/src/garbage/views.py
@@ -1,3 +1,11 @@
from django.shortcuts import render
+from rest_framework.generics import ListAPIView
+from .models import *
+from rest_framework.response import Response
+from .serializers import *
-# class CaorusAPIView(CarouselsAPIView(ListAPIView):)
\ No newline at end of file
+class CaorusAPIView(ListAPIView):
+ def get(self, request):
+ queryset = Carousels.objects.using('add_base').all().order_by('order')
+ print(queryset, '----------------queryset')
+ return Response(CarouselsSerializer(queryset, many=True).data)
\ No newline at end of file
diff --git a/src/general_vacation/views.py b/src/general_vacation/views.py
index 550acf246..68baa9ee3 100644
--- a/src/general_vacation/views.py
+++ b/src/general_vacation/views.py
@@ -70,16 +70,7 @@ class DailyRoundUpAPIView(APIView):
mess = 'Файл не найден'
try:
getattr(re, request.GET.get("excel"))()
- print(request.GET.get("excel"), 'request.GET.get("excel")----------------')
- # if request.GET.get("excel") == 'round':
-
- # re.roundfilse()
- # mess = "Файл загружен"
- # if request.GET.get("excel") == 'vacation':
- # re.vacationsExcel()
- # print(request.data['dailyfiles'], 'request.data[dailyfiles]--------------------')
- # mess = 'Файл в обраотке'
- # pos=''
+
except Exception as e:
print(e, '-----------------------------')
pass
diff --git a/src/navigation/views.py b/src/navigation/views.py
index 1ec348258..8f26047ee 100644
--- a/src/navigation/views.py
+++ b/src/navigation/views.py
@@ -123,7 +123,7 @@ class CarouselsAPIView(ListAPIView):
for k in nowday:
birthday.append({
- "title":'Поздравляем!',
+ "title":'Сегодня поздравляем!',
"text": f"{k.fio}!"+"\n"+ f"{brdtext[0].text}",
"link": "/media/"+str(brdimage[0].img),
"published": 'true',
diff --git a/src/userauth/serializers.py b/src/userauth/serializers.py
index 50465c4a4..0748d8bb5 100644
--- a/src/userauth/serializers.py
+++ b/src/userauth/serializers.py
@@ -118,4 +118,4 @@ class ShortUserSerializer(serializers.ModelSerializer):
class Meta:
model = DictEmployee
- fields = ['familyname', 'name', 'parentname', 'id']
\ No newline at end of file
+ fields = ['familyname', 'name', 'parentname', 'id', 'login']
\ No newline at end of file