Skip to content

Commit 38b8d1c

Browse files
committed
changes
1 parent 1f1de25 commit 38b8d1c

3 files changed

Lines changed: 17 additions & 10 deletions

File tree

apps/api/prisma/seeders/anmeldungen.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,24 @@ async function create(prisma: PrismaClient, unterveranstaltung: Unterveranstaltu
3737
description: 'address created via db seeder',
3838
})
3939

40+
// Make sure the email isn't NOT based on the person's name
41+
const firstName = faker.person.firstName()
42+
const lastName = faker.person.lastName()
43+
const mail = faker.internet.email({ firstName, lastName })
44+
4045
const account = await prisma.account.create({
4146
data: {
42-
email: faker.internet.email(),
47+
email: mail,
4348
role: 'USER',
4449
activatedAt: new Date(),
4550
status: 'AKTIV',
4651
person: {
4752
create: {
48-
firstname: faker.person.firstName(),
49-
lastname: faker.person.lastName(),
53+
firstname: firstName,
54+
lastname: lastName,
5055
birthday: faker.date.birthdate({ min: 12, max: 30, mode: 'age' }),
5156
gender: faker.helpers.enumValue(Gender),
52-
email: faker.internet.email(),
57+
email: mail,
5358
telefon: faker.string.numeric('+49151########'),
5459
essgewohnheit: faker.helpers.enumValue(Essgewohnheit),
5560
nahrungsmittelIntoleranzen: faker.helpers.arrayElements(Object.values(NahrungsmittelIntoleranz)),

apps/frontend/src/components/BasicInputs/BasicTypeahead.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const props = withDefaults(
1919
strict?: InstanceType<typeof Typeahead>['strict']
2020
immediate?: InstanceType<typeof Typeahead>['immediate']
2121
debounceTime?: InstanceType<typeof Typeahead>['debounceTime']
22+
disabled?: InstanceType<typeof Typeahead>['disabled']
2223
}
2324
>(),
2425
{
@@ -50,6 +51,7 @@ const { model, errorMessage } = useValidationModel(props, emit)
5051
:sync="sync"
5152
:immediate="immediate"
5253
:placeholder="placeholder"
54+
:disabled="disabled"
5355
:name="name"
5456
:debounce-time="debounceTime"
5557
:strict="strict"

apps/frontend/src/components/forms/access/FormGliederungAccess.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ import { apiClient } from '@/api'
33
import BasicTypeahead from '@/components/BasicInputs/BasicTypeahead.vue'
44
import Button from '@/components/UIComponents/Button.vue'
55
import Loading from '@/components/UIComponents/Loading.vue'
6+
import type { RouterOutput } from '@codeanker/api'
67
import { ValidateForm } from '@codeanker/validation'
78
import { XMarkIcon } from '@heroicons/vue/24/outline'
89
import { useMutation, useQueryClient } from '@tanstack/vue-query'
910
import { ref } from 'vue'
1011
12+
type AccountTypeaheadResult = RouterOutput['account']['verwaltungList']['data'][number]
13+
type GliederungTypeaheadResult = RouterOutput['gliederung']['publicList'][number]
14+
1115
const input = ref<{
12-
account?: {
13-
id: string
14-
}
15-
gliederung?: {
16-
id: string
17-
}
16+
account?: AccountTypeaheadResult
17+
gliederung?: GliederungTypeaheadResult
1818
}>({})
1919
2020
async function queryObjectGliederungen(searchTerm) {

0 commit comments

Comments
 (0)