@@ -5,9 +5,11 @@ import { Form, Head, Link, usePage } from '@inertiajs/vue3';
55import DeleteUser from ' @/components/DeleteUser.vue' ;
66import HeadingSmall from ' @/components/HeadingSmall.vue' ;
77import InputError from ' @/components/InputError.vue' ;
8+ import Select from ' @/components/Select.vue' ;
89import { Button } from ' @/components/ui/button' ;
910import { Input } from ' @/components/ui/input' ;
1011import { Label } from ' @/components/ui/label' ;
12+ import { Textarea } from ' @/components/ui/textarea' ;
1113import AppLayout from ' @/layouts/AppLayout.vue' ;
1214import SettingsLayout from ' @/layouts/settings/Layout.vue' ;
1315import { type BreadcrumbItem } from ' @/types' ;
@@ -16,6 +18,7 @@ import { useSettingsRoutes } from '@/composables/useSettingsRoutes';
1618interface Props {
1719 mustVerifyEmail: boolean ;
1820 status? : string ;
21+ profile? : any ;
1922}
2023
2124defineProps <Props >();
@@ -25,6 +28,11 @@ const user = page.props.auth.user;
2528
2629const settingsRoutes = useSettingsRoutes ();
2730
31+ const genderOptions = [
32+ { value: ' male' , label: ' Male' },
33+ { value: ' female' , label: ' Female' },
34+ ];
35+
2836const breadcrumbItems: BreadcrumbItem [] = [
2937 {
3038 title: ' Profile settings' ,
@@ -58,12 +66,45 @@ const breadcrumbItems: BreadcrumbItem[] = [
5866 <InputError class =" mt-2" :message =" errors.email" />
5967 </div >
6068
69+ <div class =" grid gap-2" >
70+ <Label for =" address" >Address</Label >
71+ <Textarea id =" address" class =" mt-1 block w-full" name =" address"
72+ :default-value =" profile?.address" placeholder =" Your address" rows =" 3" />
73+ <InputError class =" mt-2" :message =" errors.address" />
74+ </div >
75+
76+ <!-- Two column grid for profile fields -->
77+ <div class =" grid grid-cols-1 md:grid-cols-2 gap-6" >
78+ <div class =" grid gap-2" >
79+ <Label for =" contact_number" >Contact Number</Label >
80+ <Input id =" contact_number" type =" tel" class =" mt-1 block w-full" name =" contact_number"
81+ :default-value =" profile?.contact_number" placeholder =" Your contact number" />
82+ <InputError class =" mt-2" :message =" errors.contact_number" />
83+ </div >
84+
85+ <div class =" grid gap-2" >
86+ <Label for =" gender" >Gender</Label >
87+ <Select id =" gender" class =" mt-1" name =" gender" :model-value =" profile?.gender"
88+ :options =" genderOptions" placeholder =" Select gender" />
89+ <InputError class =" mt-2" :message =" errors.gender" />
90+ </div >
91+ </div >
92+
93+ <div class =" grid grid-cols-1 md:grid-cols-2 gap-6" >
94+ <div class =" grid gap-2" >
95+ <Label for =" birth_date" >Birth Date</Label >
96+ <Input id =" birth_date" type =" date" class =" mt-1 block w-full" name =" birth_date"
97+ :default-value =" profile?.birth_date" placeholder =" Birth Date" />
98+ <InputError class =" mt-2" :message =" errors.birth_date" />
99+ </div >
100+ </div >
101+
61102 <div v-if =" mustVerifyEmail && !user.email_verified_at" >
62103 <p class =" -mt-4 text-sm text-muted-foreground" >
63104 Your email address is unverified.
64105 <Link :href =" send()" as =" button"
65106 class =" text-foreground underline decoration-neutral-300 underline-offset-4 transition-colors duration-300 ease-out hover:decoration-current! dark:decoration-neutral-500" >
66- Click here to resend the verification email.
107+ Click here to resend the verification email.
67108 </Link >
68109 </p >
69110
0 commit comments