in ngo-ui/src/app/ui/ngos-list/ngos-list.component.ts [73:99]
ngOnInit() {
this.ngoService.getNGOs().subscribe(data => {
this.ngolist = data;
this.ngolist.forEach(element => {
this.setRatings(element);
this.getNGOFundsDetails(element);
this.getNGOSpendData(element);
this.ngoMap.set(element.id, element);
});
this.selectedNGO = this.ngolist.length > 0 ? this.ngoMap.get(this.ngolist[0].id) : new Ngo();
setTimeout(() => {
const ngo_data = UtilsService.mapToJson(this.ngoMap);
SessionService.setValue('ngos', ngo_data);
}, 1000);
// set height dynimically
UtilsService.onHeightChange('.container-dynamic-height', 20);
},
err => {
console.error(err);
}
);
this.donateForm = this.formBuilder.group({
donationAmount: new FormControl('', [Validators.required])
});
}