Copy-paste fix

ref #119
This commit is contained in:
Nicolai Ort 2021-04-03 19:58:24 +02:00
parent 2e3ac154be
commit 7488a8b597

View File

@ -1,7 +1,9 @@
<script>
import { _ } from "svelte-i18n";
import {
DonationService
DonationService,
RunnerTeamService,
RunnerOrganizationService
} from "@odit/lfk-client-js";
import Toastify from "toastify-js";
export let certificates_show = false;
@ -89,17 +91,17 @@
duration: -1,
}).showToast();
let count = 0;
const current_cards = await RunnerCardService.runnerCardControllerGetAll();
const current_donations = await DonationService.donationControllerGetAll();
for (const t of generate_teams) {
const runners = await RunnerTeamService.runnerTeamControllerGetRunners(
t.id
);
const current_donations = await DonationService.donationControllerGetAll();
);
let certificateRunners = [];
for (let runner of generate_runners) {
for (let runner of runners) {
runner.distanceDonations = current_donations.find((d) => d.runner?.id == runner.id) || [];
certificateRunners.push(runner);
}
console.log(certificateRunners)
fetch(
`${config.baseurl}/documents/cards?locale=${locale}&download=true&key=${config.documentserver_key}`,
{
@ -158,7 +160,7 @@
o.id
);
let certificateRunners = [];
for (let runner of generate_runners) {
for (let runner of runners) {
runner.distanceDonations = current_donations.find((d) => d.runner?.id == runner.id) || [];
certificateRunners.push(runner);
}