diff --git a/src/db.sqlite3 b/src/db.sqlite3 index 7b35db2cd..5ee5eeeb6 100644 Binary files a/src/db.sqlite3 and b/src/db.sqlite3 differ diff --git a/src/front/src/router/index.js b/src/front/src/router/index.js index 43dc22c46..990587822 100644 --- a/src/front/src/router/index.js +++ b/src/front/src/router/index.js @@ -83,7 +83,8 @@ const routes = [ name: 'AboutPortalPage', component: () => import('@/views/AboutPortalPage.vue'), meta:{ - title:"О портале" + title:"О портале", + ico: "mdi-contact-mail" } }, { diff --git a/src/front/src/utils/universal_functions.js b/src/front/src/utils/universal_functions.js index 881c82cec..0a3993056 100644 --- a/src/front/src/utils/universal_functions.js +++ b/src/front/src/utils/universal_functions.js @@ -66,7 +66,9 @@ export function pagecounter(){ console.log(router.currentRoute.value.meta, '-------------ttt------------------'); let postdata = {user__id: "user" in accountStore &&"id" in accountStore.user? accountStore.user.id: null, page: router.currentRoute.value.meta.title, - fullPath: router.currentRoute.value.fullPath + fullPath: router.currentRoute.value.fullPath, + ico: router.currentRoute.value.ico + } clearAxios.post(`${baseURL}api/watcher/counter/`, postdata) diff --git a/src/general_vacation/views.py b/src/general_vacation/views.py index 6e6a8e13f..c20ae7f85 100644 --- a/src/general_vacation/views.py +++ b/src/general_vacation/views.py @@ -210,6 +210,8 @@ class DailyRoundUpAPIView(APIView): def post(self, request): + + # DictCommitteeExpert.objects.using('user_directory').update(fio='kfkf', tel='03') user = DictEmployee.objects.using('user_directory').filter(deleted=0).values('login', 'id') dfuser = pd.DataFrame.from_records(user) diff --git a/src/media/DailyRoundUp.xlsx b/src/media/DailyRoundUp.xlsx index eca811aeb..4ddbaf869 100644 Binary files a/src/media/DailyRoundUp.xlsx and b/src/media/DailyRoundUp.xlsx differ diff --git a/src/userauth.sqlite3 b/src/userauth.sqlite3 index b3941b311..b00691bd7 100644 Binary files a/src/userauth.sqlite3 and b/src/userauth.sqlite3 differ diff --git a/src/watcher/models.py b/src/watcher/models.py index 37f7cf138..12cb644ee 100644 --- a/src/watcher/models.py +++ b/src/watcher/models.py @@ -9,6 +9,7 @@ class CountVisitor(models.Model): user = models.ForeignKey(User, null=True, blank=True, on_delete=models.PROTECT) count = models.IntegerField(default=0) fullPath = models.CharField(max_length=255) + ico = models.CharField(verbose_name='Иконка', max_length=150, null=True, blank=True) def __str__(self): return str(self.page) @@ -18,7 +19,7 @@ class CountVisitor(models.Model): class Meta: constraints = [ - models.UniqueConstraint(fields=['page', 'user', 'visitdate', 'fullPath'], name='unique appversion') + models.UniqueConstraint(fields=['page', 'user', 'visitdate', 'fullPath', 'ico'], name='unique appversion') ] diff --git a/src/watcher/views.py b/src/watcher/views.py index 1e071e8ad..3762cae35 100644 --- a/src/watcher/views.py +++ b/src/watcher/views.py @@ -35,9 +35,9 @@ class Counter(ListAPIView): def post(self, request): if request.data['user__id'] is not None: - watch,create = CountVisitor.objects.get_or_create(user = User(id=request.data['user__id']),page=request.data['page'], visitdate=date.today(), fullPath=request.data['fullPath']) + watch,create = CountVisitor.objects.get_or_create(user = User(id=request.data['user__id']),page=request.data['page'], visitdate=date.today(), fullPath=request.data['fullPath'], ico=request.data['ico']) else: - watch,create = CountVisitor.objects.get_or_create(user__id__isnull=True, page=request.data['page'], visitdate=date.today(), fullPath=request.data['fullPath']) + watch,create = CountVisitor.objects.get_or_create(user__id__isnull=True, page=request.data['page'], visitdate=date.today(), fullPath=request.data['fullPath'], ico=request.data['ico']) watch.count+=1 watch.save()