hmt 3 tahun lalu
induk
melakukan
623734dd3c
1 mengubah file dengan 11 tambahan dan 4 penghapusan
  1. 11 4
      components/teams.svelte

+ 11 - 4
components/teams.svelte

@@ -128,11 +128,18 @@
 <pre>
 {#each Object.entries(schueler) as [klasse, schueler]}
 {klasse}: {schueler.filter(s => s.konto).length}/{schueler.length} Anmeldungen
-{#each schueler as s}
-{#if s.konto}
+{#each schueler.filter(s=>s.konto) as s}
 {`b${s.id}@${privat.domain},${s.Name},${s.Vorname},${s.Vorname} ${s.Name},schueler,,,,,,,,Bielefeld,NW,,DE`}<br>
-{/if}
 {/each}
 {/each}
 </pre>
-{/if}
+<h3>Minderjährige</h3>
+<pre>
+{#each Object.entries(schueler) as [klasse, schueler]}
+{klasse}: {schueler.filter(s => s.alter?.years > 0 && s.alter?.years < 18).length}/{schueler.length} U18
+{#each schueler.filter(s => s.alter?.years > 0 && s.alter?.years < 18) as s}
+{`b${s.id}@${privat.domain},${s.Name},${s.Vorname},${s.Vorname} ${s.Name},schueler,,,,,,,,Bielefeld,NW,,DE`}<br>
+{/each}
+{/each}
+</pre>
+{/if}