Enhance CheckoutForm and Order components with user data integration

- Refactored CheckoutForm.vue to utilize an extended user type, incorporating additional address fields for improved user data handling.
- Updated OrderSummary.vue to conditionally display salutation based on user input.
- Standardized error alert styling across multiple pages, changing variant from 'destructive' to 'error' for consistency.
- Adjusted button styles in various components to align with the new 'experimenta' variant.

These changes aim to improve user experience by ensuring accurate data representation and consistent UI elements across the checkout and order processes.
This commit is contained in:
Bastian Masanek
2025-11-03 17:00:22 +01:00
parent 66ba95439d
commit 782bd6cdd7
8 changed files with 105 additions and 49 deletions

29
types/auth.d.ts vendored Normal file
View File

@@ -0,0 +1,29 @@
/**
* Type augmentation for nuxt-auth-utils UserSession
*
* Extends the User type with additional properties from our database schema
*/
declare module '#auth-utils' {
interface User {
id: string
experimentaId: string | null
email: string
firstName: string
lastName: string
salutation: 'male' | 'female' | 'other' | null
dateOfBirth: Date | string | null
street: string | null
postCode: string | null
city: string | null
countryCode: string | null
}
interface UserSession {
user: User
accessToken?: string
loggedInAt?: string
}
}
export {}