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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
e6ae929
Merge pull request #1 from pfitzpaddy/master
dondippino May 29, 2019
bd88463
Merge pull request #2 from pfitzpaddy/master
dondippino Jun 14, 2019
c823e48
Merge pull request #3 from pfitzpaddy/master
dondippino Jun 25, 2019
aeb5d62
Merge pull request #4 from pfitzpaddy/master
dondippino Jun 26, 2019
aec4d80
Merge pull request #5 from pfitzpaddy/master
dondippino Jul 1, 2019
09576ce
Merge pull request #6 from pfitzpaddy/master
dondippino Jul 2, 2019
1797e84
Merge pull request #7 from pfitzpaddy/master
dondippino Jul 6, 2019
18feb73
Integrations for other sectors in Nigeria
dondippino Jul 17, 2019
0f151a6
Revert "Integrations for other sectors in Nigeria"
dondippino Jul 17, 2019
152dc8a
Merge pull request #8 from pfitzpaddy/master
dondippino Jul 17, 2019
5ff4b9f
Integrations for other sectors in Nigeria
dondippino Jul 17, 2019
2a7b117
Merge branch 'master' of https://github.com/pfitzpaddy/ngm-reportHub …
dondippino Jul 25, 2019
fd6da1d
Adjustments to activities form
dondippino Jul 29, 2019
756301b
Patch to WASH sector
dondippino Aug 15, 2019
4a0b804
Merge pull request #10 from pfitzpaddy/master
dondippino Aug 15, 2019
bf0f74d
merge conflicts
dondippino Aug 15, 2019
5efb5e6
Clean up console
dondippino Aug 15, 2019
ce9f75f
Merged from upstream
dondippino Aug 15, 2019
98e20cd
Multisectoral implementation
dondippino Aug 19, 2019
ef8cee1
Merge branch 'master' of https://github.com/dondippino/ngm-reportHub
dondippino Aug 19, 2019
f8329d0
Multisectoral implementation
dondippino Aug 28, 2019
b9e44ff
Configuration for Education Nigeria
dondippino Sep 11, 2019
607d23e
Child Protection configuration
Oct 11, 2019
987b9b6
Sync with upstream
Nov 14, 2019
7f678a6
Merged changes from upstream
Nov 14, 2019
df5e6c3
Merge branch 'master' of https://github.com/pfitzpaddy/ngm-reportHub
Dec 5, 2019
dc177c5
Merge branch 'master' of https://github.com/pfitzpaddy/ngm-reportHub
Dec 24, 2019
60b6c02
Viable implementations for Education and Child Protection Sectors Nig…
Dec 24, 2019
9238144
Cleanup
Dec 24, 2019
cd92bf9
Refactored the SADDs logics from beneficiaries.html to the ngmCluster…
Jan 2, 2020
033e68e
Addition of Donor list for Education Sector Nigeria
Jan 24, 2020
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
1 change: 1 addition & 0 deletions .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ npm-debug.log
.DS_Store
package-lock.json

/nbproject/private/
Empty file modified app/images/404.gif
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified app/images/cluster/dtm-col.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified app/images/cluster/groups.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified app/images/cluster/groups_01.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified app/images/cluster/projects-AF17.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified app/images/cluster/projects-CB.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified app/images/cluster/projects-CBv1.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified app/images/cluster/projects-COL.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified app/images/docm.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified app/images/docxm.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified app/images/elsedoc.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified app/images/en.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified app/images/immap/pfitzgerald.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/images/logo-child_protection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified app/images/logo-cp.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified app/images/logo-fss.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified app/images/logo-san.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified app/images/logo-smsd.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified app/images/mp4m.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified app/images/pdfm.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified app/images/ppt.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified app/images/snapshots/reporthub/exports/afg_3w.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified app/images/spain.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified app/images/txtm.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified app/images/xls.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified app/images/xlsx.png
100644 → 100755
Empty file modified app/images/zipm.png
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ angular.module('ngm.widget.form.authentication', ['ngm.provider'])
'nutrition': { cluster: 'Nutrition' },
'protection': { cluster: 'Protection' },
'rnr_chapter': { cluster: 'R&R Chapter' },
'wash': { cluster: 'WASH' }
'wash': { cluster: 'WASH' },
'child_protection':{ cluster: 'Child Protection' }
}
},

Expand Down
Empty file modified app/scripts/app/directives/materialize.select.js
100644 → 100755
Empty file.
11 changes: 11 additions & 0 deletions app/scripts/app/translate/locale-en.json
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,16 @@
"male_60_plus":"Male 60+",
"eld_men":"Eld. Men",
"total_male":"Total Male",
"male_teachers": "Male Teachers",
"female_teachers": "Female Teachers",
"avg_attendance_boys": "Avg. Attendance Boys ",
"avg_attendance_girls": "Avg. Attendance Girls ",
"boys_6_12": "Male 6-12",
"boys_13_17": "Male 13-17",
"youth_male_18_24": "Male 18-24",
"girls_6_12": "Female 6-12",
"girls_13_17": "Female 13-17",
"youth_female_18_24": "Female 18-24",

"girls":"Girls",
"girls_0_5":"Female 0-5",
Expand All @@ -633,6 +643,7 @@
"population_in_disability":"Population in Disability",
"total_female":"Total Female",
"total_beneficiaries":"Total Beneficiaries",
"total_financing":"Total Financing",
"projects_number":"Projects Number",
"population_beneficiaries":"Population Beneficiaries",
"number_executing_agencies":"Number of Executing Agencies",
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ angular.module('ngmReportHub')

// empty Project
$scope.report = {

test: 'Hey yo',
// parent
ngm: $scope.$parent.ngm,

Expand Down
Empty file.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,119 @@ angular.module( 'ngmReportHub' )

// beneficairies
var ngmClusterBeneficiaries = {
isPresent: function(locationIndex, beneficiaryIndex, key){
return ngmClusterBeneficiaries.form[ locationIndex ][ beneficiaryIndex ].hasOwnProperty(key);
},
isPositive: function(locationIndex, beneficiaryIndex, key){
return ngmClusterBeneficiaries.form[ locationIndex ][ beneficiaryIndex ][key];
},
isPresentandPositive: function(locationIndex, beneficiaryIndex, key){
return ngmClusterBeneficiaries.form[ locationIndex ][ beneficiaryIndex ].hasOwnProperty(key) &&ngmClusterBeneficiaries.form[ locationIndex ][ beneficiaryIndex ][key];
},
// ======================= SADDs skip logics ============================
sadd_b_5_11_17_m_em_t: function(locationIndex, beneficiaryIndex){
return ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'boys_0_5' ) &&
ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'boys_6_11') &&
ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'boys_12_17') &&
ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'men' ) &&
ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'elderly_men' ) &&
ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'total_male' );
},
sadd_g_5_11_17_w_ew_t:function(locationIndex, beneficiaryIndex){
return ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'girls_0_5' ) &&
ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'girls_6_11' ) &&
ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'girls_12_17' ) &&
ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'women' ) &&
ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'elderly_women' ) &&
ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'total_female' );
},
sadd_bgmw: function(locationIndex, beneficiaryIndex){
return ( ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'boys' ) ||
ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'girls' ) ||
ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'men' ) ||
ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'women' ) ) &&
( !ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'boys_0_5' ) &&
!ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'boys_6_11' ) &&
!ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'boys_12_17' ) &&
!ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'girls_0_5' ) &&
!ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'girls_6_11' ) &&
!ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'girls_12_17' ) ) &&
( !ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'elderly_men' ) &&
!ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'elderly_women' ) )
&& (
!ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'male_teachers') &&
!ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'female_teachers') &&
!ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'avg_attendance_boys') &&
!ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'avg_attendance_girls') )

&&
( !ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'boys_0_5') &&
!ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'boys_6_12') &&
!ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'boys_13_17') &&
!ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'youth_male_18_24') )

&&

( !ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'girls_0_5') &&
!ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'girls_6_12') &&
!ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'girls_13_17') &&
!ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'youth_female_18_24') )
},
sadd_bgmw_em_ew: function(locationIndex, beneficiaryIndex){
return ( ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'boys' ) &&
ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'girls' ) &&
ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'men' ) &&
ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'women' ) &&
ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'elderly_men' ) &&
ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'elderly_women' ) ) &&
( !ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'boys_0_5' ) &&
!ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'boys_6_11' ) &&
!ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'boys_12_17' ) &&
!ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'girls_0_5' ) &&
!ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'girls_6_11' ) &&
!ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'girls_12_17' ) )
&& (
!ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'male_teachers') &&
!ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'female_teachers') &&
!ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'avg_attendance_boys') &&
!ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'avg_attendance_girls') )
&&
( !ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'boys_0_5') &&
!ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'boys_6_12') &&
!ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'boys_13_17') &&
!ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'youth_male_18_24') )

&&

( !ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'girls_0_5') &&
!ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'girls_6_12') &&
!ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'girls_13_17') &&
!ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'youth_female_18_24') );
},
sadd_edu_ng: function(locationIndex, beneficiaryIndex){
return (
ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'male_teachers') &&
ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'female_teachers') && ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'avg_attendance_boys') &&
ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'avg_attendance_girls') ) &&
( !ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'boys_0_5' ) &&
!ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'boys_6_11' ) &&
!ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'boys_12_17' ) &&
!ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'girls_0_5' ) &&
!ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'girls_6_11' ) &&
!ngmClusterBeneficiaries.isPositive(locationIndex, beneficiaryIndex, 'girls_12_17' ) );
},
sadd_b_6_12_17_24: function(locationIndex, beneficiaryIndex){
return ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'boys_0_5') &&
ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'boys_6_12' ) &&
ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'boys_13_17') &&
ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'youth_male_18_24');
},
sadd_g_6_12_17_24: function(locationIndex, beneficiaryIndex){
return ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'girls_0_5') &&
ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'girls_6_12' ) &&
ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'girls_13_17') &&
ngmClusterBeneficiaries.isPresent(locationIndex, beneficiaryIndex, 'youth_female_18_24');
},

// form
form:[[]],
Expand All @@ -26,7 +139,8 @@ angular.module( 'ngmReportHub' )
'strategic_objective_description',
'sector_objective_id',
'sector_objective_name',
'sector_objective_description'
'sector_objective_description',
'templatesUrl'
],

defaults: {
Expand Down Expand Up @@ -56,7 +170,19 @@ angular.module( 'ngmReportHub' )
elderly_women:0,
total_male:0,
total_female:0,
total_beneficiaries:0
total_beneficiaries:0,

male_teachers:0,
female_teachers:0,
avg_attendance_boys:0,
avg_attendance_girls:0,
Comment on lines +175 to +178
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.


boys_6_12:0,
boys_13_17:0,
youth_male_18_24:0,
girls_6_12:0,
girls_13_17:0,
youth_female_18_24:0
},
// activity_description: {
// activity_description_id: '',
Expand Down Expand Up @@ -170,6 +296,21 @@ angular.module( 'ngmReportHub' )
beneficiary.elderly_women;

beneficiary.total_beneficiaries += beneficiary.total_male + beneficiary.total_female;
//Workaround for Nigeria Education Sector
if(beneficiary.hasOwnProperty('male_teachers')){beneficiary.total_beneficiaries +=beneficiary.male_teachers}
if(beneficiary.hasOwnProperty('female_teachers')){beneficiary.total_beneficiaries +=beneficiary.female_teachers}
if(beneficiary.hasOwnProperty('avg_attendance_boys')){beneficiary.total_beneficiaries +=beneficiary.avg_attendance_boys}
if(beneficiary.hasOwnProperty('avg_attendance_girls')){beneficiary.total_beneficiaries +=beneficiary.avg_attendance_girls}

//Workaround for Nigeria Child Protection Sector
if(beneficiary.hasOwnProperty('boys_6_12')){beneficiary.total_beneficiaries +=beneficiary.boys_6_12}
if(beneficiary.hasOwnProperty('boys_13_17')){beneficiary.total_beneficiaries +=beneficiary.boys_13_17}
if(beneficiary.hasOwnProperty('youth_male_18_24')){beneficiary.total_beneficiaries +=beneficiary.youth_male_18_24}
if(beneficiary.hasOwnProperty('girls_6_12')){beneficiary.total_beneficiaries +=beneficiary.girls_6_12}
if(beneficiary.hasOwnProperty('girls_13_17')){beneficiary.total_beneficiaries +=beneficiary.girls_13_17}
if(beneficiary.hasOwnProperty('youth_female_18_24')){beneficiary.total_beneficiaries +=beneficiary.youth_female_18_24}


}, 100 );
},

Expand Down Expand Up @@ -273,7 +414,7 @@ angular.module( 'ngmReportHub' )
showFormInputs: function( beneficiary, form ) {
var display = false;
if ( beneficiary.activity_description_id ) {
if( !form.display_activity_detail ) {
if( !beneficiary.hasOwnProperty('display_activity_detail') || !form.display_activity_detail ) {
display = true;
}
if( beneficiary.activity_detail_id && form.display_activity_detail ) {
Expand Down
Empty file.
Loading