This commit is contained in:
2025-01-15 20:33:14 +05:30
parent a8f9aee8ff
commit 068d02a959
10 changed files with 165 additions and 11 deletions

View File

@@ -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'
}
}

View File

@@ -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 }) => {
</VStack>
</VStack>
<VStack gap={0} h="100%" w="85%" >
<HStack h={'6%'} w={'100%'} justifyContent={'flex-end'} pe={3} gap={6}>
<HStack h={'6.5%'} w={'100%'} justifyContent={'space-between'} pe={3} gap={6}>
<Text fontSize={'sm'} ms={1} fontWeight={600} color={'#013e3e'}>{headerTitle}</Text>
<HStack justifyContent={'center'}>
<RiNotificationLine color="#013e3e" cursor={'pointer'} style={{ fontSize: '22px' }} />
<HStack cursor={'pointer'} onClick={() => navigate('/profile')} >
<Avatar size={'sm'} src="https://i.pinimg.com/736x/d6/cd/0f/d6cd0ffd4634b0763d3958a7325ce26e.jpg" />
@@ -42,6 +48,7 @@ const DefaultLayout: FC<{ children: React.ReactNode }> = ({ children }) => {
<Text fontSize={'xs'} >ritesh.pandey@wdimails.com</Text>
</VStack>
</HStack>
</HStack>
</HStack>
{children}
</VStack>

View File

@@ -0,0 +1,11 @@
import MainFrame from '../../../components/MainFrame'
const AboutUs = () => {
return (
<MainFrame>
</MainFrame>
)
}
export default AboutUs

View File

@@ -0,0 +1,12 @@
import { Text } from '@chakra-ui/react'
import MainFrame from '../../../components/MainFrame'
const FreqAskQuestion = () => {
return (
<MainFrame>
<Text>hello</Text>
</MainFrame>
)
}
export default FreqAskQuestion

View File

@@ -0,0 +1,11 @@
import MainFrame from '../../../components/MainFrame'
const PrivacyPolicy = () => {
return (
<MainFrame>
</MainFrame>
)
}
export default PrivacyPolicy

View File

@@ -0,0 +1,11 @@
import MainFrame from '../../../components/MainFrame'
const TermsAndCondition = () => {
return (
<MainFrame>
</MainFrame>
)
}
export default TermsAndCondition

View File

@@ -0,0 +1,11 @@
import MainFrame from '../../components/MainFrame'
const ManageContactUs = () => {
return (
<MainFrame>
</MainFrame>
)
}
export default ManageContactUs

View File

@@ -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'
},

View File

@@ -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 },

View File

@@ -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<MainFrameProps> = ({ children, title }) => {
const MainFrame: FC<MainFrameProps> = ({ children }) => {
return (
<MotionVStack {...OPACITY_ON_LOAD} w="100%" h="97%" p={3} ps={1} pt={4} >
<MotionVStack {...OPACITY_ON_LOAD} w="100%" h="94.5%" p={3} ps={1} pt={3} >
<Box
w="100%"
h="100%"