-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_paedml Druckliste alle Förder.svelte
65 lines (63 loc) · 2.39 KB
/
_paedml Druckliste alle Förder.svelte
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{#if gruppe}
{#each Object.entries(_.groupBy(gruppe, 'Klasse')) as [klasse, schueler]}
{#each _.chunk(schueler, 6) as slice}
<div class="page" orientation="portrait" size="A4" style="font-family: sans; font-size: .98rem">
<div class="grid">
<b style="padding: 5px 0 0 5px">{klasse}</b>
{#each slice as s}
<div>
<table style="width: 80%; margin-bottom: 8px; margin-left: 30px">
<tr>
<td style="width: 60%"><b>{s.Name}, {s.Vorname}</b></td>
<td>Ihr Benutzername: k{s.ID}</td>
</tr>
<tr>
<td></td>
<td>Ihr Passwort: {h(s.ID)}</td>
</tr>
</table>
<div style="padding: 0 30px 0 30px;">
<b>Zugangsdaten zum Pädagogischen Netz des {privat.schulname} für das Schuljahr 2022/23</b>
<br>Bitte beachten Sie, mit der Verwendung der Zugangsdaten
bestätigen Sie, dass sie die Sie die Nutzungsordnung für das
pädagogische Netz gelesen und zugestimmt haben.
Zugang zu ihrer persönlichen BK-Seite haben Sie unter <b>{privat.meinbk}</b>.
Hier bekommen Sie auch einen persönlichen WLAN-Zugang. Heben Sie diesen Zettel das ganze Schuljahr über gut auf und machen Sie zur Sicherheit ein Foto davon.
</div>
</div>
<hr>
{/each}
</div>
</div>
{/each}
{/each}
{/if}
<style>
@import 'css/main.css';
.page {padding: 0;}
.grid {
display: grid;
grid-template-columns: repeat(1, 1fr);
grid-gap: 20px;
}
</style>
<script>
import Hashids from 'hashids'
const mysql = R('mysql')
export let knexConfig, privat, gruppe
if (!privat.paedml_salt) throw 'Kein Salt'
const hashids = new Hashids(privat.paedml_salt, 8, 'abcdefghkmnpqrstuvwxyz23456789')
const h = (id) => hashids.encode(id)
knexConfig.connection.database="schild_kbk"
const mysql_connection = mysql.createConnection(knexConfig.connection)
mysql_connection.connect()
mysql_connection.query(`SELECT ID, Name, Vorname, Klasse
FROM schueler
WHERE Status = 2 AND Geloescht = "-" AND Gesperrt = "-"
ORDER BY Klasse, Name ASC`,
(e, res) => {
console.log(e)
gruppe = res
})
const _ = R('lodash')
</script>