Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix company page errors #146

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/routes/(user)/company/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export const actions: Actions = {
form
});
}

const address = form.data.address;
let bestAddressGuess: AddressGuess | undefined = undefined;
try {
Expand Down
1 change: 1 addition & 0 deletions src/routes/(user)/company/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
</select>
<ChevronDown class="absolute right-3 top-2.5 size-4 opacity-50" />
</div>
<Form.FieldErrors />
</Form.Control>
</Form.Field>
<Form.Field {form} name="community">
Expand Down
4 changes: 2 additions & 2 deletions src/routes/(user)/company/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ export const formSchema = z.object({
.min(2, { message: 'Die Eingabe muss mindestens 2 Zeichen enthalten.' })
.max(50, { message: 'Die Eingabe darf höchstens 50 Zeichen enthalen.' }),
address: z.string().min(2, { message: 'Die Eingabe muss mindestens 2 Zeichen enthalten.' }),
zone: z.number(),
community: z.number()
zone: z.number().gt(0, { message: 'Es muss ein Pflichtfahrgebiet ausgewählt werden.' }),
community: z.number().gt(0, { message: 'Es muss eine Gemeinde ausgewählt werden.' })
});

export type FormSchema = typeof formSchema;