Merge branch 'develop' into test

This commit is contained in:
Nukeap committed 2024-11-08 11:11:02 +03:00
commit 7df600b864
5 files changed
+48 -34

No files matched your search

+6 -6
View File
@@ -12,7 +12,7 @@ from .serializers import *
class GetForThn(APIView): class GetForThn(APIView):
def get(self, request): def get(self, request):
user_login = request.GET.get('login') user_login = request.GET.get('login')
all_emps = DictEmplyeeR.objects.exclude(id_dict_employee__login=user_login).exclude(id_dict_employee__post='Начальник инспекции').exclude(id_dict_employee__deleted=1) all_emps = DictEmplyeeR.objects.exclude(id_dict_employee__login=user_login).exclude(id_dict_employee__post='Начальник инспекции').exclude(id_dict_employee__deleted=1).order_by('id_dict_employee__fio')
return Response(GetEmpSerializerR(all_emps, many=True).data) return Response(GetEmpSerializerR(all_emps, many=True).data)
@@ -21,7 +21,7 @@ class GetForBst(APIView):
user_login = request.GET.get('login') user_login = request.GET.get('login')
dep_id = request.GET.get('dep') dep_id = request.GET.get('dep')
emp_user = DictEmplyeeR.objects.filter(Q(id_dict_department=dep_id), ~Q( emp_user = DictEmplyeeR.objects.filter(Q(id_dict_department=dep_id), ~Q(
id_dict_employee__post="Начальник отдела"), ~Q(id_dict_employee__login=user_login)).exclude(id_dict_employee__deleted=1) id_dict_employee__post="Начальник отдела"), ~Q(id_dict_employee__login=user_login)).exclude(id_dict_employee__deleted=1).order_by('id_dict_employee__fio')
return Response(GetEmpSerializerR(emp_user, many=True).data) return Response(GetEmpSerializerR(emp_user, many=True).data)
@@ -42,7 +42,7 @@ class GetThanks(APIView):
def get(self, request): def get(self, request):
# Группировка кандидатов по имени и подсчет каждого # Группировка кандидатов по имени и подсчет каждого
count_thanks = ThanksVote.objects.values('voted_user', count_thanks = ThanksVote.objects.values('voted_user',
'cand_name').annotate(total=Count('id')) 'cand_name').annotate(total=Count('id')).order_by('cand_name')
return Response(count_thanks) return Response(count_thanks)
@@ -63,7 +63,7 @@ class SetBest(APIView):
class GetBest(APIView): class GetBest(APIView):
def get(self, request): def get(self, request):
# Группировка кандидатов по имени и подсчет каждого # Группировка кандидатов по имени и подсчет каждого
count_bests = BestVote.objects.values('voted_user','department_user', 'cand_name').annotate(total=Count('id')) count_bests = BestVote.objects.values('voted_user','department_user', 'cand_name').annotate(total=Count('id')).order_by('cand_name')
return Response(count_bests) return Response(count_bests)
@@ -71,7 +71,7 @@ class GetNotVoteThn(APIView):
def get(self, request): def get(self, request):
list_thn_users = ThanksVote.objects.values('voted_user') list_thn_users = ThanksVote.objects.values('voted_user')
list_emp = DictEmplyeeR.objects.filter( list_emp = DictEmplyeeR.objects.filter(
id_dict_employee__deleted=0).exclude(id_dict_employee__login__in=list_thn_users) id_dict_employee__deleted=0).exclude(id_dict_employee__login__in=list_thn_users).order_by('id_dict_employee__fio')
return Response(GetEmpSerializerR(list_emp, many=True).data) return Response(GetEmpSerializerR(list_emp, many=True).data)
@@ -79,5 +79,5 @@ class GetNotVoteBst(APIView):
def get(self, request): def get(self, request):
list_bst_users = BestVote.objects.values('voted_user') list_bst_users = BestVote.objects.values('voted_user')
list_emp_bst = DictEmplyeeR.objects.filter( list_emp_bst = DictEmplyeeR.objects.filter(
id_dict_employee__deleted=0).exclude(id_dict_employee__login__in=list_bst_users) id_dict_employee__deleted=0).exclude(id_dict_employee__login__in=list_bst_users).order_by('id_dict_employee__fio')
return Response(GetEmpSerializerR(list_emp_bst, many=True).data) return Response(GetEmpSerializerR(list_emp_bst, many=True).data)
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "front", "name": "front",
"version": "0.0.71", "version": "0.0.72",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "front", "name": "front",
"version": "0.0.71", "version": "0.0.72",
"dependencies": { "dependencies": {
"-": "^0.0.1", "-": "^0.0.1",
"@ckeditor/ckeditor5-build-classic": "^41.4.2", "@ckeditor/ckeditor5-build-classic": "^41.4.2",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "front", "name": "front",
"version": "0.0.71", "version": "0.0.72",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "vite build", "build": "vite build",
+1 -1
View File
@@ -1,6 +1,6 @@
<template> <template>
<v-form @submit="voteSend"> <v-form @submit="voteSend">
<v-card id="scroll-window-chekbox" height="420" elevation="0"> <v-card id="scroll-window-chekbox" height="300" elevation="0">
<!-- Форма голосования --> <!-- Форма голосования -->
<v-virtual-scroll :items="vote_data" :item-height="40"> <v-virtual-scroll :items="vote_data" :item-height="40">
<template v-slot:default="{ item }"> <template v-slot:default="{ item }">
+38 -24
View File
@@ -1,5 +1,8 @@
<template> <template>
<v-row justify="center" class="d-flex align-start h-100"> <v-row justify="center" class="d-flex align-start h-100">
<v-col cols="12" class="d-flex align-center justify-center vote-main-title pa-0 ma-0">
<v-col cols="6" class="pb-0 mb-0">ВЫБИРАЕМ ЛУЧШИХ СОТРУДНИКОВ 2024</v-col>
</v-col>
<!-- Голосование Лучший сотрудник --> <!-- Голосование Лучший сотрудник -->
<v-col cols="12" justify="center" class="d-flex vote-card-container"> <v-col cols="12" justify="center" class="d-flex vote-card-container">
<v-col cols="6" justify="center" align="center"> <v-col cols="6" justify="center" align="center">
@@ -7,12 +10,12 @@
<div class="flip-card-inner"> <div class="flip-card-inner">
<div v-if="voted_bst" class="flip-card-front"> <div v-if="voted_bst" class="flip-card-front">
<!-- Передняя сторона карточки --> <!-- Передняя сторона карточки -->
<v-card class="justify-center elevation-24 " color="teal-darken-1" width="500" height="600" <v-card class="justify-center elevation-24" width="500" height="510" variant="elevated">
variant="elevated"> <v-card-title class="vote-title">ЛУЧШИЙ В ОТДЕЛЕ</v-card-title>
<div class="justify-center"> <div class="justify-center">
<div> <div>
<v-card class="vote-card-information"> <v-card class="vote-card-information" variant="flat">
<v-card-title>&laquo;ЛУЧШИЙ В ОТДЕЛЕ&raquo;</v-card-title>
<v-card-text <v-card-text
class="justify-center align-center vote-card-information-title"> class="justify-center align-center vote-card-information-title">
<p>ВЫ УЖЕ ПРОГОЛОСОВАЛИ.</p> <p>ВЫ УЖЕ ПРОГОЛОСОВАЛИ.</p>
@@ -26,12 +29,12 @@
</div> </div>
<div v-else class="flip-card-front" @click="toggleFlip1"> <div v-else class="flip-card-front" @click="toggleFlip1">
<!-- Передняя сторона карточки --> <!-- Передняя сторона карточки -->
<v-card class="justify-center elevation-24 " color="teal-darken-1" width="500" height="600" <v-card class="justify-center elevation-24" width="500" height="510" variant="elevated">
variant="elevated"> <v-card-title class="vote-title">ЛУЧШИЙ В ОТДЕЛЕ</v-card-title>
<div class="justify-center"> <div class="justify-center">
<div> <div>
<v-card class="vote-card-information"> <v-card class="vote-card-information" variant="flat">
<v-card-title>&laquo;ЛУЧШИЙ В ОТДЕЛЕ&raquo;</v-card-title>
<v-card-text class="justify-center align-center <v-card-text class="justify-center align-center
vote-card-information-title"> vote-card-information-title">
@@ -52,9 +55,9 @@
<!-- Передняя сторона карточки КОНЕЦ--> <!-- Передняя сторона карточки КОНЕЦ-->
<div class="flip-card-back"> <div class="flip-card-back">
<!-- Задняя сторона карточки --> <!-- Задняя сторона карточки -->
<v-card class="justify-center elevation-24" width="500" height="600"> <v-card class="justify-center elevation-24" width="500" height="510">
<v-card-title> <v-card-title class="vote-title">
&laquo;МОЙ КОЛЛЕГА САМЫЙ ЛУЧШИЙ&raquo; МОЙ КОЛЛЕГА САМЫЙ ЛУЧШИЙ
</v-card-title> </v-card-title>
<v-card-text> <v-card-text>
<vote-form :type_fetch="'bst'" /> <vote-form :type_fetch="'bst'" />
@@ -78,12 +81,12 @@
<div class="flip-card-inner"> <div class="flip-card-inner">
<div v-if="voted_thn" class="flip-card-front"> <div v-if="voted_thn" class="flip-card-front">
<!-- Передняя сторона карточки --> <!-- Передняя сторона карточки -->
<v-card class="justify-center elevation-24" color="teal-darken-2" width="500" height="600" <v-card class="justify-center elevation-24" width="500" height="510" variant="elevated">
variant="elevated"> <v-card-title class="vote-title">ХОЧУ СКАЗАТЬ СПАСИБО</v-card-title>
<div class="justify-center"> <div class="justify-center">
<div> <div>
<v-card class="vote-card-information"> <v-card class="vote-card-information" variant="flat">
<v-card-title>&laquo;ХОЧУ СКАЗАТЬ СПАСИБО&raquo;</v-card-title>
<v-card-text <v-card-text
class="justify-center align-center vote-card-information-title"> class="justify-center align-center vote-card-information-title">
<p>ВЫ УЖЕ ПРОГОЛОСОВАЛИ.</p> <p>ВЫ УЖЕ ПРОГОЛОСОВАЛИ.</p>
@@ -97,13 +100,13 @@
</div> </div>
<div v-else class="flip-card-front" @click="toggleFlip2"> <div v-else class="flip-card-front" @click="toggleFlip2">
<!-- Передняя сторона карточки --> <!-- Передняя сторона карточки -->
<v-card class="justify-center elevation-24" color="teal-darken-2" width="500" height="600" <v-card class="justify-center elevation-24" width="500" height="510" variant="elevated">
variant="elevated"> <v-card-title class="vote-title ">ХОЧУ СКАЗАТЬ СПАСИБО</v-card-title>
<div class="justify-center"> <div class="justify-center">
<div> <div>
<v-card class="vote-card-information"> <v-card class="vote-card-information" variant="flat">
<v-card-title>&laquo;ХОЧУ СКАЗАТЬ СПАСИБО&raquo;</v-card-title>
<v-card-text class="justify-center align-center <v-card-text class="justify-center align-center
vote-card-information-title"> vote-card-information-title">
Выберите сотрудника <br> Выберите сотрудника <br>
@@ -120,9 +123,9 @@
<!-- Передняя сторона карточки КОНЕЦ--> <!-- Передняя сторона карточки КОНЕЦ-->
<!-- Задняя сторона карточки --> <!-- Задняя сторона карточки -->
<div class="flip-card-back"> <div class="flip-card-back">
<v-card class="justify-center elevation-24" width="500" height="600" variant="elevated"> <v-card class="justify-center elevation-24" width="500" height="510" variant="elevated">
<v-card-title> <v-card-title class="vote-title ">
&laquo;ХОЧУ СКАЗАТЬ СПАСИБО!&raquo; ХОЧУ СКАЗАТЬ СПАСИБО
</v-card-title> </v-card-title>
<v-card-text> <v-card-text>
<vote-form :type_fetch="'thn'" /> <vote-form :type_fetch="'thn'" />
@@ -286,7 +289,7 @@ export default {
</script> </script>
<style scoped> <style scoped>
.vote-card-container { .vote-card-container {
height: 620px !important; height: 600px !important;
} }
/* .flip-card {} */ /* .flip-card {} */
@@ -345,7 +348,7 @@ export default {
.vote-card-information { .vote-card-information {
background-color: rgba(255, 255, 255, 0.7); background-color: rgba(255, 255, 255, 0.7);
margin-top: 45%; margin-top: 30%;
width: 460px; width: 460px;
height: 200px; height: 200px;
@@ -354,5 +357,16 @@ export default {
.vote-card-information-title { .vote-card-information-title {
font-size: 1.2em; font-size: 1.2em;
}
.vote-title {
font-size: 1.8em;
font-weight: 400;
}
.vote-main-title {
font-size: 2.3em;
font-weight: 400;
} }
</style> </style>