Commit 431ba70e authored by Gladys Forte's avatar Gladys Forte

Merge pull request #516 in RMS/api-main-service from gladys-dev2 to RMSv2

* commit 'cc66277e':
  dash return
parents fa9e18ee cc66277e
......@@ -203,20 +203,20 @@ class ChangeRequestFormsViewset(viewsets.ModelViewSet):
overdue = overdue_filtered.count()
# server side computations
status_total = pending + approved + rejected + cancelled + completed
# status_total = pending + approved + rejected + cancelled + completed
close = rejected + cancelled + completed
# close = rejected + cancelled + completed
opened = pending + approved
# opened = pending + approved
open_percent = round((opened/status_total) * 100)
# open_percent = round((opened/status_total) * 100)
close_percent = round((close/status_total) * 100)
# close_percent = round((close/status_total) * 100)
priority_total = high + normal
# priority_total = high + normal
high_percent = round((high/priority_total) * 100)
normal_percent = round((normal/priority_total) * 100)
# high_percent = round((high/priority_total) * 100)
# normal_percent = round((normal/priority_total) * 100)
message = {
'account_no': id_number,
......@@ -229,10 +229,10 @@ class ChangeRequestFormsViewset(viewsets.ModelViewSet):
'normal': normal,
'awaiting': awaiting,
'overdue': overdue,
'open_percent': open_percent,
'close_percent': close_percent,
'high_percent': high_percent,
'normal_percent': normal_percent,
# 'open_percent': open_percent,
# 'close_percent': close_percent,
# 'high_percent': high_percent,
# 'normal_percent': normal_percent,
'code': 200,
'status': 'success',
'message': 'Dashboard Summary'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment