Fixed donations getting reduced to the first one on certificates
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			This commit is contained in:
		@@ -40,7 +40,8 @@
 | 
				
			|||||||
        const current_donations = (await DonationService.donationControllerGetAll()) || [];
 | 
					        const current_donations = (await DonationService.donationControllerGetAll()) || [];
 | 
				
			||||||
        let certificateRunners = [];
 | 
					        let certificateRunners = [];
 | 
				
			||||||
        for (let runner of generate_runners) {
 | 
					        for (let runner of generate_runners) {
 | 
				
			||||||
            runner.distanceDonations = current_donations.find((d) => d.runner?.id == runner.id) || [];
 | 
					            runner.distanceDonations = current_donations.filter((d) => d.runner?.id == runner.id) || [];
 | 
				
			||||||
 | 
					            console.log(runner.distanceDonations)
 | 
				
			||||||
            certificateRunners.push(runner);
 | 
					            certificateRunners.push(runner);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        fetch(
 | 
					        fetch(
 | 
				
			||||||
@@ -103,7 +104,7 @@
 | 
				
			|||||||
                );
 | 
					                );
 | 
				
			||||||
            let certificateRunners = [];
 | 
					            let certificateRunners = [];
 | 
				
			||||||
            for (let runner of runners) {
 | 
					            for (let runner of runners) {
 | 
				
			||||||
                runner.distanceDonations = current_donations.find((d) => d.runner?.id == runner.id) || [];
 | 
					                runner.distanceDonations = current_donations.filter((d) => d.runner?.id == runner.id) || [];
 | 
				
			||||||
                certificateRunners.push(runner);
 | 
					                certificateRunners.push(runner);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            fetch(
 | 
					            fetch(
 | 
				
			||||||
@@ -166,7 +167,7 @@
 | 
				
			|||||||
            let runners = await RunnerOrganizationService.runnerOrganizationControllerGetRunners(o.id, true)
 | 
					            let runners = await RunnerOrganizationService.runnerOrganizationControllerGetRunners(o.id, true)
 | 
				
			||||||
            let certificateRunners = [];
 | 
					            let certificateRunners = [];
 | 
				
			||||||
            for (let runner of runners) {
 | 
					            for (let runner of runners) {
 | 
				
			||||||
                runner.distanceDonations = current_donations.find((d) => d.runner?.id == runner.id) || [];
 | 
					                runner.distanceDonations = current_donations.filter((d) => d.runner?.id == runner.id) || [];
 | 
				
			||||||
                certificateRunners.push(runner);
 | 
					                certificateRunners.push(runner);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            await fetch(
 | 
					            await fetch(
 | 
				
			||||||
@@ -219,7 +220,7 @@
 | 
				
			|||||||
                );
 | 
					                );
 | 
				
			||||||
                let certificateRunners = [];
 | 
					                let certificateRunners = [];
 | 
				
			||||||
            for (let runner of runners) {
 | 
					            for (let runner of runners) {
 | 
				
			||||||
                runner.distanceDonations = current_donations.find((d) => d.runner?.id == runner.id) || [];
 | 
					                runner.distanceDonations = current_donations.filter((d) => d.runner?.id == runner.id) || [];
 | 
				
			||||||
                certificateRunners.push(runner);
 | 
					                certificateRunners.push(runner);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            await fetch(
 | 
					            await fetch(
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user