From e2f2224741cb63beb0b570585098eb4b9009e72d Mon Sep 17 00:00:00 2001 From: prateek-pareek <97360950+prateek-pareek@users.noreply.github.com> Date: Tue, 9 Jul 2024 22:38:57 +0530 Subject: [PATCH 1/4] push code --- components/ui/form-create.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/components/ui/form-create.tsx b/components/ui/form-create.tsx index 9ab073d..2f9a41b 100644 --- a/components/ui/form-create.tsx +++ b/components/ui/form-create.tsx @@ -52,7 +52,6 @@ export default function Form({ channels }: { channels: any[] }) { if (uploadedFile) { formDataObj.append('uploadedFileId', uploadedFile.id); } - console.log('Form data:', Array.from(formDataObj.entries())); try { const validatedData = schema.parse({ ...formData, From 4ea0c933355f494ed532458ce2a6578fe722e4cb Mon Sep 17 00:00:00 2001 From: prateek-pareek <97360950+prateek-pareek@users.noreply.github.com> Date: Wed, 10 Jul 2024 04:01:57 +0530 Subject: [PATCH 2/4] fix --- app/(auth)/layout.tsx | 38 + app/(auth)/signin-popup/page.tsx | 30 + app/(root)/connect/page.tsx | 8 + app/(root)/forget-passwd/page.tsx | 9 + app/(root)/payment/page.tsx | 5 + app/(root)/settings/company-details/page.tsx | 119 + app/(root)/settings/layout.tsx | 18 + app/(root)/settings/linked-accounts/page.tsx | 10 + app/(root)/settings/page.tsx | 4 + app/(root)/settings/password/page.tsx | 49 + app/(root)/settings/profile/page.tsx | 98 + app/(root)/settings/referral-program/page.tsx | 5 + app/(root)/team-members/page.tsx | 8 + components/component/billing-page.tsx | 78 + .../component/forget-password-page-view.tsx | 33 + components/component/recaptcha-dialog.tsx | 46 + .../component/reset-password-page-view.tsx | 32 + .../component/search-financial-dialog.tsx | 55 + .../component/sigin_page_simple_card.tsx | 226 + .../component/team-members-page-view.tsx | 283 + .../component/user-connect-page-view.tsx | 189 + .../user-satting-page-view-stacked.tsx | 211 + .../component/user-setting-page-view.tsx | 139 + components/ui/BillingCard.tsx | 38 + components/ui/PhoneInput.tsx | 467 ++ components/ui/SettingsButton.tsx | 19 + components/ui/SettingsContainer.tsx | 15 + components/ui/SettingsInput.tsx | 25 + components/ui/SettingsTitle.tsx | 11 + components/ui/Sidebar.tsx | 69 + components/ui/campaigns/campaigns.tsx | 2 +- components/ui/dialog.tsx | 123 + components/ui/form-create.tsx | 19 +- lib/financial-data.ts | 59 + next.config.js | 1 - package.json | 29 +- pages/_app.tsx | 19 + pages/error.tsx | 118 + pages/new-user.tsx | 136 + pages/signin.tsx | 28 + pages/signout.tsx | 80 + pages/signup.tsx | 36 + pages/verify-request.tsx | 41 + public/financial_logos/atb.png | Bin 0 -> 9761 bytes public/financial_logos/cibc.png | Bin 0 -> 4037 bytes public/financial_logos/desjardin.png | Bin 0 -> 18510 bytes public/financial_logos/hsbc.png | Bin 0 -> 41606 bytes public/financial_logos/manulife.png | Bin 0 -> 1570 bytes public/financial_logos/meridian.png | Bin 0 -> 4919 bytes public/financial_logos/paypal.png | Bin 0 -> 6888 bytes public/financial_logos/scotia.png | Bin 0 -> 5973 bytes public/financial_logos/tangerine.png | Bin 0 -> 83081 bytes public/financial_logos/tdbank.png | Bin 0 -> 2420 bytes yarn.lock | 4861 +++++++++++++++++ 54 files changed, 7870 insertions(+), 19 deletions(-) create mode 100644 app/(auth)/layout.tsx create mode 100644 app/(auth)/signin-popup/page.tsx create mode 100644 app/(root)/connect/page.tsx create mode 100644 app/(root)/forget-passwd/page.tsx create mode 100644 app/(root)/payment/page.tsx create mode 100644 app/(root)/settings/company-details/page.tsx create mode 100644 app/(root)/settings/layout.tsx create mode 100644 app/(root)/settings/linked-accounts/page.tsx create mode 100644 app/(root)/settings/page.tsx create mode 100644 app/(root)/settings/password/page.tsx create mode 100644 app/(root)/settings/profile/page.tsx create mode 100644 app/(root)/settings/referral-program/page.tsx create mode 100644 app/(root)/team-members/page.tsx create mode 100644 components/component/billing-page.tsx create mode 100644 components/component/forget-password-page-view.tsx create mode 100644 components/component/recaptcha-dialog.tsx create mode 100644 components/component/reset-password-page-view.tsx create mode 100644 components/component/search-financial-dialog.tsx create mode 100644 components/component/sigin_page_simple_card.tsx create mode 100644 components/component/team-members-page-view.tsx create mode 100644 components/component/user-connect-page-view.tsx create mode 100644 components/component/user-satting-page-view-stacked.tsx create mode 100644 components/component/user-setting-page-view.tsx create mode 100644 components/ui/BillingCard.tsx create mode 100644 components/ui/PhoneInput.tsx create mode 100644 components/ui/SettingsButton.tsx create mode 100644 components/ui/SettingsContainer.tsx create mode 100644 components/ui/SettingsInput.tsx create mode 100644 components/ui/SettingsTitle.tsx create mode 100644 components/ui/Sidebar.tsx create mode 100644 components/ui/dialog.tsx create mode 100644 lib/financial-data.ts create mode 100644 pages/_app.tsx create mode 100644 pages/error.tsx create mode 100644 pages/new-user.tsx create mode 100644 pages/signin.tsx create mode 100644 pages/signout.tsx create mode 100644 pages/signup.tsx create mode 100644 pages/verify-request.tsx create mode 100644 public/financial_logos/atb.png create mode 100644 public/financial_logos/cibc.png create mode 100644 public/financial_logos/desjardin.png create mode 100644 public/financial_logos/hsbc.png create mode 100644 public/financial_logos/manulife.png create mode 100644 public/financial_logos/meridian.png create mode 100644 public/financial_logos/paypal.png create mode 100644 public/financial_logos/scotia.png create mode 100644 public/financial_logos/tangerine.png create mode 100644 public/financial_logos/tdbank.png create mode 100644 yarn.lock diff --git a/app/(auth)/layout.tsx b/app/(auth)/layout.tsx new file mode 100644 index 0000000..5f8db33 --- /dev/null +++ b/app/(auth)/layout.tsx @@ -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 ( + + + + +
+ + {children} + + {/* Vercel Speed Insights */} + +
+
+
+ + + ); +} \ No newline at end of file diff --git a/app/(auth)/signin-popup/page.tsx b/app/(auth)/signin-popup/page.tsx new file mode 100644 index 0000000..d235a3c --- /dev/null +++ b/app/(auth)/signin-popup/page.tsx @@ -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
+} + +export default function SignInPage() { + + return ( +
+ + + +
+ ); +}; + diff --git a/app/(root)/connect/page.tsx b/app/(root)/connect/page.tsx new file mode 100644 index 0000000..5d74ab5 --- /dev/null +++ b/app/(root)/connect/page.tsx @@ -0,0 +1,8 @@ +"use client" +import { UserConnectPageView } from '@/components/component/user-connect-page-view'; + + +export default function IndexPage() { + + return (); +} diff --git a/app/(root)/forget-passwd/page.tsx b/app/(root)/forget-passwd/page.tsx new file mode 100644 index 0000000..d1d52b7 --- /dev/null +++ b/app/(root)/forget-passwd/page.tsx @@ -0,0 +1,9 @@ +"use client" + +import { ForgetPasswordPageView } from "@/components/component/forget-password-page-view"; + + +export default function IndexPage() { + + return (); +} diff --git a/app/(root)/payment/page.tsx b/app/(root)/payment/page.tsx new file mode 100644 index 0000000..07f7702 --- /dev/null +++ b/app/(root)/payment/page.tsx @@ -0,0 +1,5 @@ +import { BillingPage } from "@/components/component/billing-page"; + +export default function Page() { + return ; +} diff --git a/app/(root)/settings/company-details/page.tsx b/app/(root)/settings/company-details/page.tsx new file mode 100644 index 0000000..129b153 --- /dev/null +++ b/app/(root)/settings/company-details/page.tsx @@ -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('+1'); + return ( +
+ + +
+
{ + 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 + ); + }} + > +
+ +
+
+
+

+ Language +

+ +
+
+
+ + + + + + + +
+
+
+

+ Timezone +

+ +
+
+
+
+
+
+

+ Website +

+ +
+
+
+
+
+ { }} type="submit" /> + +
+
+
+ ); +} diff --git a/app/(root)/settings/layout.tsx b/app/(root)/settings/layout.tsx new file mode 100644 index 0000000..293d1b1 --- /dev/null +++ b/app/(root)/settings/layout.tsx @@ -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 ( +
+ + {children} +
+ ); +} diff --git a/app/(root)/settings/linked-accounts/page.tsx b/app/(root)/settings/linked-accounts/page.tsx new file mode 100644 index 0000000..9a043ad --- /dev/null +++ b/app/(root)/settings/linked-accounts/page.tsx @@ -0,0 +1,10 @@ +'use client'; +import SettingsTitle from '@/components/ui/SettingsTitle'; + +export default function Page() { + return ( +
+ +
+ ); +} diff --git a/app/(root)/settings/page.tsx b/app/(root)/settings/page.tsx new file mode 100644 index 0000000..014525e --- /dev/null +++ b/app/(root)/settings/page.tsx @@ -0,0 +1,4 @@ +import { redirect } from 'next/navigation'; +export default function Page() { + redirect('/settings/profile'); +} diff --git a/app/(root)/settings/password/page.tsx b/app/(root)/settings/password/page.tsx new file mode 100644 index 0000000..e0b2eb9 --- /dev/null +++ b/app/(root)/settings/password/page.tsx @@ -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 ( +
+ + +
+
{ + e.preventDefault(); + console.log( + e.target[0].value, + e.target[1].value, + e.target[2].value + ); + //TODO: do the logic here + }} + > +
+ + + +
+
+ { }} type="submit" /> + +
+
+
+ ); +} diff --git a/app/(root)/settings/profile/page.tsx b/app/(root)/settings/profile/page.tsx new file mode 100644 index 0000000..fb797fe --- /dev/null +++ b/app/(root)/settings/profile/page.tsx @@ -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(''); + useEffect(() => { + //TODO: fetch the image from the api + //example : + // setImage('/upload/images/ads-001.jpg'); + }, []); + + return ( +
+ + +
+

Photo

+
+ {image ? ( + profile + ) : ( +
+ )} +
+ + { + console.log(e.target.files); + if (e.target.files) { + setImage(URL.createObjectURL(e.target.files[0])); + //TODO: do the logic here + } + }} + /> +
+ +
+
{ + e.preventDefault(); + console.log( + e.target[0].value, + e.target[1].value, + e.target[2].value + ); + //TODO: do the logic here + }} + > +
+ + + +
+
+ + +
+
+
+ ); +} diff --git a/app/(root)/settings/referral-program/page.tsx b/app/(root)/settings/referral-program/page.tsx new file mode 100644 index 0000000..d68825c --- /dev/null +++ b/app/(root)/settings/referral-program/page.tsx @@ -0,0 +1,5 @@ +import SettingsTitle from '@/components/ui/SettingsTitle'; + +export default function Page() { + return ; +} diff --git a/app/(root)/team-members/page.tsx b/app/(root)/team-members/page.tsx new file mode 100644 index 0000000..de79f8d --- /dev/null +++ b/app/(root)/team-members/page.tsx @@ -0,0 +1,8 @@ + + +"use client" +import TeamMembersPageView from '@/components/component/team-members-page-view'; +export default function IndexPage() { + + return (); +} diff --git a/components/component/billing-page.tsx b/components/component/billing-page.tsx new file mode 100644 index 0000000..a5eb2c0 --- /dev/null +++ b/components/component/billing-page.tsx @@ -0,0 +1,78 @@ +'use client'; +import BillingCard from '@/components/ui/BillingCard'; +import { financialList } from '@/lib/financial-data'; +import { + Dialog, + DialogTrigger, + DialogContent, + DialogOverlay +} from '@/components/ui/dialog'; +import { RecaptchaDialog } from './recaptcha-dialog'; + +export function BillingPage() { + return ( +
+
+
+
+

+ Billing connections +

+

+ Choose your financial to get started +

+
+
+
+
+
+ {financialList?.map((financialItem) => ( +
+ +
+ ))} +
+
+
+
+
+

+ Don't see your financial? We support over 14,000 financial + institution.{' '} +

+ + + Find your financial + + + + e.preventDefault()} + > + + + + +

+

+ Financial import is available with any paid plan. By connecting + your financial you agree to our{' '} + + Terms of service + +

+
+
+
+
+ ); +} diff --git a/components/component/forget-password-page-view.tsx b/components/component/forget-password-page-view.tsx new file mode 100644 index 0000000..c478942 --- /dev/null +++ b/components/component/forget-password-page-view.tsx @@ -0,0 +1,33 @@ + +import { Input } from "@nextui-org/input"; +import { Button } from "@nextui-org/react"; +import { Link } from "@nextui-org/link"; + + + + +export const ForgetPasswordPageView = () => { + return ( +
+
+

Forgot Password

+

+ Enter your email address below and we'll send you a link to reset your password. +

+
+
+
+ +
+ +
+
+ + Return to login + +
+
+ ) +} \ No newline at end of file diff --git a/components/component/recaptcha-dialog.tsx b/components/component/recaptcha-dialog.tsx new file mode 100644 index 0000000..daae24f --- /dev/null +++ b/components/component/recaptcha-dialog.tsx @@ -0,0 +1,46 @@ +'use client'; + +import React from 'react'; +import { Button } from '@nextui-org/react'; +import { Dialog, DialogTrigger, DialogContent } from '@/components/ui/dialog'; +import SearchFinancialDialog from './search-financial-dialog'; +import Script from 'next/script'; + +export function RecaptchaDialog() { + const recaptchaSiteKey = '0x4AAAAAAAdYos5Bq6s-5evG'; + + return ( + <> +