forked from CSC-4351-FL2024-Tuesday/Team4
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b7fdc76
commit 716e9b8
Showing
21 changed files
with
1,393 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 82 additions & 0 deletions
82
app/recruiter/registeration/additional/additional-form.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
"use client"; | ||
import React, { useState } from 'react'; | ||
import Link from 'next/link'; | ||
import {useFieldArray, useForm} from 'react-hook-form'; | ||
import {zodResolver} from '@hookform/resolvers/zod'; | ||
import {z} from 'zod'; | ||
import { toast } from '@/components/ui/use-toast'; | ||
import { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from '@/components/ui/form'; | ||
import { Input } from '@/components/ui/input'; | ||
import { cn } from '@/lib/utils'; | ||
import { Button } from '@/components/ui/button'; | ||
import { useRouter } from 'next/navigation'; | ||
|
||
const AdditionalFormSchema = z.object({ | ||
purpose: z | ||
.string() | ||
.optional() | ||
, | ||
hearAboutUs: z | ||
.string() | ||
.optional() | ||
, | ||
}); | ||
|
||
type AdditionalFormValues = z.infer<typeof AdditionalFormSchema>; | ||
|
||
function AdditionalForm() { | ||
|
||
const route = useRouter(); | ||
|
||
const form = useForm<AdditionalFormValues>({ | ||
resolver: zodResolver(AdditionalFormSchema), | ||
mode: 'onChange', | ||
}); | ||
|
||
function onSubmit() { | ||
route.push('/recruiter/registeration/contact'); | ||
} | ||
|
||
return ( | ||
<Form {...form}> | ||
<form onSubmit={form.handleSubmit(onSubmit)} className='space-y-8'> | ||
<FormField | ||
control={form.control} | ||
name = 'purpose' | ||
render={({ field }) => ( | ||
<FormItem> | ||
<FormLabel>What is your purpose of joining this platform</FormLabel> | ||
<FormControl> | ||
<Input placeholder='We want to make hiring process easier' {...field} /> | ||
</FormControl> | ||
<FormDescription> | ||
This is the purpose of your company joining this platform | ||
</FormDescription> | ||
<FormMessage/> | ||
</FormItem> | ||
)} | ||
/> | ||
|
||
<FormField | ||
control={form.control} | ||
name = 'hearAboutUs' | ||
render={({ field }) => ( | ||
<FormItem> | ||
<FormLabel>How did you hear about Us</FormLabel> | ||
<FormControl> | ||
<Input placeholder='Word of mouth in the market' {...field} /> | ||
</FormControl> | ||
<FormDescription> | ||
This is how you heard about us | ||
</FormDescription> | ||
<FormMessage/> | ||
</FormItem> | ||
)} | ||
/> | ||
<Button type="submit">Submit</Button> | ||
</form> | ||
</Form> | ||
); | ||
}; | ||
|
||
export default AdditionalForm; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Separator } from "@/components/ui/separator" | ||
import AdditionalForm from "./additional-form" | ||
|
||
export default function AdditionalFormPage() { | ||
return ( | ||
<div className="space-y-6"> | ||
<div> | ||
<h3 className="text-lg font-medium">Additional Information</h3> | ||
<p className="text-sm text-muted-foreground"> | ||
Enter Necessary Additional Information | ||
</p> | ||
</div> | ||
<Separator /> | ||
<AdditionalForm /> | ||
</div> | ||
) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
"use client" | ||
|
||
import Link from "next/link" | ||
import { usePathname } from "next/navigation" | ||
|
||
import { cn } from "@/lib/utils" | ||
import { buttonVariants } from "@/components/ui/button" | ||
|
||
interface SidebarNavProps extends React.HTMLAttributes<HTMLElement> { | ||
items: { | ||
href: string | ||
title: string | ||
}[] | ||
} | ||
|
||
export function SidebarNav({ className, items, ...props }: SidebarNavProps) { | ||
const pathname = usePathname() | ||
|
||
return ( | ||
<nav | ||
className={cn( | ||
"flex space-x-2 lg:flex-col lg:space-x-0 lg:space-y-1", | ||
className | ||
)} | ||
{...props} | ||
> | ||
{items.map((item) => ( | ||
<Link | ||
key={item.href} | ||
href={item.href} | ||
className={cn( | ||
buttonVariants({ variant: "ghost" }), | ||
pathname === item.href | ||
? "bg-muted hover:bg-muted" | ||
: "hover:bg-transparent hover:underline", | ||
"justify-start" | ||
)} | ||
> | ||
{item.title} | ||
</Link> | ||
))} | ||
</nav> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
"use client"; | ||
import React, { useState } from 'react'; | ||
import Link from 'next/link'; | ||
import {useFieldArray, useForm} from 'react-hook-form'; | ||
import {zodResolver} from '@hookform/resolvers/zod'; | ||
import {z} from 'zod'; | ||
import { toast } from '@/components/ui/use-toast'; | ||
import { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from '@/components/ui/form'; | ||
import { Input } from '@/components/ui/input'; | ||
import { cn } from '@/lib/utils'; | ||
import { Button } from '@/components/ui/button'; | ||
import { useRouter } from 'next/navigation'; | ||
|
||
const contactFormSchema = z.object({ | ||
officialEmailAddress: z | ||
.string({ | ||
required_error: 'Official email is required', | ||
}) | ||
.email() | ||
, | ||
phoneNumber: z | ||
.string({ | ||
required_error: 'Phone number is required', | ||
}) | ||
, | ||
hqAddress: z | ||
.string({ | ||
required_error: 'Official Address is required', | ||
}), | ||
}); | ||
|
||
type ContactFormValues = z.infer<typeof contactFormSchema>; | ||
|
||
function ContactForm() { | ||
|
||
const route = useRouter(); | ||
|
||
const form = useForm<ContactFormValues>({ | ||
resolver: zodResolver(contactFormSchema), | ||
mode: 'onChange', | ||
}); | ||
|
||
function onSubmit() { | ||
route.push('/recruiter/registeration/contact'); | ||
} | ||
|
||
return ( | ||
<Form {...form}> | ||
<form onSubmit={form.handleSubmit(onSubmit)} className='space-y-8'> | ||
<FormField | ||
control={form.control} | ||
name = 'officialEmailAddress' | ||
render={({ field }) => ( | ||
<FormItem> | ||
<FormLabel>Official Email Address to HR Department</FormLabel> | ||
<FormControl> | ||
<Input placeholder='[email protected]' {...field} /> | ||
</FormControl> | ||
<FormDescription> | ||
This is the official email address to reach the HR department of your company | ||
</FormDescription> | ||
<FormMessage/> | ||
</FormItem> | ||
)} | ||
/> | ||
|
||
<FormField | ||
control={form.control} | ||
name = 'phoneNumber' | ||
render={({ field }) => ( | ||
<FormItem> | ||
<FormLabel>A Phone number to reach if additional verification is needed</FormLabel> | ||
<FormControl> | ||
<Input placeholder='(123)-456-7890' {...field} /> | ||
</FormControl> | ||
<FormDescription> | ||
This is the phone number to reach if additional verification is needed | ||
</FormDescription> | ||
<FormMessage/> | ||
</FormItem> | ||
)} | ||
/> | ||
<FormField | ||
control={form.control} | ||
name = 'hqAddress' | ||
render={({ field }) => ( | ||
<FormItem> | ||
<FormLabel>Official Address of the company headquarters</FormLabel> | ||
<FormControl> | ||
<Input placeholder='9993 Hodkiewicz Ranch Suite 735' {...field} /> | ||
</FormControl> | ||
<FormDescription> | ||
This is the official address of the company headquarters | ||
</FormDescription> | ||
<FormMessage/> | ||
</FormItem> | ||
)} | ||
/> | ||
<Button type="submit">Next</Button> | ||
</form> | ||
</Form> | ||
); | ||
}; | ||
|
||
export default ContactForm; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Separator } from "@/components/ui/separator" | ||
import ContactForm from "./contact-form" | ||
|
||
export default function ContactFormPage() { | ||
return ( | ||
<div className="space-y-6"> | ||
<div> | ||
<h3 className="text-lg font-medium">Contact Information</h3> | ||
<p className="text-sm text-muted-foreground"> | ||
Enter Necessary Contact Information | ||
</p> | ||
</div> | ||
<Separator /> | ||
<ContactForm /> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Separator } from "@/components/ui/separator" | ||
|
||
export default function AdditionalFormPage() { | ||
return ( | ||
<div className="space-y-6"> | ||
<div> | ||
<h3 className="text-lg font-medium">Thank you for your application!</h3> | ||
<p className="text-sm text-muted-foreground"> | ||
Hang tight while our team reviews your application and you will be notified of the next steps. | ||
</p> | ||
</div> | ||
</div> | ||
) | ||
} |
Oops, something went wrong.