Merge branch 'razrab' into Alex
This commit is contained in:
commit
3d5d19d3c4
11 files changed
+150
-28
No files matched your search
@@ -65,6 +65,7 @@ class CustomAuth(ModelBackend):
|
|||||||
# try:
|
# try:
|
||||||
|
|
||||||
user = DictEmployee.objects.using('user_directory').get(login=username)
|
user = DictEmployee.objects.using('user_directory').get(login=username)
|
||||||
|
# print(user)
|
||||||
|
|
||||||
if user.deleted!=1:
|
if user.deleted!=1:
|
||||||
homeuser, created = User.objects.get_or_create(username=username)
|
homeuser, created = User.objects.get_or_create(username=username)
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
from rest_framework import serializers
|
from rest_framework import serializers
|
||||||
from django.contrib.auth import authenticate
|
from django.contrib.auth import authenticate
|
||||||
from .models import User
|
from .models import User
|
||||||
|
|
||||||
@@ -13,6 +13,7 @@ urlpatterns = [
|
|||||||
path('token/', TokenObtainPairView.as_view(), name='token_obtain_pair'),
|
path('token/', TokenObtainPairView.as_view(), name='token_obtain_pair'),
|
||||||
path('token/refresh/', TokenRefreshView.as_view(), name='token_refresh'),
|
path('token/refresh/', TokenRefreshView.as_view(), name='token_refresh'),
|
||||||
path('token/verify/', TokenVerifyView.as_view(), name='token_access'),
|
path('token/verify/', TokenVerifyView.as_view(), name='token_access'),
|
||||||
path('getuser/', getuserAPIView.as_view(), name='getuserAPIView'),
|
path('getuser/', getuserAPIView.as_view(), name='getuserAPIView', ),
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
||||||
+12
-3
@@ -5,6 +5,8 @@ from rest_framework.views import APIView
|
|||||||
from .renderers import UserJSONRenderer
|
from .renderers import UserJSONRenderer
|
||||||
from userauth.models import *
|
from userauth.models import *
|
||||||
from .models import *
|
from .models import *
|
||||||
|
from .serializers import *
|
||||||
|
import pandas as pd
|
||||||
# from .serializers import RegistrationSerializer
|
# from .serializers import RegistrationSerializer
|
||||||
|
|
||||||
# class RegistrationAPIView(APIView):
|
# class RegistrationAPIView(APIView):
|
||||||
@@ -36,6 +38,7 @@ class UserAPIView(APIView):
|
|||||||
|
|
||||||
class getuserAPIView(APIView):
|
class getuserAPIView(APIView):
|
||||||
permission_classes = (AllowAny,)
|
permission_classes = (AllowAny,)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -43,8 +46,14 @@ class getuserAPIView(APIView):
|
|||||||
userlogin = request.query_params.get('userlogin')
|
userlogin = request.query_params.get('userlogin')
|
||||||
|
|
||||||
queryset = model_to_dict(DictEmployee.objects.using('user_directory').get(login=userlogin))
|
queryset = model_to_dict(DictEmployee.objects.using('user_directory').get(login=userlogin))
|
||||||
|
|
||||||
# queryset['responsible'] = [model_to_dict(x) for x in OrderResponsibilityEmployee.objects.using('user_directory').raw("SELECT * FROM order_responsibility_employee")]
|
# com = Committee2.objects.using('user_directory').values('id_dict_employee')
|
||||||
|
# emp = DictEmployee.objects.using('user_directory').values('login', 'id')
|
||||||
|
# dfcom = pd.DataFrame.from_records(com)
|
||||||
|
# dfemp = pd.DataFrame.from_records(emp)
|
||||||
|
# h = dfcom.merge(dfemp, how="left", left_on="id_dict_employee", right_on="id")
|
||||||
|
# print(h, '====================================================================')
|
||||||
|
|
||||||
|
|
||||||
return Response(queryset)
|
return Response(queryset)
|
||||||
|
|
||||||
Binary file not shown.
Generated
+12
@@ -26,6 +26,7 @@
|
|||||||
"roboto-fontface": "*",
|
"roboto-fontface": "*",
|
||||||
"v-tooltip": "^2.1.3",
|
"v-tooltip": "^2.1.3",
|
||||||
"vue": "^3.2.0",
|
"vue": "^3.2.0",
|
||||||
|
"vue-cal": "^4.8.1",
|
||||||
"vue-chartjs": "^5.2.0",
|
"vue-chartjs": "^5.2.0",
|
||||||
"vue-jwt-decode": "^0.1.0",
|
"vue-jwt-decode": "^0.1.0",
|
||||||
"vue-router": "^4.0.0",
|
"vue-router": "^4.0.0",
|
||||||
@@ -21546,6 +21547,17 @@
|
|||||||
"@vue/shared": "3.3.4"
|
"@vue/shared": "3.3.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/vue-cal": {
|
||||||
|
"version": "4.8.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/vue-cal/-/vue-cal-4.8.1.tgz",
|
||||||
|
"integrity": "sha512-qe0jSDmbzdKF3/MSTPcHSJMOovav4MwmXtgs1n7jkI345zAtfErQVv4uFEVXg1rD62sBi1qWflYRUKy1mzQapg==",
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/antoniandre"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"vue": "^2.6.14 || ^3.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/vue-chartjs": {
|
"node_modules/vue-chartjs": {
|
||||||
"version": "5.2.0",
|
"version": "5.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/vue-chartjs/-/vue-chartjs-5.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/vue-chartjs/-/vue-chartjs-5.2.0.tgz",
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
"roboto-fontface": "*",
|
"roboto-fontface": "*",
|
||||||
"v-tooltip": "^2.1.3",
|
"v-tooltip": "^2.1.3",
|
||||||
"vue": "^3.2.0",
|
"vue": "^3.2.0",
|
||||||
|
"vue-cal": "^4.8.1",
|
||||||
"vue-chartjs": "^5.2.0",
|
"vue-chartjs": "^5.2.0",
|
||||||
"vue-jwt-decode": "^0.1.0",
|
"vue-jwt-decode": "^0.1.0",
|
||||||
"vue-router": "^4.0.0",
|
"vue-router": "^4.0.0",
|
||||||
|
|||||||
@@ -70,21 +70,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
,
|
,
|
||||||
// eventRender: function(eventObj, $el) {
|
|
||||||
// $el.popover({
|
|
||||||
// title: eventObj.title,
|
|
||||||
// content: eventObj.description,
|
|
||||||
// trigger: 'hover',
|
|
||||||
// placement: 'top',
|
|
||||||
// container: 'body'
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
|
|
||||||
|
|
||||||
// eventDidMount: function(info) {
|
|
||||||
// console.log(info.event.extendedProps);
|
|
||||||
// {description: "Lecture", department: "BioChemistry"}
|
|
||||||
// },
|
|
||||||
aspectRatio: 1,
|
aspectRatio: 1,
|
||||||
multiMonthMaxColumns: 2,
|
multiMonthMaxColumns: 2,
|
||||||
displayEventEnd: true,
|
displayEventEnd: true,
|
||||||
|
|||||||
@@ -0,0 +1,109 @@
|
|||||||
|
<template>
|
||||||
|
<v-row>
|
||||||
|
<v-col>
|
||||||
|
<vue-cal
|
||||||
|
locale="ru"
|
||||||
|
xsmall
|
||||||
|
:time="false"
|
||||||
|
hide-view-selector
|
||||||
|
active-view="month"
|
||||||
|
:disable-views="['years', 'year', 'week', 'day']"
|
||||||
|
@cell-focus="selectedDate = $event"
|
||||||
|
class="vuecal--blue-theme vuecal--rounded-theme"
|
||||||
|
|
||||||
|
>
|
||||||
|
<template #arrow-prev>
|
||||||
|
<v-icon icon="mdi-menu-left"></v-icon>
|
||||||
|
</template>
|
||||||
|
<template #arrow-next>
|
||||||
|
<v-icon icon="mdi-menu-right"></v-icon>
|
||||||
|
</template>
|
||||||
|
</vue-cal>
|
||||||
|
</v-col>
|
||||||
|
<v-col>
|
||||||
|
<vue-cal
|
||||||
|
locale="ru"
|
||||||
|
xsmall
|
||||||
|
:time="false"
|
||||||
|
hide-view-selector
|
||||||
|
active-view="day"
|
||||||
|
:disable-views="['years', 'year', 'month', 'week']"
|
||||||
|
:selected-date="selectedDate"
|
||||||
|
class="vuecal--blue-theme"
|
||||||
|
>
|
||||||
|
<template #arrow-prev>
|
||||||
|
<v-icon icon="mdi-menu-left"></v-icon>
|
||||||
|
</template>
|
||||||
|
<template #arrow-next>
|
||||||
|
<v-icon icon="mdi-menu-right"></v-icon>
|
||||||
|
</template>
|
||||||
|
</vue-cal>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import VueCal from 'vue-cal'
|
||||||
|
import 'vue-cal/dist/vuecal.css'
|
||||||
|
import { ref, onMounted } from 'vue'
|
||||||
|
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: { VueCal },
|
||||||
|
|
||||||
|
setup() {
|
||||||
|
const selectedDate = ref(null)
|
||||||
|
|
||||||
|
const events = [
|
||||||
|
{
|
||||||
|
start: '2023-11-20 14:00',
|
||||||
|
end: '2023-11-20 18:00',
|
||||||
|
title: 'Need to go shopping',
|
||||||
|
icon: 'shopping_cart', // Custom attribute.
|
||||||
|
content: 'Click to see my shopping list',
|
||||||
|
contentFull: 'My shopping list is rather long:<br><ul><li>Avocados</li><li>Tomatoes</li><li>Potatoes</li><li>Mangoes</li></ul>', // Custom attribute.
|
||||||
|
class: 'leisure'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
start: '2023-10-10 14:00',
|
||||||
|
end: '2023-10-20 14:00',
|
||||||
|
title: 'Golf with John',
|
||||||
|
icon: 'golf_course', // Custom attribute.
|
||||||
|
content: 'Do I need to tell how many holes?',
|
||||||
|
contentFull: 'Okay.<br>It will be a 18 hole golf course.', // Custom attribute.
|
||||||
|
class: 'sport'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
return { events, selectedDate }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.vuecal__cell-events-count {
|
||||||
|
width: 18px;
|
||||||
|
height: 2px;
|
||||||
|
color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Dot indicator */
|
||||||
|
.vuecal__cell-events-count {
|
||||||
|
width: 4px;
|
||||||
|
min-width: 0;
|
||||||
|
height: 4px;
|
||||||
|
padding: 0;
|
||||||
|
color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Cell background indicator */
|
||||||
|
.vuecal__cell--has-events {background-color: #fffacd;}
|
||||||
|
.vuecal__cell-events-count {display: none;}
|
||||||
|
</style>
|
||||||
@@ -12,13 +12,11 @@
|
|||||||
<v-col class="pr-0 pt-0 flex-column">
|
<v-col class="pr-0 pt-0 flex-column">
|
||||||
<v-card class="h-100 bg-transparent pa-2 d-flex flex-column">
|
<v-card class="h-100 bg-transparent pa-2 d-flex flex-column">
|
||||||
<v-row class="d-flex">
|
<v-row class="d-flex">
|
||||||
<v-col>
|
<v-col class="flex-column d-flex">
|
||||||
<Calendar-full/>
|
<!-- <Calendar-full/>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col>
|
<v-col> -->
|
||||||
<Calendar-full
|
<event-calendar/>
|
||||||
:initial="'listYear'"
|
|
||||||
/>
|
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-card>
|
</v-card>
|
||||||
@@ -158,6 +156,9 @@
|
|||||||
import LoadRound from '@/components/load-round.vue'
|
import LoadRound from '@/components/load-round.vue'
|
||||||
import DigitalLetna from '@/components/digital-letna.vue'
|
import DigitalLetna from '@/components/digital-letna.vue'
|
||||||
import { axiosApiInstance } from '@/utils/axios-api'
|
import { axiosApiInstance } from '@/utils/axios-api'
|
||||||
|
|
||||||
|
import EventCalendar from '@/components/UI/event-calendar.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
@@ -167,7 +168,9 @@
|
|||||||
CalendarFull,
|
CalendarFull,
|
||||||
NewsListHome,
|
NewsListHome,
|
||||||
LoadRound,
|
LoadRound,
|
||||||
DigitalLetna
|
DigitalLetna,
|
||||||
|
|
||||||
|
EventCalendar
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
@@ -176,6 +179,7 @@
|
|||||||
const appStore = useAppStore()
|
const appStore = useAppStore()
|
||||||
const favorit = ref([])
|
const favorit = ref([])
|
||||||
const toggle = ref(null)
|
const toggle = ref(null)
|
||||||
|
|
||||||
pagecounter()
|
pagecounter()
|
||||||
const accountStore = useAccountStore()
|
const accountStore = useAccountStore()
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ class DictEmployee(models.Model):
|
|||||||
datebegin = models.DateField(db_column='DateBegin', blank=True, null=True, db_comment='─рЄр яЁшхьр эр ЁрсюЄє') # Field name made lowercase.
|
datebegin = models.DateField(db_column='DateBegin', blank=True, null=True, db_comment='─рЄр яЁшхьр эр ЁрсюЄє') # Field name made lowercase.
|
||||||
dateend = models.DateField(db_column='DateEnd', blank=True, null=True, db_comment='─рЄр єтюы№эхэш ') # Field name made lowercase.
|
dateend = models.DateField(db_column='DateEnd', blank=True, null=True, db_comment='─рЄр єтюы№эхэш ') # Field name made lowercase.
|
||||||
workstatus2 = models.CharField(db_column='WorkStatus2', max_length=500, blank=True, null=True, db_comment='ёЄрЄєё єўхЄэющ чряшёш(Enabled)') # Field name made lowercase.
|
workstatus2 = models.CharField(db_column='WorkStatus2', max_length=500, blank=True, null=True, db_comment='ёЄрЄєё єўхЄэющ чряшёш(Enabled)') # Field name made lowercase.
|
||||||
workstatus3 = models.TextField(db_column='WorkStatus3', blank=True, null=True) # Field name made lowercase. This field type is a guess.
|
# workstatus3 = models.TextField(db_column='WorkStatus3', blank=True, null=True) # Field name made lowercase. This field type is a guess.
|
||||||
deleted = models.PositiveIntegerField(db_comment='╠рЁъхЁ єфрыхэш ')
|
deleted = models.PositiveIntegerField(db_comment='╠рЁъхЁ єфрыхэш ')
|
||||||
deleteddate = models.DateField(db_column='deletedDate', blank=True, null=True, db_comment='─рЄр чряюыэхэш ьрЁъхЁр єфрыхэш ') # Field name made lowercase.
|
deleteddate = models.DateField(db_column='deletedDate', blank=True, null=True, db_comment='─рЄр чряюыэхэш ьрЁъхЁр єфрыхэш ') # Field name made lowercase.
|
||||||
is_responsible = models.PositiveIntegerField(db_comment='╙фрышЄ№')
|
is_responsible = models.PositiveIntegerField(db_comment='╙фрышЄ№')
|
||||||
|
|||||||
Reference in new issue
Block a user