diff --git a/.env b/.env index ea61219..78f19ee 100644 --- a/.env +++ b/.env @@ -1,4 +1,5 @@ -VITE_API_URL=https://ssa.betadelivery.com/apia/v1 +VITE_API_URL='https://ssa.betadelivery.com/apia/v1' +# VITE_API_URL='http://192.16.50.44/seo-backend/apia/v1' VITE_USER_NAME="Admin" -VITE_PASSWORD="71%@L%es^bUX94`J9XT*%4&^%tUU^%Q^ffgt" +VITE_PASSWORD="71%@L%es^bUX94`J9XT*@bh,._WWM{$%^^&&" VITE_APP_NAME=MyViteApp \ No newline at end of file diff --git a/dev-dist/sw.js b/dev-dist/sw.js index 0ae4473..2892c8c 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.86j4c86n9j8" + "revision": "0.s1fup7lrbig" }], {}); workbox.cleanupOutdatedCaches(); workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), { diff --git a/package-lock.json b/package-lock.json index 9005efe..0a1160c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "axios": "^1.7.9", "chart.js": "^4.4.7", "framer-motion": "^11.18.0", + "js-cookie": "^3.0.5", "next-themes": "^0.4.4", "react": "^18.3.1", "react-chartjs-2": "^5.3.0", @@ -28,6 +29,7 @@ "devDependencies": { "@chakra-ui/cli": "^3.2.3", "@eslint/js": "^9.17.0", + "@types/js-cookie": "^3.0.6", "@types/react": "^18.3.18", "@types/react-dom": "^18.3.5", "@vitejs/plugin-react": "^4.3.4", @@ -3248,6 +3250,13 @@ "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", "license": "MIT" }, + "node_modules/@types/js-cookie": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@types/js-cookie/-/js-cookie-3.0.6.tgz", + "integrity": "sha512-wkw9yd1kEXOPnvEeEV1Go1MmxtBJL0RR79aOTAApecWFVu7w0NNXNqhcWgvw2YgZDYadliXkl14pa3WXw5jlCQ==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", @@ -7349,6 +7358,15 @@ "node": ">=10" } }, + "node_modules/js-cookie": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.5.tgz", + "integrity": "sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==", + "license": "MIT", + "engines": { + "node": ">=14" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", diff --git a/package.json b/package.json index aef7be3..af0444f 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "axios": "^1.7.9", "chart.js": "^4.4.7", "framer-motion": "^11.18.0", + "js-cookie": "^3.0.5", "next-themes": "^0.4.4", "react": "^18.3.1", "react-chartjs-2": "^5.3.0", @@ -30,6 +31,7 @@ "devDependencies": { "@chakra-ui/cli": "^3.2.3", "@eslint/js": "^9.17.0", + "@types/js-cookie": "^3.0.6", "@types/react": "^18.3.18", "@types/react-dom": "^18.3.5", "@vitejs/plugin-react": "^4.3.4", diff --git a/src/App.tsx b/src/App.tsx index fa6affb..b9302aa 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -14,7 +14,7 @@ function App() { } /> - {RouteLink.map(({ path, Component }, index) => (} />))}) : ()} /> + {RouteLink.map(({ path, Component }, index) => (} />))}) : ()} /> } /> diff --git a/src/Contexts/GlobalStateProvider.tsx b/src/Contexts/GlobalStateProvider.tsx index 9a839de..105a8cb 100644 --- a/src/Contexts/GlobalStateProvider.tsx +++ b/src/Contexts/GlobalStateProvider.tsx @@ -1,11 +1,11 @@ -import { ReactNode, useState } from 'react'; +import { ReactNode, useState } from 'react'; import GlobalStateContext from './GlobalStateContext'; -const GlobalStateProvider = ({ children }:{children:ReactNode}) => { - const [isAuthenticate, setIsAuthenticate] = useState(false); +const GlobalStateProvider = ({ children }: { children: ReactNode }) => { + const [isAuthenticate, setIsAuthenticate] = useState(true); return ( diff --git a/src/Layouts/DefaultLayout.tsx b/src/Layouts/DefaultLayout.tsx index b52e7d5..2e63eae 100644 --- a/src/Layouts/DefaultLayout.tsx +++ b/src/Layouts/DefaultLayout.tsx @@ -6,8 +6,12 @@ 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 { LuLogOut } from "react-icons/lu"; +import { logout, setToken } from "../Redux/Service/authSlice"; +import { useDispatch } from "react-redux"; const DefaultLayout: FC<{ children: React.ReactNode }> = ({ children }) => { + const dispatch = useDispatch() const navigate = useNavigate() const location = useLocation() @@ -15,25 +19,31 @@ const DefaultLayout: FC<{ children: React.ReactNode }> = ({ children }) => { return ( - + - + - + {nav?.map(({ title, path, Icon, type, children }, 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', }}> {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:'#919198' }} > {title})} )} + + + {dispatch(logout()), navigate('/login')}} className="link" style={{ cursor: 'pointer', borderRadius: '8px', padding: '6px', width: '100%', display: 'flex', alignItems: 'center', gap: 6, border: '1px solid #ffffff', backgroundColor:'#fff', color:'#000', boxShadow:'rgba(99, 99, 99, 0.2) 0px 2px 8px 0px'}} > Logout + - - + + + + navigate('/profile')} > diff --git a/src/Pages/Dashboard/Dashboard.tsx b/src/Pages/Dashboard/Dashboard.tsx index 056fa6c..10539a7 100644 --- a/src/Pages/Dashboard/Dashboard.tsx +++ b/src/Pages/Dashboard/Dashboard.tsx @@ -67,8 +67,8 @@ const Dashboard = () => { return ( - - + + Total Users @@ -117,6 +117,7 @@ const Dashboard = () => { @@ -140,13 +141,14 @@ const Dashboard = () => { w={"20%"} boxShadow={"rgba(99, 99, 99, 0.2) 0px 2px 8px 0px"} p={'10px'} + rounded={'lg'} > Number Of Groups created - - + + Faqs diff --git a/src/Pages/ManageCMS/AboutUs/AboutUs.tsx b/src/Pages/ManageCMS/AboutUs/AboutUs.tsx index a080942..c704868 100644 --- a/src/Pages/ManageCMS/AboutUs/AboutUs.tsx +++ b/src/Pages/ManageCMS/AboutUs/AboutUs.tsx @@ -2,9 +2,18 @@ import { Box, HStack, Text } from "@chakra-ui/react"; import MainFrame from "../../../components/MainFrame" import { p } from "framer-motion/client"; import AboutUsAddModel from "../../ManageCMS/AboutUs/AboutUsAddModel"; +import { useGetAboutUsQuery } from "../../../Redux/Service/manage.aboutus.service"; const AboutUs = () => { + + const { + data + } = useGetAboutUsQuery() + + console.log('===================================='); + console.log(data); + console.log('===================================='); return ( diff --git a/src/Pages/ManageContact/ManageContact.tsx b/src/Pages/ManageContact/ManageContact.tsx index e3bd9d6..d4d44ed 100644 --- a/src/Pages/ManageContact/ManageContact.tsx +++ b/src/Pages/ManageContact/ManageContact.tsx @@ -25,7 +25,6 @@ const managepost: any[] = [ "Action": ( - ), })), diff --git a/src/Pages/ManageContact/PendingRequests.tsx b/src/Pages/ManageContact/PendingRequests.tsx index 23d566b..9356979 100644 --- a/src/Pages/ManageContact/PendingRequests.tsx +++ b/src/Pages/ManageContact/PendingRequests.tsx @@ -1,77 +1,105 @@ -import { Button } from "../../components/ui/button" -import { DialogBody, DialogCloseTrigger, DialogContent, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger } from "../../components/ui/dialog" -import { Field, HStack, Input, Stack, Textarea, } from "@chakra-ui/react" +import { Button } from "../../components/ui/button"; +import { + DialogBody, + DialogCloseTrigger, + DialogContent, + DialogFooter, + DialogHeader, + DialogRoot, + DialogTitle, + DialogTrigger, +} from "../../components/ui/dialog"; +import { Badge, Field, HStack, Input, Stack, Textarea } from "@chakra-ui/react"; function PendingRequests() { - return ( + return ( + + + + Answer request + + - - - - {/* */} + + + + Pending Requests + + - + + + + + Request Type + + - + Solution + +