Merge branch 'Andr' into develop
This commit is contained in:
commit
f9afcf7761
3 files changed
+45
-31
No files matched your search
@@ -12,7 +12,7 @@ from .serializers import *
|
||||
class GetForThn(APIView):
|
||||
def get(self, request):
|
||||
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)
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ class GetForBst(APIView):
|
||||
user_login = request.GET.get('login')
|
||||
dep_id = request.GET.get('dep')
|
||||
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)
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ class GetThanks(APIView):
|
||||
def get(self, request):
|
||||
# Группировка кандидатов по имени и подсчет каждого
|
||||
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)
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ class SetBest(APIView):
|
||||
class GetBest(APIView):
|
||||
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)
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ class GetNotVoteThn(APIView):
|
||||
def get(self, request):
|
||||
list_thn_users = ThanksVote.objects.values('voted_user')
|
||||
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)
|
||||
|
||||
|
||||
@@ -79,5 +79,5 @@ class GetNotVoteBst(APIView):
|
||||
def get(self, request):
|
||||
list_bst_users = BestVote.objects.values('voted_user')
|
||||
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)
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<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">
|
||||
<template v-slot:default="{ item }">
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<template>
|
||||
<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="6" justify="center" align="center">
|
||||
@@ -7,12 +10,12 @@
|
||||
<div class="flip-card-inner">
|
||||
<div v-if="voted_bst" class="flip-card-front">
|
||||
<!-- Передняя сторона карточки -->
|
||||
<v-card class="justify-center elevation-24 " color="teal-darken-1" width="500" height="600"
|
||||
variant="elevated">
|
||||
<v-card class="justify-center elevation-24" width="500" height="510" variant="elevated">
|
||||
<v-card-title class="vote-title">ЛУЧШИЙ В ОТДЕЛЕ</v-card-title>
|
||||
<div class="justify-center">
|
||||
<div>
|
||||
<v-card class="vote-card-information">
|
||||
<v-card-title>«ЛУЧШИЙ В ОТДЕЛЕ»</v-card-title>
|
||||
<v-card class="vote-card-information" variant="flat">
|
||||
|
||||
<v-card-text
|
||||
class="justify-center align-center vote-card-information-title">
|
||||
<p>ВЫ УЖЕ ПРОГОЛОСОВАЛИ.</p>
|
||||
@@ -26,12 +29,12 @@
|
||||
</div>
|
||||
<div v-else class="flip-card-front" @click="toggleFlip1">
|
||||
<!-- Передняя сторона карточки -->
|
||||
<v-card class="justify-center elevation-24 " color="teal-darken-1" width="500" height="600"
|
||||
variant="elevated">
|
||||
<v-card class="justify-center elevation-24" width="500" height="510" variant="elevated">
|
||||
<v-card-title class="vote-title">ЛУЧШИЙ В ОТДЕЛЕ</v-card-title>
|
||||
<div class="justify-center">
|
||||
<div>
|
||||
<v-card class="vote-card-information">
|
||||
<v-card-title>«ЛУЧШИЙ В ОТДЕЛЕ»</v-card-title>
|
||||
<v-card class="vote-card-information" variant="flat">
|
||||
|
||||
|
||||
<v-card-text class="justify-center align-center
|
||||
vote-card-information-title">
|
||||
@@ -52,9 +55,9 @@
|
||||
<!-- Передняя сторона карточки КОНЕЦ-->
|
||||
<div class="flip-card-back">
|
||||
<!-- Задняя сторона карточки -->
|
||||
<v-card class="justify-center elevation-24" width="500" height="600">
|
||||
<v-card-title>
|
||||
«МОЙ КОЛЛЕГА САМЫЙ ЛУЧШИЙ»
|
||||
<v-card class="justify-center elevation-24" width="500" height="510">
|
||||
<v-card-title class="vote-title">
|
||||
МОЙ КОЛЛЕГА САМЫЙ ЛУЧШИЙ
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
<vote-form :type_fetch="'bst'" />
|
||||
@@ -78,12 +81,12 @@
|
||||
<div class="flip-card-inner">
|
||||
<div v-if="voted_thn" class="flip-card-front">
|
||||
<!-- Передняя сторона карточки -->
|
||||
<v-card class="justify-center elevation-24" color="teal-darken-2" width="500" height="600"
|
||||
variant="elevated">
|
||||
<v-card class="justify-center elevation-24" width="500" height="510" variant="elevated">
|
||||
<v-card-title class="vote-title">ХОЧУ СКАЗАТЬ СПАСИБО</v-card-title>
|
||||
<div class="justify-center">
|
||||
<div>
|
||||
<v-card class="vote-card-information">
|
||||
<v-card-title>«ХОЧУ СКАЗАТЬ СПАСИБО»</v-card-title>
|
||||
<v-card class="vote-card-information" variant="flat">
|
||||
|
||||
<v-card-text
|
||||
class="justify-center align-center vote-card-information-title">
|
||||
<p>ВЫ УЖЕ ПРОГОЛОСОВАЛИ.</p>
|
||||
@@ -97,13 +100,13 @@
|
||||
</div>
|
||||
<div v-else class="flip-card-front" @click="toggleFlip2">
|
||||
<!-- Передняя сторона карточки -->
|
||||
<v-card class="justify-center elevation-24" color="teal-darken-2" width="500" height="600"
|
||||
variant="elevated">
|
||||
<v-card class="justify-center elevation-24" width="500" height="510" variant="elevated">
|
||||
<v-card-title class="vote-title ">ХОЧУ СКАЗАТЬ СПАСИБО</v-card-title>
|
||||
<div class="justify-center">
|
||||
|
||||
<div>
|
||||
<v-card class="vote-card-information">
|
||||
<v-card-title>«ХОЧУ СКАЗАТЬ СПАСИБО»</v-card-title>
|
||||
<v-card class="vote-card-information" variant="flat">
|
||||
|
||||
<v-card-text class="justify-center align-center
|
||||
vote-card-information-title">
|
||||
Выберите сотрудника <br>
|
||||
@@ -120,9 +123,9 @@
|
||||
<!-- Передняя сторона карточки КОНЕЦ-->
|
||||
<!-- Задняя сторона карточки -->
|
||||
<div class="flip-card-back">
|
||||
<v-card class="justify-center elevation-24" width="500" height="600" variant="elevated">
|
||||
<v-card-title>
|
||||
«ХОЧУ СКАЗАТЬ СПАСИБО!»
|
||||
<v-card class="justify-center elevation-24" width="500" height="510" variant="elevated">
|
||||
<v-card-title class="vote-title ">
|
||||
ХОЧУ СКАЗАТЬ СПАСИБО
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
<vote-form :type_fetch="'thn'" />
|
||||
@@ -286,7 +289,7 @@ export default {
|
||||
</script>
|
||||
<style scoped>
|
||||
.vote-card-container {
|
||||
height: 620px !important;
|
||||
height: 600px !important;
|
||||
}
|
||||
|
||||
.flip-card {}
|
||||
@@ -345,7 +348,7 @@ export default {
|
||||
|
||||
.vote-card-information {
|
||||
background-color: rgba(255, 255, 255, 0.7);
|
||||
margin-top: 45%;
|
||||
margin-top: 30%;
|
||||
width: 460px;
|
||||
height: 200px;
|
||||
|
||||
@@ -354,5 +357,16 @@ export default {
|
||||
.vote-card-information-title {
|
||||
font-size: 1.2em;
|
||||
|
||||
}
|
||||
|
||||
.vote-title {
|
||||
font-size: 1.8em;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.vote-main-title {
|
||||
font-size: 2.3em;
|
||||
font-weight: 400;
|
||||
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user