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:
29
types/auth.d.ts
vendored
Normal file
29
types/auth.d.ts
vendored
Normal 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 {}
|
||||
Reference in New Issue
Block a user