1234567891011121314151617181920212223242526272829303132 |
- {#await gruppe}
- {:then gruppeP}
- <pre>
- {#each gruppeP as s}
- <br>b{s.ID},{s.Name},{s.Vorname},{s.Klasse.slice(0, -1)},{h(s.ID)}
- {/each}
- </pre>
- {/await}
- <script>
- import Hashids from 'hashids'
- const hashids = new Hashids('schild.report hashing salt', 8, 'abcdefghkmnpqrstuvwxyz23456789')
- function h (id) { return hashids.encode(id) }
- export default {
- computed: {
- gruppe: async ({schueler, knexConfig}) => {
- const Schueler = await R.models.Schueler
- const knex = await R.knex(knexConfig)
- Schueler.knex(knex)
- return Schueler.query()
- .where('Status', '2')
- .andWhere('Geloescht', '-')
- .andWhere('Gesperrt', '-')
- .select('ID', 'Name', 'Vorname', 'Klasse')
- .orderBy('Klasse')
- .orderBy('Name')
- }
- },
- helpers: { h },
- }
- </script>
|