Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

views upgrade #6

Closed
wants to merge 13 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
my work
  • Loading branch information
Sharonjep committed Feb 27, 2022
commit 596fa95373678f15328156d9d489640738598bbc
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions .idea/cpims-dcs-3.0.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions cpovc_registry/functions-.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ def dashboard(request):
# Org units
cbo_id = request.session.get('ou_primary', 0)
cbo_ids = request.session.get('ou_attached', [])
<<<<<<< HEAD
print (cbo_ids)
=======
print cbo_ids
>>>>>>> origin/main
org_id = int(cbo_id)
org_ids = get_orgs_child(org_id)
# Workforce members using Appuser
Expand All @@ -86,7 +90,11 @@ def dashboard(request):
users = AppUser.objects.filter(
reg_person_id__in=person_orgs)
user_ids = users.values_list('id', flat=True)
<<<<<<< HEAD
print ('user ids', user_ids)
=======
print 'user ids', user_ids
>>>>>>> origin/main
users_count = users.count()
dash['workforce_members'] = users_count
person_types = RegPersonsTypes.objects.filter(
Expand Down Expand Up @@ -181,8 +189,13 @@ def dashboard(request):
dash['ovc_regs'] = ovc_regs
dash['case_regs'] = case_regs
dash['case_cats'] = case_categories
<<<<<<< HEAD
except Exception as e:
print ('error with dash - %s' % (str(e)))
=======
except Exception, e:
print 'error with dash - %s' % (str(e))
>>>>>>> origin/main
dash = {}
dash['children'] = 0
dash['guardian'] = 0
Expand Down Expand Up @@ -239,10 +252,17 @@ def ovc_dashboard(request):
# OVC
cbo_id = request.session.get('ou_primary', 0)
cbo_ids = request.session.get('ou_attached', [])
<<<<<<< HEAD
print (cbo_ids)
org_id = int(cbo_id)
org_ids = get_orgs_child(org_id)
print ('dash orgs', org_ids)
=======
print cbo_ids
org_id = int(cbo_id)
org_ids = get_orgs_child(org_id)
print 'dash orgs', org_ids
>>>>>>> origin/main
# Get org units
orgs_count = len(org_ids) - 1 if len(org_ids) > 1 else 1
dash['org_units'] = orgs_count
Expand Down Expand Up @@ -312,8 +332,13 @@ def ovc_dashboard(request):
dash['case_regs'] = case_regs
dash['case_cats'] = {}
dash['criteria'] = case_criteria
<<<<<<< HEAD
except Exception as e:
print ('error - %s' % (str(e)))
=======
except Exception, e:
print 'error - %s' % (str(e))
>>>>>>> origin/main
dash = {}
dash['children'] = 0
dash['children_all'] = 0
Expand All @@ -338,7 +363,11 @@ def ovc_dashboard(request):
def get_unit_parent(org_ids):
"""Method to do the organisation tree."""
try:
<<<<<<< HEAD
print (org_ids)
=======
print org_ids
>>>>>>> origin/main
orgs = []
orgs_qs = RegOrgUnit.objects.filter(
is_void=False,
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.