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

Viable custom implementations for Education and Child Protection Sector in Nigeria #320

Open
wants to merge 31 commits into
base: master
Choose a base branch
from

Conversation

dondippino
Copy link
Contributor

@dondippino dondippino commented Dec 24, 2019

Additions of New Clusters to ReportHub from Nigeria:

  • Customizations of the beneficiaries.html to accommodate the unique natures of the SADDs from both sectors.
  • ngmClusterList.js, ngmClusterBeneficiaries.js and locale-en.json were also updated accordingly to facilitate these changes.

dondippino and others added 29 commits May 29, 2019 15:20
@drfaustusfade
Copy link
Collaborator

Additions of New Clusters to ReportHub from Nigeria:

  • Customizations of the beneficiaries.html to accommodate the unique natures of the SADDs from both sectors.
  • ngmClusterList.js, ngmClusterBeneficiaries.js and locale-en.json were also updated accordingly to facilitate these changes.
  • are male/female_teachers beneficiaries, should they be summed to total beneficiaries? I think they are more fit to people type units form selection, but disaggregated by male and female; avg_attendance_girls/boys at least could be generalized to avg_girls/boys for other use cases, or maybe just using boys/girls model fields, to keep sadd clean
  • hasOwnProperty on the form will check the existence, not the value, rendering true if prop is 0, why not dot access?


  • Also, as a general system dev proposal, to add into activities field/s SADD form type selection, that is SADD related field groups, so that not to confuse forms with piles of conditions, unload html a bit, avoid mistakes in defining activities, and be more developer friendly :)

as per this pull request, SADDs groups:
sadd_b_5_11_17_m_em_t
sadd_g_5_11_17_w_ew_t
sadd_bgmw
sadd_bgmw_em_ew
sadd_school
sadd_b_6_12_17_24
sadd_g_6_12_17_24

from this

ng-if="( ngmClusterBeneficiaries.form[ $locationIndex ][ $beneficiaryIndex ][ 'boys' ] ||
    ngmClusterBeneficiaries.form[ $locationIndex ][ $beneficiaryIndex ][ 'girls' ] ||
    ngmClusterBeneficiaries.form[ $locationIndex ][ $beneficiaryIndex ][ 'men' ] ||
    ngmClusterBeneficiaries.form[ $locationIndex ][ $beneficiaryIndex ][ 'women' ] ) &&
( !ngmClusterBeneficiaries.form[ $locationIndex ][ $beneficiaryIndex ][ 'boys_0_5' ]  &&
    !ngmClusterBeneficiaries.form[ $locationIndex ][ $beneficiaryIndex ][ 'boys_6_11' ] &&
    !ngmClusterBeneficiaries.form[ $locationIndex ][ $beneficiaryIndex ][ 'boys_12_17' ] &&
    !ngmClusterBeneficiaries.form[ $locationIndex ][ $beneficiaryIndex ][ 'girls_0_5' ]  &&
    !ngmClusterBeneficiaries.form[ $locationIndex ][ $beneficiaryIndex ][ 'girls_6_11' ] &&
    !ngmClusterBeneficiaries.form[ $locationIndex ][ $beneficiaryIndex ][ 'girls_12_17' ] ) &&
( !ngmClusterBeneficiaries.form[ $locationIndex ][ $beneficiaryIndex ][ 'elderly_men' ] &&
    !ngmClusterBeneficiaries.form[ $locationIndex ][ $beneficiaryIndex ][ 'elderly_women' ] )
&& (
    !ngmClusterBeneficiaries.form[ $locationIndex ][ $beneficiaryIndex ]['male_teachers') &&
    !ngmClusterBeneficiaries.form[ $locationIndex ][ $beneficiaryIndex ]['female_teachers') &&
    !ngmClusterBeneficiaries.form[ $locationIndex ][ $beneficiaryIndex ]['avg_attendance_boys') &&
    !ngmClusterBeneficiaries.form[ $locationIndex ][ $beneficiaryIndex ]['avg_attendance_girls') )

    &&
    ( !ngmClusterBeneficiaries.form[ $locationIndex ][ $beneficiaryIndex ]['boys_0_5') &&
    !ngmClusterBeneficiaries.form[ $locationIndex ][ $beneficiaryIndex ]['boys_6_12') &&
    !ngmClusterBeneficiaries.form[ $locationIndex ][ $beneficiaryIndex ]['boys_13_17') &&
    !ngmClusterBeneficiaries.form[ $locationIndex ][ $beneficiaryIndex ]['youth_male_18_24') )

    &&

    ( !ngmClusterBeneficiaries.form[ $locationIndex ][ $beneficiaryIndex ]['girls_0_5') &&
    !ngmClusterBeneficiaries.form[ $locationIndex ][ $beneficiaryIndex ]['girls_6_12') &&
    !ngmClusterBeneficiaries.form[ $locationIndex ][ $beneficiaryIndex ]['girls_13_17') &&
    !ngmClusterBeneficiaries.form[ $locationIndex ][ $beneficiaryIndex ]['youth_female_18_24') )
    "

to something like:

ng-if="( ngmClusterBeneficiaries.form[ $locationIndex ][ $beneficiaryIndex ][ 'sadd_bgmw' ]"

Cheers

@dondippino
Copy link
Contributor Author

dondippino commented Dec 31, 2019

  • are male/female_teachers beneficiaries, should they be summed to total beneficiaries? I think they are more fit to people type units form selection, but disaggregated by male and female; avg_attendance_girls/boys at least could be generalized to avg_girls/boys for other use cases, or maybe just using boys/girls model fields, to keep sadd clean

Yes male and female teachers are part of the beneficiaries, likewise average attendance of boys and girls are also part of the total beneficiaries.
Well the Education sector in Nigeria has fields for boys and girls, separate from average_attendance_boys and average_attendance_girls hence we have to accommodate that in our beneficiary fields so that we could have that in the export

  • hasOwnProperty on the form will check the existence, not the value, rendering true if prop is 0, why not dot access?

Thank you for pointing that out, I wasn't looking beyond my edge cases, I will update to check for zeros and ones

  • Also, as a general system dev proposal, to add into activities field/s SADD form type selection, that is SADD related field groups, so that not to confuse forms with piles of conditions, unload html a bit, avoid mistakes in defining activities, and be more developer friendly :)

You are right, we could go in this direction

@drfaustusfade
Copy link
Collaborator

Yes male and female teachers are part of the beneficiaries, likewise average attendance of boys and girls are also part of the total beneficiaries.
Well the Education sector in Nigeria has fields for boys and girls, separate from average_attendance_boys and average_attendance_girls hence we have to accommodate that in our beneficiary fields so that we could have that in the export

If I got it correctly teachers are the beneficiaries to who services are provided?

Also, as a general system dev proposal, to add into activities field/s SADD form type selection, that is SADD related field groups, so that not to confuse forms with piles of conditions, unload html a bit, avoid mistakes in defining activities, and be more developer friendly :)

More like adding additional fields into activities csv config, so that more solid structure with a sadd form control and individual sadd fields controls

@dondippino
Copy link
Contributor Author

dondippino commented Jan 3, 2020

If I got it correctly teachers are the beneficiaries to who services are provided?

Yes they are part of the beneficiaries, there are some activities on teacher training.

@drfaustusfade
Copy link
Collaborator

Also, as a general system dev proposal, to add into activities field/s SADD form type selection, that is SADD related field groups, so that not to confuse forms with piles of conditions, unload html a bit, avoid mistakes in defining activities, and be more developer friendly :)

proposal: pfitzpaddy/ngm-reportDesk#307

@pfitzpaddy
Copy link
Owner

Nice approach, will adopt proposed changes in activities.csv / beneficiaries.html for all implementations of ReportHub in coming weeks.

Comment on lines +175 to +178
male_teachers:0,
female_teachers:0,
avg_attendance_boys:0,
avg_attendance_girls:0,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beneficiary types as columns in beneficiary model is not going to be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants