@@ -46,6 +46,7 @@ const partyFormSchema = z.object({
4646 "Party must be at least 2 business days in the future"
4747 ) ,
4848 partyTime : z . string ( ) . min ( 1 , "Party time is required" ) ,
49+ secondContactName : z . string ( ) . min ( 1 , "Name is required" ) ,
4950 phoneNumber : z
5051 . string ( )
5152 . min ( 1 , "Phone number is required" )
@@ -160,9 +161,8 @@ export default function PartyRegistrationForm({
160161 < Button
161162 id = "party-date"
162163 variant = "outline"
163- className = { `w-full justify-start text-left font-normal ${
164- ! formData . partyDate && "text-muted-foreground"
165- } `}
164+ className = { `w-full justify-start text-left font-normal ${ ! formData . partyDate && "text-muted-foreground"
165+ } `}
166166 >
167167 { formData . partyDate ? (
168168 format ( formData . partyDate , "PPP" )
@@ -206,8 +206,22 @@ export default function PartyRegistrationForm({
206206 </ Field >
207207 </ div >
208208
209+ < Field data-invalid = { ! ! errors . secondContactName } >
210+ < FieldLabel htmlFor = "second-contact-name" > Second Contact name</ FieldLabel >
211+ < Input
212+ id = "phone-number"
213+ placeholder = ""
214+ value = { formData . secondContactName }
215+ onChange = { ( e ) => updateField ( "secondContactName" , e . target . value ) }
216+ aria-invalid = { ! ! errors . secondContactName }
217+ />
218+ { errors . phoneNumber && (
219+ < FieldError > { errors . phoneNumber } </ FieldError >
220+ ) }
221+ </ Field >
222+
209223 < Field data-invalid = { ! ! errors . phoneNumber } >
210- < FieldLabel htmlFor = "phone-number" > Your Phone Number</ FieldLabel >
224+ < FieldLabel htmlFor = "phone-number" > Second Contact Phone Number</ FieldLabel >
211225 < Input
212226 id = "phone-number"
213227 placeholder = "(123) 456-7890"
@@ -216,7 +230,7 @@ export default function PartyRegistrationForm({
216230 aria-invalid = { ! ! errors . phoneNumber }
217231 />
218232 < FieldDescription >
219- We will use this to contact you about the party
233+ We will use this to contact Contact two about the party
220234 </ FieldDescription >
221235 { errors . phoneNumber && (
222236 < FieldError > { errors . phoneNumber } </ FieldError >
@@ -225,7 +239,7 @@ export default function PartyRegistrationForm({
225239
226240 < Field data-invalid = { ! ! errors . contactPreference } >
227241 < FieldLabel htmlFor = "contact-preference" >
228- Contact Preference
242+ Second Contact Contact Preference
229243 </ FieldLabel >
230244 < Select
231245 value = { formData . contactPreference }
@@ -241,7 +255,7 @@ export default function PartyRegistrationForm({
241255 < SelectItem value = "text" > Text</ SelectItem >
242256 </ SelectContent >
243257 </ Select >
244- < FieldDescription > How should we contact you ?</ FieldDescription >
258+ < FieldDescription > How should we contact the second contact ?</ FieldDescription >
245259 { errors . contactPreference && (
246260 < FieldError > { errors . contactPreference } </ FieldError >
247261 ) }
0 commit comments