Положение сотрудников
This commit is contained in:
1 parent
d89762ef14
commit
4a2e6ee13e
8 files changed
+34
-7
No files matched your search
BIN
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 2.4 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 665 KiB |
@@ -3,7 +3,7 @@
|
|||||||
<!-- <v-btn v-scroll-to="{element:'#g'}">
|
<!-- <v-btn v-scroll-to="{element:'#g'}">
|
||||||
j
|
j
|
||||||
</v-btn> -->
|
</v-btn> -->
|
||||||
<my-helper :pretext = 'newss.result'/>
|
<!-- <my-helper :pretext = 'newss.result'/> -->
|
||||||
<v-card
|
<v-card
|
||||||
v-show="route.path=='/'"
|
v-show="route.path=='/'"
|
||||||
:ref="i"
|
:ref="i"
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
|
|
||||||
<v-expand-transition>
|
<v-expand-transition>
|
||||||
|
|
||||||
<div v-show="x.showComment" v-if="x.comment.length>0">
|
<div v-show="x.showComment" v-if="x.comment.length>0" class="bgf">
|
||||||
<div
|
<div
|
||||||
v-for = "(y, key) in x.comment"
|
v-for = "(y, key) in x.comment"
|
||||||
:key="key"
|
:key="key"
|
||||||
@@ -155,7 +155,7 @@
|
|||||||
:class="accountStore.user.login==y.author.login?'bgchatnot':'bgchat'"
|
:class="accountStore.user.login==y.author.login?'bgchatnot':'bgchat'"
|
||||||
|
|
||||||
>
|
>
|
||||||
<v-col class="flex-grow-1 text-subtitle-2 pa-0 "
|
<v-col class="flex-grow-1 text-subtitle-2 pl-2 pa-0 "
|
||||||
|
|
||||||
>
|
>
|
||||||
{{ accountStore.user.login==y.author.login?'':splitname(y.author) }}
|
{{ accountStore.user.login==y.author.login?'':splitname(y.author) }}
|
||||||
@@ -164,7 +164,7 @@
|
|||||||
|
|
||||||
{{dateformat(y.cdate)}}
|
{{dateformat(y.cdate)}}
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col class="pa-0 text-end text-subtitle-2 ">
|
<v-col class="pa-0 pr-2 text-end text-subtitle-2 ">
|
||||||
{{ accountStore.user.login!=y.author.login?'':splitname(y.author) }}
|
{{ accountStore.user.login!=y.author.login?'':splitname(y.author) }}
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
@@ -180,8 +180,8 @@
|
|||||||
<v-alert
|
<v-alert
|
||||||
|
|
||||||
|
|
||||||
color="#f9f9f9"
|
color="white"
|
||||||
|
rounded=0
|
||||||
:border="accountStore.user.login==y.author.login?'end':'start'"
|
:border="accountStore.user.login==y.author.login?'end':'start'"
|
||||||
:border-color="accountStore.user.login==y.author.login?'success':'deep-purple accent-4'"
|
:border-color="accountStore.user.login==y.author.login?'success':'deep-purple accent-4'"
|
||||||
elevation=0
|
elevation=0
|
||||||
@@ -433,4 +433,9 @@ export default {
|
|||||||
background-color: #eef9efad;
|
background-color: #eef9efad;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bgf {
|
||||||
|
background: url("@/assets/message.jpg") repeat-y;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
@@ -2,6 +2,28 @@ from django.db import models
|
|||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from userauth.models import DictEmployee
|
from userauth.models import DictEmployee
|
||||||
|
|
||||||
|
class BasePosition(models.Model):
|
||||||
|
name = models.CharField(verbose_name='Название', max_length=150, blank=True, db_index=True)
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
verbose_name = "Справочник - Позиция"
|
||||||
|
verbose_name_plural = "Справочник - Позиция"
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return str(self.name)
|
||||||
|
|
||||||
|
class DailyRoundUp(models.Model):
|
||||||
|
todaysDate = models.DateField(verbose_name='Начало рабочего периода')
|
||||||
|
user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.PROTECT, verbose_name='Сотрудник')
|
||||||
|
position = models.ForeignKey(BasePosition, on_delete=models.PROTECT, verbose_name='Позиция')
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
verbose_name = "Ежедневный обход"
|
||||||
|
verbose_name_plural = "Ежедневный обход"
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return str(self.name)
|
||||||
|
|
||||||
class GeneralVacation(models.Model):
|
class GeneralVacation(models.Model):
|
||||||
CHOICES = (
|
CHOICES = (
|
||||||
('os', 'Осн'),
|
('os', 'Осн'),
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 665 KiB |
+1
-1
@@ -73,7 +73,7 @@ class NewsAPIView(ListAPIView):
|
|||||||
|
|
||||||
upd.cdate=datetime.now()
|
upd.cdate=datetime.now()
|
||||||
upd.save()
|
upd.save()
|
||||||
for y in ScoreNews.objects.filter(news_id=request.data['news']):
|
|
||||||
back = [{"score":y.score, "user":y.author.username} for y in ScoreNews.objects.filter(news_id=request.data['news'])]
|
back = [{"score":y.score, "user":y.author.username} for y in ScoreNews.objects.filter(news_id=request.data['news'])]
|
||||||
|
|
||||||
if 'text' in request.data:
|
if 'text' in request.data:
|
||||||
|
|||||||
BIN
Binary file not shown.
Reference in new issue
Block a user