From 48cd9e9f65266fc27e307848a102b29ed0a1cd72 Mon Sep 17 00:00:00 2001 From: Sinan Date: Sun, 18 Aug 2024 20:03:17 +0530 Subject: [PATCH] working --- client/app/layout.tsx | 3 +- client/app/page.tsx | 6 +- .../signin/@otp-verification/page.tsx} | 0 client/app/patient/signin/page.tsx | 8 +-- client/components/NavBar.tsx | 21 +++++-- client/components/SearchInput.tsx | 21 +++++++ client/components/forms/admin/SigninForm.tsx | 4 +- client/public/assets/icons/calendar.svg | 3 - client/public/assets/icons/email.svg | 3 - client/public/assets/icons/phone.svg | 12 ---- client/public/assets/icons/user.svg | 3 - client/{app => styles}/globals.css | 0 client/types/fromTypes.ts | 61 +++++++++++-------- 13 files changed, 80 insertions(+), 65 deletions(-) rename client/{components/modles/OtpVerificationModel.tsx => app/patient/signin/@otp-verification/page.tsx} (100%) create mode 100644 client/components/SearchInput.tsx delete mode 100644 client/public/assets/icons/calendar.svg delete mode 100644 client/public/assets/icons/email.svg delete mode 100644 client/public/assets/icons/phone.svg delete mode 100644 client/public/assets/icons/user.svg rename client/{app => styles}/globals.css (100%) diff --git a/client/app/layout.tsx b/client/app/layout.tsx index dc7b6281..3420df2d 100644 --- a/client/app/layout.tsx +++ b/client/app/layout.tsx @@ -1,7 +1,6 @@ import type { Metadata } from "next"; import { Plus_Jakarta_Sans } from "next/font/google"; -import "./globals.css"; - +import "@/styles/global.css"; import { cn } from "@/lib/utils"; import { ThemeProvider } from "@/components/theme-provider"; import StoreProvider from "./StoreProvider"; diff --git a/client/app/page.tsx b/client/app/page.tsx index 12116c26..928bd2d9 100644 --- a/client/app/page.tsx +++ b/client/app/page.tsx @@ -2,12 +2,12 @@ import React from 'react' const page = () => { return ( -
+ //

Scroll back up to reveal Navbar

-
-
+ //
+ //
) } diff --git a/client/components/modles/OtpVerificationModel.tsx b/client/app/patient/signin/@otp-verification/page.tsx similarity index 100% rename from client/components/modles/OtpVerificationModel.tsx rename to client/app/patient/signin/@otp-verification/page.tsx diff --git a/client/app/patient/signin/page.tsx b/client/app/patient/signin/page.tsx index adc1a24d..ce26c446 100644 --- a/client/app/patient/signin/page.tsx +++ b/client/app/patient/signin/page.tsx @@ -1,12 +1,10 @@ import SigninForm from "@/components/forms/SigninForm"; -import OtpVerificationModel from "@/components/modles/OtpVerificationModel"; import Image from "next/image"; import Link from "next/link"; const SignIn = ()=> { return (
-
{ className="mb-12 h-10 w-fit" /> -
+

© 2024 AVM Ayurveda's

- - Admin + + Doctor
diff --git a/client/components/NavBar.tsx b/client/components/NavBar.tsx index d26e4c9a..8fbb641e 100644 --- a/client/components/NavBar.tsx +++ b/client/components/NavBar.tsx @@ -2,12 +2,23 @@ import React from "react"; import { FloatingNav } from "./ui/floating-navbar"; import { NavItems } from "@/constants"; +import { usePathname } from "next/navigation"; const NavBar = () => { - return ( -
- -
- ); + const pathName = usePathname(); + + if ( + !pathName.includes("/signin") && + !pathName.includes("/register") && + !pathName.includes("/new-appointment") && + !pathName.includes("/signup") + ){ + return ( +
+ +
+ ); + } + }; export default NavBar; diff --git a/client/components/SearchInput.tsx b/client/components/SearchInput.tsx new file mode 100644 index 00000000..d500e395 --- /dev/null +++ b/client/components/SearchInput.tsx @@ -0,0 +1,21 @@ +import React, { useState } from 'react' +import { FormFieldType, SearchInputProps } from '@/types/fromTypes' +import { Input } from './ui/input' +import CustomFormField from './CustomFormField' +import { Button } from './ui/button' +import { Search } from 'lucide-react' + +const SearchInput = ({placeHolder}:SearchInputProps) => { + const [input,setInput] = useState('') + return ( +
+ + +
+ ) +} + +export default SearchInput \ No newline at end of file diff --git a/client/components/forms/admin/SigninForm.tsx b/client/components/forms/admin/SigninForm.tsx index 94f663ec..24c507f9 100644 --- a/client/components/forms/admin/SigninForm.tsx +++ b/client/components/forms/admin/SigninForm.tsx @@ -10,6 +10,7 @@ import SubmitButton from "@/components/SubmitButton"; import { signinFormValidation } from "@/lib/adminValidation"; import Link from "next/link"; import { FormFieldType } from "@/types/fromTypes"; +import { IconMail } from "@tabler/icons-react"; const SigninForm = () => { const [isLoading, setIsLoading] = useState(false); @@ -43,8 +44,7 @@ const SigninForm = () => { name="email" label="Email address *" placeholder="johndoe@gmail.com" - iconSrc="/assets/icons/email.svg" - iconAlt="email" + Icon={IconMail} /> - - diff --git a/client/public/assets/icons/email.svg b/client/public/assets/icons/email.svg deleted file mode 100644 index b4d5c0d9..00000000 --- a/client/public/assets/icons/email.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/client/public/assets/icons/phone.svg b/client/public/assets/icons/phone.svg deleted file mode 100644 index f6c8bbbf..00000000 --- a/client/public/assets/icons/phone.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - diff --git a/client/public/assets/icons/user.svg b/client/public/assets/icons/user.svg deleted file mode 100644 index 283fb7ee..00000000 --- a/client/public/assets/icons/user.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/client/app/globals.css b/client/styles/globals.css similarity index 100% rename from client/app/globals.css rename to client/styles/globals.css diff --git a/client/types/fromTypes.ts b/client/types/fromTypes.ts index 3591adb6..6d88a445 100644 --- a/client/types/fromTypes.ts +++ b/client/types/fromTypes.ts @@ -2,30 +2,37 @@ import { FC } from "react"; import { Control } from "react-hook-form"; export enum FormFieldType { - INPUT = "input", - TEXTAREA = "textarea", - PHONE_INPUT = "phoneInput", - CHECKBOX = "checkbox", - DATE_PICKER = "datePicker", - SELECT = "select", - SKELETON = "skeleton", - PASSWORD="password" - } - - export interface CustomProps { - control: Control; - name: string; - label?: string; - placeholder?: string; - iconSrc?: string; - iconAlt?: string; - disabled?: boolean; - dateFormat?: string; - showTimeSelect?: boolean; - children?: React.ReactNode; - renderSkeleton?: (field: any) => React.ReactNode; - fieldType: FormFieldType; - isLimited?:boolean; - availableTimes?:string[]; - Icon?: FC<{ className?: string }>; - } \ No newline at end of file + INPUT = "input", + TEXTAREA = "textarea", + PHONE_INPUT = "phoneInput", + CHECKBOX = "checkbox", + DATE_PICKER = "datePicker", + SELECT = "select", + SKELETON = "skeleton", + PASSWORD = "password", +} + +export interface CustomProps { + control: Control; + name: string; + label?: string; + placeholder?: string; + iconSrc?: string; + iconAlt?: string; + disabled?: boolean; + dateFormat?: string; + showTimeSelect?: boolean; + children?: React.ReactNode; + renderSkeleton?: (field: any) => React.ReactNode; + fieldType: FormFieldType; + isLimited?: boolean; + availableTimes?: string[]; + Icon?: FC<{ className?: string }>; +} + + +export interface SearchInputProps { + placeHolder:string; + name?:string; + onChange?:()=>void +} \ No newline at end of file