-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from prateek-pareek/develop-prateek-pareek
Develop prateek pareek
- Loading branch information
Showing
57 changed files
with
7,886 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import '../globals.css'; | ||
|
||
import { Analytics } from '@vercel/analytics/react'; | ||
import { SessionProvider } from 'next-auth/react'; | ||
import { SpeedInsights } from "@vercel/speed-insights/next" | ||
import { NextUIProvider } from '@nextui-org/react'; | ||
import { ThemeProvider as NextThemesProvider } from "next-themes"; | ||
|
||
export const metadata = { | ||
title: 'Welcome to Mitech', | ||
description: | ||
'A user admin dashboard configured with Next.js, Postgres, NextAuth, Tailwind CSS, TypeScript, ESLint, and Prettier.' | ||
}; | ||
|
||
export default async function RootLayout({ | ||
children | ||
}: { | ||
children: React.ReactNode; | ||
}) { | ||
|
||
return ( | ||
<html lang="en" > | ||
<body className="static h-full bg-gray-50"> | ||
<NextUIProvider> | ||
<NextThemesProvider attribute="class" > | ||
<main className="text-foreground bg-background"> | ||
<SessionProvider> | ||
{children} | ||
<Analytics /> | ||
<SpeedInsights />{/* Vercel Speed Insights */} | ||
</SessionProvider> | ||
</main> | ||
</NextThemesProvider> | ||
</NextUIProvider> | ||
</body> | ||
</html> | ||
); | ||
} |
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,30 @@ | ||
"use client"; | ||
import { signIn, useSession } from "next-auth/react"; | ||
import { useSearchParams } from "next/navigation"; | ||
import { Suspense, useEffect } from "react"; | ||
|
||
|
||
function Search() { | ||
const { data: session, status } = useSession(); | ||
const params = useSearchParams(); | ||
useEffect(() => { | ||
if (!(status === "loading") && !session) { | ||
params?.get("provider") && void signIn(params.get("provider") ?? "google"); | ||
}; | ||
if (session) window.close(); | ||
}, [params, session, status]); | ||
|
||
return <div></div> | ||
} | ||
|
||
export default function SignInPage() { | ||
|
||
return ( | ||
<main> | ||
<Suspense> | ||
<Search /> | ||
</Suspense> | ||
</main> | ||
); | ||
}; | ||
|
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,8 @@ | ||
"use client" | ||
import { UserConnectPageView } from '@/components/component/user-connect-page-view'; | ||
|
||
|
||
export default function IndexPage() { | ||
|
||
return (<UserConnectPageView />); | ||
} |
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,9 @@ | ||
"use client" | ||
|
||
import { ForgetPasswordPageView } from "@/components/component/forget-password-page-view"; | ||
|
||
|
||
export default function IndexPage() { | ||
|
||
return (<ForgetPasswordPageView />); | ||
} |
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,5 @@ | ||
import { BillingPage } from "@/components/component/billing-page"; | ||
|
||
export default function Page() { | ||
return <BillingPage/>; | ||
} |
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,119 @@ | ||
'use client'; | ||
import PhoneInput from '@/components/ui/PhoneInput'; | ||
import SettingsButton from '@/components/ui/SettingsButton'; | ||
import SettingsContainer from '@/components/ui/SettingsContainer'; | ||
import SettingsInput from '@/components/ui/SettingsInput'; | ||
import SettingsTitle from '@/components/ui/SettingsTitle'; | ||
import { useState } from 'react'; | ||
|
||
export default function Page() { | ||
const [phone, setPhone] = useState<string>('+1'); | ||
return ( | ||
<div className="w-full"> | ||
<SettingsTitle title="Company Details" /> | ||
<SettingsContainer className="mt-5 mb-10"> | ||
<div className="flex flex-col ml-8 mb-10 w-full mx-5"> | ||
<form | ||
className="mt-8 " | ||
onSubmit={(e: any) => { | ||
e.preventDefault(); | ||
//TODO: do the logic here | ||
console.log( | ||
e.target[0].value, | ||
e.target[1].value, | ||
e.target[2].value, | ||
e.target[3].value, | ||
e.target[4].value, | ||
e.target[5].value, | ||
e.target[6].value, | ||
phone + e.target[7].value, | ||
e.target[8].value, | ||
e.target[9].value, | ||
e.target[10].value | ||
); | ||
}} | ||
> | ||
<div className="grid lg:grid-cols-2 grid-cols-1 gap-8"> | ||
<SettingsInput | ||
title="Company" | ||
type="text" | ||
placeholder="Company's Name" | ||
/> | ||
<div className="w-full"> | ||
<div className="flex flex-row items-center justify-between w-full"> | ||
<div className="flex flex-col w-full"> | ||
<p className="text-[16px] text-black font-semibold"> | ||
Language | ||
</p> | ||
<select | ||
required | ||
className="w-full h-[3rem] mt-2 px-2 border-1 border-[#ECEDF0] rounded-md bg-[#F9FAFB] focus:outline-none text-black" | ||
> | ||
<option value="English (US)">English (US)</option> | ||
<option value="French (CA)">French (CA)</option> | ||
</select> | ||
</div> | ||
</div> | ||
</div> | ||
<SettingsInput | ||
title="Street Address" | ||
type="text" | ||
placeholder="Street Address" | ||
/> | ||
<SettingsInput title="City" type="text" placeholder="City" /> | ||
<SettingsInput title="State" type="text" placeholder="State" /> | ||
<SettingsInput title="Zip" type="text" placeholder="Zip Code" /> | ||
<SettingsInput | ||
title="Country" | ||
type="text" | ||
placeholder="Country" | ||
/> | ||
<PhoneInput phone={phone} setPhone={setPhone} /> | ||
<SettingsInput | ||
title="VAT Number" | ||
type="text" | ||
placeholder="VAT Number" | ||
/> | ||
<div className="w-full"> | ||
<div className="flex flex-row items-center justify-between w-full"> | ||
<div className="flex flex-col w-full"> | ||
<p className="text-[16px] text-black font-semibold"> | ||
Timezone | ||
</p> | ||
<select | ||
required | ||
className="w-full h-[3rem] mt-2 px-2 border-1 border-[#ECEDF0] rounded-md bg-[#F9FAFB] focus:outline-none text-black" | ||
> | ||
<option value="Eastern Time (US & Canada)"> | ||
Eastern Time (US & Canada) | ||
</option> | ||
<option value="Central Time (US & Canada)"> | ||
Central Time (US & Canada) | ||
</option> | ||
</select> | ||
</div> | ||
</div> | ||
</div> | ||
<div className="w-full"> | ||
<div className="flex flex-row items-center justify-between w-full"> | ||
<div className="flex flex-col w-full"> | ||
<p className="text-[16px] text-black font-semibold"> | ||
Website | ||
</p> | ||
<input | ||
type="url" | ||
className="w-full h-[3rem] mt-2 px-2 border-1 border-[#ECEDF0] rounded-md bg-white focus:outline-none text-black" | ||
placeholder="Website" | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<hr className="bg-[#E4E8EA] mt-5" /> | ||
<SettingsButton title="Save" onClick={() => { }} type="submit" /> | ||
</form> | ||
</div> | ||
</SettingsContainer> | ||
</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,18 @@ | ||
export const metadata = { | ||
title: 'Settings | Mitech Recruitment' | ||
}; | ||
|
||
import Sidebar from '@/components/ui/Sidebar'; | ||
|
||
export default function SettingsLayout({ | ||
children | ||
}: { | ||
children: React.ReactNode; | ||
}) { | ||
return ( | ||
<div className="flex bg-[#EBEDF0] h-full rounded-xl"> | ||
<Sidebar /> | ||
{children} | ||
</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,10 @@ | ||
'use client'; | ||
import SettingsTitle from '@/components/ui/SettingsTitle'; | ||
|
||
export default function Page() { | ||
return ( | ||
<div className="w-full"> | ||
<SettingsTitle title="Linked Accounts" /> | ||
</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,4 @@ | ||
import { redirect } from 'next/navigation'; | ||
export default function Page() { | ||
redirect('/settings/profile'); | ||
} |
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,49 @@ | ||
'use client'; | ||
import SettingsButton from '@/components/ui/SettingsButton'; | ||
import SettingsContainer from '@/components/ui/SettingsContainer'; | ||
import SettingsInput from '@/components/ui/SettingsInput'; | ||
import SettingsTitle from '@/components/ui/SettingsTitle'; | ||
|
||
export default function Page() { | ||
return ( | ||
<div className="w-full"> | ||
<SettingsTitle title="Password" /> | ||
<SettingsContainer className="mt-5 mb-10"> | ||
<div className="flex flex-col ml-8 mb-10 w-full mx-5"> | ||
<form | ||
className="mt-8 " | ||
onSubmit={(e: any) => { | ||
e.preventDefault(); | ||
console.log( | ||
e.target[0].value, | ||
e.target[1].value, | ||
e.target[2].value | ||
); | ||
//TODO: do the logic here | ||
}} | ||
> | ||
<div className="grid grid-cols-1 gap-8"> | ||
<SettingsInput | ||
title="Current Password" | ||
type="password" | ||
placeholder="Current Password" | ||
/> | ||
<SettingsInput | ||
title="New Password" | ||
type="password" | ||
placeholder="New Password" | ||
/> | ||
<SettingsInput | ||
title="Confirm Password" | ||
type="password" | ||
placeholder="Confirm Password" | ||
/> | ||
</div> | ||
<hr className="bg-[#E4E8EA] mt-5" /> | ||
<SettingsButton title="Save" onClick={() => { }} type="submit" /> | ||
</form> | ||
</div> | ||
</SettingsContainer> | ||
</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,98 @@ | ||
'use client'; | ||
import SettingsButton from '@/components/ui/SettingsButton'; | ||
import SettingsContainer from '@/components/ui/SettingsContainer'; | ||
import SettingsInput from '@/components/ui/SettingsInput'; | ||
import SettingsTitle from '@/components/ui/SettingsTitle'; | ||
|
||
import { useEffect, useState } from 'react'; | ||
import Image from 'next/image'; | ||
|
||
export default function Page() { | ||
const [image, setImage] = useState<string>(''); | ||
useEffect(() => { | ||
//TODO: fetch the image from the api | ||
//example : | ||
// setImage('/upload/images/ads-001.jpg'); | ||
}, []); | ||
|
||
return ( | ||
<div className="w-full"> | ||
<SettingsTitle title="Profile" /> | ||
<SettingsContainer className="mt-5 mb-10"> | ||
<div className="flex flex-col ml-8 mt-8 mb-10 w-full mx-5"> | ||
<p className="text-[16px] text-black font-semibold">Photo</p> | ||
<div className="flex items-center mt-4 gap-5"> | ||
{image ? ( | ||
<Image | ||
src={image} | ||
alt="profile" | ||
className="w-14 h-14 rounded-full object-cover" | ||
width={14} | ||
height={14} | ||
/> | ||
) : ( | ||
<div className="w-14 h-14 rounded-full bg-gray-300"></div> | ||
)} | ||
<div> | ||
<label | ||
htmlFor="file" | ||
className="inline-block px-5 py-2 max-w-[250px] bg-[#EBEDF0] border border-[#DBDFE3] text-black rounded-md font-light cursor-pointer text-center" | ||
> | ||
Upload New Image | ||
</label> | ||
<input | ||
id="file" | ||
type="file" | ||
className="hidden" | ||
onChange={(e) => { | ||
console.log(e.target.files); | ||
if (e.target.files) { | ||
setImage(URL.createObjectURL(e.target.files[0])); | ||
//TODO: do the logic here | ||
} | ||
}} | ||
/> | ||
</div> | ||
<button | ||
className="text-red-500" | ||
onClick={() => { | ||
//TODO: do the logic here | ||
setImage(''); | ||
}} | ||
> | ||
Delete | ||
</button> | ||
</div> | ||
<form | ||
className="mt-8 " | ||
onSubmit={(e: any) => { | ||
e.preventDefault(); | ||
console.log( | ||
e.target[0].value, | ||
e.target[1].value, | ||
e.target[2].value | ||
); | ||
//TODO: do the logic here | ||
}} | ||
> | ||
<div className="grid lg:grid-cols-2 grid-cols-1 gap-5"> | ||
<SettingsInput | ||
title="First Name" | ||
type="text" | ||
placeholder="First Name" | ||
/> | ||
<SettingsInput | ||
title="Last Name" | ||
type="text" | ||
placeholder="Last Name" | ||
/> | ||
<SettingsInput title="Email" type="email" placeholder="Email" /> | ||
</div> | ||
<hr className="bg-[#E4E8EA] mt-5" /> | ||
<SettingsButton title="Save" type="submit" /> | ||
</form> | ||
</div> | ||
</SettingsContainer> | ||
</div> | ||
); | ||
} |
Oops, something went wrong.