Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
R
red-ci-cd
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
red-group-test
red-ci-cd
Commits
af9c9469
Commit
af9c9469
authored
Jan 14, 2020
by
John Red Medrano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed on dashboard
parent
4ce8c939
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
app/applicationlayer/master/dashboard/views.py
app/applicationlayer/master/dashboard/views.py
+17
-1
No files found.
app/applicationlayer/master/dashboard/views.py
View file @
af9c9469
...
...
@@ -31,12 +31,20 @@ class RMSDashBoardViewSet(APIView):
arr_company
=
[]
recently_company
=
{}
recently_users
=
User
.
objects
.
all
()
.
values
(
'name'
,
'department__company__name'
,
'department__name'
,
'date_joined'
)
.
order_by
(
'-date_joined'
)[
0
:
9
]
)
# recently_users = User.objects.all().values(
# 'name',
# 'department__company__name',
# 'department__name',
# 'date_joined'
# ).order_by('-date_joined')[0:10]
if
user_type
==
enums_department
:
...
...
@@ -57,6 +65,10 @@ class RMSDashBoardViewSet(APIView):
recently_company
[
'date_added'
]
=
request
.
user
.
department
.
company
.
created
arr_company
.
append
(
recently_company
)
recently_users
=
recently_users
.
filter
(
department
=
str
(
user_department
)
)
elif
user_type
==
enums_company
:
company_count
=
1
...
...
@@ -79,6 +91,10 @@ class RMSDashBoardViewSet(APIView):
arr_company
.
append
(
recently_company
)
recently_users
=
recently_users
.
filter
(
department__company__code
=
str
(
user_company
)
)
else
:
company_count
=
Company
.
objects
.
all
()
.
count
()
companies
=
Company
.
objects
.
all
()[
0
:
10
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment