diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 index 6418df5fc..dd3de4dbb --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ npm-debug.log .DS_Store package-lock.json +/nbproject/private/ \ No newline at end of file diff --git a/app/images/404.gif b/app/images/404.gif old mode 100644 new mode 100755 diff --git a/app/images/cluster/dtm-col.jpg b/app/images/cluster/dtm-col.jpg old mode 100644 new mode 100755 diff --git a/app/images/cluster/groups.jpg b/app/images/cluster/groups.jpg old mode 100644 new mode 100755 diff --git a/app/images/cluster/groups_01.jpg b/app/images/cluster/groups_01.jpg old mode 100644 new mode 100755 diff --git a/app/images/cluster/projects-AF17.jpg b/app/images/cluster/projects-AF17.jpg old mode 100644 new mode 100755 diff --git a/app/images/cluster/projects-CB.jpg b/app/images/cluster/projects-CB.jpg old mode 100644 new mode 100755 diff --git a/app/images/cluster/projects-CBv1.jpg b/app/images/cluster/projects-CBv1.jpg old mode 100644 new mode 100755 diff --git a/app/images/cluster/projects-COL.jpg b/app/images/cluster/projects-COL.jpg old mode 100644 new mode 100755 diff --git a/app/images/docm.png b/app/images/docm.png old mode 100644 new mode 100755 diff --git a/app/images/docxm.png b/app/images/docxm.png old mode 100644 new mode 100755 diff --git a/app/images/elsedoc.png b/app/images/elsedoc.png old mode 100644 new mode 100755 diff --git a/app/images/en.png b/app/images/en.png old mode 100644 new mode 100755 diff --git a/app/images/immap/pfitzgerald.jpg b/app/images/immap/pfitzgerald.jpg old mode 100644 new mode 100755 diff --git a/app/images/logo-child_protection.png b/app/images/logo-child_protection.png new file mode 100755 index 000000000..cb70048f4 Binary files /dev/null and b/app/images/logo-child_protection.png differ diff --git a/app/images/logo-cp.png b/app/images/logo-cp.png old mode 100644 new mode 100755 diff --git a/app/images/logo-fss.png b/app/images/logo-fss.png old mode 100644 new mode 100755 diff --git a/app/images/logo-san.png b/app/images/logo-san.png old mode 100644 new mode 100755 diff --git a/app/images/logo-smsd.png b/app/images/logo-smsd.png old mode 100644 new mode 100755 diff --git a/app/images/mp4m.png b/app/images/mp4m.png old mode 100644 new mode 100755 diff --git a/app/images/pdfm.png b/app/images/pdfm.png old mode 100644 new mode 100755 diff --git a/app/images/ppt.png b/app/images/ppt.png old mode 100644 new mode 100755 diff --git a/app/images/snapshots/reporthub/exports/afg_3w.png b/app/images/snapshots/reporthub/exports/afg_3w.png old mode 100644 new mode 100755 diff --git a/app/images/spain.png b/app/images/spain.png old mode 100644 new mode 100755 diff --git a/app/images/txtm.png b/app/images/txtm.png old mode 100644 new mode 100755 diff --git a/app/images/xls.png b/app/images/xls.png old mode 100644 new mode 100755 diff --git a/app/images/xlsx.png b/app/images/xlsx.png old mode 100644 new mode 100755 diff --git a/app/images/zipm.png b/app/images/zipm.png old mode 100644 new mode 100755 diff --git a/app/scripts/app/controllers/admin/controller.authentication.js b/app/scripts/app/controllers/admin/controller.authentication.js index f7e40c588..6489cc5d1 100755 --- a/app/scripts/app/controllers/admin/controller.authentication.js +++ b/app/scripts/app/controllers/admin/controller.authentication.js @@ -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' } } }, diff --git a/app/scripts/app/directives/materialize.select.js b/app/scripts/app/directives/materialize.select.js old mode 100644 new mode 100755 diff --git a/app/scripts/app/translate/locale-en.json b/app/scripts/app/translate/locale-en.json index 5d0892c25..f1957cbd5 100755 --- a/app/scripts/app/translate/locale-en.json +++ b/app/scripts/app/translate/locale-en.json @@ -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", @@ -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", diff --git a/app/scripts/modules/cluster/dashboards/dashboard.4wprojectplan.js b/app/scripts/modules/cluster/dashboards/dashboard.4wprojectplan.js old mode 100644 new mode 100755 diff --git a/app/scripts/modules/cluster/reports/controllers/cluster.project.report.js b/app/scripts/modules/cluster/reports/controllers/cluster.project.report.js index f3f85b4e0..cca49a130 100755 --- a/app/scripts/modules/cluster/reports/controllers/cluster.project.report.js +++ b/app/scripts/modules/cluster/reports/controllers/cluster.project.report.js @@ -29,7 +29,7 @@ angular.module('ngmReportHub') // empty Project $scope.report = { - + test: 'Hey yo', // parent ngm: $scope.$parent.ngm, diff --git a/app/scripts/modules/cluster/reports/services/CB/ngmCbBeneficiaries.js b/app/scripts/modules/cluster/reports/services/CB/ngmCbBeneficiaries.js old mode 100644 new mode 100755 diff --git a/app/scripts/modules/cluster/reports/services/CB/ngmCbLocations.js b/app/scripts/modules/cluster/reports/services/CB/ngmCbLocations.js old mode 100644 new mode 100755 diff --git a/app/scripts/modules/cluster/reports/services/ngmClusterBeneficiaries.js b/app/scripts/modules/cluster/reports/services/ngmClusterBeneficiaries.js index da7e1f0fa..3ffc07cf2 100755 --- a/app/scripts/modules/cluster/reports/services/ngmClusterBeneficiaries.js +++ b/app/scripts/modules/cluster/reports/services/ngmClusterBeneficiaries.js @@ -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:[[]], @@ -26,7 +139,8 @@ angular.module( 'ngmReportHub' ) 'strategic_objective_description', 'sector_objective_id', 'sector_objective_name', - 'sector_objective_description' + 'sector_objective_description', + 'templatesUrl' ], defaults: { @@ -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, + + 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: '', @@ -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 ); }, @@ -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 ) { diff --git a/app/scripts/modules/cluster/reports/services/ngmClusterDocument.js b/app/scripts/modules/cluster/reports/services/ngmClusterDocument.js old mode 100644 new mode 100755 diff --git a/app/scripts/modules/cluster/reports/services/ngmClusterLists.js b/app/scripts/modules/cluster/reports/services/ngmClusterLists.js index 963e489c8..b84882b93 100755 --- a/app/scripts/modules/cluster/reports/services/ngmClusterLists.js +++ b/app/scripts/modules/cluster/reports/services/ngmClusterLists.js @@ -18,7 +18,7 @@ angular.module( 'ngmReportHub' ) var ngmClusterLists = { // comphrensive list of all sectors - ever - all_sectors: [ 'cvwg','agriculture','cccm_esnfi','cwcwg','coordination','education','eiewg','emergency_telecommunications','esnfi','fsac','fss','health','logistics','smsd','nutrition','protection','rnr_chapter','wash' ], + all_sectors: [ 'cvwg','agriculture','cccm_esnfi','cwcwg','coordination','education','eiewg','emergency_telecommunications','esnfi','fsac','fss','health','logistics','smsd','nutrition','protection','rnr_chapter','wash','child_protection' ], all_sectors_minus_smsd: [ 'cvwg','agriculture','cccm_esnfi','cwcwg','coordination','education','eiewg','emergency_telecommunications','esnfi','fsac','fss','health','logistics','nutrition','protection','rnr_chapter','wash' ], all_sectors_minus_health: [ 'cvwg','agriculture','cccm_esnfi','cwcwg','coordination','education','eiewg','emergency_telecommunications','esnfi','fsac','fss','logistics','smsd','nutrition','protection','rnr_chapter','wash' ], all_sectors_minus_health_smsd: [ 'cvwg','agriculture','cccm_esnfi','cwcwg','coordination','education','eiewg','emergency_telecommunications','esnfi','fsac','fss','logistics','nutrition','protection','rnr_chapter','wash' ], @@ -27,6 +27,8 @@ angular.module( 'ngmReportHub' ) all_sectors_minus_wash_health_smsd: [ 'cvwg','agriculture','cccm_esnfi','cwcwg','coordination','education','eiewg','emergency_telecommunications','esnfi','fsac','fss','logistics','nutrition','protection','rnr_chapter' ], all_sectors_minus_wash_education: [ 'cvwg','agriculture','cccm_esnfi','cwcwg','coordination','eiewg','emergency_telecommunications','esnfi','fsac','fss','health','logistics','smsd','nutrition','protection','rnr_chapter' ], all_sectors_col: ['smsd','education','alojamientos_asentamientos','san','health','recuperacion_temprana','protection','wash','ningún_cluster','coordinación_información'], + all_sectors_minus_education: [ 'cvwg','agriculture','cccm_esnfi','cwcwg','coordination','eiewg','emergency_telecommunications','esnfi','fsac','fss','health','logistics','smsd','nutrition','protection','rnr_chapter','wash','child_protection' ], + // lists ( project, mpc transfers ) @@ -37,7 +39,7 @@ angular.module( 'ngmReportHub' ) // lists units: ngmClusterLists.getUnits( project.admin0pcode ), indicators: ngmClusterLists.getIndicators( true ), - delivery_types: ngmClusterLists.getDeliveryTypes( project.admin0pcode ), + delivery_types: ngmClusterLists.getDeliveryTypes( project.admin0pcode, project.cluster_id ), mpc_purpose: ngmClusterLists.getMpcPurpose(), // mpc_delivery_type: ngmClusterLists.getMpcDeliveryTypes(project.admin0pcode), @@ -315,7 +317,7 @@ angular.module( 'ngmReportHub' ) }, // delivery - getDeliveryTypes: function( admin0pcode ) { + getDeliveryTypes: function( admin0pcode, cluster_id ) { var delivery = []; @@ -364,14 +366,26 @@ angular.module( 'ngmReportHub' ) }]; } else if ( admin0pcode === 'NG' ) { + if(cluster_id === 'child_protection'){ + delivery = [{ + delivery_type_id: 'disabled', + delivery_type_name: 'Disabled' + },{ + delivery_type_id: 'not_disabled', + delivery_type_name: 'Not Disabled' + }]; + }else{ + delivery = [{ + delivery_type_id: 'completed', + delivery_type_name: 'Completed' + },{ + delivery_type_id: 'planned', + delivery_type_name: 'Planned' + }]; - delivery = [{ - delivery_type_id: 'completed', - delivery_type_name: 'Completed' - },{ - delivery_type_id: 'planned', - delivery_type_name: 'Planned' - }]; + } + + } else { @@ -662,6 +676,9 @@ angular.module( 'ngmReportHub' ) },{ cluster_id: 'wash', cluster: 'WASH' + },{ + cluster_id: 'child_protection', + cluster: 'Child Protection' }]; } else if ( admin0pcode.toLowerCase() === 'col' ) { @@ -3928,56 +3945,116 @@ angular.module( 'ngmReportHub' ) // include for NG if ( admin0pcode === 'NG' ) { - donors = [ - { project_donor_id: "africa_development_bank", project_donor_name:"African Development Bank" }, - { project_donor_id: "australian_high_commission", project_donor_name:"Australian High Commission" }, - { project_donor_id: "british_high_commission", project_donor_name:"British High Commission" }, - { project_donor_id: "central_emergency_response_fund", project_donor_name:"Central Emergency Response Fund" }, - { project_donor_id: "cjk", project_donor_name:"CJK" }, - { project_donor_id: "danish_international_development_agency", project_donor_name:"Danish International Development Agency" }, - { project_donor_id: "ukaid", project_donor_name:"Department for International Development (UKAID)" }, - { project_donor_id: "dgd_belgium_fund", project_donor_name:"DGD Belgium Fund" }, - { project_donor_id: "disability_rights_fund", project_donor_name:"Disability Rights Fund" }, - { project_donor_id: "dutch_cooperating_aid_agencies", project_donor_name:"Dutch Cooperating Aid Agencies" }, - { project_donor_id: "dutch_relief_alliance", project_donor_name:"Dutch Relief Alliance" }, - { project_donor_id: "embassy_denmark", project_donor_name:"Embassy of Denmark" }, - { project_donor_id: "embassy_finland", project_donor_name:"Embassy of Finland" }, - { project_donor_id: "embassy_france", project_donor_name:"Embassy of France" }, - { project_donor_id: "embassy_israel", project_donor_name:"Embassy of Israel" }, - { project_donor_id: "embassy_japan", project_donor_name:"Embassy of Japan" }, - { project_donor_id: "embassy_poland", project_donor_name:"Embassy of Poland" }, - { project_donor_id: "embassy_sweden", project_donor_name:"Embassy of Sweden" }, - { project_donor_id: "embassy_switzerland", project_donor_name:"Embassy of Switzerland" }, - { project_donor_id: "embassy_kingdom_of_netherlands", project_donor_name:"Embassy of the Kingdom of Netherlands" }, - { project_donor_id: "europe_aid", project_donor_name:"EuropeAid" }, - { project_donor_id: "european_commission", project_donor_name:"European Commission" }, - { project_donor_id: "european_commissioner_for_humanitarian_aid_and_civil_protection", project_donor_name:"European Commissioner for Humanitarian Aid and Civil Protection (ECHO)" }, - { project_donor_id: "european_union", project_donor_name:"European Union" }, - { project_donor_id: "french_ministry_of_foreign_affairs", project_donor_name:"French Ministry of Foreign Affairs" }, - { project_donor_id: "german_federal_foreign_office", project_donor_name:"German Federal Foreign Office" }, - { project_donor_id: "global_affairs_canada", project_donor_name:"Global Affairs Canada" }, - { project_donor_id: "global_fund", project_donor_name:"Global Fund" }, - { project_donor_id: "global_fund_for_women", project_donor_name:"Global Fund for Women" }, - { project_donor_id: "global_fund_observer", project_donor_name:"Global Fund Observer" }, - { project_donor_id: "high_comission_of_canda", project_donor_name:"High Commission of Canada" }, - { project_donor_id: "irish_aid", project_donor_name:"Irish Aid" }, - { project_donor_id: "italian_agency_for_cooperation_and_development", project_donor_name:"Italian Agency for Cooperation and Development" }, - { project_donor_id: "japan_international_cooperation_agency", project_donor_name:"Japan International Cooperation Agency" }, - { project_donor_id: "letsai", project_donor_name:"LETSAI" }, - { project_donor_id: "nigerian_humanitarian_fund", project_donor_name:"Nigerian Humanitarian Fund" }, - { project_donor_id: "norwegian_ministry_of_foreign_affairs", project_donor_name:"Norwegian Ministry of Foreign Affairs" }, - { project_donor_id: "office_of_us_disaster_assistance", project_donor_name:"Office of US Disaster Assistance" }, - { project_donor_id: "plan_international_candaa", project_donor_name:"Plan International Canada" }, - { project_donor_id: "private_donor", project_donor_name:"Private Donor" }, - { project_donor_id: "royal_norwegian_embassy", project_donor_name:"Royal Norwegian Embassy" }, - { project_donor_id: "sv", project_donor_name:"SV" }, - { project_donor_id: "swedish_international_development_cooperation_agency", project_donor_name:"Swedish International Development Cooperation Agency" }, - { project_donor_id: "swiss_embassy", project_donor_name:"Swiss Embassy" }, - { project_donor_id: "swiss_solidarity", project_donor_name:"Swiss Solidarity" }, - { project_donor_id: "united_nations_childrens_fund", project_donor_name:"United Nations Children's Fund" }, - { project_donor_id: "usaid", project_donor_name:"United States Agency for International Development" }, - { project_donor_id: "us_ofda", project_donor_name:"United States Office of Foreign Disaster Assistance" } + if( cluster_id === 'education' ){ + donors = [ + {project_donor_id: "adb",project_donor_name: "African Development Bank"}, + {project_donor_id: "austrialian_hc",project_donor_name: "Australian High Commission"}, + {project_donor_id: "british_hc",project_donor_name: "British High Commission"}, + {project_donor_id: "cerf",project_donor_name: "Central Emergency Response Fund"}, + {project_donor_id: "danida",project_donor_name: "Danish International Development Agency"}, + {project_donor_id: "dfid",project_donor_name: "Department for International Development"}, + {project_donor_id: "giz",project_donor_name: "Deutsche Gesellschaft für Internationale Zusammenarbeit"}, + {project_donor_id: "drf",project_donor_name: "Disability Rights Fund"}, + {project_donor_id: "ecw",project_donor_name: "Education Cannot Wait"}, + {project_donor_id: "e_belgium",project_donor_name: "Embassy of Belgium"}, + {project_donor_id: "e_china",project_donor_name: "Embassy of China"}, + {project_donor_id: "e_denmark",project_donor_name: "Embassy of Denmark"}, + {project_donor_id: "e_finland",project_donor_name: "Embassy of Finland"}, + {project_donor_id: "e_france",project_donor_name: "Embassy of France"}, + {project_donor_id: "e_germany",project_donor_name: "Embassy of Germany"}, + {project_donor_id: "e_ireland",project_donor_name: "Embassy of Ireland"}, + {project_donor_id: "e_israel",project_donor_name: "Embassy of Israel"}, + {project_donor_id: "e_poland",project_donor_name: "Embassy of Poland"}, + {project_donor_id: "e_sweden",project_donor_name: "Embassy of Sweden"}, + {project_donor_id: "e_switzerland",project_donor_name: "Embassy of Switzerland"}, + {project_donor_id: "e_netherlands",project_donor_name: "Embassy of the Kingdom of Netherlands"}, + {project_donor_id: "echo",project_donor_name: "European Community Humanitarian aid Office"}, + {project_donor_id: "eu",project_donor_name: "European Union"}, + {project_donor_id: "fgn",project_donor_name: "Federal Government of Nigeria"}, + {project_donor_id: "gf",project_donor_name: "Gates Foundation"}, + {project_donor_id: "gffo",project_donor_name: "Germany Federal Foreign Office"}, + {project_donor_id: "gac",project_donor_name: "Global Affairs Canada"}, + {project_donor_id: "gfo",project_donor_name: "Global Fund Observer"}, + {project_donor_id: "hc_canada",project_donor_name: "High Commission of Canada"}, + {project_donor_id: "irishaid",project_donor_name: "Irish Aid"}, + {project_donor_id: "aics",project_donor_name: "Italian Agency for Cooperation and Development"}, + {project_donor_id: "jica",project_donor_name: "Japan International Cooperation Agency"}, + {project_donor_id: "e_japan",project_donor_name: "Japaneese Embassy"}, + {project_donor_id: "kfw",project_donor_name: "Kreditanstalt für Wiederaufbau (KfW)"}, + {project_donor_id: "luxembourg",project_donor_name: "Luxembourg Government"}, + {project_donor_id: "mf",project_donor_name: "Malala Fund"}, + {project_donor_id: "nhf",project_donor_name: "Nigeria Humanitarian Fund"}, + {project_donor_id: "ng",project_donor_name: "Nigerian Government"}, + {project_donor_id: "normfa",project_donor_name: "Norwegian Ministry of Foreign Affairs"}, + {project_donor_id: "norad",project_donor_name: "Norweigian Agency for Development Cooperation"}, + {project_donor_id: "ofda",project_donor_name: "Office of US Disaster Assistance"}, + {project_donor_id: "pri",project_donor_name: "Private Individual"}, + {project_donor_id: "pro",project_donor_name: "Private Organization"}, + {project_donor_id: "e_norway",project_donor_name: "Royal Norwegian Embassy"}, + {project_donor_id: "sf",project_donor_name: "Self-Funding"}, + {project_donor_id: "sida",project_donor_name: "Swedish International Development Agency"}, + {project_donor_id: "e_swiss",project_donor_name: "Swiss Embassy"}, + {project_donor_id: "ss",project_donor_name: "Swiss Solidarity"}, + {project_donor_id: "unicef",project_donor_name: "United Nations Children's Fund"}, + {project_donor_id: "usaid",project_donor_name: "United States Agency for International Development"}, + {project_donor_id: "us_embassy",project_donor_name: "United States of America"}, + {project_donor_id: "vsf",project_donor_name: "Victims Support Fund"}, + {project_donor_id: "wb",project_donor_name: "World Bank"} ]; + } else { + donors = [ + { project_donor_id: "africa_development_bank", project_donor_name:"African Development Bank" }, + { project_donor_id: "australian_high_commission", project_donor_name:"Australian High Commission" }, + { project_donor_id: "british_high_commission", project_donor_name:"British High Commission" }, + { project_donor_id: "central_emergency_response_fund", project_donor_name:"Central Emergency Response Fund" }, + { project_donor_id: "cjk", project_donor_name:"CJK" }, + { project_donor_id: "danish_international_development_agency", project_donor_name:"Danish International Development Agency" }, + { project_donor_id: "ukaid", project_donor_name:"Department for International Development (UKAID)" }, + { project_donor_id: "dgd_belgium_fund", project_donor_name:"DGD Belgium Fund" }, + { project_donor_id: "disability_rights_fund", project_donor_name:"Disability Rights Fund" }, + { project_donor_id: "dutch_cooperating_aid_agencies", project_donor_name:"Dutch Cooperating Aid Agencies" }, + { project_donor_id: "dutch_relief_alliance", project_donor_name:"Dutch Relief Alliance" }, + { project_donor_id: "embassy_denmark", project_donor_name:"Embassy of Denmark" }, + { project_donor_id: "embassy_finland", project_donor_name:"Embassy of Finland" }, + { project_donor_id: "embassy_france", project_donor_name:"Embassy of France" }, + { project_donor_id: "embassy_israel", project_donor_name:"Embassy of Israel" }, + { project_donor_id: "embassy_japan", project_donor_name:"Embassy of Japan" }, + { project_donor_id: "embassy_poland", project_donor_name:"Embassy of Poland" }, + { project_donor_id: "embassy_sweden", project_donor_name:"Embassy of Sweden" }, + { project_donor_id: "embassy_switzerland", project_donor_name:"Embassy of Switzerland" }, + { project_donor_id: "embassy_kingdom_of_netherlands", project_donor_name:"Embassy of the Kingdom of Netherlands" }, + { project_donor_id: "europe_aid", project_donor_name:"EuropeAid" }, + { project_donor_id: "european_commission", project_donor_name:"European Commission" }, + { project_donor_id: "european_commissioner_for_humanitarian_aid_and_civil_protection", project_donor_name:"European Commissioner for Humanitarian Aid and Civil Protection (ECHO)" }, + { project_donor_id: "european_union", project_donor_name:"European Union" }, + { project_donor_id: "french_ministry_of_foreign_affairs", project_donor_name:"French Ministry of Foreign Affairs" }, + { project_donor_id: "german_federal_foreign_office", project_donor_name:"German Federal Foreign Office" }, + { project_donor_id: "global_affairs_canada", project_donor_name:"Global Affairs Canada" }, + { project_donor_id: "global_fund", project_donor_name:"Global Fund" }, + { project_donor_id: "global_fund_for_women", project_donor_name:"Global Fund for Women" }, + { project_donor_id: "global_fund_observer", project_donor_name:"Global Fund Observer" }, + { project_donor_id: "high_comission_of_canda", project_donor_name:"High Commission of Canada" }, + { project_donor_id: "irish_aid", project_donor_name:"Irish Aid" }, + { project_donor_id: "italian_agency_for_cooperation_and_development", project_donor_name:"Italian Agency for Cooperation and Development" }, + { project_donor_id: "japan_international_cooperation_agency", project_donor_name:"Japan International Cooperation Agency" }, + { project_donor_id: "letsai", project_donor_name:"LETSAI" }, + { project_donor_id: "nigerian_humanitarian_fund", project_donor_name:"Nigerian Humanitarian Fund" }, + { project_donor_id: "norwegian_ministry_of_foreign_affairs", project_donor_name:"Norwegian Ministry of Foreign Affairs" }, + { project_donor_id: "office_of_us_disaster_assistance", project_donor_name:"Office of US Disaster Assistance" }, + { project_donor_id: "plan_international_candaa", project_donor_name:"Plan International Canada" }, + { project_donor_id: "private_donor", project_donor_name:"Private Donor" }, + { project_donor_id: "royal_norwegian_embassy", project_donor_name:"Royal Norwegian Embassy" }, + { project_donor_id: "sv", project_donor_name:"SV" }, + { project_donor_id: "swedish_international_development_cooperation_agency", project_donor_name:"Swedish International Development Cooperation Agency" }, + { project_donor_id: "swiss_embassy", project_donor_name:"Swiss Embassy" }, + { project_donor_id: "swiss_solidarity", project_donor_name:"Swiss Solidarity" }, + { project_donor_id: "united_nations_childrens_fund", project_donor_name:"United Nations Children's Fund" }, + { project_donor_id: "usaid", project_donor_name:"United States Agency for International Development" }, + { project_donor_id: "us_ofda", project_donor_name:"United States Office of Foreign Disaster Assistance" }] + } + + + } // if no list use default @@ -5308,6 +5385,66 @@ angular.module( 'ngmReportHub' ) }]; } + function excludeSectors(exSectors){ + var clone = Object.assign([], ngmClusterLists.all_sectors); + exSectors.forEach(function(exSector){ + var index = clone.indexOf(exSector); + if (index > -1) { + clone.splice(index, 1); + } + }); + return clone; + } + //admin NG + if( admin0pcode === 'NG' ){ + beneficiaries = [{ + cluster_id: excludeSectors(['child_protection']), + beneficiary_type_id: 'idps', + beneficiary_type_name: 'IDPs' + },{ + cluster_id: excludeSectors(['education','child_protection']), + beneficiary_type_id: 'drought_idps', + beneficiary_type_name: 'Drought IDPs' + },{ + cluster_id: excludeSectors(['education','child_protection']), + beneficiary_type_id: 'flood_idps', + beneficiary_type_name: 'Flood IDPs' + },{ + cluster_id: excludeSectors(['education','child_protection']), + beneficiary_type_id: 'natural_disaster_idps', + beneficiary_type_name: 'Natural Disaster IDPs' + },{ + cluster_id: excludeSectors(['education','child_protection']), + beneficiary_type_id: 'conflict_idps', + beneficiary_type_name: 'Conflict IDPs' + },{ + cluster_id: excludeSectors(['education','child_protection']), + beneficiary_type_id: 'refugees', + beneficiary_type_name: 'Refugees' + },{ + cluster_id: ngmClusterLists.all_sectors, + beneficiary_type_id: 'returnees', + beneficiary_type_name: 'Returnees' + },{ + cluster_id: ngmClusterLists.all_sectors, + beneficiary_type_id: 'host_communities', + beneficiary_type_name: 'Host Communities' + },{ + cluster_id: excludeSectors(['education','child_protection']), + beneficiary_type_id: 'stakeholders', + beneficiary_type_name: 'Stakeholders' + },{ + cluster_id: excludeSectors(['education','wash']), + beneficiary_type_id: 'idps_in_host_communities', + beneficiary_type_name: 'IDPs in Host Communities' + },{ + cluster_id: excludeSectors(['education','wash']), + beneficiary_type_id: 'idps_in_camps', + beneficiary_type_name: 'IDPs in Camps' + } + ] + } + // admin COL if ( admin0pcode === 'COL' ) { diff --git a/app/scripts/modules/cluster/views/forms/details/project-upload.html b/app/scripts/modules/cluster/views/forms/details/project-upload.html old mode 100644 new mode 100755 diff --git a/app/scripts/modules/cluster/views/forms/details/target-beneficiaries/target-beneficiaries.html b/app/scripts/modules/cluster/views/forms/details/target-beneficiaries/target-beneficiaries.html index 3daf0c216..8a99d6ee6 100755 --- a/app/scripts/modules/cluster/views/forms/details/target-beneficiaries/target-beneficiaries.html +++ b/app/scripts/modules/cluster/views/forms/details/target-beneficiaries/target-beneficiaries.html @@ -683,278 +683,350 @@
- -
+ + +
- - + +
- - + +
- - + +
- - + +
- - + +
- - + +
-
+
- -
+ +
- - + +
- - + +
- - + +
- - + +
- - + +
- - + +
-
- - +
- -
+ +
- - - + + +
- - - + + +
- - - + + +
- - - + + + +
-
+ +
+ + +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+
- -
+ +
@@ -964,8 +1036,9 @@
class="validate" min="0" ng-model="beneficiary.boys" - ng-change="ngmClusterBeneficiaries.updateBeneficiaires( beneficiary );" - ng-disabled="project.definition.project_status === 'complete' || !ngmClusterBeneficiaries.form[ 0 ][ $index ][ 'boys' ]" + ng-change="ngmClusterBeneficiaries.updateBeneficiaires( beneficiary ); + ngmClusterBeneficiaries.inputChange( 'ngm-boys-{{ $index }}' );" + ng-disabled="project.definition.project_status === 'complete' || project.report.report_status === 'complete' || !ngmClusterBeneficiaries.form[0][$index][ 'boys' ]" required />
@@ -977,8 +1050,9 @@
class="validate" min="0" ng-model="beneficiary.girls" - ng-change="ngmClusterBeneficiaries.updateBeneficiaires( beneficiary );" - ng-disabled="project.definition.project_status === 'complete' || !ngmClusterBeneficiaries.form[ 0 ][ $index ][ 'girls' ]" + ng-change="ngmClusterBeneficiaries.updateBeneficiaires( beneficiary ); + ngmClusterBeneficiaries.inputChange( 'ngm-girls-{{ $index }}' );" + ng-disabled="project.definition.project_status === 'complete' || project.report.report_status === 'complete' || !ngmClusterBeneficiaries.form[0][$index][ 'girls' ]" required />
@@ -990,8 +1064,9 @@
class="validate" min="0" ng-model="beneficiary.men" - ng-change="ngmClusterBeneficiaries.updateBeneficiaires( beneficiary );" - ng-disabled="project.definition.project_status === 'complete' || !ngmClusterBeneficiaries.form[ 0 ][ $index ][ 'men' ]" + ng-change="ngmClusterBeneficiaries.updateBeneficiaires( beneficiary ); + ngmClusterBeneficiaries.inputChange( 'ngm-men-{{ $index }}' );" + ng-disabled="project.definition.project_status === 'complete' || project.report.report_status === 'complete' || !ngmClusterBeneficiaries.form[0][$index][ 'men' ]" required />
@@ -1003,39 +1078,258 @@
class="validate" min="0" ng-model="beneficiary.women" - ng-change="ngmClusterBeneficiaries.updateBeneficiaires( beneficiary );" - ng-disabled="project.definition.project_status === 'complete' || !ngmClusterBeneficiaries.form[ 0 ][ $index ][ 'women' ]" + ng-change="ngmClusterBeneficiaries.updateBeneficiaires( beneficiary ); + ngmClusterBeneficiaries.inputChange( 'ngm-women-{{ $index }}' );" + ng-disabled="project.definition.project_status === 'complete' || project.report.report_status === 'complete' || !ngmClusterBeneficiaries.form[0][$index][ 'women' ]" required /> - +
- - +
- +
- - +
+ +
+ + +
+ +
+ + +
+ + + + +
+ + +
+ + +
+ +
+ + +
+ +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + + + +
+ + +
+ + +
+ + +
+ +
+ + +
+ +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + + +
+ @@ -1080,12 +1374,15 @@
- +
diff --git a/app/scripts/modules/cluster/views/forms/details/target-locations/CB/locations.html b/app/scripts/modules/cluster/views/forms/details/target-locations/CB/locations.html old mode 100644 new mode 100755 diff --git a/app/scripts/modules/cluster/views/forms/financials/financials-COL.html b/app/scripts/modules/cluster/views/forms/financials/financials-COL.html old mode 100644 new mode 100755 diff --git a/app/scripts/modules/cluster/views/forms/report/beneficiaries/AF/assessment_fsac.html b/app/scripts/modules/cluster/views/forms/report/beneficiaries/AF/assessment_fsac.html old mode 100644 new mode 100755 diff --git a/app/scripts/modules/cluster/views/forms/report/beneficiaries/AF/assessment_fsac_absnumber_v2.html b/app/scripts/modules/cluster/views/forms/report/beneficiaries/AF/assessment_fsac_absnumber_v2.html old mode 100644 new mode 100755 diff --git a/app/scripts/modules/cluster/views/forms/report/beneficiaries/AF/fsac_percentage.html b/app/scripts/modules/cluster/views/forms/report/beneficiaries/AF/fsac_percentage.html old mode 100644 new mode 100755 diff --git a/app/scripts/modules/cluster/views/forms/report/beneficiaries/beneficiaries.html b/app/scripts/modules/cluster/views/forms/report/beneficiaries/beneficiaries.html index 565fe128d..e00d2fee4 100755 --- a/app/scripts/modules/cluster/views/forms/report/beneficiaries/beneficiaries.html +++ b/app/scripts/modules/cluster/views/forms/report/beneficiaries/beneficiaries.html @@ -1,4 +1,4 @@ -