From 5e61eaa1c651d5dca0136cf634c7375e1924bf7f Mon Sep 17 00:00:00 2001 From: "Siddhesh.More" Date: Wed, 15 Jan 2025 18:44:06 +0530 Subject: [PATCH 01/13] update --- src/Layouts/DefaultLayout.tsx | 2 +- src/Routes/Nav.ts | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/Layouts/DefaultLayout.tsx b/src/Layouts/DefaultLayout.tsx index 5750ec9..5dc8b49 100644 --- a/src/Layouts/DefaultLayout.tsx +++ b/src/Layouts/DefaultLayout.tsx @@ -27,7 +27,7 @@ const DefaultLayout: FC<{ children: React.ReactNode }> = ({ children }) => { {title} : - navigate(path)} gap={0} style={{ cursor: 'pointer', borderRadius: '8px', padding: '5px', width: '100%', display: 'flex', alignItems: 'center', border: '1px solid #ffffff', backgroundColor:'#fff',color:'#000', fontSize: '14px' }}> {title} + navigate(path)} gap={0} style={{ cursor: 'pointer', borderRadius: '8px', padding: '5px', width: '100%', display: 'flex', alignItems: 'center', border: '1px solid #ffffff', backgroundColor:'#fff',color:'#000', fontSize: '14px', fontWeight:'normal' }}> {title} {children?.map(({ title, path, Icon }, index) => navigate(path)} style={{ marginTop: 6, cursor: 'pointer', borderRadius: '8px', padding: '6px', width: '100%', display: 'flex', alignItems: 'center', gap: 6, border: '1px solid #ffffff', backgroundColor:'#fff',color:'#000' }} > {title})} )} diff --git a/src/Routes/Nav.ts b/src/Routes/Nav.ts index f225b1a..8bfe22e 100644 --- a/src/Routes/Nav.ts +++ b/src/Routes/Nav.ts @@ -1,6 +1,7 @@ import { LiaUsersSolid } from "react-icons/lia"; import { LuBellDot } from "react-icons/lu"; import { MdOutlineSupportAgent, MdPostAdd } from "react-icons/md"; +import { TiUserOutline } from "react-icons/ti"; import { GoDotFill } from "react-icons/go"; import { TbFileSettings, TbLayoutDashboard, TbReport, TbUsers, TbUsersGroup } from "react-icons/tb"; @@ -16,9 +17,21 @@ export const nav = [ }, { title: "Manage Users", - path: "/manage-user", - Icon: TbUsers, - type:'single' + path: "/register-user", + Icon: TiUserOutline, + type:'multiple', + children: [ + { + title: "Register Users", + path: "/register-user", + Icon: GoDotFill, + }, + { + title: "Deactivated Accounts", + path: "/deactivate-accounts", + Icon: GoDotFill, + }, + ], }, { title: "Manage Groups", -- 2.34.1 From a8f9aee8ff380dab3654c108b55e47d394191827 Mon Sep 17 00:00:00 2001 From: "Siddhesh.More" Date: Wed, 15 Jan 2025 19:46:50 +0530 Subject: [PATCH 02/13] update --- src/Layouts/DefaultLayout.tsx | 4 +- src/Pages/Dashboard/Dashboard.tsx | 5 +- src/Pages/ManageCommunity/ManageCommunity.tsx | 10 --- src/Pages/ManageCommunity/ManagePost.tsx | 11 ---- src/Pages/ManageGroups/ManageGroups.tsx | 11 ---- .../ManageJobs.tsx} | 10 +-- src/Pages/ManagePost/ManagePost.tsx | 8 +++ src/Pages/ManageSubAdmin/ManageSubAdmin.tsx | 11 ++++ .../DeactivatedAccounts.tsx | 11 ++++ .../RegisterUsers/RegisterUsers.tsx | 11 ++++ src/Pages/ManageUsers/ManageUsers.tsx | 11 ---- src/Pages/SubAdmin/SubAdmin.tsx | 11 ---- src/Pages/Support/Support.tsx | 11 ---- src/Routes/Nav.ts | 66 +++++-------------- src/Routes/Routes.ts | 42 +++++++----- src/components/MainFrame.tsx | 4 +- 16 files changed, 97 insertions(+), 140 deletions(-) delete mode 100644 src/Pages/ManageCommunity/ManageCommunity.tsx delete mode 100644 src/Pages/ManageCommunity/ManagePost.tsx delete mode 100644 src/Pages/ManageGroups/ManageGroups.tsx rename src/Pages/{Reporting/Reporting.tsx => ManageJobs/ManageJobs.tsx} (53%) create mode 100644 src/Pages/ManagePost/ManagePost.tsx create mode 100644 src/Pages/ManageSubAdmin/ManageSubAdmin.tsx create mode 100644 src/Pages/ManageUser/DeactivatedAccounts/DeactivatedAccounts.tsx create mode 100644 src/Pages/ManageUser/RegisterUsers/RegisterUsers.tsx delete mode 100644 src/Pages/ManageUsers/ManageUsers.tsx delete mode 100644 src/Pages/SubAdmin/SubAdmin.tsx delete mode 100644 src/Pages/Support/Support.tsx diff --git a/src/Layouts/DefaultLayout.tsx b/src/Layouts/DefaultLayout.tsx index 1a13610..97cac25 100644 --- a/src/Layouts/DefaultLayout.tsx +++ b/src/Layouts/DefaultLayout.tsx @@ -15,7 +15,7 @@ const DefaultLayout: FC<{ children: React.ReactNode }> = ({ children }) => { return ( - + @@ -27,7 +27,7 @@ const DefaultLayout: FC<{ children: React.ReactNode }> = ({ children }) => { navigate(path)} gap={0} style={{ cursor: 'pointer', borderRadius: '8px', padding: '5px', width: '100%', display: 'flex', alignItems: 'center', border: '1px solid #ffffff', backgroundColor:'#fff',color:'#000', fontSize: '14px', fontWeight:'normal' }}> {title} - {children?.map(({ title, path, Icon }, index) => navigate(path)} style={{ marginTop: 6, cursor: 'pointer', borderRadius: '8px', padding: '6px', width: '100%', display: 'flex', alignItems: 'center', gap: 6, border: '1px solid #ffffff', backgroundColor:'#fff',color:'#000' }} > {title})} + {children?.map(({ title, path, Icon }, index) => navigate(path)} style={{ marginTop: 6, cursor: 'pointer', borderRadius: '8px', padding: '6px', width: '100%', display: 'flex', alignItems: 'center', gap: 6, border: '1px solid #ffffff', backgroundColor:'#fff',color:'#000' }} > {title})} )} diff --git a/src/Pages/Dashboard/Dashboard.tsx b/src/Pages/Dashboard/Dashboard.tsx index d063737..a322836 100644 --- a/src/Pages/Dashboard/Dashboard.tsx +++ b/src/Pages/Dashboard/Dashboard.tsx @@ -1,7 +1,10 @@ +import MainFrame from "../../components/MainFrame" const Dashboard = () => { return ( -
Dashboard
+ + + ) } diff --git a/src/Pages/ManageCommunity/ManageCommunity.tsx b/src/Pages/ManageCommunity/ManageCommunity.tsx deleted file mode 100644 index 9588a01..0000000 --- a/src/Pages/ManageCommunity/ManageCommunity.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import MainFrame from "../../components/MainFrame" - -const ManageCommunity = () => { - return ( - - - - ) -} -export default ManageCommunity \ No newline at end of file diff --git a/src/Pages/ManageCommunity/ManagePost.tsx b/src/Pages/ManageCommunity/ManagePost.tsx deleted file mode 100644 index 17f55ca..0000000 --- a/src/Pages/ManageCommunity/ManagePost.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import MainFrame from "../../components/MainFrame" - -const ManagePost = () => { - return ( - - - - ) -} - -export default ManagePost \ No newline at end of file diff --git a/src/Pages/ManageGroups/ManageGroups.tsx b/src/Pages/ManageGroups/ManageGroups.tsx deleted file mode 100644 index ae5dedc..0000000 --- a/src/Pages/ManageGroups/ManageGroups.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import MainFrame from "../../components/MainFrame" - -const ManageGroups = () => { - return ( - - - - ) -} - -export default ManageGroups \ No newline at end of file diff --git a/src/Pages/Reporting/Reporting.tsx b/src/Pages/ManageJobs/ManageJobs.tsx similarity index 53% rename from src/Pages/Reporting/Reporting.tsx rename to src/Pages/ManageJobs/ManageJobs.tsx index 7f0e7c3..2c13107 100644 --- a/src/Pages/Reporting/Reporting.tsx +++ b/src/Pages/ManageJobs/ManageJobs.tsx @@ -1,11 +1,11 @@ import MainFrame from "../../components/MainFrame" -const Reporting = () => { +const ManageJobs = () => { return ( - - - + + ) } -export default Reporting \ No newline at end of file + +export default ManageJobs \ No newline at end of file diff --git a/src/Pages/ManagePost/ManagePost.tsx b/src/Pages/ManagePost/ManagePost.tsx new file mode 100644 index 0000000..edbb8e2 --- /dev/null +++ b/src/Pages/ManagePost/ManagePost.tsx @@ -0,0 +1,8 @@ + +const ManagePost = () => { + return ( +
ManagePost
+ ) +} + +export default ManagePost \ No newline at end of file diff --git a/src/Pages/ManageSubAdmin/ManageSubAdmin.tsx b/src/Pages/ManageSubAdmin/ManageSubAdmin.tsx new file mode 100644 index 0000000..6ffd6d5 --- /dev/null +++ b/src/Pages/ManageSubAdmin/ManageSubAdmin.tsx @@ -0,0 +1,11 @@ +import MainFrame from '../../components/MainFrame' + +const ManageSubAdmin = () => { + return ( + + + + ) +} + +export default ManageSubAdmin \ No newline at end of file diff --git a/src/Pages/ManageUser/DeactivatedAccounts/DeactivatedAccounts.tsx b/src/Pages/ManageUser/DeactivatedAccounts/DeactivatedAccounts.tsx new file mode 100644 index 0000000..1b031a0 --- /dev/null +++ b/src/Pages/ManageUser/DeactivatedAccounts/DeactivatedAccounts.tsx @@ -0,0 +1,11 @@ +import MainFrame from '../../../components/MainFrame' + +const DeactivatedAccounts = () => { + return ( + + + + ) +} + +export default DeactivatedAccounts \ No newline at end of file diff --git a/src/Pages/ManageUser/RegisterUsers/RegisterUsers.tsx b/src/Pages/ManageUser/RegisterUsers/RegisterUsers.tsx new file mode 100644 index 0000000..f32f938 --- /dev/null +++ b/src/Pages/ManageUser/RegisterUsers/RegisterUsers.tsx @@ -0,0 +1,11 @@ +import MainFrame from '../../../components/MainFrame' + +const RegisterUsers = () => { + return ( + + + + ) +} + +export default RegisterUsers \ No newline at end of file diff --git a/src/Pages/ManageUsers/ManageUsers.tsx b/src/Pages/ManageUsers/ManageUsers.tsx deleted file mode 100644 index e6080cd..0000000 --- a/src/Pages/ManageUsers/ManageUsers.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import MainFrame from "../../components/MainFrame" - -const ManageUsers = () => { - return ( - - - - ) -} - -export default ManageUsers \ No newline at end of file diff --git a/src/Pages/SubAdmin/SubAdmin.tsx b/src/Pages/SubAdmin/SubAdmin.tsx deleted file mode 100644 index 4ed0414..0000000 --- a/src/Pages/SubAdmin/SubAdmin.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import MainFrame from "../../components/MainFrame" - -const SubAdmin = () => { - return ( - - - - - ) -} -export default SubAdmin \ No newline at end of file diff --git a/src/Pages/Support/Support.tsx b/src/Pages/Support/Support.tsx deleted file mode 100644 index 47bd3d4..0000000 --- a/src/Pages/Support/Support.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import MainFrame from "../../components/MainFrame" - -const Support = () => { - return ( - - - - - ) -} -export default Support \ No newline at end of file diff --git a/src/Routes/Nav.ts b/src/Routes/Nav.ts index 8bfe22e..78d1c1d 100644 --- a/src/Routes/Nav.ts +++ b/src/Routes/Nav.ts @@ -1,11 +1,10 @@ -import { LiaUsersSolid } from "react-icons/lia"; -import { LuBellDot } from "react-icons/lu"; -import { MdOutlineSupportAgent, MdPostAdd } from "react-icons/md"; -import { TiUserOutline } from "react-icons/ti"; import { GoDotFill } from "react-icons/go"; +import { PiSuitcaseBold } from "react-icons/pi"; +import { RiSuitcase2Line } from "react-icons/ri"; +import { TbEdit, TbLayoutDashboard } from "react-icons/tb"; +import { TiUserAddOutline, TiUserOutline } from "react-icons/ti"; +import { CgWorkAlt } from "react-icons/cg"; -import { TbFileSettings, TbLayoutDashboard, TbReport, TbUsers, TbUsersGroup } from "react-icons/tb"; -import { RiUserSettingsLine } from "react-icons/ri"; export const nav = [ @@ -34,57 +33,28 @@ export const nav = [ ], }, { - title: "Manage Groups", - path: "/manage-groups", - Icon: TbUsersGroup, + title: "Manage Post", + path: "/manage-post", + Icon: TbEdit, type:'single' }, { - title: "Community", - path: "/manage-community", - Icon: LiaUsersSolid, - type:'multiple', - children: [ - { - title: "Manage Community", - path: "/manage-community", - Icon: GoDotFill, - }, - { - title: "Manage Post", - path: "/manage-post", - Icon: GoDotFill, - }, - ], - }, - { - title: "Support", - path: "/support", - Icon: MdOutlineSupportAgent, + title: "Manage Sub-Admin", + path: "/manage-sub-admin", + Icon: TiUserAddOutline, type:'single' }, { - title: "Sub-Admin", - path: "/sub-admin", - Icon: RiUserSettingsLine, + title: "Manage Jobs", + path: "/manage-jobs", + Icon: CgWorkAlt, type:'single' }, { - title: "Reporting", - path: "/reporting", - Icon: TbReport, + title: "Manage Jobs", + path: "/manage-jobs", + Icon: CgWorkAlt, type:'single' }, - { - title: "CMS", - path: "/cms", - Icon: TbFileSettings, - type:'single' - }, - { - title: "Manage Notifications", - path: "/manage-notification", - Icon: LuBellDot, - type:'single' - } + ]; \ No newline at end of file diff --git a/src/Routes/Routes.ts b/src/Routes/Routes.ts index b58d3ec..8aefe07 100644 --- a/src/Routes/Routes.ts +++ b/src/Routes/Routes.ts @@ -1,24 +1,32 @@ -import CMS from "../Pages/CMS/CMS"; import Dashboard from "../Pages/Dashboard/Dashboard"; -import ManageCommunity from "../Pages/ManageCommunity/ManageCommunity"; -import ManagePost from "../Pages/ManageCommunity/ManagePost"; -import ManageGroups from "../Pages/ManageGroups/ManageGroups"; -import ManageUsers from "../Pages/ManageUsers/ManageUsers"; +import ManageJobs from "../Pages/ManageJobs/ManageJobs"; +import ManagePost from "../Pages/ManagePost/ManagePost"; +import ManageSubAdmin from "../Pages/ManageSubAdmin/ManageSubAdmin"; +import DeactivatedAccounts from "../Pages/ManageUser/DeactivatedAccounts/DeactivatedAccounts"; +import RegisterUsers from "../Pages/ManageUser/RegisterUsers/RegisterUsers"; import Profile from "../Pages/Profile/Profile"; -import Reporting from "../Pages/Reporting/Reporting"; -import SubAdmin from "../Pages/SubAdmin/SubAdmin"; -import Support from "../Pages/Support/Support"; export const RouteLink = [ { path: "/", Component: Dashboard }, - { path: "/manage-user", Component: ManageUsers }, - { path: "/manage-groups", Component: ManageGroups }, - { path: "/manage-community", Component: ManageCommunity}, - { path: "/manage-post", Component: ManagePost}, - { path: "/support", Component: Support}, - { path: "/sub-admin", Component: SubAdmin}, - { path: "/reporting", Component: Reporting}, - { path: "/cms", Component: CMS}, - { path: "/manage-notification", Component: CMS}, + { path: "/register-user", Component: RegisterUsers }, + { path: "/deactivate-accounts", Component: DeactivatedAccounts }, + { path: "/manage-post", Component: ManagePost }, + { path: "/manage-sub-admin", Component: ManageSubAdmin }, + { path: "/manage-jobs", Component: ManageJobs }, + + + + + + + + + + + + + + + { path: "/profile", Component: Profile}, ] \ No newline at end of file diff --git a/src/components/MainFrame.tsx b/src/components/MainFrame.tsx index 32c5f64..df552e2 100644 --- a/src/components/MainFrame.tsx +++ b/src/components/MainFrame.tsx @@ -13,10 +13,10 @@ interface MainFrameProps { const MainFrame: FC = ({ children, title }) => { return ( - + Date: Wed, 15 Jan 2025 20:33:14 +0530 Subject: [PATCH 03/13] updated --- src/Constants/Constaants.tsx | 30 +++++++++++ src/Layouts/DefaultLayout.tsx | 9 +++- src/Pages/ManageCMS/AboutUs/AboutUs.tsx | 11 ++++ src/Pages/ManageCMS/FAQ/FreqAskQuestion.tsx | 12 +++++ .../ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx | 11 ++++ .../TermsAndCondition/TermsAndCondition.tsx | 11 ++++ src/Pages/ManageContactUs/ManageContactUs.tsx | 11 ++++ src/Routes/Nav.ts | 52 ++++++++++++++++--- src/Routes/Routes.ts | 23 ++++++++ src/components/MainFrame.tsx | 6 +-- 10 files changed, 165 insertions(+), 11 deletions(-) create mode 100644 src/Constants/Constaants.tsx create mode 100644 src/Pages/ManageCMS/AboutUs/AboutUs.tsx create mode 100644 src/Pages/ManageCMS/FAQ/FreqAskQuestion.tsx create mode 100644 src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx create mode 100644 src/Pages/ManageCMS/TermsAndCondition/TermsAndCondition.tsx create mode 100644 src/Pages/ManageContactUs/ManageContactUs.tsx diff --git a/src/Constants/Constaants.tsx b/src/Constants/Constaants.tsx new file mode 100644 index 0000000..842f931 --- /dev/null +++ b/src/Constants/Constaants.tsx @@ -0,0 +1,30 @@ +export const getTitle = (loactions:string) =>{ + + if (loactions==='/') { + return 'Dashboard' + }else if (loactions==='/register-user') { + return 'Manage User - Register User' + } else if (loactions==='/deactivate-accounts') { + return 'Manage User - Deactivated User' + } else if (loactions==='/manage-post') { + return 'Manage Post' + } else if (loactions==='/manage-sub-admin') { + return 'Manage Sub Admin' + } else if (loactions==='/manage-jobs') { + return 'Manage Jobs' + } else if (loactions==='/manage-contact-us') { + return 'Manage Contact Us' + } else if (loactions==='/manage-contact-us') { + return 'Manage Contact Us' + }else if (loactions==='/faq') { + return 'Manage CMS - FAQ' + }else if (loactions==='/about-us') { + return 'Manage CMS - About Us' + }else if (loactions==='/privacy-policy') { + return 'Manage CMS - Privacy Policy' + }else if (loactions==='/terms-and-condition') { + return 'Manage CMS - Tems And Condition' + }else if (loactions==='/profile') { + return 'My Profile' + } +} \ No newline at end of file diff --git a/src/Layouts/DefaultLayout.tsx b/src/Layouts/DefaultLayout.tsx index 97cac25..c6df190 100644 --- a/src/Layouts/DefaultLayout.tsx +++ b/src/Layouts/DefaultLayout.tsx @@ -6,10 +6,14 @@ import { nav } from "../Routes/Nav"; import logo from '../assets/logo.svg'; import { AccordionItem, AccordionItemContent, AccordionItemTrigger, AccordionRoot } from "../components/ui/accordion"; import { Avatar } from "../components/ui/avatar"; +import { getTitle } from "../Constants/Constaants"; const DefaultLayout: FC<{ children: React.ReactNode }> = ({ children }) => { const navigate = useNavigate() const location = useLocation() + const headerTitle = getTitle(location?.pathname) + + @@ -33,7 +37,9 @@ const DefaultLayout: FC<{ children: React.ReactNode }> = ({ children }) => { - + + {headerTitle} + navigate('/profile')} > @@ -42,6 +48,7 @@ const DefaultLayout: FC<{ children: React.ReactNode }> = ({ children }) => { ritesh.pandey@wdimails.com
+
{children} diff --git a/src/Pages/ManageCMS/AboutUs/AboutUs.tsx b/src/Pages/ManageCMS/AboutUs/AboutUs.tsx new file mode 100644 index 0000000..c16d6d9 --- /dev/null +++ b/src/Pages/ManageCMS/AboutUs/AboutUs.tsx @@ -0,0 +1,11 @@ +import MainFrame from '../../../components/MainFrame' + +const AboutUs = () => { + return ( + + + + ) +} + +export default AboutUs \ No newline at end of file diff --git a/src/Pages/ManageCMS/FAQ/FreqAskQuestion.tsx b/src/Pages/ManageCMS/FAQ/FreqAskQuestion.tsx new file mode 100644 index 0000000..f562825 --- /dev/null +++ b/src/Pages/ManageCMS/FAQ/FreqAskQuestion.tsx @@ -0,0 +1,12 @@ +import { Text } from '@chakra-ui/react' +import MainFrame from '../../../components/MainFrame' + +const FreqAskQuestion = () => { + return ( + + hello + + ) +} + +export default FreqAskQuestion \ No newline at end of file diff --git a/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx b/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx new file mode 100644 index 0000000..8a43a36 --- /dev/null +++ b/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx @@ -0,0 +1,11 @@ +import MainFrame from '../../../components/MainFrame' + +const PrivacyPolicy = () => { + return ( + + + + ) +} + +export default PrivacyPolicy \ No newline at end of file diff --git a/src/Pages/ManageCMS/TermsAndCondition/TermsAndCondition.tsx b/src/Pages/ManageCMS/TermsAndCondition/TermsAndCondition.tsx new file mode 100644 index 0000000..fac9972 --- /dev/null +++ b/src/Pages/ManageCMS/TermsAndCondition/TermsAndCondition.tsx @@ -0,0 +1,11 @@ +import MainFrame from '../../../components/MainFrame' + +const TermsAndCondition = () => { + return ( + + + + ) +} + +export default TermsAndCondition \ No newline at end of file diff --git a/src/Pages/ManageContactUs/ManageContactUs.tsx b/src/Pages/ManageContactUs/ManageContactUs.tsx new file mode 100644 index 0000000..f713710 --- /dev/null +++ b/src/Pages/ManageContactUs/ManageContactUs.tsx @@ -0,0 +1,11 @@ +import MainFrame from '../../components/MainFrame' + +const ManageContactUs = () => { + return ( + + + + ) +} + +export default ManageContactUs \ No newline at end of file diff --git a/src/Routes/Nav.ts b/src/Routes/Nav.ts index 78d1c1d..22aba5f 100644 --- a/src/Routes/Nav.ts +++ b/src/Routes/Nav.ts @@ -1,9 +1,12 @@ import { GoDotFill } from "react-icons/go"; -import { PiSuitcaseBold } from "react-icons/pi"; -import { RiSuitcase2Line } from "react-icons/ri"; -import { TbEdit, TbLayoutDashboard } from "react-icons/tb"; -import { TiUserAddOutline, TiUserOutline } from "react-icons/ti"; +import { PiHeadphonesBold, PiSuitcaseBold } from "react-icons/pi"; +import { RiSuitcase2Line, RiUserSettingsLine } from "react-icons/ri"; +import { TbEdit, TbHeadphonesFilled, TbLayoutDashboard } from "react-icons/tb"; +import { TiDocument, TiDocumentText, TiUser, TiUserAddOutline, TiUserOutline } from "react-icons/ti"; import { CgWorkAlt } from "react-icons/cg"; +import { HiOutlineDocumentReport, HiOutlineDocumentText } from "react-icons/hi"; +import { LuUserRound } from "react-icons/lu"; + export const nav = [ @@ -51,9 +54,44 @@ export const nav = [ type:'single' }, { - title: "Manage Jobs", - path: "/manage-jobs", - Icon: CgWorkAlt, + title: "Manage Contact Us", + path: "/manage-contact-us", + Icon: PiHeadphonesBold, + type:'single' + }, + + { + title: "Manage CMS", + path: "/faq", + Icon: TiDocumentText, + type:'multiple', + children: [ + { + title: "FAQ", + path: "/faq", + Icon: GoDotFill, + }, + { + title: "About Us", + path: "/about-us", + Icon: GoDotFill, + }, + { + title: "Privacy Policy", + path: "/privacy-policy", + Icon: GoDotFill, + }, + { + title: "Terms And Conditions", + path: "/terms-and-condition", + Icon: GoDotFill, + }, + ], + }, + { + title: "My Profile", + path: "/profile", + Icon: RiUserSettingsLine, type:'single' }, diff --git a/src/Routes/Routes.ts b/src/Routes/Routes.ts index 8aefe07..a9ee324 100644 --- a/src/Routes/Routes.ts +++ b/src/Routes/Routes.ts @@ -1,5 +1,9 @@ import Dashboard from "../Pages/Dashboard/Dashboard"; +import AboutUs from "../Pages/ManageCMS/AboutUs/AboutUs"; +import FreqAskQuestion from "../Pages/ManageCMS/FAQ/FreqAskQuestion"; +import PrivacyPolicy from "../Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy"; +import ManageContactUs from "../Pages/ManageContactUs/ManageContactUs"; import ManageJobs from "../Pages/ManageJobs/ManageJobs"; import ManagePost from "../Pages/ManagePost/ManagePost"; import ManageSubAdmin from "../Pages/ManageSubAdmin/ManageSubAdmin"; @@ -13,6 +17,25 @@ export const RouteLink = [ { path: "/manage-post", Component: ManagePost }, { path: "/manage-sub-admin", Component: ManageSubAdmin }, { path: "/manage-jobs", Component: ManageJobs }, + { path: "/manage-contact-us", Component: ManageContactUs }, + { path: "/faq", Component: FreqAskQuestion }, + + + + { path: "/about-us", Component: AboutUs }, + + + + { path: "/privacy-policy", Component: PrivacyPolicy }, + + + { path: "/terms-and-condition", Component: PrivacyPolicy }, + + + + + + diff --git a/src/components/MainFrame.tsx b/src/components/MainFrame.tsx index df552e2..6aabdd2 100644 --- a/src/components/MainFrame.tsx +++ b/src/components/MainFrame.tsx @@ -1,4 +1,4 @@ -import { Box, Text, VStack } from "@chakra-ui/react" +import { Box, VStack } from "@chakra-ui/react" import { motion } from "framer-motion" import React, { FC } from "react" import { OPACITY_ON_LOAD } from "../Layouts/animations" @@ -11,9 +11,9 @@ interface MainFrameProps { title?: string } -const MainFrame: FC = ({ children, title }) => { +const MainFrame: FC = ({ children }) => { return ( - + Date: Wed, 15 Jan 2025 20:33:34 +0530 Subject: [PATCH 04/13] update --- src/Routes/Nav.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Routes/Nav.ts b/src/Routes/Nav.ts index 22aba5f..c0450b5 100644 --- a/src/Routes/Nav.ts +++ b/src/Routes/Nav.ts @@ -1,11 +1,9 @@ -import { GoDotFill } from "react-icons/go"; -import { PiHeadphonesBold, PiSuitcaseBold } from "react-icons/pi"; -import { RiSuitcase2Line, RiUserSettingsLine } from "react-icons/ri"; -import { TbEdit, TbHeadphonesFilled, TbLayoutDashboard } from "react-icons/tb"; -import { TiDocument, TiDocumentText, TiUser, TiUserAddOutline, TiUserOutline } from "react-icons/ti"; import { CgWorkAlt } from "react-icons/cg"; -import { HiOutlineDocumentReport, HiOutlineDocumentText } from "react-icons/hi"; -import { LuUserRound } from "react-icons/lu"; +import { GoDotFill } from "react-icons/go"; +import { PiHeadphonesBold } from "react-icons/pi"; +import { RiUserSettingsLine } from "react-icons/ri"; +import { TbEdit, TbLayoutDashboard } from "react-icons/tb"; +import { TiDocumentText, TiUserAddOutline, TiUserOutline } from "react-icons/ti"; -- 2.34.1 From 7157a6396974b56061b21adb47fd91b86f724dd3 Mon Sep 17 00:00:00 2001 From: "Pratham.Mandavkar" Date: Wed, 15 Jan 2025 20:36:12 +0530 Subject: [PATCH 05/13] OTPpages --- src/App.tsx | 56 ++++++++---- src/Contexts/GlobalStateProvider.tsx | 2 +- src/Pages/OnBoarding/LoginOtp.tsx | 132 +++++++++++++++++++++++++++ src/assets/icons/edit.png | Bin 0 -> 667 bytes src/components/ui/pin-input.tsx | 27 ++++++ 5 files changed, 197 insertions(+), 20 deletions(-) create mode 100644 src/Pages/OnBoarding/LoginOtp.tsx create mode 100644 src/assets/icons/edit.png create mode 100644 src/components/ui/pin-input.tsx diff --git a/src/App.tsx b/src/App.tsx index fa6affb..7b53971 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,24 +1,42 @@ -import { useContext } from 'react'; +import { useContext } from "react"; import { Route, BrowserRouter as Router, Routes } from "react-router-dom"; -import GlobalStateContext from './Contexts/GlobalStateContext'; -import DefaultLayout from './Layouts/DefaultLayout'; -import Login from './Pages/Login'; -import { RouteLink } from './Routes/Routes'; +import GlobalStateContext from "./Contexts/GlobalStateContext"; +import DefaultLayout from "./Layouts/DefaultLayout"; +import Login from "./Pages/Login"; +import { RouteLink } from "./Routes/Routes"; +import LoginOtp from "./Pages/OnBoarding/LoginOtp"; -function App() { - const context = useContext(GlobalStateContext); - if (!context) throw new Error('App must be used within a GlobalStateProvider'); - const { isAuthenticate } = context; +function App() { + const context = useContext(GlobalStateContext); + if (!context) + throw new Error("App must be used within a GlobalStateProvider"); + const { isAuthenticate } = context; - return ( - - - } /> - {RouteLink.map(({ path, Component }, index) => (} />))}) : ()} /> - } /> - - - ); -} + return ( + + + } /> + } /> + + + {RouteLink.map(({ path, Component }, index) => ( + } /> + ))} + + + ) : ( + + ) + } + /> + } /> + + + ); +} export default App; diff --git a/src/Contexts/GlobalStateProvider.tsx b/src/Contexts/GlobalStateProvider.tsx index 1f2c713..9a839de 100644 --- a/src/Contexts/GlobalStateProvider.tsx +++ b/src/Contexts/GlobalStateProvider.tsx @@ -5,7 +5,7 @@ import GlobalStateContext from './GlobalStateContext'; const GlobalStateProvider = ({ children }:{children:ReactNode}) => { - const [isAuthenticate, setIsAuthenticate] = useState(true); + const [isAuthenticate, setIsAuthenticate] = useState(false); return ( diff --git a/src/Pages/OnBoarding/LoginOtp.tsx b/src/Pages/OnBoarding/LoginOtp.tsx new file mode 100644 index 0000000..3fa635a --- /dev/null +++ b/src/Pages/OnBoarding/LoginOtp.tsx @@ -0,0 +1,132 @@ +import { Center, HStack, Image, Input, Text, VStack } from "@chakra-ui/react"; +import { useContext, useState } from "react"; +import { useForm } from "react-hook-form"; +import GlobalStateContext from "../../Contexts/GlobalStateContext"; +import logo from "../../assets/logo.svg"; +import uiEdit from "../../assets/icons/edit.png"; +import { Button } from "../../components/ui/button"; +import { Field } from "../../components/ui/field"; +import { Toaster, toaster } from "../../components/ui/toaster"; +import { PinInput } from "../../components/ui/pin-input"; + +interface FormValues { + mobileNumber: number; +} + +const LoginOtp = () => { + const [isLoading, setIsLoading] = useState(false); + const context = useContext(GlobalStateContext); + if (!context) { + throw new Error("App must be used within a GlobalStateProvider"); + } + const { setIsAuthenticate } = context; + const { + register, + handleSubmit, + formState: { errors }, + } = useForm(); + + const onSubmit = handleSubmit((data) => { + setIsLoading(true); + if (data?.mobileNumber === 1234567890) { + setTimeout(() => { + setIsAuthenticate(true); + setIsLoading(false); + }, 3000); // 3-second delay + } else { + toaster.create({ + title: `Invalid Credentials`, + type: "error", + }); + setIsLoading(false); + } + }); + + return ( + + + + + + +
+ +
+ +
+ + + Enter otp + + + OTP has been send to your E-mail Address + + + + + 9619565889 + + + + + + + + Forgot password + + +
+ +
+
+ ); +}; + +export default LoginOtp; diff --git a/src/assets/icons/edit.png b/src/assets/icons/edit.png new file mode 100644 index 0000000000000000000000000000000000000000..2aeaad044baee7c745aa8b2a4b2e02a437de8ff6 GIT binary patch literal 667 zcmV;M0%ZM(P)Px%RY^oaRA>e5ncZ>1Fbse@0wXX&N5})%N}hP>H8wmj0vo^x-3T^d1V&&4dP-1; z-TYXIgL6IiuID&bBz=2Ey2*e0X9RU#e5v0DQQa>`O?;zEAz5e=~+O8M< zNwQg_LS51MrhkOCw9kS;@6Nn)%^tdd5 z(8rhK#yai{VK~$>iER)J5|t5_ASYmkEUfcA0pOZFM41Z!88t!lBNh5O#3t!0T9Dgw z384L4DWOaHwSt)O8v1J^|3k5D3E| zE`Wo49p34h3o$zYZYE|4z=4=800*LaF*(#U7uc!pyM$cl1j(U;UHaY*z{^DWb7Xb^ zJ|Ti+fFep|LjAV3OD-sYk4yvy7y>~VX=ppQpKTfTa-W>(Q})_o8v6}8Lkb7L$wVJy z&~evH1a-2{_`4v=H$HFA-sgKY{yvEQmu2M?_u^kb&=Jj$?Wt?Ps$)v2AFj`^dXOQUN_8kQF4Tqbn7b$*vr|b)`F-%25!8j>9Z3J^6TU92`ZoeH=)28ex=dGW z7^PI`i%;h>xxJ%K`lwPFix)8hF#<6HF#>amz%LGocy$b2GiU$+002ovPDHLkV1i+) BCWHV0 literal 0 HcmV?d00001 diff --git a/src/components/ui/pin-input.tsx b/src/components/ui/pin-input.tsx new file mode 100644 index 0000000..93e013c --- /dev/null +++ b/src/components/ui/pin-input.tsx @@ -0,0 +1,27 @@ +import { PinInput as ChakraPinInput, Group } from "@chakra-ui/react" +import * as React from "react" + +export interface PinInputProps extends ChakraPinInput.RootProps { + rootRef?: React.Ref + count?: number + inputProps?: React.InputHTMLAttributes + attached?: boolean +} + +export const PinInput = React.forwardRef( + function PinInput(props, ref) { + const { count = 4, inputProps, rootRef, attached, ...rest } = props + return ( + + + + + {Array.from({ length: count }).map((_, index) => ( + + ))} + + + + ) + }, +) -- 2.34.1 From 9688f07e4fd156cc3f0b2e05111b02de641b98c3 Mon Sep 17 00:00:00 2001 From: "Siddhesh.More" Date: Thu, 16 Jan 2025 12:10:28 +0530 Subject: [PATCH 06/13] UPDATE --- dev-dist/sw.js | 2 +- src/Constants/Constaants.tsx | 30 --- src/Constants/Constants.tsx | 19 ++ src/Layouts/DefaultLayout.tsx | 22 +- src/Pages/ManagePost/ManagePost.tsx | 5 +- .../RegisterUsers/RegisterUsers.tsx | 225 ++++++++++++++++++ src/Routes/Nav.ts | 18 +- src/Routes/Routes.ts | 12 +- src/components/DataTable.tsx | 35 +++ src/index.css | 77 +----- 10 files changed, 319 insertions(+), 126 deletions(-) delete mode 100644 src/Constants/Constaants.tsx create mode 100644 src/Constants/Constants.tsx create mode 100644 src/components/DataTable.tsx diff --git a/dev-dist/sw.js b/dev-dist/sw.js index b003956..c8fe26e 100644 --- a/dev-dist/sw.js +++ b/dev-dist/sw.js @@ -82,7 +82,7 @@ define(['./workbox-54d0af47'], (function (workbox) { 'use strict'; "revision": "3ca0b8505b4bec776b69afdba2768812" }, { "url": "index.html", - "revision": "0.jlpvaemfr1" + "revision": "0.7mpt2f2te58" }], {}); workbox.cleanupOutdatedCaches(); workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), { diff --git a/src/Constants/Constaants.tsx b/src/Constants/Constaants.tsx deleted file mode 100644 index 842f931..0000000 --- a/src/Constants/Constaants.tsx +++ /dev/null @@ -1,30 +0,0 @@ -export const getTitle = (loactions:string) =>{ - - if (loactions==='/') { - return 'Dashboard' - }else if (loactions==='/register-user') { - return 'Manage User - Register User' - } else if (loactions==='/deactivate-accounts') { - return 'Manage User - Deactivated User' - } else if (loactions==='/manage-post') { - return 'Manage Post' - } else if (loactions==='/manage-sub-admin') { - return 'Manage Sub Admin' - } else if (loactions==='/manage-jobs') { - return 'Manage Jobs' - } else if (loactions==='/manage-contact-us') { - return 'Manage Contact Us' - } else if (loactions==='/manage-contact-us') { - return 'Manage Contact Us' - }else if (loactions==='/faq') { - return 'Manage CMS - FAQ' - }else if (loactions==='/about-us') { - return 'Manage CMS - About Us' - }else if (loactions==='/privacy-policy') { - return 'Manage CMS - Privacy Policy' - }else if (loactions==='/terms-and-condition') { - return 'Manage CMS - Tems And Condition' - }else if (loactions==='/profile') { - return 'My Profile' - } -} \ No newline at end of file diff --git a/src/Constants/Constants.tsx b/src/Constants/Constants.tsx new file mode 100644 index 0000000..09c8792 --- /dev/null +++ b/src/Constants/Constants.tsx @@ -0,0 +1,19 @@ +export const getTitle = (location: string): string => { + const titles: { [key: string]: string } = { + '/': 'Dashboard', + '/manage-user/register-user': 'Manage User', + '/manage-user/deactivate-accounts': 'Manage User', + '/manage-post': 'Manage Post', + '/manage-sub-admin': 'Manage Sub Admin', + '/manage-jobs': 'Manage Jobs', + '/manage-contact-us': 'Manage Contact Us', + '/manage-cms/faq': 'Manage CMS', + '/manage-cms/about-us': 'Manage CMS', + '/manage-cms/privacy-policy': 'Manage CMS', + '/manage-cms/terms-and-condition': 'Manage CMS', + '/profile': 'My Profile', + }; + + return titles[location] || 'Page Not Found'; + }; + \ No newline at end of file diff --git a/src/Layouts/DefaultLayout.tsx b/src/Layouts/DefaultLayout.tsx index c6df190..cac6cd9 100644 --- a/src/Layouts/DefaultLayout.tsx +++ b/src/Layouts/DefaultLayout.tsx @@ -6,12 +6,14 @@ import { nav } from "../Routes/Nav"; import logo from '../assets/logo.svg'; import { AccordionItem, AccordionItemContent, AccordionItemTrigger, AccordionRoot } from "../components/ui/accordion"; import { Avatar } from "../components/ui/avatar"; -import { getTitle } from "../Constants/Constaants"; +import { getTitle } from "../Constants/Constants"; const DefaultLayout: FC<{ children: React.ReactNode }> = ({ children }) => { const navigate = useNavigate() const location = useLocation() const headerTitle = getTitle(location?.pathname) + console.log(location); + @@ -19,27 +21,27 @@ const DefaultLayout: FC<{ children: React.ReactNode }> = ({ children }) => { return ( - + - - {nav?.map(({ title, path, Icon, type, children }, index) => type === 'single' ? - {title} : + + {nav?.map(({ title, path, Icon, type, children, initPath }, index) => type === 'single' ? + {title} : - - navigate(path)} gap={0} style={{ cursor: 'pointer', borderRadius: '8px', padding: '5px', width: '100%', display: 'flex', alignItems: 'center', border: '1px solid #ffffff', backgroundColor:'#fff',color:'#000', fontSize: '14px', fontWeight:'normal' }}> {title} + + navigate(path)} gap={0} style={{ cursor: 'pointer', borderRadius: '8px', padding: '5px', width: '100%', display: 'flex', alignItems: 'center', border: '1px solid #ffffff', backgroundColor:'#fff',color:'#000', fontSize: '14px', fontWeight:'normal' }}> {title} {children?.map(({ title, path, Icon }, index) => navigate(path)} style={{ marginTop: 6, cursor: 'pointer', borderRadius: '8px', padding: '6px', width: '100%', display: 'flex', alignItems: 'center', gap: 6, border: '1px solid #ffffff', backgroundColor:'#fff',color:'#000' }} > {title})} )} - - {headerTitle} - + + {headerTitle} + navigate('/profile')} > diff --git a/src/Pages/ManagePost/ManagePost.tsx b/src/Pages/ManagePost/ManagePost.tsx index edbb8e2..2dc46be 100644 --- a/src/Pages/ManagePost/ManagePost.tsx +++ b/src/Pages/ManagePost/ManagePost.tsx @@ -1,7 +1,10 @@ +import MainFrame from "../../components/MainFrame" const ManagePost = () => { return ( -
ManagePost
+ + + ) } diff --git a/src/Pages/ManageUser/RegisterUsers/RegisterUsers.tsx b/src/Pages/ManageUser/RegisterUsers/RegisterUsers.tsx index f32f938..312e8d9 100644 --- a/src/Pages/ManageUser/RegisterUsers/RegisterUsers.tsx +++ b/src/Pages/ManageUser/RegisterUsers/RegisterUsers.tsx @@ -1,9 +1,234 @@ +import { Box, HStack, Input, Stack, Table, Text } from '@chakra-ui/react' import MainFrame from '../../../components/MainFrame' +import { InputGroup } from '../../../components/ui/input-group' +import { LuSearch } from 'react-icons/lu' +import DataTable from '../../../components/DataTable' + + + + + // Table setup + const tableHeadRow = [ + "Sr. No", + "First Name", + "Mobile number", + "Gender", + "DOB", + "Type of User", + "Language", + "Status", + "Action", + ]; + + + + const usersData:any[] = [ + { + "Sr. No": 1, + "First Name": "Ritesh", + "Mobile number": "9876543210", + "Gender": "Male", + "DOB": "15-01-1990", + "Type of User": "Admin", + "Language": "English", + "Status": "Active", + "Action": "Edit/Delete", + }, + { + 'Sr. No': 2, + "First Name": "Anjali", + "Mobile number": "9123456789", + "Gender": "Female", + "DOB": "21-06-1995", + "Type of User": "Customer", + "Language": "Hindi", + "Status": "Inactive", + "Action": "Edit/Delete", + }, + { + 'Sr. No': 3, + "First Name": "Rajesh", + "Mobile number": "9871234560", + "Gender": "Male", + "DOB": "12-12-1985", + "Type of User": "Vendor", + "Language": "English", + "Status": "Active", + "Action": "Edit/Delete", + }, + { + 'Sr. No': 4, + "First Name": "Priya", + "Mobile number": "9988776655", + "Gender": "Female", + "DOB": "05-05-1998", + "Type of User": "Customer", + "Language": "Tamil", + "Status": "Active", + "Action": "Edit/Delete", + }, + { + 'Sr. No': 5, + "First Name": "Amit", + "Mobile number": "8899665544", + "Gender": "Male", + "DOB": "03-03-1992", + "Type of User": "Admin", + "Language": "Gujarati", + "Status": "Inactive", + "Action": "Edit/Delete", + }, + { + 'Sr. No': 6, + "First Name": "Amit", + "Mobile number": "8899665544", + "Gender": "Male", + "DOB": "03-03-1992", + "Type of User": "Admin", + "Language": "Gujarati", + "Status": "Inactive", + "Action": "Edit/Delete", + }, + { + 'Sr. No': 7, + "First Name": "Amit", + "Mobile number": "8899665544", + "Gender": "Male", + "DOB": "03-03-1992", + "Type of User": "Admin", + "Language": "Gujarati", + "Status": "Inactive", + "Action": "Edit/Delete", + }, + { + 'Sr. No': 5, + "First Name": "Amit", + "Mobile number": "8899665544", + "Gender": "Male", + "DOB": "03-03-1992", + "Type of User": "Admin", + "Language": "Gujarati", + "Status": "Inactive", + "Action": "Edit/Delete", + }, + { + 'Sr. No': 6, + "First Name": "Amit", + "Mobile number": "8899665544", + "Gender": "Male", + "DOB": "03-03-1992", + "Type of User": "Admin", + "Language": "Gujarati", + "Status": "Inactive", + "Action": "Edit/Delete", + }, + { + 'Sr. No': 7, + "First Name": "Amit", + "Mobile number": "8899665544", + "Gender": "Male", + "DOB": "03-03-1992", + "Type of User": "Admin", + "Language": "Gujarati", + "Status": "Inactive", + "Action": "Edit/Delete", + }, + { + 'Sr. No': 8, + "First Name": "Amit", + "Mobile number": "8899665544", + "Gender": "Male", + "DOB": "03-03-1992", + "Type of User": "Admin", + "Language": "Gujarati", + "Status": "Inactive", + "Action": "Edit/Delete", + }, + { + 'Sr. No': 9, + "First Name": "Amit", + "Mobile number": "8899665544", + "Gender": "Male", + "DOB": "03-03-1992", + "Type of User": "Admin", + "Language": "Gujarati", + "Status": "Inactive", + "Action": "Edit/Delete", + }, + { + 'Sr. No': 10, + "First Name": "Amit", + "Mobile number": "8899665544", + "Gender": "Male", + "DOB": "03-03-1992", + "Type of User": "Admin", + "Language": "Gujarati", + "Status": "Inactive", + "Action": "Edit/Delete", + }, + { + 'Sr. No': 11, + "First Name": "Amit", + "Mobile number": "8899665544", + "Gender": "Male", + "DOB": "03-03-1992", + "Type of User": "Admin", + "Language": "Gujarati", + "Status": "Inactive", + "Action": "Edit/Delete", + }, + { + 'Sr. No': 12, + "First Name": "Amit", + "Mobile number": "8899665544", + "Gender": "Male", + "DOB": "03-03-1992", + "Type of User": "Admin", + "Language": "Gujarati", + "Status": "Inactive", + "Action": "Edit/Delete", + }, + { + 'Sr. No': 13, + "First Name": "Amit", + "Mobile number": "8899665544", + "Gender": "Male", + "DOB": "03-03-1992", + "Type of User": "Admin", + "Language": "Gujarati", + "Status": "Inactive", + "Action": "Edit/Delete", + }, + ]; + const RegisterUsers = () => { + return ( + + Register User + + + + } + w={'100%'} + color={'#000'} + > + + + + + + + + + + ) } diff --git a/src/Routes/Nav.ts b/src/Routes/Nav.ts index c0450b5..5c3852d 100644 --- a/src/Routes/Nav.ts +++ b/src/Routes/Nav.ts @@ -17,18 +17,19 @@ export const nav = [ }, { title: "Manage Users", - path: "/register-user", + path: "/manage-user/register-user", + initPath:'/manage-user', Icon: TiUserOutline, type:'multiple', children: [ { title: "Register Users", - path: "/register-user", + path: "/manage-user/register-user", Icon: GoDotFill, }, { title: "Deactivated Accounts", - path: "/deactivate-accounts", + path: "/manage-user/deactivate-accounts", Icon: GoDotFill, }, ], @@ -60,28 +61,29 @@ export const nav = [ { title: "Manage CMS", - path: "/faq", + initPath:'/manage-cms', + path: "/manage-cms/faq", Icon: TiDocumentText, type:'multiple', children: [ { title: "FAQ", - path: "/faq", + path: "/manage-cms/faq", Icon: GoDotFill, }, { title: "About Us", - path: "/about-us", + path: "/manage-cms/about-us", Icon: GoDotFill, }, { title: "Privacy Policy", - path: "/privacy-policy", + path: "/manage-cms/privacy-policy", Icon: GoDotFill, }, { title: "Terms And Conditions", - path: "/terms-and-condition", + path: "/manage-cms/terms-and-condition", Icon: GoDotFill, }, ], diff --git a/src/Routes/Routes.ts b/src/Routes/Routes.ts index a9ee324..6157151 100644 --- a/src/Routes/Routes.ts +++ b/src/Routes/Routes.ts @@ -12,24 +12,24 @@ import RegisterUsers from "../Pages/ManageUser/RegisterUsers/RegisterUsers"; import Profile from "../Pages/Profile/Profile"; export const RouteLink = [ { path: "/", Component: Dashboard }, - { path: "/register-user", Component: RegisterUsers }, - { path: "/deactivate-accounts", Component: DeactivatedAccounts }, + { path: "/manage-user/register-user", Component: RegisterUsers }, + { path: "/manage-user/deactivate-accounts", Component: DeactivatedAccounts }, { path: "/manage-post", Component: ManagePost }, { path: "/manage-sub-admin", Component: ManageSubAdmin }, { path: "/manage-jobs", Component: ManageJobs }, { path: "/manage-contact-us", Component: ManageContactUs }, - { path: "/faq", Component: FreqAskQuestion }, + { path: "/manage-cms/faq", Component: FreqAskQuestion }, - { path: "/about-us", Component: AboutUs }, + { path: "/manage-cms/about-us", Component: AboutUs }, - { path: "/privacy-policy", Component: PrivacyPolicy }, + { path: "/manage-cms/privacy-policy", Component: PrivacyPolicy }, - { path: "/terms-and-condition", Component: PrivacyPolicy }, + { path: "/manage-cms/terms-and-condition", Component: PrivacyPolicy }, diff --git a/src/components/DataTable.tsx b/src/components/DataTable.tsx new file mode 100644 index 0000000..cb5cbbe --- /dev/null +++ b/src/components/DataTable.tsx @@ -0,0 +1,35 @@ +import { Stack, Table } from "@chakra-ui/react" + + +interface TableProps { + tableHeadRow: string[]; + data: Record[]; +} + + + +const DataTable: React.FC = ({ tableHeadRow, data }) => { + return ( + + + + + {tableHeadRow.map((item, index)=>{item})} + + + + + {data.map((item:any, index) => ( + + {tableHeadRow.map((heading)=>{item[heading]} )} + + ))} + + + + + ) +} + +export default DataTable \ No newline at end of file diff --git a/src/index.css b/src/index.css index 1ac4b6c..7e69aee 100644 --- a/src/index.css +++ b/src/index.css @@ -1,4 +1,4 @@ -*{ +body{ margin: 0; padding: 0; box-sizing: border-box; @@ -21,7 +21,12 @@ /* background-color: #e2e8f01c !important; */ } - +.active>.css-1ic543h { + -webkit-transition: rotate 0.2s; + transition: rotate 0.2s; + transform-origin: center; + color: #fff; +} .linkChild:hover{ color: #02A0A0 !important; @@ -48,71 +53,3 @@ /* background-color: #e2e8f01c !important; */ } - -/* Sphere.css */ - -/* ✅ Red Spheres */ -.red-sphere-1, -.red-sphere-2, -.red-sphere-3{ - position: absolute; - border-radius: 50%; - background-color: #D90B2E46; - box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); - filter: blur(100px); -} - -/* ✅ Blue Spheres */ -.blue-sphere-1, -.blue-sphere-2, -.blue-sphere-3{ - position: absolute; - border-radius: 50%; - background-color: #009DAB46; - box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); - filter: blur(100px); -} - -/* 🔧 Positioning for Spheres */ -.red-sphere-1 { - width: 250px; - height: 250px; - top: 10%; - left: 5%; -} - -.blue-sphere-1 { - width: 320px; - height: 320px; - top: 30%; - right: 0%; -} - -.red-sphere-2 { - width: 180px; - height: 180px; - bottom: 15%; - left: 20%; -} - -.blue-sphere-2 { - width: 140px; - height: 140px; - bottom: 5%; - right: 25%; -} - -.red-sphere-3 { - width: 480px; - height: 480px; - bottom: 55%; - left: 40%; -} - -.blue-sphere-3{ - width: 300px; - height: 300px; - bottom: 10%; - right: 40%; -} - -- 2.34.1 From 50a56cfe6b238506b20b9cbdd87558df1f961ae0 Mon Sep 17 00:00:00 2001 From: "Pratham.Mandavkar" Date: Thu, 16 Jan 2025 16:29:15 +0530 Subject: [PATCH 07/13] OnBoarding forms --- dev-dist/sw.js | 2 +- src/App.tsx | 2 + src/Layouts/DefaultLayout.tsx | 218 +++++++-- src/Pages/Login.tsx | 135 ++++-- .../RegisterUsers/RegisterUsers.tsx | 447 +++++++++--------- src/Pages/OnBoarding/CreatePass.tsx | 149 ++++++ src/Pages/OnBoarding/LoginOtp.tsx | 12 +- src/components/MainFrame.tsx | 2 +- src/index.css | 24 + 9 files changed, 675 insertions(+), 316 deletions(-) create mode 100644 src/Pages/OnBoarding/CreatePass.tsx diff --git a/dev-dist/sw.js b/dev-dist/sw.js index c8fe26e..0ba50c7 100644 --- a/dev-dist/sw.js +++ b/dev-dist/sw.js @@ -82,7 +82,7 @@ define(['./workbox-54d0af47'], (function (workbox) { 'use strict'; "revision": "3ca0b8505b4bec776b69afdba2768812" }, { "url": "index.html", - "revision": "0.7mpt2f2te58" + "revision": "0.46s6apu2028" }], {}); workbox.cleanupOutdatedCaches(); workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), { diff --git a/src/App.tsx b/src/App.tsx index 7b53971..0ba553c 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -5,6 +5,7 @@ import DefaultLayout from "./Layouts/DefaultLayout"; import Login from "./Pages/Login"; import { RouteLink } from "./Routes/Routes"; import LoginOtp from "./Pages/OnBoarding/LoginOtp"; +import CreatePass from "./Pages/OnBoarding/CreatePass"; function App() { const context = useContext(GlobalStateContext); @@ -17,6 +18,7 @@ function App() { } /> } /> + }/> = ({ children }) => { - const navigate = useNavigate() - const location = useLocation() - const headerTitle = getTitle(location?.pathname) + const navigate = useNavigate(); + const location = useLocation(); + const headerTitle = getTitle(location?.pathname); console.log(location); - - - - - - return ( - - - - + + + - - {nav?.map(({ title, path, Icon, type, children, initPath }, index) => type === 'single' ? - {title} : - - - navigate(path)} gap={0} style={{ cursor: 'pointer', borderRadius: '8px', padding: '5px', width: '100%', display: 'flex', alignItems: 'center', border: '1px solid #ffffff', backgroundColor:'#fff',color:'#000', fontSize: '14px', fontWeight:'normal' }}> {title} - {children?.map(({ title, path, Icon }, index) => navigate(path)} style={{ marginTop: 6, cursor: 'pointer', borderRadius: '8px', padding: '6px', width: '100%', display: 'flex', alignItems: 'center', gap: 6, border: '1px solid #ffffff', backgroundColor:'#fff',color:'#000' }} > {title})} - - )} + + {nav?.map(({ title, path, Icon, type, children, initPath }, index) => + type === "single" ? ( + + {" "} + + {title} + + + ) : ( + + + navigate(path)} + gap={0} + style={{ + cursor: "pointer", + borderRadius: "8px", + padding: "5px", + width: "100%", + display: "flex", + alignItems: "center", + border: "1px solid #ffffff", + backgroundColor: "#fff", + color: "#000", + fontSize: "14px", + fontWeight: "normal", + }} + > + {" "} + + + {title} + + + {children?.map(({ title, path, Icon }, index) => ( + navigate(path)} + style={{ + marginTop: 6, + cursor: "pointer", + borderRadius: "8px", + padding: "6px", + width: "100%", + display: "flex", + alignItems: "center", + gap: 6, + border: "1px solid #ffffff", + backgroundColor: "#fff", + color: "#000", + }} + > + {" "} + + {title} + + + ))} + + + ) + )} - - - {headerTitle} - - - navigate('/profile')} > - - - Ritesh Pandey - ritesh.pandey@wdimails.com - - + + + + {headerTitle} + + + + navigate("/profile")}> + + + + Ritesh Pandey + + ritesh.pandey@wdimails.com + + {children} diff --git a/src/Pages/Login.tsx b/src/Pages/Login.tsx index ea2c5dd..5c37c55 100644 --- a/src/Pages/Login.tsx +++ b/src/Pages/Login.tsx @@ -1,96 +1,127 @@ -import { Center, HStack, Image, Input, Text, VStack } from "@chakra-ui/react" -import { useContext, useState } from "react" -import { useForm } from "react-hook-form" -import GlobalStateContext from "../Contexts/GlobalStateContext" -import logo from '../assets/logo.svg' -import { Button } from "../components/ui/button" -import { Field } from "../components/ui/field" -import { Toaster, toaster } from "../components/ui/toaster" +import { Center, HStack, Image, Input, Text, VStack } from "@chakra-ui/react"; +import { useContext, useState } from "react"; +import { useForm } from "react-hook-form"; +import GlobalStateContext from "../Contexts/GlobalStateContext"; +import logo from "../assets/logo.svg"; +import { Button } from "../components/ui/button"; +import { Field } from "../components/ui/field"; +import { Toaster, toaster } from "../components/ui/toaster"; +import { LuUser } from "react-icons/lu"; interface FormValues { - mobileNumber: number + mobileNumber: number; } const Login = () => { - - const [isLoading, setIsLoading] = useState(false) + const [isLoading, setIsLoading] = useState(false); const context = useContext(GlobalStateContext); if (!context) { - throw new Error('App must be used within a GlobalStateProvider'); + throw new Error("App must be used within a GlobalStateProvider"); } const { setIsAuthenticate } = context; const { register, handleSubmit, formState: { errors }, - } = useForm() - + } = useForm(); const onSubmit = handleSubmit((data) => { - setIsLoading(true) + setIsLoading(true); if (data?.mobileNumber === 1234567890) { setTimeout(() => { setIsAuthenticate(true); - setIsLoading(false) + setIsLoading(false); }, 3000); // 3-second delay - } else { toaster.create({ title: `Invalid Credentials`, type: "error", - }) - setIsLoading(false) + }); + setIsLoading(false); } }); - return ( - - - - - - - + + + - - - - - - -
+ +
+
+ + + LOGIN + + + + + - - -
- - LOGIN - - - - - {/* Forget password */} + Forget password - + Forgot password - -
- ) -} + ); +}; -export default Login \ No newline at end of file +export default Login; diff --git a/src/Pages/ManageUser/RegisterUsers/RegisterUsers.tsx b/src/Pages/ManageUser/RegisterUsers/RegisterUsers.tsx index 312e8d9..4388fbe 100644 --- a/src/Pages/ManageUser/RegisterUsers/RegisterUsers.tsx +++ b/src/Pages/ManageUser/RegisterUsers/RegisterUsers.tsx @@ -1,236 +1,233 @@ -import { Box, HStack, Input, Stack, Table, Text } from '@chakra-ui/react' -import MainFrame from '../../../components/MainFrame' -import { InputGroup } from '../../../components/ui/input-group' -import { LuSearch } from 'react-icons/lu' -import DataTable from '../../../components/DataTable' +import { Box, HStack, Input, Stack, Table, Text } from "@chakra-ui/react"; +import MainFrame from "../../../components/MainFrame"; +import { InputGroup } from "../../../components/ui/input-group"; +import { LuSearch } from "react-icons/lu"; +import DataTable from "../../../components/DataTable"; +// Table setup +const tableHeadRow = [ + "Sr. No", + "First Name", + "Mobile number", + "Gender", + "DOB", + "Type of User", + "Language", + "Status", + "Action", +]; - - - // Table setup - const tableHeadRow = [ - "Sr. No", - "First Name", - "Mobile number", - "Gender", - "DOB", - "Type of User", - "Language", - "Status", - "Action", - ]; - - - - const usersData:any[] = [ - { - "Sr. No": 1, - "First Name": "Ritesh", - "Mobile number": "9876543210", - "Gender": "Male", - "DOB": "15-01-1990", - "Type of User": "Admin", - "Language": "English", - "Status": "Active", - "Action": "Edit/Delete", - }, - { - 'Sr. No': 2, - "First Name": "Anjali", - "Mobile number": "9123456789", - "Gender": "Female", - "DOB": "21-06-1995", - "Type of User": "Customer", - "Language": "Hindi", - "Status": "Inactive", - "Action": "Edit/Delete", - }, - { - 'Sr. No': 3, - "First Name": "Rajesh", - "Mobile number": "9871234560", - "Gender": "Male", - "DOB": "12-12-1985", - "Type of User": "Vendor", - "Language": "English", - "Status": "Active", - "Action": "Edit/Delete", - }, - { - 'Sr. No': 4, - "First Name": "Priya", - "Mobile number": "9988776655", - "Gender": "Female", - "DOB": "05-05-1998", - "Type of User": "Customer", - "Language": "Tamil", - "Status": "Active", - "Action": "Edit/Delete", - }, - { - 'Sr. No': 5, - "First Name": "Amit", - "Mobile number": "8899665544", - "Gender": "Male", - "DOB": "03-03-1992", - "Type of User": "Admin", - "Language": "Gujarati", - "Status": "Inactive", - "Action": "Edit/Delete", - }, - { - 'Sr. No': 6, - "First Name": "Amit", - "Mobile number": "8899665544", - "Gender": "Male", - "DOB": "03-03-1992", - "Type of User": "Admin", - "Language": "Gujarati", - "Status": "Inactive", - "Action": "Edit/Delete", - }, - { - 'Sr. No': 7, - "First Name": "Amit", - "Mobile number": "8899665544", - "Gender": "Male", - "DOB": "03-03-1992", - "Type of User": "Admin", - "Language": "Gujarati", - "Status": "Inactive", - "Action": "Edit/Delete", - }, - { - 'Sr. No': 5, - "First Name": "Amit", - "Mobile number": "8899665544", - "Gender": "Male", - "DOB": "03-03-1992", - "Type of User": "Admin", - "Language": "Gujarati", - "Status": "Inactive", - "Action": "Edit/Delete", - }, - { - 'Sr. No': 6, - "First Name": "Amit", - "Mobile number": "8899665544", - "Gender": "Male", - "DOB": "03-03-1992", - "Type of User": "Admin", - "Language": "Gujarati", - "Status": "Inactive", - "Action": "Edit/Delete", - }, - { - 'Sr. No': 7, - "First Name": "Amit", - "Mobile number": "8899665544", - "Gender": "Male", - "DOB": "03-03-1992", - "Type of User": "Admin", - "Language": "Gujarati", - "Status": "Inactive", - "Action": "Edit/Delete", - }, - { - 'Sr. No': 8, - "First Name": "Amit", - "Mobile number": "8899665544", - "Gender": "Male", - "DOB": "03-03-1992", - "Type of User": "Admin", - "Language": "Gujarati", - "Status": "Inactive", - "Action": "Edit/Delete", - }, - { - 'Sr. No': 9, - "First Name": "Amit", - "Mobile number": "8899665544", - "Gender": "Male", - "DOB": "03-03-1992", - "Type of User": "Admin", - "Language": "Gujarati", - "Status": "Inactive", - "Action": "Edit/Delete", - }, - { - 'Sr. No': 10, - "First Name": "Amit", - "Mobile number": "8899665544", - "Gender": "Male", - "DOB": "03-03-1992", - "Type of User": "Admin", - "Language": "Gujarati", - "Status": "Inactive", - "Action": "Edit/Delete", - }, - { - 'Sr. No': 11, - "First Name": "Amit", - "Mobile number": "8899665544", - "Gender": "Male", - "DOB": "03-03-1992", - "Type of User": "Admin", - "Language": "Gujarati", - "Status": "Inactive", - "Action": "Edit/Delete", - }, - { - 'Sr. No': 12, - "First Name": "Amit", - "Mobile number": "8899665544", - "Gender": "Male", - "DOB": "03-03-1992", - "Type of User": "Admin", - "Language": "Gujarati", - "Status": "Inactive", - "Action": "Edit/Delete", - }, - { - 'Sr. No': 13, - "First Name": "Amit", - "Mobile number": "8899665544", - "Gender": "Male", - "DOB": "03-03-1992", - "Type of User": "Admin", - "Language": "Gujarati", - "Status": "Inactive", - "Action": "Edit/Delete", - }, - ]; - +const usersData: any[] = [ + { + "Sr. No": 1, + "First Name": "Ritesh", + "Mobile number": "9876543210", + Gender: "Male", + DOB: "15-01-1990", + "Type of User": "Admin", + Language: "English", + Status: "Active", + Action: "Edit/Delete", + }, + { + "Sr. No": 2, + "First Name": "Anjali", + "Mobile number": "9123456789", + Gender: "Female", + DOB: "21-06-1995", + "Type of User": "Customer", + Language: "Hindi", + Status: "Inactive", + Action: "Edit/Delete", + }, + { + "Sr. No": 3, + "First Name": "Rajesh", + "Mobile number": "9871234560", + Gender: "Male", + DOB: "12-12-1985", + "Type of User": "Vendor", + Language: "English", + Status: "Active", + Action: "Edit/Delete", + }, + { + "Sr. No": 4, + "First Name": "Priya", + "Mobile number": "9988776655", + Gender: "Female", + DOB: "05-05-1998", + "Type of User": "Customer", + Language: "Tamil", + Status: "Active", + Action: "Edit/Delete", + }, + { + "Sr. No": 5, + "First Name": "Amit", + "Mobile number": "8899665544", + Gender: "Male", + DOB: "03-03-1992", + "Type of User": "Admin", + Language: "Gujarati", + Status: "Inactive", + Action: "Edit/Delete", + }, + { + "Sr. No": 6, + "First Name": "Amit", + "Mobile number": "8899665544", + Gender: "Male", + DOB: "03-03-1992", + "Type of User": "Admin", + Language: "Gujarati", + Status: "Inactive", + Action: "Edit/Delete", + }, + { + "Sr. No": 7, + "First Name": "Amit", + "Mobile number": "8899665544", + Gender: "Male", + DOB: "03-03-1992", + "Type of User": "Admin", + Language: "Gujarati", + Status: "Inactive", + Action: "Edit/Delete", + }, + { + "Sr. No": 5, + "First Name": "Amit", + "Mobile number": "8899665544", + Gender: "Male", + DOB: "03-03-1992", + "Type of User": "Admin", + Language: "Gujarati", + Status: "Inactive", + Action: "Edit/Delete", + }, + { + "Sr. No": 6, + "First Name": "Amit", + "Mobile number": "8899665544", + Gender: "Male", + DOB: "03-03-1992", + "Type of User": "Admin", + Language: "Gujarati", + Status: "Inactive", + Action: "Edit/Delete", + }, + { + "Sr. No": 7, + "First Name": "Amit", + "Mobile number": "8899665544", + Gender: "Male", + DOB: "03-03-1992", + "Type of User": "Admin", + Language: "Gujarati", + Status: "Inactive", + Action: "Edit/Delete", + }, + { + "Sr. No": 8, + "First Name": "Amit", + "Mobile number": "8899665544", + Gender: "Male", + DOB: "03-03-1992", + "Type of User": "Admin", + Language: "Gujarati", + Status: "Inactive", + Action: "Edit/Delete", + }, + { + "Sr. No": 9, + "First Name": "Amit", + "Mobile number": "8899665544", + Gender: "Male", + DOB: "03-03-1992", + "Type of User": "Admin", + Language: "Gujarati", + Status: "Inactive", + Action: "Edit/Delete", + }, + { + "Sr. No": 10, + "First Name": "Amit", + "Mobile number": "8899665544", + Gender: "Male", + DOB: "03-03-1992", + "Type of User": "Admin", + Language: "Gujarati", + Status: "Inactive", + Action: "Edit/Delete", + }, + { + "Sr. No": 11, + "First Name": "Amit", + "Mobile number": "8899665544", + Gender: "Male", + DOB: "03-03-1992", + "Type of User": "Admin", + Language: "Gujarati", + Status: "Inactive", + Action: "Edit/Delete", + }, + { + "Sr. No": 12, + "First Name": "Amit", + "Mobile number": "8899665544", + Gender: "Male", + DOB: "03-03-1992", + "Type of User": "Admin", + Language: "Gujarati", + Status: "Inactive", + Action: "Edit/Delete", + }, + { + "Sr. No": 13, + "First Name": "Amit", + "Mobile number": "8899665544", + Gender: "Male", + DOB: "03-03-1992", + "Type of User": "Admin", + Language: "Gujarati", + Status: "Inactive", + Action: "Edit/Delete", + }, +]; const RegisterUsers = () => { - return ( - - Register User + + + Register User + - - + } - w={'100%'} - color={'#000'} - > - - - - + bgSize={"xs"} + flex="1" + startElement={} + w={"100%"} + color={"#000"} + > + + + + - - - - - - + - ) -} + ); +}; -export default RegisterUsers \ No newline at end of file +export default RegisterUsers; diff --git a/src/Pages/OnBoarding/CreatePass.tsx b/src/Pages/OnBoarding/CreatePass.tsx new file mode 100644 index 0000000..0fd60ac --- /dev/null +++ b/src/Pages/OnBoarding/CreatePass.tsx @@ -0,0 +1,149 @@ +import { Center, HStack, Image, Input, Text, VStack } from "@chakra-ui/react"; +import { useContext, useState } from "react"; +import { useForm } from "react-hook-form"; +import GlobalStateContext from "../../Contexts/GlobalStateContext"; +import logo from "../../assets/logo.svg"; +import { Button } from "../../components/ui/button"; +import { Field } from "../../components/ui/field"; +import { Toaster, toaster } from "../../components/ui/toaster"; + +interface FormValues { + password: string; + confirmPassword: string; +} + +const CreatePass = () => { + const [isLoading, setIsLoading] = useState(false); + const context = useContext(GlobalStateContext); + if (!context) { + throw new Error("App must be used within a GlobalStateProvider"); + } + const { setIsAuthenticate } = context; + const { + register, + handleSubmit, + formState: { errors }, + } = useForm(); + + const onSubmit = handleSubmit((data) => { + setIsLoading(true); + if (data?.password === "password123") { + setTimeout(() => { + setIsAuthenticate(true); + setIsLoading(false); + }, 3000); + } else { + toaster.create({ + title: `Invalid Credentials`, + type: "error", + }); + setIsLoading(false); + } + }); + + return ( + + + + + + +
+ +
+ +
+ + + create a password + + + + + + + + + value === getValues("password") || "Passwords do not match", + })} + placeholder="Confirm your password" + /> + + + + Forgot password + + +
+ +
+
+ ); +}; + +export default CreatePass; diff --git a/src/Pages/OnBoarding/LoginOtp.tsx b/src/Pages/OnBoarding/LoginOtp.tsx index 3fa635a..b5c9b7e 100644 --- a/src/Pages/OnBoarding/LoginOtp.tsx +++ b/src/Pages/OnBoarding/LoginOtp.tsx @@ -1,4 +1,4 @@ -import { Center, HStack, Image, Input, Text, VStack } from "@chakra-ui/react"; +import { Center, HStack, Image, Input, Text, VStack } from "@chakra-ui/react"; import { useContext, useState } from "react"; import { useForm } from "react-hook-form"; import GlobalStateContext from "../../Contexts/GlobalStateContext"; @@ -106,6 +106,16 @@ const LoginOtp = () => { + + Resend OTP + - Forgot password + + Forgot password? +
diff --git a/src/Pages/ManageUser/RegisterUsers/RegisterUsers.tsx b/src/Pages/ManageUser/RegisterUsers/RegisterUsers.tsx index 4388fbe..704abef 100644 --- a/src/Pages/ManageUser/RegisterUsers/RegisterUsers.tsx +++ b/src/Pages/ManageUser/RegisterUsers/RegisterUsers.tsx @@ -1,8 +1,27 @@ -import { Box, HStack, Input, Stack, Table, Text } from "@chakra-ui/react"; +import { + Box, + HStack, + Input, + Stack, + Table, + Text, + VStack, +} from "@chakra-ui/react"; import MainFrame from "../../../components/MainFrame"; import { InputGroup } from "../../../components/ui/input-group"; import { LuSearch } from "react-icons/lu"; import DataTable from "../../../components/DataTable"; +import { Switch } from "../../../components/ui/switch"; +import { Button } from "../../../components/ui/button"; +import { FaRegEye } from "react-icons/fa"; +import { CiEdit } from "react-icons/ci"; +import { RiDeleteBin5Line } from "react-icons/ri"; +import { + PaginationItems, + PaginationNextTrigger, + PaginationPrevTrigger, + PaginationRoot, +} from "../../../components/ui/pagination"; // Table setup const tableHeadRow = [ @@ -13,7 +32,7 @@ const tableHeadRow = [ "DOB", "Type of User", "Language", - "Status", + "Activate/Deactivate", "Action", ]; @@ -26,180 +45,119 @@ const usersData: any[] = [ DOB: "15-01-1990", "Type of User": "Admin", Language: "English", - Status: "Active", - Action: "Edit/Delete", + "Activate/Deactivate": ( + + Yes + + No + + ), + Action: ( + + + + + + ), }, { "Sr. No": 2, - "First Name": "Anjali", - "Mobile number": "9123456789", - Gender: "Female", - DOB: "21-06-1995", - "Type of User": "Customer", - Language: "Hindi", - Status: "Inactive", - Action: "Edit/Delete", + "First Name": "Ritesh", + "Mobile number": "9876543210", + Gender: "Male", + DOB: "15-01-1990", + "Type of User": "Admin", + Language: "English", + "Activate/Deactivate": ( + + Yes + + No + + ), + Action: ( + + + + + + ), }, { "Sr. No": 3, - "First Name": "Rajesh", - "Mobile number": "9871234560", + "First Name": "Ritesh", + "Mobile number": "9876543210", Gender: "Male", - DOB: "12-12-1985", - "Type of User": "Vendor", + DOB: "15-01-1990", + "Type of User": "Admin", Language: "English", - Status: "Active", - Action: "Edit/Delete", + "Activate/Deactivate": ( + + Yes + + No + + ), + Action: ( + + + + + + ), }, { "Sr. No": 4, - "First Name": "Priya", - "Mobile number": "9988776655", - Gender: "Female", - DOB: "05-05-1998", - "Type of User": "Customer", - Language: "Tamil", - Status: "Active", - Action: "Edit/Delete", + "First Name": "Ritesh", + "Mobile number": "9876543210", + Gender: "Male", + DOB: "15-01-1990", + "Type of User": "Admin", + Language: "English", + "Activate/Deactivate": ( + + Yes + + No + + ), + Action: ( + + + + + + ), }, { "Sr. No": 5, - "First Name": "Amit", - "Mobile number": "8899665544", + "First Name": "Ritesh", + "Mobile number": "9876543210", Gender: "Male", - DOB: "03-03-1992", + DOB: "15-01-1990", "Type of User": "Admin", - Language: "Gujarati", - Status: "Inactive", - Action: "Edit/Delete", - }, - { - "Sr. No": 6, - "First Name": "Amit", - "Mobile number": "8899665544", - Gender: "Male", - DOB: "03-03-1992", - "Type of User": "Admin", - Language: "Gujarati", - Status: "Inactive", - Action: "Edit/Delete", - }, - { - "Sr. No": 7, - "First Name": "Amit", - "Mobile number": "8899665544", - Gender: "Male", - DOB: "03-03-1992", - "Type of User": "Admin", - Language: "Gujarati", - Status: "Inactive", - Action: "Edit/Delete", - }, - { - "Sr. No": 5, - "First Name": "Amit", - "Mobile number": "8899665544", - Gender: "Male", - DOB: "03-03-1992", - "Type of User": "Admin", - Language: "Gujarati", - Status: "Inactive", - Action: "Edit/Delete", - }, - { - "Sr. No": 6, - "First Name": "Amit", - "Mobile number": "8899665544", - Gender: "Male", - DOB: "03-03-1992", - "Type of User": "Admin", - Language: "Gujarati", - Status: "Inactive", - Action: "Edit/Delete", - }, - { - "Sr. No": 7, - "First Name": "Amit", - "Mobile number": "8899665544", - Gender: "Male", - DOB: "03-03-1992", - "Type of User": "Admin", - Language: "Gujarati", - Status: "Inactive", - Action: "Edit/Delete", - }, - { - "Sr. No": 8, - "First Name": "Amit", - "Mobile number": "8899665544", - Gender: "Male", - DOB: "03-03-1992", - "Type of User": "Admin", - Language: "Gujarati", - Status: "Inactive", - Action: "Edit/Delete", - }, - { - "Sr. No": 9, - "First Name": "Amit", - "Mobile number": "8899665544", - Gender: "Male", - DOB: "03-03-1992", - "Type of User": "Admin", - Language: "Gujarati", - Status: "Inactive", - Action: "Edit/Delete", - }, - { - "Sr. No": 10, - "First Name": "Amit", - "Mobile number": "8899665544", - Gender: "Male", - DOB: "03-03-1992", - "Type of User": "Admin", - Language: "Gujarati", - Status: "Inactive", - Action: "Edit/Delete", - }, - { - "Sr. No": 11, - "First Name": "Amit", - "Mobile number": "8899665544", - Gender: "Male", - DOB: "03-03-1992", - "Type of User": "Admin", - Language: "Gujarati", - Status: "Inactive", - Action: "Edit/Delete", - }, - { - "Sr. No": 12, - "First Name": "Amit", - "Mobile number": "8899665544", - Gender: "Male", - DOB: "03-03-1992", - "Type of User": "Admin", - Language: "Gujarati", - Status: "Inactive", - Action: "Edit/Delete", - }, - { - "Sr. No": 13, - "First Name": "Amit", - "Mobile number": "8899665544", - Gender: "Male", - DOB: "03-03-1992", - "Type of User": "Admin", - Language: "Gujarati", - Status: "Inactive", - Action: "Edit/Delete", + Language: "English", + "Activate/Deactivate": ( + + Yes + + No + + ), + Action: ( + + + + + + ), }, ]; const RegisterUsers = () => { return ( - + Register User @@ -226,6 +184,20 @@ const RegisterUsers = () => { + + + + {/* */} + + + + ); }; diff --git a/src/Pages/OnBoarding/LoginOtp.tsx b/src/Pages/OnBoarding/LoginOtp.tsx index b5c9b7e..9ddf6ce 100644 --- a/src/Pages/OnBoarding/LoginOtp.tsx +++ b/src/Pages/OnBoarding/LoginOtp.tsx @@ -8,6 +8,7 @@ import { Button } from "../../components/ui/button"; import { Field } from "../../components/ui/field"; import { Toaster, toaster } from "../../components/ui/toaster"; import { PinInput } from "../../components/ui/pin-input"; +import { useNavigate } from "react-router-dom"; interface FormValues { mobileNumber: number; @@ -16,6 +17,7 @@ interface FormValues { const LoginOtp = () => { const [isLoading, setIsLoading] = useState(false); const context = useContext(GlobalStateContext); + const navigate = useNavigate(); if (!context) { throw new Error("App must be used within a GlobalStateProvider"); } @@ -117,7 +119,7 @@ const LoginOtp = () => { Resend OTP diff --git a/src/Pages/OnBoarding/LoginWithPass.tsx b/src/Pages/OnBoarding/LoginWithPass.tsx new file mode 100644 index 0000000..96a8c3b --- /dev/null +++ b/src/Pages/OnBoarding/LoginWithPass.tsx @@ -0,0 +1,170 @@ +import { Center, HStack, Image, Input, Text, VStack } from "@chakra-ui/react"; +import { useContext, useState } from "react"; +import GlobalStateContext from "../../Contexts/GlobalStateContext"; +import logo from "../../assets/logo.svg"; +import { Button } from "../../components/ui/button"; +import { Toaster, toaster } from "../../components/ui/toaster"; +import { NavLink, useNavigate } from "react-router-dom"; +import { Field } from "../../components/ui/field"; + +const LoginWithPass = () => { + const [isLoading, setIsLoading] = useState(false); + const [mobileNumber, setMobileNumber] = useState(""); + const [password, setPassword] = useState(""); + const context = useContext(GlobalStateContext); + const navigate = useNavigate(); + + if (!context) { + throw new Error("App must be used within a GlobalStateProvider"); + } + + const { setIsAuthenticate } = context; + + // Validation functions + const validateMobileNumber = (mobile: string) => { + if (!mobile) { + return "Mobile Number is required"; + } + if (mobile.length !== 10) { + return "Mobile Number must be 10 digits long"; + } + return ""; + }; + + const validatePassword = (password: string) => { + if (!password) { + return "Password is required"; + } + if (password.length < 6) { + return "Password must be at least 6 characters long"; + } + return ""; + }; + + const onHandleSubmit = () => { + const mobileError = validateMobileNumber(mobileNumber); + const passwordError = validatePassword(password); + + if (mobileError || passwordError) { + toaster.create({ + title: mobileError || passwordError, + type: "error", + }); + return; + } + + setIsLoading(true); + if (mobileNumber === "1231239870" && password === " ") { + navigate("/"); + } else { + setIsLoading(false); + toaster.create({ + title: "Invalid Credentials", + type: "error", + }); + } + }; + + return ( + + + + + + +
+ +
+ +
{ + e.preventDefault(); + onHandleSubmit(); + }} + > + + + LogIn + + + + + setMobileNumber(e.target.value)} + placeholder="Enter your mobile number" + /> + + + + setPassword(e.target.value)} + placeholder="Enter your password" + /> + + + Forget password + + + + + + + Forgot password + + +
+ +
+
+ ); +}; + +export default LoginWithPass; diff --git a/src/components/DataTable.tsx b/src/components/DataTable.tsx index cb5cbbe..e569383 100644 --- a/src/components/DataTable.tsx +++ b/src/components/DataTable.tsx @@ -14,7 +14,7 @@ const DataTable: React.FC = ({ tableHeadRow, data }) => { - {tableHeadRow.map((item, index)=>{item})} + {tableHeadRow.map((item, index)=>{item})} diff --git a/src/components/ui/link-button.tsx b/src/components/ui/link-button.tsx new file mode 100644 index 0000000..defa1c3 --- /dev/null +++ b/src/components/ui/link-button.tsx @@ -0,0 +1,12 @@ +"use client" + +import type { HTMLChakraProps, RecipeProps } from "@chakra-ui/react" +import { createRecipeContext } from "@chakra-ui/react" + +export interface LinkButtonProps + extends HTMLChakraProps<"a", RecipeProps<"button">> {} + +const { withContext } = createRecipeContext({ key: "button" }) + +// Replace "a" with your framework's link component +export const LinkButton = withContext("a") diff --git a/src/components/ui/pagination.tsx b/src/components/ui/pagination.tsx new file mode 100644 index 0000000..fc21919 --- /dev/null +++ b/src/components/ui/pagination.tsx @@ -0,0 +1,215 @@ +"use client"; + +import type { ButtonProps, TextProps } from "@chakra-ui/react"; +import { + Button, + Pagination as ChakraPagination, + IconButton, + Text, + createContext, + usePaginationContext, +} from "@chakra-ui/react"; +import * as React from "react"; +import { + HiChevronLeft, + HiChevronRight, + HiMiniEllipsisHorizontal, +} from "react-icons/hi2"; +import { LinkButton } from "./link-button"; + +interface ButtonVariantMap { + current: ButtonProps["variant"]; + default: ButtonProps["variant"]; + ellipsis: ButtonProps["variant"]; +} + +type PaginationVariant = "outline" | "solid" | "subtle"; + +interface ButtonVariantContext { + size: ButtonProps["size"]; + variantMap: ButtonVariantMap; + getHref?: (page: number) => string; +} + +const [RootPropsProvider, useRootProps] = createContext({ + name: "RootPropsProvider", +}); + +export interface PaginationRootProps + extends Omit { + size?: ButtonProps["size"]; + variant?: PaginationVariant; + getHref?: (page: number) => string; +} + +const variantMap: Record = { + outline: { default: "ghost", ellipsis: "plain", current: "outline" }, + solid: { default: "outline", ellipsis: "outline", current: "solid" }, + subtle: { default: "ghost", ellipsis: "plain", current: "subtle" }, +}; + +export const PaginationRoot = React.forwardRef< + HTMLDivElement, + PaginationRootProps +>(function PaginationRoot(props, ref) { + const { size = "sm", variant = "outline", getHref, ...rest } = props; + return ( + + + + ); +}); + +export const PaginationEllipsis = React.forwardRef< + HTMLDivElement, + ChakraPagination.EllipsisProps +>(function PaginationEllipsis(props, ref) { + const { size, variantMap } = useRootProps(); + return ( + + + + ); +}); + +export const PaginationItem = React.forwardRef< + HTMLButtonElement, + ChakraPagination.ItemProps +>(function PaginationItem(props, ref) { + const { page } = usePaginationContext(); + const { size, variantMap, getHref } = useRootProps(); + + const current = page === props.value; + const variant = current ? variantMap.current : variantMap.default; + + if (getHref) { + return ( + + {props.value} + + ); + } + + return ( + + + + ); +}); + +export const PaginationPrevTrigger = React.forwardRef< + HTMLButtonElement, + ChakraPagination.PrevTriggerProps +>(function PaginationPrevTrigger(props, ref) { + const { size, variantMap, getHref } = useRootProps(); + const { previousPage } = usePaginationContext(); + + if (getHref) { + return ( + + + + ); + } + + return ( + + + + + + ); +}); + +export const PaginationNextTrigger = React.forwardRef< + HTMLButtonElement, + ChakraPagination.NextTriggerProps +>(function PaginationNextTrigger(props, ref) { + const { size, variantMap, getHref } = useRootProps(); + const { nextPage } = usePaginationContext(); + + if (getHref) { + return ( + + + + ); + } + + return ( + + + + ); +}); + +export const PaginationItems = (props: React.HTMLAttributes) => { + return ( + + {({ pages }) => + pages.map((page, index) => { + return page.type === "ellipsis" ? ( + + ) : ( + + ); + }) + } + + ); +}; + +interface PageTextProps extends TextProps { + format?: "short" | "compact" | "long"; +} + +export const PaginationPageText = React.forwardRef< + HTMLParagraphElement, + PageTextProps +>(function PaginationPageText(props, ref) { + const { format = "compact", ...rest } = props; + const { page, totalPages, pageRange, count } = usePaginationContext(); + const content = React.useMemo(() => { + if (format === "short") return `${page} / ${totalPages}`; + if (format === "compact") return `${page} of ${totalPages}`; + return `${pageRange.start + 1} - ${Math.min(pageRange.end, count)} of ${count}`; + }, [format, page, totalPages, pageRange, count]); + + return ( + + {content} + + ); +}); diff --git a/src/components/ui/switch.tsx b/src/components/ui/switch.tsx new file mode 100644 index 0000000..a677ca2 --- /dev/null +++ b/src/components/ui/switch.tsx @@ -0,0 +1,39 @@ +import { Switch as ChakraSwitch } from "@chakra-ui/react" +import * as React from "react" + +export interface SwitchProps extends ChakraSwitch.RootProps { + inputProps?: React.InputHTMLAttributes + rootRef?: React.Ref + trackLabel?: { on: React.ReactNode; off: React.ReactNode } + thumbLabel?: { on: React.ReactNode; off: React.ReactNode } +} + +export const Switch = React.forwardRef( + function Switch(props, ref) { + const { inputProps, children, rootRef, trackLabel, thumbLabel, ...rest } = + props + + return ( + + + + + {thumbLabel && ( + + {thumbLabel?.on} + + )} + + {trackLabel && ( + + {trackLabel.on} + + )} + + {children != null && ( + {children} + )} + + ) + }, +) -- 2.34.1 From cc33540e4fc64424d3a285f6e14d0b70c1393bd9 Mon Sep 17 00:00:00 2001 From: "Pratham.Mandavkar" Date: Fri, 17 Jan 2025 17:38:05 +0530 Subject: [PATCH 09/13] MyProfile and minor changes --- dev-dist/sw.js | 2 +- src/Layouts/DefaultLayout.tsx | 4 +- .../RegisterUsers/RegisterUsers.tsx | 167 ++++++++++++- src/Pages/Profile/Profile.tsx | 59 ++++- src/Routes/Nav.ts | 221 ++++++++++-------- src/Routes/Routes.ts | 52 ++--- src/assets/profile-Avtars/mypfp.png | Bin 0 -> 31476 bytes src/components/MainFrame.tsx | 2 +- src/components/ui/pagination.tsx | 29 +-- 9 files changed, 382 insertions(+), 154 deletions(-) create mode 100644 src/assets/profile-Avtars/mypfp.png diff --git a/dev-dist/sw.js b/dev-dist/sw.js index 92d566b..21173fd 100644 --- a/dev-dist/sw.js +++ b/dev-dist/sw.js @@ -82,7 +82,7 @@ define(['./workbox-54d0af47'], (function (workbox) { 'use strict'; "revision": "3ca0b8505b4bec776b69afdba2768812" }, { "url": "index.html", - "revision": "0.o063ar5rjc" + "revision": "0.g1faafl9ja8" }], {}); workbox.cleanupOutdatedCaches(); workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), { diff --git a/src/Layouts/DefaultLayout.tsx b/src/Layouts/DefaultLayout.tsx index face04c..dc62e93 100644 --- a/src/Layouts/DefaultLayout.tsx +++ b/src/Layouts/DefaultLayout.tsx @@ -31,11 +31,11 @@ const DefaultLayout: FC<{ children: React.ReactNode }> = ({ children }) => { w="100%" h="100vh" > - + - + {nav?.map(({ title, path, Icon, type, children, initPath }, index) => type === "single" ? ( ), }, + { + "Sr. No": 6, + "First Name": "Ritesh", + "Mobile number": "9876543210", + Gender: "Male", + DOB: "15-01-1990", + "Type of User": "Admin", + Language: "English", + "Activate/Deactivate": ( + + Yes + + No + + ), + Action: ( + + + + + + ), + }, + { + "Sr. No": 6, + "First Name": "Ritesh", + "Mobile number": "9876543210", + Gender: "Male", + DOB: "15-01-1990", + "Type of User": "Admin", + Language: "English", + "Activate/Deactivate": ( + + Yes + + No + + ), + Action: ( + + + + + + ), + }, + { + "Sr. No": 7, + "First Name": "Ritesh", + "Mobile number": "9876543210", + Gender: "Male", + DOB: "15-01-1990", + "Type of User": "Admin", + Language: "English", + "Activate/Deactivate": ( + + Yes + + No + + ), + Action: ( + + + + + + ), + }, + { + "Sr. No": 7, + "First Name": "Ritesh", + "Mobile number": "9876543210", + Gender: "Male", + DOB: "15-01-1990", + "Type of User": "Admin", + Language: "English", + "Activate/Deactivate": ( + + Yes + + No + + ), + Action: ( + + + + + + ), + }, + { + "Sr. No": 8, + "First Name": "Ritesh", + "Mobile number": "9876543210", + Gender: "Male", + DOB: "15-01-1990", + "Type of User": "Admin", + Language: "English", + "Activate/Deactivate": ( + + Yes + + No + + ), + Action: ( + + + + + + ), + }, + { + "Sr. No": 9, + "First Name": "Ritesh", + "Mobile number": "9876543210", + Gender: "Male", + DOB: "15-01-1990", + "Type of User": "Admin", + Language: "English", + "Activate/Deactivate": ( + + Yes + + No + + ), + Action: ( + + + + + + ), + }, + { + "Sr. No": 10, + "First Name": "Ritesh", + "Mobile number": "9876543210", + Gender: "Male", + DOB: "15-01-1990", + "Type of User": "Admin", + Language: "English", + "Activate/Deactivate": ( + + Yes + + No + + ), + Action: ( + + + + + + ), + }, ]; const RegisterUsers = () => { @@ -184,20 +345,20 @@ const RegisterUsers = () => {
- - + {/* */} + ); }; diff --git a/src/Pages/Profile/Profile.tsx b/src/Pages/Profile/Profile.tsx index ff8f49e..3298d63 100644 --- a/src/Pages/Profile/Profile.tsx +++ b/src/Pages/Profile/Profile.tsx @@ -1,11 +1,60 @@ -import MainFrame from "../../components/MainFrame" +import { Circle, HStack, Image, Input, Text, VStack } from "@chakra-ui/react"; +import MainFrame from "../../components/MainFrame"; +import mypfp from "../../assets/profile-Avtars/mypfp.png"; +import { FaCamera } from "react-icons/fa"; +import { Field } from "../../components/ui/field"; +import { Button } from "../../components/ui/button"; const Profile = () => { return ( - + + + + + + + + + + + Jackson David + + + Employee ID: #1245679 + + + + + + + + + + + + + + + + + + + Update Password + + + + - ) -} + ); +}; -export default Profile \ No newline at end of file +export default Profile; diff --git a/src/Routes/Nav.ts b/src/Routes/Nav.ts index 5c3852d..1e4c231 100644 --- a/src/Routes/Nav.ts +++ b/src/Routes/Nav.ts @@ -3,96 +3,135 @@ import { GoDotFill } from "react-icons/go"; import { PiHeadphonesBold } from "react-icons/pi"; import { RiUserSettingsLine } from "react-icons/ri"; import { TbEdit, TbLayoutDashboard } from "react-icons/tb"; -import { TiDocumentText, TiUserAddOutline, TiUserOutline } from "react-icons/ti"; - - +import { + TiDocumentText, + TiUserAddOutline, + TiUserOutline, +} from "react-icons/ti"; export const nav = [ - - { - title: "Dashboard", - path: "/", - Icon: TbLayoutDashboard, - type:'single' - }, - { - title: "Manage Users", - path: "/manage-user/register-user", - initPath:'/manage-user', - Icon: TiUserOutline, - type:'multiple', - children: [ - { - title: "Register Users", - path: "/manage-user/register-user", - Icon: GoDotFill, - }, - { - title: "Deactivated Accounts", - path: "/manage-user/deactivate-accounts", - Icon: GoDotFill, - }, - ], - }, - { - title: "Manage Post", - path: "/manage-post", - Icon: TbEdit, - type:'single' - }, - { - title: "Manage Sub-Admin", - path: "/manage-sub-admin", - Icon: TiUserAddOutline, - type:'single' - }, - { - title: "Manage Jobs", - path: "/manage-jobs", - Icon: CgWorkAlt, - type:'single' - }, - { - title: "Manage Contact Us", - path: "/manage-contact-us", - Icon: PiHeadphonesBold, - type:'single' - }, - - { - title: "Manage CMS", - initPath:'/manage-cms', - path: "/manage-cms/faq", - Icon: TiDocumentText, - type:'multiple', - children: [ - { - title: "FAQ", - path: "/manage-cms/faq", - Icon: GoDotFill, - }, - { - title: "About Us", - path: "/manage-cms/about-us", - Icon: GoDotFill, - }, - { - title: "Privacy Policy", - path: "/manage-cms/privacy-policy", - Icon: GoDotFill, - }, - { - title: "Terms And Conditions", - path: "/manage-cms/terms-and-condition", - Icon: GoDotFill, - }, - ], - }, - { - title: "My Profile", - path: "/profile", - Icon: RiUserSettingsLine, - type:'single' - }, - - ]; \ No newline at end of file + { + title: "Dashboard", + path: "/", + Icon: TbLayoutDashboard, + type: "single", + }, + { + title: "Manage Users", + path: "/manage-user/register-user", + initPath: "/manage-user", + Icon: TiUserOutline, + type: "multiple", + children: [ + { + title: "Register Users", + path: "/manage-user/register-user", + Icon: GoDotFill, + }, + { + title: "Deactivated Accounts", + path: "/manage-user/deactivate-accounts", + Icon: GoDotFill, + }, + ], + }, + { + title: "Manage Post", + path: "/manage-post", + Icon: TbEdit, + type: "single", + }, + { + title: "Manage Sub-Admin", + path: "/manage-sub-admin", + Icon: TiUserAddOutline, + type: "single", + }, + { + title: "Manage Jobs", + path: "/manage-jobs", + Icon: CgWorkAlt, + type: "single", + }, + { + title: "Manage Contact Us", + path: "/manage-contact-us", + Icon: PiHeadphonesBold, + type: "single", + }, + + { + title: "Manage CMS", + initPath: "/manage-cms", + path: "/manage-cms/faq", + Icon: TiDocumentText, + type: "multiple", + children: [ + { + title: "FAQ", + path: "/manage-cms/faq", + Icon: GoDotFill, + }, + { + title: "About Us", + path: "/manage-cms/about-us", + Icon: GoDotFill, + }, + { + title: "Privacy Policy", + path: "/manage-cms/privacy-policy", + Icon: GoDotFill, + }, + { + title: "Terms And Conditions", + path: "/manage-cms/terms-and-condition", + Icon: GoDotFill, + }, + ], + }, + { + title: "My Profile", + path: "/profile", + Icon: RiUserSettingsLine, + type: "single", + }, + { + title: "Master Module", + initPath: "/master-module", + path: "/master-module/agency-master", + Icon: TiDocumentText, + type: "multiple", + children: [ + { + title: "Agency Master", + path: "/master-module/agency-master", + Icon: GoDotFill, + }, + { + title: "Template Master", + path: "/master-module/template-master", + Icon: GoDotFill, + }, + { + title: "Job Type", + path: "/master-module/job-type", + Icon: GoDotFill, + }, + { + title: "Workspace model", + path: "/master-module/workspace-model", + Icon: GoDotFill, + }, + { + title: "Country", + path: "/master-module/country", + Icon: GoDotFill, + }, + { + title: "Job Status", + path: "/master-module/job-status", + Icon: GoDotFill, + }, + ], + }, +]; diff --git a/src/Routes/Routes.ts b/src/Routes/Routes.ts index 6157151..df63538 100644 --- a/src/Routes/Routes.ts +++ b/src/Routes/Routes.ts @@ -1,4 +1,3 @@ - import Dashboard from "../Pages/Dashboard/Dashboard"; import AboutUs from "../Pages/ManageCMS/AboutUs/AboutUs"; import FreqAskQuestion from "../Pages/ManageCMS/FAQ/FreqAskQuestion"; @@ -11,45 +10,22 @@ import DeactivatedAccounts from "../Pages/ManageUser/DeactivatedAccounts/Deactiv import RegisterUsers from "../Pages/ManageUser/RegisterUsers/RegisterUsers"; import Profile from "../Pages/Profile/Profile"; export const RouteLink = [ - { path: "/", Component: Dashboard }, - { path: "/manage-user/register-user", Component: RegisterUsers }, - { path: "/manage-user/deactivate-accounts", Component: DeactivatedAccounts }, - { path: "/manage-post", Component: ManagePost }, - { path: "/manage-sub-admin", Component: ManageSubAdmin }, - { path: "/manage-jobs", Component: ManageJobs }, - { path: "/manage-contact-us", Component: ManageContactUs }, - { path: "/manage-cms/faq", Component: FreqAskQuestion }, + { path: "/", Component: Dashboard }, + { path: "/manage-user/register-user", Component: RegisterUsers }, + { path: "/manage-user/deactivate-accounts", Component: DeactivatedAccounts }, + { path: "/manage-post", Component: ManagePost }, + { path: "/manage-sub-admin", Component: ManageSubAdmin }, + { path: "/manage-jobs", Component: ManageJobs }, + { path: "/manage-contact-us", Component: ManageContactUs }, + { path: "/manage-cms/faq", Component: FreqAskQuestion }, + { path: "/manage-cms/about-us", Component: AboutUs }, + { path: "/manage-cms/privacy-policy", Component: PrivacyPolicy }, - { path: "/manage-cms/about-us", Component: AboutUs }, + { path: "/manage-cms/terms-and-condition", Component: PrivacyPolicy }, + { path: "/profile", Component: Profile }, - - { path: "/manage-cms/privacy-policy", Component: PrivacyPolicy }, - - - { path: "/manage-cms/terms-and-condition", Component: PrivacyPolicy }, - - - - - - - - - - - - - - - - - - - - - - { path: "/profile", Component: Profile}, -] \ No newline at end of file + { path: "/my-profile", Component: Profile }, +]; diff --git a/src/assets/profile-Avtars/mypfp.png b/src/assets/profile-Avtars/mypfp.png new file mode 100644 index 0000000000000000000000000000000000000000..8b8ba467d1b8dcbb7267053fb958d4f4e84d0c0e GIT binary patch literal 31476 zcmV*TKwQ6xP)PyA07*naRCodGy#;txSKjs=TIwyutx#xjO9I3_Awmoygt%eB-3jg*ED+o+5L|); zPY4#Y#i7&Aw9}ENBkw!&Jm34h*ZqC>f1h>Ej?s3e?UZv)u4`TU=stVztlzr-w$`?> zvHtxkt^jV`s*cYd+vCyG2t0W<9FLw&!_ya=@Z{M6Jb8W&kDtFVwkOZO!;|Nzw3$A8 zOTNo}a9`Y~?E7g19z5~kZ~iJy-g*$$EAUHS0X%ro6c3)J89{seoUptctd~Le@4xpQ zOJw%0x7SQsrhp&>vwqkY!l7cA9FpepS50r zA9V#p`6P;Ih3^NL+!~ZtrTkHS%=+Onm3GA6ZBUO zU|BG&K$;hjRsdfy0QEpJsPpjIaP#Vs7I-$2hOoraGks?^hsTB}s|9x9SNoL3547e1 zO@R<|fRX25HCJC9FlFNFe|CPK`2q0j0{J^Uc{cUc>5&$8qionlD8^>^&0#OeZU%3{kL%xe~{G_)(-eDbU^FCW$ZUk zpKY@GjsGH!27i#NU|Tz(^&0&9eZcBB{&*6tK^g1d^Ro=VRv3Rcj8dv*jg0>L3Sd>y zimxI2)?@3vJzh$rpnA<;)QkN+i*{$6q$D~BXtc-OZ7()WLs z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jf>_Z~_ literal 0 HcmV?d00001 diff --git a/src/components/MainFrame.tsx b/src/components/MainFrame.tsx index 1adcf9e..8d9f19c 100644 --- a/src/components/MainFrame.tsx +++ b/src/components/MainFrame.tsx @@ -16,7 +16,7 @@ const MainFrame: FC = ({ children }) => { - @@ -174,18 +179,16 @@ export const PaginationItems = (props: React.HTMLAttributes) => { return ( {({ pages }) => - pages.map((page, index) => { - return page.type === "ellipsis" ? ( - - ) : ( - - ); - }) + pages.map((page, index) => ( + + )) } ); -- 2.34.1 From d6ba0818c252476c0caca97a15ad246583fc796b Mon Sep 17 00:00:00 2001 From: "Pratham.Mandavkar" Date: Mon, 20 Jan 2025 13:09:25 +0530 Subject: [PATCH 10/13] UseForms --- dev-dist/sw.js | 2 +- package-lock.json | 1 - src/Contexts/GlobalStateProvider.tsx | 2 +- src/Pages/OnBoarding/LoginWithPass.tsx | 92 ++++++++++++-------------- src/Pages/Profile/Profile.tsx | 53 +++++++++++++-- src/index.css | 2 +- 6 files changed, 92 insertions(+), 60 deletions(-) diff --git a/dev-dist/sw.js b/dev-dist/sw.js index 21173fd..18ba53a 100644 --- a/dev-dist/sw.js +++ b/dev-dist/sw.js @@ -82,7 +82,7 @@ define(['./workbox-54d0af47'], (function (workbox) { 'use strict'; "revision": "3ca0b8505b4bec776b69afdba2768812" }, { "url": "index.html", - "revision": "0.g1faafl9ja8" + "revision": "0.s3ua6eoia6o" }], {}); workbox.cleanupOutdatedCaches(); workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), { diff --git a/package-lock.json b/package-lock.json index 22e03c6..ac4ad4f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1668,7 +1668,6 @@ }, "node_modules/@clack/prompts/node_modules/is-unicode-supported": { "version": "1.3.0", - "extraneous": true, "inBundle": true, "license": "MIT", "engines": { diff --git a/src/Contexts/GlobalStateProvider.tsx b/src/Contexts/GlobalStateProvider.tsx index 1f2c713..9a839de 100644 --- a/src/Contexts/GlobalStateProvider.tsx +++ b/src/Contexts/GlobalStateProvider.tsx @@ -5,7 +5,7 @@ import GlobalStateContext from './GlobalStateContext'; const GlobalStateProvider = ({ children }:{children:ReactNode}) => { - const [isAuthenticate, setIsAuthenticate] = useState(true); + const [isAuthenticate, setIsAuthenticate] = useState(false); return ( diff --git a/src/Pages/OnBoarding/LoginWithPass.tsx b/src/Pages/OnBoarding/LoginWithPass.tsx index 96a8c3b..765cceb 100644 --- a/src/Pages/OnBoarding/LoginWithPass.tsx +++ b/src/Pages/OnBoarding/LoginWithPass.tsx @@ -1,5 +1,6 @@ import { Center, HStack, Image, Input, Text, VStack } from "@chakra-ui/react"; -import { useContext, useState } from "react"; +import { useContext } from "react"; +import { useForm } from "react-hook-form"; import GlobalStateContext from "../../Contexts/GlobalStateContext"; import logo from "../../assets/logo.svg"; import { Button } from "../../components/ui/button"; @@ -8,9 +9,11 @@ import { NavLink, useNavigate } from "react-router-dom"; import { Field } from "../../components/ui/field"; const LoginWithPass = () => { - const [isLoading, setIsLoading] = useState(false); - const [mobileNumber, setMobileNumber] = useState(""); - const [password, setPassword] = useState(""); + const { + register, + handleSubmit, + formState: { errors }, + } = useForm(); const context = useContext(GlobalStateContext); const navigate = useNavigate(); @@ -20,44 +23,13 @@ const LoginWithPass = () => { const { setIsAuthenticate } = context; - // Validation functions - const validateMobileNumber = (mobile: string) => { - if (!mobile) { - return "Mobile Number is required"; - } - if (mobile.length !== 10) { - return "Mobile Number must be 10 digits long"; - } - return ""; - }; + const onSubmit = (data: { mobileNumber: string; password: string }) => { + const { mobileNumber, password } = data; - const validatePassword = (password: string) => { - if (!password) { - return "Password is required"; - } - if (password.length < 6) { - return "Password must be at least 6 characters long"; - } - return ""; - }; - - const onHandleSubmit = () => { - const mobileError = validateMobileNumber(mobileNumber); - const passwordError = validatePassword(password); - - if (mobileError || passwordError) { - toaster.create({ - title: mobileError || passwordError, - type: "error", - }); - return; - } - - setIsLoading(true); - if (mobileNumber === "1231239870" && password === " ") { + if (mobileNumber === "1231239870" && password === "admin@123") { navigate("/"); + setIsAuthenticate(true); } else { - setIsLoading(false); toaster.create({ title: "Invalid Credentials", type: "error", @@ -93,10 +65,7 @@ const LoginWithPass = () => { p={{ base: 4, md: 16 }} w={{ base: "100%", md: "50%" }} h={"100%"} - onSubmit={(e) => { - e.preventDefault(); - onHandleSubmit(); - }} + onSubmit={handleSubmit(onSubmit)} > { setMobileNumber(e.target.value)} + {...register("mobileNumber", { + required: "Mobile Number is required", + minLength: { + value: 10, + message: "Mobile Number must be 10 digits long", + }, + maxLength: { + value: 10, + message: "Mobile Number must be 10 digits long", + }, + })} placeholder="Enter your mobile number" /> + {errors.mobileNumber && ( + + {errors.mobileNumber.message} + + )} setPassword(e.target.value)} + {...register("password", { + required: "Password is required", + minLength: { + value: 6, + message: "Password must be at least 6 characters long", + }, + })} placeholder="Enter your password" /> - + {errors.password && ( + + {errors.password.message} + + )} + { - - Forgot password
diff --git a/src/Pages/Profile/Profile.tsx b/src/Pages/Profile/Profile.tsx index 3298d63..21fce8c 100644 --- a/src/Pages/Profile/Profile.tsx +++ b/src/Pages/Profile/Profile.tsx @@ -4,7 +4,7 @@ import mypfp from "../../assets/profile-Avtars/mypfp.png"; import { FaCamera } from "react-icons/fa"; import { Field } from "../../components/ui/field"; import { Button } from "../../components/ui/button"; - +import { Editable } from "@chakra-ui/react"; const Profile = () => { return ( @@ -27,16 +27,59 @@ const Profile = () => { - + + First Name + + + + + + + Last Name + + + + + + {/* - + */} - + {/* - + */} + + Phone Number + + + + + diff --git a/src/index.css b/src/index.css index 1a8109e..6b587a8 100644 --- a/src/index.css +++ b/src/index.css @@ -68,7 +68,7 @@ body{ /* Style the scrollbar thumb (the draggable part) */ ::-webkit-scrollbar-thumb { - background-color: #02A0A0; /* Gray color for the thumb */ + background-color: #f3f3f3; /* Gray color for the thumb */ border-radius: 10px; border: 3px solid #f1f1f1; /* Border around the thumb */ } -- 2.34.1 From 25e8ffe2855016e454e191c6f81bcdd843b7eca6 Mon Sep 17 00:00:00 2001 From: "Pratham.Mandavkar" Date: Mon, 20 Jan 2025 15:27:34 +0530 Subject: [PATCH 11/13] Array conversion --- src/Contexts/GlobalStateProvider.tsx | 2 +- .../DeactivatedAccounts.tsx | 92 +++++- .../RegisterUsers/RegisterUsers.tsx | 283 +----------------- src/Pages/Profile/Profile.tsx | 19 +- src/components/DataTable.tsx | 4 +- src/components/ui/pagination.tsx | 40 ++- 6 files changed, 139 insertions(+), 301 deletions(-) diff --git a/src/Contexts/GlobalStateProvider.tsx b/src/Contexts/GlobalStateProvider.tsx index 9a839de..1f2c713 100644 --- a/src/Contexts/GlobalStateProvider.tsx +++ b/src/Contexts/GlobalStateProvider.tsx @@ -5,7 +5,7 @@ import GlobalStateContext from './GlobalStateContext'; const GlobalStateProvider = ({ children }:{children:ReactNode}) => { - const [isAuthenticate, setIsAuthenticate] = useState(false); + const [isAuthenticate, setIsAuthenticate] = useState(true); return ( diff --git a/src/Pages/ManageUser/DeactivatedAccounts/DeactivatedAccounts.tsx b/src/Pages/ManageUser/DeactivatedAccounts/DeactivatedAccounts.tsx index 1b031a0..3cc0cd9 100644 --- a/src/Pages/ManageUser/DeactivatedAccounts/DeactivatedAccounts.tsx +++ b/src/Pages/ManageUser/DeactivatedAccounts/DeactivatedAccounts.tsx @@ -1,11 +1,91 @@ -import MainFrame from '../../../components/MainFrame' +import { + Box, + HStack, + Input, + Text +} from "@chakra-ui/react"; +import { LuSearch } from "react-icons/lu"; +import DataTable from "../../../components/DataTable"; +import MainFrame from "../../../components/MainFrame"; +import { InputGroup } from "../../../components/ui/input-group"; +import { + PaginationItems, + PaginationNextTrigger, + PaginationPrevTrigger, + PaginationRoot, +} from "../../../components/ui/pagination"; +import { Switch } from "../../../components/ui/switch"; + +const tableHeadRow = [ + "Sr. No", + "First Name", + "Last Name", + "Company name", + "Activate/Deactivate", +]; + +const usersData = [ + ...Array.from({ length: 10 }, (_, i) => ({ + "Sr. No": i + 1, + "First Name": "Ritesh", + "Last Name": "Joshi", + "Company name": "WDI", + "Activate/Deactivate": ( + + Yes + + No + + ), + })), +]; const DeactivatedAccounts = () => { return ( - - - ) -} + + + Registered Users + -export default DeactivatedAccounts \ No newline at end of file + + } + w="100%" + color="#000" + > + + + + + + + + + + + + + + + + ); +}; + +export default DeactivatedAccounts; diff --git a/src/Pages/ManageUser/RegisterUsers/RegisterUsers.tsx b/src/Pages/ManageUser/RegisterUsers/RegisterUsers.tsx index cfb797d..a3b40dc 100644 --- a/src/Pages/ManageUser/RegisterUsers/RegisterUsers.tsx +++ b/src/Pages/ManageUser/RegisterUsers/RegisterUsers.tsx @@ -2,26 +2,21 @@ import { Box, HStack, Input, - Stack, - Table, - Text, - VStack, + Text } from "@chakra-ui/react"; +import { CiEdit } from "react-icons/ci"; +import { FaRegEye } from "react-icons/fa"; +import { LuSearch } from "react-icons/lu"; +import { RiDeleteBin5Line } from "react-icons/ri"; +import DataTable from "../../../components/DataTable"; import MainFrame from "../../../components/MainFrame"; import { InputGroup } from "../../../components/ui/input-group"; -import { LuSearch } from "react-icons/lu"; -import DataTable from "../../../components/DataTable"; -import { Switch } from "../../../components/ui/switch"; -import { Button } from "../../../components/ui/button"; -import { FaRegEye } from "react-icons/fa"; -import { CiEdit } from "react-icons/ci"; -import { RiDeleteBin5Line } from "react-icons/ri"; import { PaginationItems, PaginationNextTrigger, - PaginationPrevTrigger, - PaginationRoot, + PaginationRoot } from "../../../components/ui/pagination"; +import { Switch } from "../../../components/ui/switch"; // Table setup const tableHeadRow = [ @@ -37,8 +32,8 @@ const tableHeadRow = [ ]; const usersData: any[] = [ - { - "Sr. No": 1, + ...Array.from({ length: 10 }, (_, i) => ({ + "Sr. No": i + 1, "First Name": "Ritesh", "Mobile number": "9876543210", Gender: "Male", @@ -59,260 +54,7 @@ const usersData: any[] = [
), - }, - { - "Sr. No": 2, - "First Name": "Ritesh", - "Mobile number": "9876543210", - Gender: "Male", - DOB: "15-01-1990", - "Type of User": "Admin", - Language: "English", - "Activate/Deactivate": ( - - Yes - - No - - ), - Action: ( - - - - - - ), - }, - { - "Sr. No": 3, - "First Name": "Ritesh", - "Mobile number": "9876543210", - Gender: "Male", - DOB: "15-01-1990", - "Type of User": "Admin", - Language: "English", - "Activate/Deactivate": ( - - Yes - - No - - ), - Action: ( - - - - - - ), - }, - { - "Sr. No": 4, - "First Name": "Ritesh", - "Mobile number": "9876543210", - Gender: "Male", - DOB: "15-01-1990", - "Type of User": "Admin", - Language: "English", - "Activate/Deactivate": ( - - Yes - - No - - ), - Action: ( - - - - - - ), - }, - { - "Sr. No": 5, - "First Name": "Ritesh", - "Mobile number": "9876543210", - Gender: "Male", - DOB: "15-01-1990", - "Type of User": "Admin", - Language: "English", - "Activate/Deactivate": ( - - Yes - - No - - ), - Action: ( - - - - - - ), - }, - { - "Sr. No": 6, - "First Name": "Ritesh", - "Mobile number": "9876543210", - Gender: "Male", - DOB: "15-01-1990", - "Type of User": "Admin", - Language: "English", - "Activate/Deactivate": ( - - Yes - - No - - ), - Action: ( - - - - - - ), - }, - { - "Sr. No": 6, - "First Name": "Ritesh", - "Mobile number": "9876543210", - Gender: "Male", - DOB: "15-01-1990", - "Type of User": "Admin", - Language: "English", - "Activate/Deactivate": ( - - Yes - - No - - ), - Action: ( - - - - - - ), - }, - { - "Sr. No": 7, - "First Name": "Ritesh", - "Mobile number": "9876543210", - Gender: "Male", - DOB: "15-01-1990", - "Type of User": "Admin", - Language: "English", - "Activate/Deactivate": ( - - Yes - - No - - ), - Action: ( - - - - - - ), - }, - { - "Sr. No": 7, - "First Name": "Ritesh", - "Mobile number": "9876543210", - Gender: "Male", - DOB: "15-01-1990", - "Type of User": "Admin", - Language: "English", - "Activate/Deactivate": ( - - Yes - - No - - ), - Action: ( - - - - - - ), - }, - { - "Sr. No": 8, - "First Name": "Ritesh", - "Mobile number": "9876543210", - Gender: "Male", - DOB: "15-01-1990", - "Type of User": "Admin", - Language: "English", - "Activate/Deactivate": ( - - Yes - - No - - ), - Action: ( - - - - - - ), - }, - { - "Sr. No": 9, - "First Name": "Ritesh", - "Mobile number": "9876543210", - Gender: "Male", - DOB: "15-01-1990", - "Type of User": "Admin", - Language: "English", - "Activate/Deactivate": ( - - Yes - - No - - ), - Action: ( - - - - - - ), - }, - { - "Sr. No": 10, - "First Name": "Ritesh", - "Mobile number": "9876543210", - Gender: "Male", - DOB: "15-01-1990", - "Type of User": "Admin", - Language: "English", - "Activate/Deactivate": ( - - Yes - - No - - ), - Action: ( - - - - - - ), - }, + })), ]; const RegisterUsers = () => { @@ -352,13 +94,12 @@ const RegisterUsers = () => { pageSize={3} defaultPage={1} > - + {/* */} - ); }; diff --git a/src/Pages/Profile/Profile.tsx b/src/Pages/Profile/Profile.tsx index 21fce8c..0ef11fb 100644 --- a/src/Pages/Profile/Profile.tsx +++ b/src/Pages/Profile/Profile.tsx @@ -17,24 +17,27 @@ const Profile = () => { - + Jackson David - Employee ID: #1245679 + Employee ID: #1245679 - First Name + + First Name + @@ -42,7 +45,9 @@ const Profile = () => { - Last Name + + Last Name + { */} - Phone Number + + Phone Number + = ({ tableHeadRow, data }) => { - {tableHeadRow.map((item, index)=>{item})} + {tableHeadRow.map((item, index)=>{item})} @@ -22,7 +22,7 @@ const DataTable: React.FC = ({ tableHeadRow, data }) => { {data.map((item:any, index) => ( - {tableHeadRow.map((heading)=>{item[heading]} )} + {tableHeadRow.map((heading)=>{item[heading]} )} ))} diff --git a/src/components/ui/pagination.tsx b/src/components/ui/pagination.tsx index cccf059..930b004 100644 --- a/src/components/ui/pagination.tsx +++ b/src/components/ui/pagination.tsx @@ -10,11 +10,7 @@ import { usePaginationContext, } from "@chakra-ui/react"; import * as React from "react"; -import { - HiChevronLeft, - HiChevronRight, - HiMiniEllipsisHorizontal, -} from "react-icons/hi2"; +import { HiChevronLeft, HiChevronRight } from "react-icons/hi2"; import { LinkButton } from "./link-button"; interface ButtonVariantMap { @@ -43,7 +39,7 @@ export interface PaginationRootProps } const variantMap: Record = { - outline: { default: "ghost", ellipsis: "plain", current: "outline" }, + outline: { default: "ghost", ellipsis: "plain", current: "solid" }, solid: { default: "outline", ellipsis: "outline", current: "solid" }, subtle: { default: "ghost", ellipsis: "plain", current: "subtle" }, }; @@ -74,7 +70,7 @@ export const PaginationEllipsis = React.forwardRef< return ( ); @@ -92,7 +88,14 @@ export const PaginationItem = React.forwardRef< if (getHref) { return ( - + {props.value} ); @@ -101,10 +104,12 @@ export const PaginationItem = React.forwardRef< return ( @@ -125,6 +130,7 @@ export const PaginationPrevTrigger = React.forwardRef< href={previousPage != null ? getHref(previousPage) : undefined} variant={variantMap.default} size={size} + _hover={{ bg: "#02A0A0", color: "white" }} > @@ -153,8 +159,13 @@ export const PaginationNextTrigger = React.forwardRef< href={nextPage != null ? getHref(nextPage) : undefined} variant={variantMap.default} size={size} + borderRadius="94px" + bg="#02A0A0" + color="white" + w="136px" + _hover={{ bg: "#026060" }} > - + Next ); } @@ -164,11 +175,12 @@ export const PaginationNextTrigger = React.forwardRef< @@ -181,8 +193,6 @@ export const PaginationItems = (props: React.HTMLAttributes) => { {({ pages }) => pages.map((page, index) => ( Date: Mon, 20 Jan 2025 15:28:54 +0530 Subject: [PATCH 12/13] NN --- src/Pages/ManageUser/RegisterUsers/RegisterUsers.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Pages/ManageUser/RegisterUsers/RegisterUsers.tsx b/src/Pages/ManageUser/RegisterUsers/RegisterUsers.tsx index a3b40dc..e0e1807 100644 --- a/src/Pages/ManageUser/RegisterUsers/RegisterUsers.tsx +++ b/src/Pages/ManageUser/RegisterUsers/RegisterUsers.tsx @@ -41,14 +41,14 @@ const usersData: any[] = [ "Type of User": "Admin", Language: "English", "Activate/Deactivate": ( - + Yes No ), Action: ( - + -- 2.34.1 From 6a73d33cda311325b74d431d54eee2967f3f0fce Mon Sep 17 00:00:00 2001 From: "Pratham.Mandavkar" Date: Tue, 21 Jan 2025 12:14:28 +0530 Subject: [PATCH 13/13] N --- .../Component/DeleteConfirmationDialog.tsx | 82 ++++++++++++++++++ .../Component/EditRegisterUser.tsx | 77 ++++++++++++++++ .../RegisterUsers/RegisterUsers.tsx | 30 ++++--- src/assets/icons/delete.png | Bin 0 -> 2019 bytes 4 files changed, 177 insertions(+), 12 deletions(-) create mode 100644 src/Pages/ManageUser/RegisterUsers/Component/DeleteConfirmationDialog.tsx create mode 100644 src/Pages/ManageUser/RegisterUsers/Component/EditRegisterUser.tsx create mode 100644 src/assets/icons/delete.png diff --git a/src/Pages/ManageUser/RegisterUsers/Component/DeleteConfirmationDialog.tsx b/src/Pages/ManageUser/RegisterUsers/Component/DeleteConfirmationDialog.tsx new file mode 100644 index 0000000..88af6e8 --- /dev/null +++ b/src/Pages/ManageUser/RegisterUsers/Component/DeleteConfirmationDialog.tsx @@ -0,0 +1,82 @@ +import React from "react"; + +import { + DialogActionTrigger, + DialogCloseTrigger, + DialogContent, + DialogFooter, + DialogHeader, + DialogRoot, + DialogTitle, + DialogTrigger, +} from "../../../../components/ui/dialog"; +import { RiDeleteBin5Line } from "react-icons/ri"; +import { DialogBody, Image, Text } from "@chakra-ui/react"; +import { Button } from "../../../../components/ui/button"; +import DelteIcon from "../../../../assets/icons/delete.png"; + +interface DeleteConfirmationDialogProps { + onConfirm: () => void; +} + +const DeleteConfirmationDialog: React.FC = ({ + onConfirm, +}) => { + return ( + + + + + + + {/* Are you sure? */} + + + + + + Delete User + +

+ {" "} + Are you sure you want to delete this user +

+
+ + + + + + + +
+
+ ); +}; + +export default DeleteConfirmationDialog; diff --git a/src/Pages/ManageUser/RegisterUsers/Component/EditRegisterUser.tsx b/src/Pages/ManageUser/RegisterUsers/Component/EditRegisterUser.tsx new file mode 100644 index 0000000..e24a0e9 --- /dev/null +++ b/src/Pages/ManageUser/RegisterUsers/Component/EditRegisterUser.tsx @@ -0,0 +1,77 @@ +import React, { useRef } from "react"; +import { Input, Stack } from "@chakra-ui/react"; +import { Button } from "../../../../components/ui/button"; +import { + DialogActionTrigger, + DialogBody, + DialogContent, + DialogFooter, + DialogHeader, + DialogRoot, + DialogTitle, + DialogTrigger, +} from "../../../../components/ui/dialog"; +import { Field } from "../../../../components/ui/field"; +import { FaRegEye } from "react-icons/fa"; + +interface EditRegisterUser { + onConfirm: () => void; +} + +const EditRegisterUser: React.FC = ({ onConfirm }) => { + const ref = useRef(null); // Initialize the ref properly + + return ( +
+ ref.current}> + + + + + + Edit user Accounts + + + + + + + + + + + + + + + + + + + + + + + +
+ ); +}; + +export default EditRegisterUser; diff --git a/src/Pages/ManageUser/RegisterUsers/RegisterUsers.tsx b/src/Pages/ManageUser/RegisterUsers/RegisterUsers.tsx index e0e1807..ed37e1e 100644 --- a/src/Pages/ManageUser/RegisterUsers/RegisterUsers.tsx +++ b/src/Pages/ManageUser/RegisterUsers/RegisterUsers.tsx @@ -1,22 +1,19 @@ -import { - Box, - HStack, - Input, - Text -} from "@chakra-ui/react"; +import { Box, HStack, Input, Text } from "@chakra-ui/react"; import { CiEdit } from "react-icons/ci"; import { FaRegEye } from "react-icons/fa"; import { LuSearch } from "react-icons/lu"; -import { RiDeleteBin5Line } from "react-icons/ri"; import DataTable from "../../../components/DataTable"; import MainFrame from "../../../components/MainFrame"; import { InputGroup } from "../../../components/ui/input-group"; import { PaginationItems, PaginationNextTrigger, - PaginationRoot + PaginationRoot, } from "../../../components/ui/pagination"; import { Switch } from "../../../components/ui/switch"; +import { Button } from "../../../components/ui/button"; +import DeleteConfirmationDialog from "./Component/DeleteConfirmationDialog"; +import EditRegisterUser from "./Component/EditRegisterUser"; // Table setup const tableHeadRow = [ @@ -41,7 +38,7 @@ const usersData: any[] = [ "Type of User": "Admin", Language: "English", "Activate/Deactivate": ( - + Yes No @@ -49,9 +46,18 @@ const usersData: any[] = [ ), Action: ( - + {/* */} + { + console.log("User deleted:", i + 1); + }} + /> - + { + console.log("User deleted:", i + 1); + }} + /> ), })), @@ -87,6 +93,7 @@ const RegisterUsers = () => { + { defaultPage={1} > - {/* */} diff --git a/src/assets/icons/delete.png b/src/assets/icons/delete.png new file mode 100644 index 0000000000000000000000000000000000000000..383f0f0af79be69ceba8ebe58e17ea4a1e5d8415 GIT binary patch literal 2019 zcmb`I{Xf&|AICR_Vas+-a&vOCQI;MmG8@e?Ge&Y#36mDx95VMEw~<*NEV*4Hr`)!1 zsD`3a(abqnbDIdwU2;=yYI(%m9lmqUzwmurkN5Sy-jC~by`Hb%uIuiu6u64E3J3&( zJ2{e1$U0M2rBFrL&JU>P%NqFd2?`0s>)QPV1X3z;BHMbzf)|Q1^ZM`zKwS>y3k8VK z3*i7!ks@2ZiaFp5L}(5eHGI7JOWpvz3Tv=Rd0#1Aj+10uta|QY+<>)%Cg$N#KsE}f zK>>OwAjxgH(xNIvj|8n*XFkb(->iyCu%Y%iJ7UiLxxhIJ*?g8+`%_Q%h8B{PSVmy* zOHjaBooZrw&TP9_DO_`nE!9Bt*_vp4IS8yJ*c0ouj&tZmF{j@i<|+F8d^|B>%FpzN zcxz{M^0YYYY5BeUpn%nrcaA!7ElzqOaSZ&lBj9V>QP#5MR8=zL zX42}kciWzu4`}4!t`+7@%nAs5zSmEN$rOQ5?$gZW#FaEozdwe4OmI^DD zJdzFHWk7Ykt+TbeA<|=uRH*nR=aOh2>CTJYUe3HQ&DT_4eE}>Z_bds><=V_0Ar~Z@ zE;_S%j{le%&KtVfernujGmgHHFSWYME2P#x3^5UxYht?v)g-LvzER(_*l!6dnBPi* zoctmB{25h=f$3X6PuEYpi9NBpm!JcM*W8ox%sz%yFxuUc4`}@WJABpDG<>69sjU23 zF#flQv{xWj13B?1Y>g{MO(V7ra;MXOY?#;f?O)ok%>2bgMjT>4{o{2ynjby z&(Rv+R*#o1D0IunoZJ1vPamO}Xqs90qDnDP8!;jA_QVkv!``ibIR1k7c+4zc+kK5f zEIv@FBC`6;MpB*x``iKtD_n7b{~oF>slr9k?n6XagpkU3bBF}cAs^;a`mELGu0w4O z>-E%d+jjtXQ6 z8+N25;Y5^m$AJMZ+eqZ5Y!?=fK>d2te?Hyt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