From 599f320598c795b109012a0937a4a7db1d27c97f Mon Sep 17 00:00:00 2001
From: YasinShaikh123 <123150391+YasinShaikh123@users.noreply.github.com>
Date: Wed, 12 Feb 2025 12:50:47 +0530
Subject: [PATCH 1/7] [ working Icon ]
---
.../RegisterUsers/RegisterUsers.tsx | 3 +-
.../RegisterUsers/ViewRegisterUsers.tsx | 68 ++++++++++++-------
src/components/ActionIcons/Delete.tsx | 34 ++++++++++
src/components/ActionIcons/Edit.tsx | 47 ++++++++-----
src/components/ActionIcons/View.tsx | 34 ++++++++++
src/components/MainFrame.tsx | 2 +-
6 files changed, 145 insertions(+), 43 deletions(-)
create mode 100644 src/components/ActionIcons/Delete.tsx
create mode 100644 src/components/ActionIcons/View.tsx
diff --git a/src/Pages/ManageUsers/RegisterUsers/RegisterUsers.tsx b/src/Pages/ManageUsers/RegisterUsers/RegisterUsers.tsx
index 95965a9..4ad9614 100644
--- a/src/Pages/ManageUsers/RegisterUsers/RegisterUsers.tsx
+++ b/src/Pages/ManageUsers/RegisterUsers/RegisterUsers.tsx
@@ -9,6 +9,7 @@ import { LuSearch } from "react-icons/lu";
import ViewRegisterUsers from "./ViewRegisterUsers";
import EditRegisterUsers from "./EditRegisterUsers";
import AddRegisterUsers from "./AddRegisterUsers";
+import Delete from "../../../components/ActionIcons/Delete";
const tableHeadRow = [
"Sr. No",
@@ -42,7 +43,7 @@ const registerUser: any[] = [
{/* */}
} // Pass as function
alertText="Delete Users"
alertIcon={}
alertCaption="Are You Sure You Want To Delete This User ?"
diff --git a/src/Pages/ManageUsers/RegisterUsers/ViewRegisterUsers.tsx b/src/Pages/ManageUsers/RegisterUsers/ViewRegisterUsers.tsx
index 5f26943..66ab01c 100644
--- a/src/Pages/ManageUsers/RegisterUsers/ViewRegisterUsers.tsx
+++ b/src/Pages/ManageUsers/RegisterUsers/ViewRegisterUsers.tsx
@@ -9,31 +9,23 @@ import {
DialogTitle,
DialogTrigger,
} from "../../../components/ui/dialog";
+import View from "../../../components/ActionIcons/View";
function ViewRegisterUsers() {
return (
-
-
-
+
@@ -48,42 +40,72 @@ function ViewRegisterUsers() {
First Name
Last Name
Gender
DOB
OTP Verified
Language
diff --git a/src/components/ActionIcons/Delete.tsx b/src/components/ActionIcons/Delete.tsx
new file mode 100644
index 0000000..95f1cf5
--- /dev/null
+++ b/src/components/ActionIcons/Delete.tsx
@@ -0,0 +1,34 @@
+import { Icon, Image } from "@chakra-ui/react";
+import { Tooltip } from "../ui/tooltip";
+import { RiDeleteBin5Line } from "react-icons/ri";
+
+const Delete = () => {
+ return (
+
+
+
+
+
+ );
+};
+
+export default Delete;
diff --git a/src/components/ActionIcons/Edit.tsx b/src/components/ActionIcons/Edit.tsx
index d6d4b09..fde1f52 100644
--- a/src/components/ActionIcons/Edit.tsx
+++ b/src/components/ActionIcons/Edit.tsx
@@ -1,22 +1,33 @@
-import { Icon } from '@chakra-ui/react'
-import { TbEdit } from 'react-icons/tb'
-import { Tooltip } from '../ui/tooltip'
+import { Icon } from "@chakra-ui/react";
+import { TbEdit } from "react-icons/tb";
+import { Tooltip } from "../ui/tooltip";
const Edit = () => {
return (
-
-
-
-
-
- )
-}
+
+
+
+
+
+ );
+};
-export default Edit
\ No newline at end of file
+export default Edit;
diff --git a/src/components/ActionIcons/View.tsx b/src/components/ActionIcons/View.tsx
new file mode 100644
index 0000000..c83d22a
--- /dev/null
+++ b/src/components/ActionIcons/View.tsx
@@ -0,0 +1,34 @@
+import { Icon } from "@chakra-ui/react";
+import { Tooltip } from "../ui/tooltip";
+import { MdOutlineRemoveRedEye } from "react-icons/md";
+
+const View = () => {
+ return (
+
+
+
+
+
+ );
+};
+
+export default View;
diff --git a/src/components/MainFrame.tsx b/src/components/MainFrame.tsx
index e486ade..0d86073 100644
--- a/src/components/MainFrame.tsx
+++ b/src/components/MainFrame.tsx
@@ -22,7 +22,7 @@ const MainFrame: FC = ({ children }) => {
rounded="lg"
boxShadow={'rgba(99, 99, 99, 0.2) 0px 2px 8px 0px'}
pt={3}
- >
+ >
{children}
From 9579771f98ec3918bc200947b584ba0624eb1ea2 Mon Sep 17 00:00:00 2001
From: "Siddhesh.More"
Date: Wed, 12 Feb 2025 13:18:18 +0530
Subject: [PATCH 2/7] update
---
.../ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx | 37 ++++++++-----------
.../PrivacyPolicy/PrivacyPolicyAddModel.tsx | 2 +-
.../PrivacyPolicy/PrivacyPolicySkeleton.tsx | 16 ++++++++
src/components/MainFrame.tsx | 13 ++++---
4 files changed, 39 insertions(+), 29 deletions(-)
create mode 100644 src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicySkeleton.tsx
diff --git a/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx b/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx
index 94b6f41..6950f72 100644
--- a/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx
+++ b/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx
@@ -1,12 +1,14 @@
-import { Box, HStack, Text, Skeleton } from "@chakra-ui/react";
+import { Box, HStack, Text, Skeleton, VStack } from "@chakra-ui/react";
import MainFrame from "../../../components/MainFrame";
import PrivacyPolicyAddModel from "./PrivacyPolicyAddModel";
import { useGetPrivacyPolicyQuery } from "../../../Redux/Service/privacy.policy.service";
+import PrivacyPolicySkeleton from "./privacyPolicySkeleton";
+import { Spinner } from "../../../components/Sipnner/Spinner";
const PrivacyPolicy = () => {
// Fetch data using RTK Query with type annotations
- const { data, isLoading } = useGetPrivacyPolicyQuery();
+ const { data, isLoading, isFetching } = useGetPrivacyPolicyQuery();
console.log(isLoading);
@@ -16,51 +18,42 @@ const PrivacyPolicy = () => {
console.log(data);
console.log("====================================");
- // Extract content array from the response
- const content = data?.data?.[0]?.content;
return (
-
-
+
+ {isLoading?:
+
+ {data?.data?.map(({id,content}, index)=>
Privacy Policy
-
-
{/* Render multiple skeletons or content based on loading state */}
- {isLoading || !content ? (
-
-
-
-
-
-
-
+ {isFetching || !content ? (
+
) : (
{content}
)}
-
+ )}
+ }
);
};
diff --git a/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicyAddModel.tsx b/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicyAddModel.tsx
index 05eacd1..92503df 100644
--- a/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicyAddModel.tsx
+++ b/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicyAddModel.tsx
@@ -11,7 +11,7 @@ function PrivacyPolicyAddModel() {
{/* */}
-
+
diff --git a/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicySkeleton.tsx b/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicySkeleton.tsx
new file mode 100644
index 0000000..1244b85
--- /dev/null
+++ b/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicySkeleton.tsx
@@ -0,0 +1,16 @@
+import { Box, Skeleton } from '@chakra-ui/react'
+import React from 'react'
+
+const PrivacyPolicySkeleton = () => {
+ return (
+
+
+
+
+
+
+
+ )
+}
+
+export default PrivacyPolicySkeleton
\ No newline at end of file
diff --git a/src/components/MainFrame.tsx b/src/components/MainFrame.tsx
index d6a3404..79ce468 100644
--- a/src/components/MainFrame.tsx
+++ b/src/components/MainFrame.tsx
@@ -9,19 +9,20 @@ const MotionVStack = motion(VStack)
interface MainFrameProps {
children: React.ReactNode
title?: string
+ transperant?:boolean
}
-const MainFrame: FC = ({ children }) => {
+const MainFrame: FC = ({ children, transperant }) => {
return (
-
+
{children}
From 68fc0bfdf5aca6d9b633da6c2f443678b297d5e6 Mon Sep 17 00:00:00 2001
From: YasinShaikh123 <123150391+YasinShaikh123@users.noreply.github.com>
Date: Wed, 12 Feb 2025 13:25:22 +0530
Subject: [PATCH 3/7] =?UTF-8?q?[=20Update=20action=20iocn=20=F0=9F=98=89?=
=?UTF-8?q?=20]?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/Pages/ManageCMS/AboutUs/AboutUs.tsx | 8 +-
.../ManageCMS/AboutUs/AboutUsAddModel.tsx | 268 +++++--------
src/Pages/ManageCMS/FAQ/EditDetails.tsx | 129 +++---
src/Pages/ManageCMS/FAQ/FAQ.tsx | 3 +-
src/Pages/ManageCMS/FAQ/FaqAddModel.tsx | 125 +++---
.../PrivacyPolicy/PrivacyPolicyAddModel.tsx | 115 +++---
.../TermsAndConditionsAddModel.tsx | 116 +++---
src/Pages/ManageGroups/EditDetailGroup.tsx | 189 +++++----
src/Pages/ManageGroups/ManageGroups.tsx | 57 ++-
src/Pages/ManageGroups/ViewManageGroup.tsx | 184 +++++----
src/Pages/ManageJobs/ManageJobs.tsx | 36 +-
src/Pages/ManageJobs/ManageJobsAdd.tsx | 362 +++++++++++------
src/Pages/ManageJobs/ViewManageJob.tsx | 373 +++++++++++++-----
src/Pages/ManagePost/ManagePost.tsx | 63 +--
src/Pages/ManagePost/ViewDailog.tsx | 12 +-
.../AgencyMaster/EditAgencyMaster.tsx | 219 ++++++----
.../AgencyMaster/ViewAgencyMaster.tsx | 220 +++++++----
.../MasterModule/Country/EditCountryModel.tsx | 114 +++---
.../JobStatus/EditJobStatusModel.tsx | 9 +-
.../MasterModule/JobType/EditJobModel.tsx | 115 +++---
.../TemplateMaster/EditTemplateModel.tsx | 211 ++++++----
.../WorkspaceMode/EditWorkModel.tsx | 121 +++---
src/Pages/SubAdmin/SubAdmin.tsx | 3 +-
src/Pages/SubAdmin/ViewSubAdmin.tsx | 248 ++++++++----
src/components/EditSubAdmin.tsx | 12 +-
25 files changed, 1972 insertions(+), 1340 deletions(-)
diff --git a/src/Pages/ManageCMS/AboutUs/AboutUs.tsx b/src/Pages/ManageCMS/AboutUs/AboutUs.tsx
index 2275af0..7801ed7 100644
--- a/src/Pages/ManageCMS/AboutUs/AboutUs.tsx
+++ b/src/Pages/ManageCMS/AboutUs/AboutUs.tsx
@@ -18,7 +18,7 @@ const AboutUs = () => {
return (
-
+
{
{content}
)}
- {/*
- {content}
- */}
- {/*
- Lorem ipsum dolor sit amet, consectetur adipisicing elit. Numquam soluta doloremque quibusdam facilis quas, unde hic eaque doloribus sed perferendis atque, eos dolores eius consectetur iure sint adipisci itaque tempora fugit quidem culpa provident possimus. Ullam, vitae in voluptatum dignissimos, quos blanditiis sequi aut repellat error eaque veritatis unde quam temporibus adipisci consectetur neque vero exercitationem dolor cum numquam maiores alias, totam minima quas. Possimus, ratione harum. Alias laboriosam nesciunt esse fugit deserunt pariatur corporis tempora quia veniam laborum aliquid enim voluptatibus asperiores minima tempore repudiandae vero quo porro, doloribus explicabo sit beatae et hic natus. Non earum nisi reiciendis?
- */}
)
diff --git a/src/Pages/ManageCMS/AboutUs/AboutUsAddModel.tsx b/src/Pages/ManageCMS/AboutUs/AboutUsAddModel.tsx
index 301c0de..4d7948e 100644
--- a/src/Pages/ManageCMS/AboutUs/AboutUsAddModel.tsx
+++ b/src/Pages/ManageCMS/AboutUs/AboutUsAddModel.tsx
@@ -1,189 +1,119 @@
-// import { FaRegEdit } from "react-icons/fa"
-// import { DialogBody, DialogCloseTrigger, DialogContent, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger } from "../../../components/ui/dialog"
-// import { Field, Stack, Text, Textarea } from "@chakra-ui/react"
-// import { Button } from "../../../components/ui/button"
-// import { useUpdateAboutUsMutation } from "../../../Redux/Service/manage.aboutus.service"
-
-// function AboutUsAddModel() {
-
-// const [ updateAboutUs ] = useUpdateAboutUsMutation()
-
-
-// try {
-// const res = updateAboutUs({id:2, updatedData:''})
-// console.log(res);
-
-
-// } catch (error) {
-
-// }
-
-
-
-
-// return (
-
-//
-//
-// {/* */}
-//
-
-//
-
-//
-//
-// Edit
-//
-
-//
-//
-
-//
-// AboutUs
-//
-//
-//
-//
-//
-//
-//
-
-//
-//
-//
-
-// )
-// }
-
-// export default AboutUsAddModel
-
-
import React, { useState } from "react";
import { FaRegEdit } from "react-icons/fa";
import {
- DialogBody,
- DialogCloseTrigger,
- DialogContent,
- DialogFooter,
- DialogHeader,
- DialogRoot,
- DialogTitle,
- DialogTrigger,
+ DialogBody,
+ DialogCloseTrigger,
+ DialogContent,
+ DialogFooter,
+ DialogHeader,
+ DialogRoot,
+ DialogTitle,
+ DialogTrigger,
} from "../../../components/ui/dialog";
import { Field, Stack, Text, Textarea } from "@chakra-ui/react";
import { Button } from "../../../components/ui/button";
import { useUpdateAboutUsMutation } from "../../../Redux/Service/manage.aboutus.service";
function AboutUsAddModel() {
- const [content, setContent] = useState(""); // State for the textarea input
- const [updateAboutUs, { isLoading }] = useUpdateAboutUsMutation(); // Mutation for updating About Us
- // const toast = useToast(); // Toast for feedback
+ const [content, setContent] = useState(""); // State for the textarea input
+ const [updateAboutUs, { isLoading }] = useUpdateAboutUsMutation(); // Mutation for updating About Us
+ // const toast = useToast(); // Toast for feedback
- // Handle form submission
- const handleSubmit = async (e: any) => {
- e.preventDefault(); // Prevent default form submission
+ // Handle form submission
+ const handleSubmit = async (e: any) => {
+ e.preventDefault(); // Prevent default form submission
- try {
- // Call the updateAboutUs mutation
- const res = await updateAboutUs({ id: 2, updatedData: content }).unwrap();
- console.log(res);
+ try {
+ // Call the updateAboutUs mutation
+ const res = await updateAboutUs({ id: 2, updatedData: content }).unwrap();
+ console.log(res);
- // Show success toast
- // toast({
- // title: "Success",
- // description: "About Us content updated successfully",
- // status: "success",
- // duration: 5000,
- // isClosable: true,
- // });
+ // Show success toast
+ // toast({
+ // title: "Success",
+ // description: "About Us content updated successfully",
+ // status: "success",
+ // duration: 5000,
+ // isClosable: true,
+ // });
- // Clear the input field after successful submission
- setContent("");
- } catch (error) {
- // Show error toast
- // toast({
- // title: "Error",
- // description: "Failed to update About Us content",
- // status: "error",
- // duration: 5000,
- // isClosable: true,
- // });
- }
- };
+ // Clear the input field after successful submission
+ setContent("");
+ } catch (error) {
+ // Show error toast
+ // toast({
+ // title: "Error",
+ // description: "Failed to update About Us content",
+ // status: "error",
+ // duration: 5000,
+ // isClosable: true,
+ // });
+ }
+ };
- return (
-
-
-
-
+ return (
+
+
+
+
-
-
-
- Edit
-
-
+
+
+
+ Edit
+
+
-
-
-
-
- AboutUs
-
-
-
-
+
+
+
+
+ AboutUs
+
+
+
+
-
-
-
+
+
+
-
-
-
- );
+
+
+
+ );
}
-export default AboutUsAddModel;
\ No newline at end of file
+export default AboutUsAddModel;
diff --git a/src/Pages/ManageCMS/FAQ/EditDetails.tsx b/src/Pages/ManageCMS/FAQ/EditDetails.tsx
index ee9a64e..d088351 100644
--- a/src/Pages/ManageCMS/FAQ/EditDetails.tsx
+++ b/src/Pages/ManageCMS/FAQ/EditDetails.tsx
@@ -1,64 +1,79 @@
-import { TbEdit } from "react-icons/tb";
-import { Button } from "../../../components/ui/button"
-import { DialogBody, DialogCloseTrigger, DialogContent, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger } from "../../../components/ui/dialog"
-import { Field, Grid, Icon, Input, Stack, Text, Textarea } from "@chakra-ui/react"
-import { FaRegEdit } from "react-icons/fa";
+import { Button } from "../../../components/ui/button";
+import {
+ DialogBody,
+ DialogCloseTrigger,
+ DialogContent,
+ DialogFooter,
+ DialogHeader,
+ DialogRoot,
+ DialogTitle,
+ DialogTrigger,
+} from "../../../components/ui/dialog";
+import { Field, Input, Stack, Textarea } from "@chakra-ui/react";
+import Edit from "../../../components/ActionIcons/Edit";
function EditDetails() {
- return (
+ return (
+
+
+
+
-
-
-
-
-
- {/* */}
+
+
+
+ Edit Details
+
+
-
+
+
+
+
+ Questions
+
+
-
+ Answer
+
+
+
+
+
+
+
+
- p={3} // Reduced padding
- bgSize={'md'}
- >
-
- Edit Details
-
-
-
-
-
-
- Questions
-
-
- Answer
-
-
-
-
-
-
-
-
-
-
-
-
-
- )
+
+
+
+ );
}
-export default EditDetails
\ No newline at end of file
+export default EditDetails;
diff --git a/src/Pages/ManageCMS/FAQ/FAQ.tsx b/src/Pages/ManageCMS/FAQ/FAQ.tsx
index bcb9a6d..f8cdf5a 100644
--- a/src/Pages/ManageCMS/FAQ/FAQ.tsx
+++ b/src/Pages/ManageCMS/FAQ/FAQ.tsx
@@ -8,6 +8,7 @@ import AlertDailog from "../../../components/AlertDailog";
import { RiDeleteBin5Line } from "react-icons/ri";
import { Switch } from "../../../components/ui/switch";
import FaqAddModel from "./FaqAddModel";
+import Delete from "../../../components/ActionIcons/Delete";
// table data
@@ -31,7 +32,7 @@ const managepost: any[] = [
}
alertText="Delete Users"
alertIcon={}
alertCaption="are you sure you want to delete ?"
diff --git a/src/Pages/ManageCMS/FAQ/FaqAddModel.tsx b/src/Pages/ManageCMS/FAQ/FaqAddModel.tsx
index 40b1f60..5af08af 100644
--- a/src/Pages/ManageCMS/FAQ/FaqAddModel.tsx
+++ b/src/Pages/ManageCMS/FAQ/FaqAddModel.tsx
@@ -1,57 +1,84 @@
-import { DialogBody, DialogCloseTrigger, DialogContent, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger } from "../../../components/ui/dialog"
-import { Field, Input, Stack, Text, Textarea } from "@chakra-ui/react"
-import { IoMdAdd } from "react-icons/io"
-import { Button } from "../../../components/ui/button"
+import {
+ DialogBody,
+ DialogCloseTrigger,
+ DialogContent,
+ DialogFooter,
+ DialogHeader,
+ DialogRoot,
+ DialogTitle,
+ DialogTrigger,
+} from "../../../components/ui/dialog";
+import { Field, Input, Stack, Text, Textarea } from "@chakra-ui/react";
+import { IoMdAdd } from "react-icons/io";
+import { Button } from "../../../components/ui/button";
function FaqAddModel() {
- return (
+ return (
+
+
+
+
-
-
- {/* */}
-
+
+
+
+ Add
+
+
-
+
+
+
+
+ Questions
+
+
-
+ Answer
+
+
+
+
+
+
+
+
- p={3} // Reduced padding
- bgSize={'md'}
- >
-
- Add
-
-
-
-
-
-
- Questions
-
-
- Answer
-
-
-
-
-
-
-
-
-
-
-
-
-
- )
+
+
+
+ );
}
-export default FaqAddModel
\ No newline at end of file
+export default FaqAddModel;
diff --git a/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicyAddModel.tsx b/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicyAddModel.tsx
index 05eacd1..fda8072 100644
--- a/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicyAddModel.tsx
+++ b/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicyAddModel.tsx
@@ -1,53 +1,80 @@
-import { FaRegEdit } from "react-icons/fa"
-import { DialogBody, DialogCloseTrigger, DialogContent, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger } from "../../../components/ui/dialog"
-import { Field, Stack, Text, Textarea } from "@chakra-ui/react"
-import { Button } from "../../../components/ui/button"
+import { FaRegEdit } from "react-icons/fa";
+import {
+ DialogBody,
+ DialogCloseTrigger,
+ DialogContent,
+ DialogFooter,
+ DialogHeader,
+ DialogRoot,
+ DialogTitle,
+ DialogTrigger,
+} from "../../../components/ui/dialog";
+import { Field, Stack, Text, Textarea } from "@chakra-ui/react";
+import { Button } from "../../../components/ui/button";
function PrivacyPolicyAddModel() {
- return (
-
-
-
- {/*
+
+
+
+ Edit
+
+
-
+
+
+
+ PrivacyPolicy
+
+
+
+
+
+
+
+ Save
+
+
- p={3} // Reduced padding
- bgSize={'md'}
- >
-
- Edit
-
-
-
-
-
-
- PrivacyPolicy
-
-
-
-
-
-
- Save
-
-
-
-
-
-
-
- )
+
+
+
+ );
}
-export default PrivacyPolicyAddModel
\ No newline at end of file
+export default PrivacyPolicyAddModel;
diff --git a/src/Pages/ManageCMS/TermsAndConditions/TermsAndConditionsAddModel.tsx b/src/Pages/ManageCMS/TermsAndConditions/TermsAndConditionsAddModel.tsx
index 17a97fa..11d4715 100644
--- a/src/Pages/ManageCMS/TermsAndConditions/TermsAndConditionsAddModel.tsx
+++ b/src/Pages/ManageCMS/TermsAndConditions/TermsAndConditionsAddModel.tsx
@@ -1,53 +1,77 @@
-import { FaRegEdit } from "react-icons/fa"
-import { DialogBody, DialogCloseTrigger, DialogContent, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger } from "../../../components/ui/dialog"
-import { Field, Stack, Text, Textarea } from "@chakra-ui/react"
-import { Button } from "../../../components/ui/button"
+import { FaRegEdit } from "react-icons/fa";
+import {
+ DialogBody,
+ DialogCloseTrigger,
+ DialogContent,
+ DialogFooter,
+ DialogHeader,
+ DialogRoot,
+ DialogTitle,
+ DialogTrigger,
+} from "../../../components/ui/dialog";
+import { Field, Stack, Text, Textarea } from "@chakra-ui/react";
+import { Button } from "../../../components/ui/button";
function TermsAndConditionsAddModel() {
- return (
+ return (
+
+
+
+ {" "}
+ {" "}
+
+ Edit
+
+
+
-
-
- {/*
-
- */}
- Edit
+
+
+
+ Edit
+
+
-
+
+
+
+
+ TermsAndConditions
+
+
+
+
+
+
+
+ Save
+
+
-
-
- Edit
-
-
-
-
-
-
- TermsAndConditions
-
-
-
-
-
-
- Save
-
-
-
-
-
-
-
- )
+
+
+
+ );
}
-export default TermsAndConditionsAddModel
\ No newline at end of file
+export default TermsAndConditionsAddModel;
diff --git a/src/Pages/ManageGroups/EditDetailGroup.tsx b/src/Pages/ManageGroups/EditDetailGroup.tsx
index b7da10c..a829600 100644
--- a/src/Pages/ManageGroups/EditDetailGroup.tsx
+++ b/src/Pages/ManageGroups/EditDetailGroup.tsx
@@ -1,92 +1,119 @@
-import { Button } from "../../components/ui/button"
-import { DialogBody, DialogCloseTrigger, DialogContent, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger } from "../../components/ui/dialog"
-import { Avatar, Box, Field, Heading, Icon, Input, Stack, Text } from "@chakra-ui/react"
+import { Button } from "../../components/ui/button";
+import {
+ DialogBody,
+ DialogCloseTrigger,
+ DialogContent,
+ DialogFooter,
+ DialogHeader,
+ DialogRoot,
+ DialogTitle,
+ DialogTrigger,
+} from "../../components/ui/dialog";
+import { Avatar, Box, Field, Heading, Input, Stack } from "@chakra-ui/react";
import { Switch } from "../../components/ui/switch";
-import { FaRegEdit } from "react-icons/fa";
import { AvatarGroup } from "../../components/ui/avatar";
-import { TbEdit } from "react-icons/tb";
+import Edit from "../../components/ActionIcons/Edit";
function EditDetailGroups() {
- return (
+ return (
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+ Edit details
+
+
+
+
+
+
+ Group Name
+
+
-
-
- Edit details
-
+
+ Description
+
+
-
-
+
+ Members
+
-
- Group Name
-
+
+
+
+
+
+
- Description
-
+
+
+
+
- Members
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- +3
-
-
-
-
- public/Private
-
-
-
-
-
- Save
-
-
-
-
-
- )
+
+
+
+
+
+ +3
+
+
+
+
+
+ public/Private
+
+
+
+
+
+
+ Save
+
+ {" "}
+
+
+
+ );
}
-export default EditDetailGroups
\ No newline at end of file
+export default EditDetailGroups;
diff --git a/src/Pages/ManageGroups/ManageGroups.tsx b/src/Pages/ManageGroups/ManageGroups.tsx
index 5824d73..7d88ddb 100644
--- a/src/Pages/ManageGroups/ManageGroups.tsx
+++ b/src/Pages/ManageGroups/ManageGroups.tsx
@@ -1,16 +1,16 @@
-import { Box, HStack, Image, Input, 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 AlertDailog from "../../components/AlertDailog"
+import { Box, HStack, Image, Input, 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 AlertDailog from "../../components/AlertDailog";
import { RiDeleteBin5Line } from "react-icons/ri";
-import ViewManageGroup from "./ViewManageGroup"
-import EditDetailGroups from "./EditDetailGroup"
-import AddGroup from "./AddGroup"
+import ViewManageGroup from "./ViewManageGroup";
+import EditDetailGroups from "./EditDetailGroup";
+import AddGroup from "./AddGroup";
+import Delete from "../../components/ActionIcons/Delete";
// import ViewSubAdmin from "./ViewSubAdmin"
-
// table data
const tableHeadRow = [
@@ -26,21 +26,15 @@ const managepost: any[] = [
...Array.from({ length: 12 }, (_, i) => ({
"Sr. No": i + 1,
"Group Name": "ABC",
- "Description": "Lorem ipsum",
- "Date": "12/01/1987",
+ Description: "Lorem ipsum",
+ Date: "12/01/1987",
"Group type": "Private",
- "Action": (
+ Action: (
-
- {/* */}
-
- {/* */}
}
alertText="Delete Users"
alertIcon={}
alertCaption="are you sure you want to delete ?"
@@ -54,8 +48,7 @@ const managepost: any[] = [
];
const ManageGroups = () => {
return (
-
-
+
{
Manage Groups
-
+
+
}
color={"#000"}
>
@@ -85,9 +81,9 @@ const ManageGroups = () => {
size={"xs"}
fontSize={"sm"}
placeholder="Search..."
- bgColor={'#EEEEEE'}
+ bgColor={"#EEEEEE"}
ps={8}
- border={'none'}
+ border={"none"}
/>
{/* Add */}
@@ -99,7 +95,8 @@ const ManageGroups = () => {
tableHeadRow={tableHeadRow}
data={managepost}
/>
-
- )
-}
-export default ManageGroups
\ No newline at end of file
+ {" "}
+
+ );
+};
+export default ManageGroups;
diff --git a/src/Pages/ManageGroups/ViewManageGroup.tsx b/src/Pages/ManageGroups/ViewManageGroup.tsx
index 4622904..cc02725 100644
--- a/src/Pages/ManageGroups/ViewManageGroup.tsx
+++ b/src/Pages/ManageGroups/ViewManageGroup.tsx
@@ -1,94 +1,116 @@
-import { Button } from "../../components/ui/button"
-import { DialogBody, DialogCloseTrigger, DialogContent, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger } from "../../components/ui/dialog"
-import { Avatar, Box, Field, Grid, Heading, Icon, Input, Stack, Text } from "@chakra-ui/react"
-import { Checkbox } from "../../components/ui/checkbox"
-import { MdOutlineRemoveRedEye } from "react-icons/md";
+import {
+ DialogBody,
+ DialogCloseTrigger,
+ DialogContent,
+ DialogHeader,
+ DialogRoot,
+ DialogTitle,
+ DialogTrigger,
+} from "../../components/ui/dialog";
+import { Avatar, Box, Field, Heading, Input, Stack } from "@chakra-ui/react";
import { Switch } from "../../components/ui/switch";
import { AvatarGroup } from "../../components/ui/avatar";
-import { TbEdit } from "react-icons/tb";
+import View from "../../components/ActionIcons/View";
function ViewManageGroup() {
- return (
+ return (
+
+
+
+
-
-
-
-
-
-
+
+
+
+ View details
+
+
-
+
+
+
+
+ Group Name
+
+
-
-
- View details
-
+
+ Description
+
+
-
-
+
+ Members
+
-
- Group Name
-
+
+
+
+
+
+
- Description
-
+
+
+
+
- Members
+
+
+
+
+
+ +3
+
+
+
+
+
+ public/Private
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- +3
-
-
-
-
-
- public/Private
-
-
-
-
-
-
-
-
- )
+
+
+
+ );
}
-export default ViewManageGroup
\ No newline at end of file
+export default ViewManageGroup;
diff --git a/src/Pages/ManageJobs/ManageJobs.tsx b/src/Pages/ManageJobs/ManageJobs.tsx
index 3d408ab..d694131 100644
--- a/src/Pages/ManageJobs/ManageJobs.tsx
+++ b/src/Pages/ManageJobs/ManageJobs.tsx
@@ -7,7 +7,7 @@ import MainFrame from "../../components/MainFrame";
import { InputGroup } from "../../components/ui/input-group";
import ManageJobsAdd from "./ManageJobsAdd";
import ViewManageJob from "./ViewManageJob";
-
+import Delete from "../../components/ActionIcons/Delete";
// table data
@@ -26,21 +26,15 @@ const managepost: any[] = [
"Sr. No": i + 1,
"Job Title": "Freelance content writer",
"Workspace mode": "Onsite",
- "Category": "IT",
+ Category: "IT",
"Sub-category": "Flutter dev",
- "Salary": "3.5 LPA",
- "Action": (
+ Salary: "3.5 LPA",
+ Action: (
-
- {/* */}
- {/* */}
- {/* */}
}
alertText="Delete Users"
alertIcon={}
alertCaption="are you sure you want to delete ?"
@@ -55,7 +49,6 @@ const managepost: any[] = [
const ManageJobs = () => {
return (
-
{
View job Posting
-
-
+
+
}
color={"#000"}
>
@@ -86,7 +82,7 @@ const ManageJobs = () => {
size={"xs"}
fontSize={"sm"}
placeholder="Search..."
- bgColor={'#EEEEEE'}
+ bgColor={"#EEEEEE"}
ps={8}
/>
@@ -98,8 +94,8 @@ const ManageJobs = () => {
tableHeadRow={tableHeadRow}
data={managepost}
/>
-
+
- )
-}
-export default ManageJobs
\ No newline at end of file
+ );
+};
+export default ManageJobs;
diff --git a/src/Pages/ManageJobs/ManageJobsAdd.tsx b/src/Pages/ManageJobs/ManageJobsAdd.tsx
index 60f300e..46a7454 100644
--- a/src/Pages/ManageJobs/ManageJobsAdd.tsx
+++ b/src/Pages/ManageJobs/ManageJobsAdd.tsx
@@ -1,125 +1,261 @@
-import { Field, Icon, Input, SelectValueText, Stack, createListCollection } from "@chakra-ui/react";
+import {
+ Field,
+ Icon,
+ Input,
+ SelectValueText,
+ Stack,
+ createListCollection,
+} from "@chakra-ui/react";
import { Button } from "../../components/ui/button";
-import { DialogBody, DialogCloseTrigger, DialogContent, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger } from "../../components/ui/dialog";
+import {
+ DialogBody,
+ DialogCloseTrigger,
+ DialogContent,
+ DialogFooter,
+ DialogHeader,
+ DialogRoot,
+ DialogTitle,
+ DialogTrigger,
+} from "../../components/ui/dialog";
import { TbEdit } from "react-icons/tb";
-import { SelectContent, SelectItem, SelectLabel, SelectRoot, SelectTrigger } from "../../components/ui/select";
+import {
+ SelectContent,
+ SelectItem,
+ SelectLabel,
+ SelectRoot,
+ SelectTrigger,
+} from "../../components/ui/select";
+import Edit from "../../components/ActionIcons/Edit";
const frameworks = createListCollection({
- items: [
- { label: "React.js", value: "react" },
- { label: "Vue.js", value: "vue" },
- { label: "Angular", value: "angular" },
- { label: "Svelte", value: "svelte" },
- ],
-})
+ items: [
+ { label: "React.js", value: "react" },
+ { label: "Vue.js", value: "vue" },
+ { label: "Angular", value: "angular" },
+ { label: "Svelte", value: "svelte" },
+ ],
+});
function ManageJobsAdd() {
- return (
+ return (
+
+
+
+
+
+
+
+ Add Details
+
+
-
-
-
-
-
-
-
-
-
- Add Details
-
-
-
-
-
- Job title
-
-
-
-
- Workspace mode
-
-
-
- Category
-
-
-
- Sub-Category
-
-
-
- Salary
-
-
-
- Experience
-
-
-
- Job Location
-
-
- {/* Country Selection
+
+
+
+
+ Job title
+
+
+
+
+
+ Workspace mode
+
+
+
+
+
+ Category
+
+
+
+
+
+ Sub-Category
+
+
+
+
+
+ Salary
+
+
+
+
+
+ Experience
+
+
+
+
+
+ Job Location
+
+
+
+ {/* Country Selection
*/}
-
- Country Selection
-
-
-
-
- {frameworks.items.map((movie) => (
-
- {movie.label}
-
- ))}
-
-
-
+
+
+ Country Selection
+
+
+
+
+
+ {frameworks.items.map((movie) => (
+
+ {movie.label}
+
+ ))}
+
+
+
+
+ Job type
+
+
+
+
+
+ Skills required
+
+
+
+
+
+ Job Description*
+
+
+
+
+
+
+
+ Save
+
+
- Job type
-
-
-
- Skills required
-
-
-
- Job Description*
-
-
-
-
-
-
- Save
-
-
-
-
-
-
-
-
- )
+
+
+
+ );
}
-export default ManageJobsAdd
\ No newline at end of file
+export default ManageJobsAdd;
diff --git a/src/Pages/ManageJobs/ViewManageJob.tsx b/src/Pages/ManageJobs/ViewManageJob.tsx
index bcd9bc8..460a8f9 100644
--- a/src/Pages/ManageJobs/ViewManageJob.tsx
+++ b/src/Pages/ManageJobs/ViewManageJob.tsx
@@ -1,119 +1,276 @@
-import { Field, Icon, Input, SelectValueText, Stack, createListCollection, } from "@chakra-ui/react"
-import { Button } from "../../components/ui/button"
-import { DialogBody, DialogCloseTrigger, DialogContent, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger } from "../../components/ui/dialog"
+import {
+ Field,
+ Icon,
+ Input,
+ SelectValueText,
+ Stack,
+ createListCollection,
+} from "@chakra-ui/react";
+import { Button } from "../../components/ui/button";
+import {
+ DialogBody,
+ DialogCloseTrigger,
+ DialogContent,
+ DialogFooter,
+ DialogHeader,
+ DialogRoot,
+ DialogTitle,
+ DialogTrigger,
+} from "../../components/ui/dialog";
-import { MdOutlineRemoveRedEye } from "react-icons/md"
-import { SelectContent, SelectItem, SelectLabel, SelectRoot, SelectTrigger } from "../../components/ui/select"
+import { MdOutlineRemoveRedEye } from "react-icons/md";
+import {
+ SelectContent,
+ SelectItem,
+ SelectLabel,
+ SelectRoot,
+ SelectTrigger,
+} from "../../components/ui/select";
+import View from "../../components/ActionIcons/View";
const frameworks = createListCollection({
- items: [
- { label: "React.js", value: "react" },
- { label: "Vue.js", value: "vue" },
- { label: "Angular", value: "angular" },
- { label: "Svelte", value: "svelte" },
- ],
-})
+ items: [
+ { label: "React.js", value: "react" },
+ { label: "Vue.js", value: "vue" },
+ { label: "Angular", value: "angular" },
+ { label: "Svelte", value: "svelte" },
+ ],
+});
function ViewManageJob() {
- return (
+ return (
+
+
+
+
+
+
+
+ Add Details
+
+
-
-
-
-
-
-
-
-
-
- Add Details
-
-
-
-
-
- Job title
-
-
- Workspace mode
-
-
- Category
-
-
- Sub-Category
-
-
- Salary
-
-
- Experience
-
-
- Job Location
-
-
- {/* Country Selection
+
+
+
+
+ Job title
+
+
+
+
+
+ Workspace mode
+
+
+
+
+
+ Category
+
+
+
+
+
+ Sub-Category
+
+
+
+
+
+ Salary
+
+
+
+
+
+ Experience
+
+
+
+
+
+ Job Location
+
+
+
+ {/* Country Selection
*/}
-
- Country Selection
-
-
-
-
- {frameworks.items.map((movie) => (
-
- {movie.label}
-
- ))}
-
-
+
+
+ Country Selection
+
+
+
+
+
+ {frameworks.items.map((movie) => (
+
+ {movie.label}
+
+ ))}
+
+
-
- Job type
-
-
- Skills required
-
-
- Job Description*
-
-
- Upload Image
-
-
-
-
-
-
- Save
-
-
+
+
+ Job type
+
+
+
+
+
+ Skills required
+
+
+
+
+
+ Job Description*
+
+
+
+
+
+ Upload Image
+
+
+
+
+
+
+
+ Save
+
+
-
-
-
-
-
- )
+
+
+
+ );
}
-export default ViewManageJob
\ No newline at end of file
+export default ViewManageJob;
diff --git a/src/Pages/ManagePost/ManagePost.tsx b/src/Pages/ManagePost/ManagePost.tsx
index 8f63a58..67c1264 100644
--- a/src/Pages/ManagePost/ManagePost.tsx
+++ b/src/Pages/ManagePost/ManagePost.tsx
@@ -1,14 +1,14 @@
-
-import { Box, HStack, Image, Input, 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 AlertDailog from '../../components/AlertDailog'
-import { Switch } from '../../components/ui/switch'
-import img from "../../assets/waterfall.jpg"
+import { Box, HStack, Image, Input, 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 AlertDailog from "../../components/AlertDailog";
+import { Switch } from "../../components/ui/switch";
+import img from "../../assets/waterfall.jpg";
import { RiDeleteBin5Line } from "react-icons/ri";
-import ViewDailog from './ViewDailog'
+import ViewDailog from "./ViewDailog";
+import Delete from "../../components/ActionIcons/Delete";
// import ViewDailog from './ViewDailog'
// table data
@@ -25,31 +25,29 @@ const tableHeadRow = [
const managepost: any[] = [
...Array.from({ length: 12 }, (_, i) => ({
"Sr. No": i + 1,
- "Images": (
+ Images: (
//
-
-
-
+
+ ),
+ Description: (
+
+ {`Lorem ipsum dolor, sit amet consectetur adipisicing elit.}`.slice(
+ 0,
+ 30
+ ) + "..."}
+
),
- "Description": (
- {`Lorem ipsum dolor, sit amet consectetur adipisicing elit.}`.slice(0, 30) + '...'}
- ),
"Publish Data": "12/01/2025",
"Activate/Deactivate": (
-
-
+
+
),
- "Action": (
+ Action: (
-
- {/* */}
- {/* */}
}
alertText="Delete Users"
alertIcon={}
alertCaption="are you sure you want to delete ?"
@@ -79,7 +77,10 @@ const ManagePost = () => {
+
}
color={"#000"}
>
@@ -93,7 +94,7 @@ const ManagePost = () => {
size={"xs"}
fontSize={"sm"}
placeholder="Search..."
- bgColor={'#EEEEEE'}
+ bgColor={"#EEEEEE"}
ps={8}
/>
@@ -106,7 +107,7 @@ const ManagePost = () => {
/>
- )
-}
+ );
+};
-export default ManagePost
+export default ManagePost;
diff --git a/src/Pages/ManagePost/ViewDailog.tsx b/src/Pages/ManagePost/ViewDailog.tsx
index 390da84..4efcbff 100644
--- a/src/Pages/ManagePost/ViewDailog.tsx
+++ b/src/Pages/ManagePost/ViewDailog.tsx
@@ -2,22 +2,14 @@ import { Field, Icon, Image, Input, Stack } from "@chakra-ui/react"
import { TbEdit } from "react-icons/tb"
import img from "../../assets/waterfall.jpg"
import { DialogBody, DialogCloseTrigger, DialogContent, DialogHeader, DialogRoot, DialogTitle, DialogTrigger } from "../../components/ui/dialog"
+import Edit from "../../components/ActionIcons/Edit"
function ViewDailog() {
return (
-
-
-
+
+
+
+
+
+
+
+ Edit
+
+
-
-
-
+
+
+
+ Agency name
+
+
+
+
+ RC No.
+
+
+
+
+ State
+
+
+
+
+ Registered Office Address
+
+
+
+
+ Website/Domain
+
+
+
+
+ GST no.
+
+
+
+
+ Action
+
+
+
+
+
+
+
-
-
-
+ Save
+
+
-
-
- Edit
-
-
-
-
-
- Agency name
-
-
- RC No.
-
-
- State
-
-
- Registered Office Address
-
-
- Website/Domain
-
-
- GST no.
-
-
- Action
-
-
-
-
-
-
-
-
- Save
-
-
-
-
-
-
-
-
- )
+
+
+
+ );
}
-export default EditAgencyMaster
\ No newline at end of file
+export default EditAgencyMaster;
diff --git a/src/Pages/MasterModule/AgencyMaster/ViewAgencyMaster.tsx b/src/Pages/MasterModule/AgencyMaster/ViewAgencyMaster.tsx
index e8e2d9a..ea581eb 100644
--- a/src/Pages/MasterModule/AgencyMaster/ViewAgencyMaster.tsx
+++ b/src/Pages/MasterModule/AgencyMaster/ViewAgencyMaster.tsx
@@ -1,83 +1,153 @@
-import { DialogBody, DialogCloseTrigger, DialogContent, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger } from "../../../components/ui/dialog"
-import { Field, Icon, Input, Stack, } from "@chakra-ui/react"
-import { MdOutlineRemoveRedEye } from "react-icons/md"
-import { Button } from "../../../components/ui/button"
-
+import {
+ DialogBody,
+ DialogCloseTrigger,
+ DialogContent,
+ DialogFooter,
+ DialogHeader,
+ DialogRoot,
+ DialogTitle,
+ DialogTrigger,
+} from "../../../components/ui/dialog";
+import { Field, Icon, Input, Stack } from "@chakra-ui/react";
+import { MdOutlineRemoveRedEye } from "react-icons/md";
+import { Button } from "../../../components/ui/button";
+import View from "../../../components/ActionIcons/View";
function ViewAgencyMaster() {
- return (
+ return (
+
+
+
+
+
+
+
+ Add
+
+
-
-
-
-
+
+
+
+ Agency name
+
+
+
+
+ RC No.
+
+
+
+
+ State
+
+
+
+
+ Registered Office Address
+
+
+
+
+ Website/Domain
+
+
+
+
+ GST no.
+
+
+
+
+ Action
+
+
+
+
+
+
+
-
-
-
+ Save
+
+
-
-
- Add
-
-
-
-
-
- Agency name
-
-
- RC No.
-
-
- State
-
-
- Registered Office Address
-
-
- Website/Domain
-
-
- GST no.
-
-
- Action
-
-
-
-
-
-
-
-
- Save
-
-
-
-
-
-
-
-
- )
+
+
+
+ );
}
-export default ViewAgencyMaster
\ No newline at end of file
+export default ViewAgencyMaster;
diff --git a/src/Pages/MasterModule/Country/EditCountryModel.tsx b/src/Pages/MasterModule/Country/EditCountryModel.tsx
index a26501e..6b88c1b 100644
--- a/src/Pages/MasterModule/Country/EditCountryModel.tsx
+++ b/src/Pages/MasterModule/Country/EditCountryModel.tsx
@@ -1,61 +1,67 @@
-import { DialogBody, DialogCloseTrigger, DialogContent, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger } from "../../../components/ui/dialog"
-import { Box, Field, IconButton, Input, Stack, Text, Textarea } from "@chakra-ui/react"
-import { Button } from "../../../components/ui/button"
-import { FaRegEdit } from "react-icons/fa";
-
+import {
+ DialogBody,
+ DialogCloseTrigger,
+ DialogContent,
+ DialogFooter,
+ DialogHeader,
+ DialogRoot,
+ DialogTitle,
+ DialogTrigger,
+} from "../../../components/ui/dialog";
+import { Field, Input, Stack } from "@chakra-ui/react";
+import { Button } from "../../../components/ui/button";
+import Edit from "../../../components/ActionIcons/Edit";
function EditCountryModel() {
+ return (
+
+
+
+
+
+
+
+ Edit
+
+
-
- return (
+
+
+
+
+ Country
+
+
+
+
+
+
+
+ Save
+
+
-
-
- {/*
-
- */}
-
-
-
-
-
-
-
-
- Edit
-
-
-
-
-
-
- Country
-
-
-
-
-
-
-
- Save
-
-
-
-
-
-
-
- )
+
+
+
+ );
}
-export default EditCountryModel
\ No newline at end of file
+export default EditCountryModel;
diff --git a/src/Pages/MasterModule/JobStatus/EditJobStatusModel.tsx b/src/Pages/MasterModule/JobStatus/EditJobStatusModel.tsx
index 7efe0a1..c40632a 100644
--- a/src/Pages/MasterModule/JobStatus/EditJobStatusModel.tsx
+++ b/src/Pages/MasterModule/JobStatus/EditJobStatusModel.tsx
@@ -2,6 +2,7 @@ import { DialogBody, DialogCloseTrigger, DialogContent, DialogFooter, DialogHead
import { Box, Field, IconButton, Input, Stack, Text, Textarea } from "@chakra-ui/react"
import { Button } from "../../../components/ui/button"
import { FaRegEdit } from "react-icons/fa";
+import Edit from "../../../components/ActionIcons/Edit";
function EditJobStatusModel() {
@@ -12,13 +13,7 @@ function EditJobStatusModel() {
- {/*
-
- */}
-
-
-
-
+
+
+
+
+
+
+
+ Edit
+
+
-
- return (
+
+
+
+
+ Job Type
+
+
+
+
+
+
+
+ Save
+
+
-
-
- {/*
-
- */}
-
-
-
-
-
-
-
-
- Edit
-
-
-
-
-
-
- Job Type
-
-
-
-
-
-
-
- Save
-
-
-
-
-
-
-
- )
+
+
+
+ );
}
-export default EditJobeModel
\ No newline at end of file
+export default EditJobeModel;
diff --git a/src/Pages/MasterModule/TemplateMaster/EditTemplateModel.tsx b/src/Pages/MasterModule/TemplateMaster/EditTemplateModel.tsx
index a96fffd..8619281 100644
--- a/src/Pages/MasterModule/TemplateMaster/EditTemplateModel.tsx
+++ b/src/Pages/MasterModule/TemplateMaster/EditTemplateModel.tsx
@@ -1,100 +1,143 @@
-import { DialogBody, DialogCloseTrigger, DialogContent, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger } from "../../../components/ui/dialog"
-import { Box, Field, IconButton, Input, Stack, Text, 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 {
+ Box,
+ Field,
+ IconButton,
+ Input,
+ Stack,
+ Text,
+ Textarea,
+} from "@chakra-ui/react";
+import { Button } from "../../../components/ui/button";
import { FiUpload } from "react-icons/fi";
import { useState } from "react";
import { FaRegEdit } from "react-icons/fa";
-
+import Edit from "../../../components/ActionIcons/Edit";
function EditTemplateModel() {
+ const [images, setImages] = useState([]);
- const [images, setImages] = useState([]);
+ const handleImageChange = (event: React.ChangeEvent) => {
+ if (event.target.files) {
+ const selectedFiles = Array.from(event.target.files);
- const handleImageChange = (event: React.ChangeEvent) => {
- if (event.target.files) {
- const selectedFiles = Array.from(event.target.files);
-
- const newImages = selectedFiles.map((file) => {
- return URL.createObjectURL(file); // Convert to preview URL
- });
-
- setImages((prevImages) => [...prevImages, ...newImages]); // Append new images
- }
- };
+ const newImages = selectedFiles.map((file) => {
+ return URL.createObjectURL(file); // Convert to preview URL
+ });
-
- return (
+ setImages((prevImages) => [...prevImages, ...newImages]); // Append new images
+ }
+ };
-
-
- {/*
-
- */}
-
-
-
+ return (
+
+
+
+
-
+
+
+
+ Add
+
+
-
-
- Add
-
+
+
+
+
+ Template Name
+
+
-
-
+
+ Images
+
+
+
+
+ {images.length > 0 ? (
+ images.map((img, index) => (
+
+ ))
+ ) : (
+ // Placeholder to maintain layout
+ )}
+
+
+
-
- Template Name
-
+ {/* */}
+
+
+
+
+
+ Save
+
+
-
- Images
-
-
-
- {images.length > 0 ? (
- images.map((img, index) => (
-
- ))
- ) : (
- // Placeholder to maintain layout
- )}
-
-
-
-
- {/* */}
-
-
-
-
-
-
-
- Save
-
-
-
-
-
-
-
- )
+
+
+
+ );
}
-export default EditTemplateModel
\ No newline at end of file
+export default EditTemplateModel;
diff --git a/src/Pages/MasterModule/WorkspaceMode/EditWorkModel.tsx b/src/Pages/MasterModule/WorkspaceMode/EditWorkModel.tsx
index ec0defb..325801a 100644
--- a/src/Pages/MasterModule/WorkspaceMode/EditWorkModel.tsx
+++ b/src/Pages/MasterModule/WorkspaceMode/EditWorkModel.tsx
@@ -1,61 +1,76 @@
-import { DialogBody, DialogCloseTrigger, DialogContent, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger } from "../../../components/ui/dialog"
-import { Box, Field, IconButton, Input, Stack, Text, 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 {
+ Box,
+ Field,
+ IconButton,
+ Input,
+ Stack,
+ Text,
+ Textarea,
+} from "@chakra-ui/react";
+import { Button } from "../../../components/ui/button";
import { FaRegEdit } from "react-icons/fa";
-
+import Edit from "../../../components/ActionIcons/Edit";
function EditWorkModel() {
+ return (
+
+
+
+
+
+
+
+ Edit
+
+
-
- return (
+
+
+
+
+ Workspace Mode
+
+
+
+
+
+
+
+ Save
+
+
-
-
- {/*
-
- */}
-
-
-
-
-
-
-
-
- Edit
-
-
-
-
-
-
- Workspace Mode
-
-
-
-
-
-
-
- Save
-
-
-
-
-
-
-
- )
+
+
+
+ );
}
-export default EditWorkModel
\ No newline at end of file
+export default EditWorkModel;
diff --git a/src/Pages/SubAdmin/SubAdmin.tsx b/src/Pages/SubAdmin/SubAdmin.tsx
index b48a452..8f3d299 100644
--- a/src/Pages/SubAdmin/SubAdmin.tsx
+++ b/src/Pages/SubAdmin/SubAdmin.tsx
@@ -8,6 +8,7 @@ import { RiDeleteBin5Line } from "react-icons/ri";
import AddModel from "./AddModel"
import EditSubAdmin from "../../components/EditSubAdmin"
import ViewSubAdmin from "./ViewSubAdmin"
+import Delete from "../../components/ActionIcons/Delete"
// table data
@@ -37,7 +38,7 @@ const managepost: any[] = [
}
alertText="Delete Users"
alertIcon={}
alertCaption="are you sure you want to delete ?"
diff --git a/src/Pages/SubAdmin/ViewSubAdmin.tsx b/src/Pages/SubAdmin/ViewSubAdmin.tsx
index b566162..6eac072 100644
--- a/src/Pages/SubAdmin/ViewSubAdmin.tsx
+++ b/src/Pages/SubAdmin/ViewSubAdmin.tsx
@@ -1,93 +1,183 @@
-import { Button } from "../../components/ui/button"
-import { DialogBody, DialogCloseTrigger, DialogContent, DialogFooter, DialogHeader, DialogRoot, DialogTitle, DialogTrigger } from "../../components/ui/dialog"
-import { Field, Grid, Heading, Icon, Input, Stack, Text } from "@chakra-ui/react"
-import { Checkbox } from "../../components/ui/checkbox"
+import { Button } from "../../components/ui/button";
+import {
+ DialogBody,
+ DialogCloseTrigger,
+ DialogContent,
+ DialogFooter,
+ DialogHeader,
+ DialogRoot,
+ DialogTitle,
+ DialogTrigger,
+} from "../../components/ui/dialog";
+import {
+ Field,
+ Grid,
+ Heading,
+ Icon,
+ Input,
+ Stack,
+ Text,
+} from "@chakra-ui/react";
+import { Checkbox } from "../../components/ui/checkbox";
import { MdOutlineRemoveRedEye } from "react-icons/md";
import { FaRegEdit } from "react-icons/fa";
+import View from "../../components/ActionIcons/View";
function ViewSubAdmin() {
- return (
+ return (
+
+
+
+
-
-
-
-
-
-
- {/* */}
-
- {/* */}
+
+
+
+ View Sub Admin Account
+
+
-
+
+
+
+
+ First Name
+
+
-
-
- View Sub Admin Account
-
+
+ Last Name
+
+
-
-
+
+ ID
+
+
-
- First Name
-
+
+ DOB
+
+
- Last Name
-
-
- ID
-
-
- DOB
-
-
- Gender
-
- Permissions
-
-
- Dashboard
- Manage contact us
- manage User
- Manage CMS
- Manage Post
- Manage Reports
- manage Sub-Admin
- My profile
- Manage Jobs
- manage feedbacks
- Manage community
- Notification
-
-
-
-
- {/*
+
+ Gender
+
+
+
+ Permissions
+
+
+
+
+ Dashboard
+
+
+ {" "}
+ Manage contact us
+
+
+ {" "}
+ manage User
+
+
+ {" "}
+ Manage CMS
+
+
+ {" "}
+ Manage Post
+
+
+ {" "}
+ Manage Reports
+
+
+ {" "}
+ manage Sub-Admin
+
+
+ {" "}
+ My profile
+
+
+ Manage Jobs{" "}
+
+
+ manage feedbacks
+
+
+ Manage community{" "}
+
+
+ Notification
+
+
+
+
+
+ {/*
Save
*/}
-
+
-
-
-
-
- )
+
+
+
+ );
}
-export default ViewSubAdmin
\ No newline at end of file
+export default ViewSubAdmin;
diff --git a/src/components/EditSubAdmin.tsx b/src/components/EditSubAdmin.tsx
index 4928b75..faf8978 100644
--- a/src/components/EditSubAdmin.tsx
+++ b/src/components/EditSubAdmin.tsx
@@ -12,22 +12,14 @@ import {
DialogTitle,
DialogTrigger,
} from "./ui/dialog";
+import Edit from "./ActionIcons/Edit";
function EditSubAdmin() {
return (
{/* */}
-
-
-
+
{/* */}
From 22d07519ff133e0568007e18e9a1417f256164cc Mon Sep 17 00:00:00 2001
From: "Siddhesh.More"
Date: Wed, 12 Feb 2025 13:30:02 +0530
Subject: [PATCH 4/7] update
---
src/Routes/Nav.ts | 32 ++++++++++++++++----------------
src/Routes/Routes.ts | 39 ++++++++++++++++++++++++++-------------
2 files changed, 42 insertions(+), 29 deletions(-)
diff --git a/src/Routes/Nav.ts b/src/Routes/Nav.ts
index 83956b9..16cee72 100644
--- a/src/Routes/Nav.ts
+++ b/src/Routes/Nav.ts
@@ -17,18 +17,18 @@ export const nav = [
},
{
title: "Manage Users",
- path: "/register-users",
+ path: "/manage-users",
Icon: BiUserPin,
type:'multiple',
children: [
{
title: "Register Users",
- path: "/register-users",
+ path: "/manage-users/register-users",
Icon: GoDotFill,
},
{
title: "Deactivated Accounts",
- path: "/deactivated-accounts",
+ path: "/manage-users/deactivated-accounts",
Icon: GoDotFill,
},
],
@@ -65,33 +65,33 @@ export const nav = [
},
{
title: "Manage CMS",
- path: "/faq",
+ path: "/manage-cms",
Icon: AiOutlineFileText,
type:'multiple',
children: [
{
title: "FAQs",
- 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-conditions",
+ path: "/manage-cms/terms-conditions",
Icon: GoDotFill,
},
{
title: "Privacy",
- path: "/privacy",
+ path: "/manage-cms/privacy",
Icon: GoDotFill,
},
],
@@ -104,38 +104,38 @@ export const nav = [
},
{
title: "Master Module",
- path: "/agency-master",
+ path: "/master-module",
Icon: BsBoxes,
type:'multiple',
children: [
{
title: "Agency Master",
- path: "/agency-master",
+ path: "/master-module/agency-master",
Icon: GoDotFill,
},
{
title: "Template Master",
- path: "/template-master",
+ path: "/master-module/template-master",
Icon: GoDotFill,
},
{
title: "Job Type",
- path: "/job-type",
+ path: "/master-module/job-type",
Icon: GoDotFill,
},
{
title: "Workspace Mode",
- path: "/workspace-mode",
+ path: "/master-module/workspace-mode",
Icon: GoDotFill,
},
{
title: "Country",
- path: "/country",
+ path: "/master-module/country",
Icon: GoDotFill,
},
{
title: "Job Status",
- path: "/job-status",
+ path: "/master-module/job-status",
Icon: GoDotFill,
},
],
diff --git a/src/Routes/Routes.ts b/src/Routes/Routes.ts
index c014a40..d1fcb50 100644
--- a/src/Routes/Routes.ts
+++ b/src/Routes/Routes.ts
@@ -27,27 +27,40 @@ import { Spinner } from "../components/Sipnner/Spinner";
export const RouteLink = [
{ path: "/", Component: Dashboard },
{ path: "/dashboard", Component: Dashboard },
- { path: "/register-users", Component: RegisterUsers },
- { path: "/deactivated-accounts", Component: DeactivatedAccounts },
+ { path: "/manage-users/register-users", Component: RegisterUsers },
+ { path: "/manage-users/deactivated-accounts", Component: DeactivatedAccounts },
{ path: "/manage-post", Component: ManagePost },
{ path: "/sub-admin", Component: SubAdmin},
{ path: "/manage-jobs", Component: ManageJobs},
{ path: "/manage-groups", Component: ManageGroups },
{ path: "/manage-contact", Component: ManageContact},
- { path: "/faq", Component: FAQ},
- { path: "/about-us", Component: AboutUs},
- { path: "/privacy-policy", Component: PrivacyPolicy},
- { path: "/terms-conditions", Component: TermsAndConditions},
- { path: "/privacy", Component: Privacy},
+
+
+
+ { path: "/manage-cms/faq", Component: FAQ},
+ { path: "/manage-cms/about-us", Component: AboutUs},
+ { path: "/manage-cms/privacy-policy", Component: PrivacyPolicy},
+ { path: "/manage-cms/terms-conditions", Component: TermsAndConditions},
+ { path: "/manage-cms/privacy", Component: Spinner},
+
+
+
{ path: "/my-profile", Component: MyProfile},
{ path: "/manage-notification", Component: Notification},
+
+
+
+
+
{ path: "/profile", Component: Profile},
- { path: "/agency-master", Component: AgencyMaster},
- { path: "/template-master", Component: TemplateMaster},
- { path: "/job-type", Component: JobType},
- { path: "/workspace-mode", Component: WorkspaceMode},
- { path: "/country", Component: Country},
- { path: "/job-status", Component: JobStatus},
+
+
+ { path: "/master-module/agency-master", Component: AgencyMaster},
+ { path: "/master-module/template-master", Component: TemplateMaster},
+ { path: "/master-module/job-type", Component: JobType},
+ { path: "/master-module/workspace-mode", Component: WorkspaceMode},
+ { path: "/master-module/country", Component: Country},
+ { path: "/master-module/job-status", Component: JobStatus},
// { path: "/job-status", Component: Spinner},
]
\ No newline at end of file
From 2ad88f91d41f3aa08043cbe02dd82d582df9cb36 Mon Sep 17 00:00:00 2001
From: "Siddhesh.More"
Date: Wed, 12 Feb 2025 13:51:41 +0530
Subject: [PATCH 5/7] update
---
.../ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx | 16 +++++++---------
src/Routes/Nav.ts | 6 +++---
src/Types/privacyPolicyTypes.tsx | 5 +++++
src/components/MainFrame.tsx | 2 +-
src/components/Sipnner/Spinner.tsx | 3 ++-
5 files changed, 18 insertions(+), 14 deletions(-)
diff --git a/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx b/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx
index 6950f72..28461d7 100644
--- a/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx
+++ b/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx
@@ -1,4 +1,4 @@
-import { Box, HStack, Text, Skeleton, VStack } from "@chakra-ui/react";
+import { Box, HStack, Text, Skeleton, VStack, Center } from "@chakra-ui/react";
import MainFrame from "../../../components/MainFrame";
import PrivacyPolicyAddModel from "./PrivacyPolicyAddModel";
import { useGetPrivacyPolicyQuery } from "../../../Redux/Service/privacy.policy.service";
@@ -21,9 +21,9 @@ const PrivacyPolicy = () => {
return (
- {isLoading?:
-
- {data?.data?.map(({id,content}, index)=>
+ {isLoading?
+ :data?.data?.map(({id,content}, index)=>
{
{/* Render multiple skeletons or content based on loading state */}
- {isFetching || !content ? (
-
- ) : (
+
{
>
{content}
- )}
+
)}
- }
+
);
};
diff --git a/src/Routes/Nav.ts b/src/Routes/Nav.ts
index 16cee72..a962322 100644
--- a/src/Routes/Nav.ts
+++ b/src/Routes/Nav.ts
@@ -17,7 +17,7 @@ export const nav = [
},
{
title: "Manage Users",
- path: "/manage-users",
+ // path: "/manage-users",
Icon: BiUserPin,
type:'multiple',
children: [
@@ -65,7 +65,7 @@ export const nav = [
},
{
title: "Manage CMS",
- path: "/manage-cms",
+ // path: "",
Icon: AiOutlineFileText,
type:'multiple',
children: [
@@ -104,7 +104,7 @@ export const nav = [
},
{
title: "Master Module",
- path: "/master-module",
+ // path: "/master-module",
Icon: BsBoxes,
type:'multiple',
children: [
diff --git a/src/Types/privacyPolicyTypes.tsx b/src/Types/privacyPolicyTypes.tsx
index fce8cb3..f0ca289 100644
--- a/src/Types/privacyPolicyTypes.tsx
+++ b/src/Types/privacyPolicyTypes.tsx
@@ -3,6 +3,11 @@ export interface PrivacyPolicyContent {
language_master_xid: number;
content: string;
is_active: boolean;
+ privacy_language:{
+ id:number;
+ language_code:string;
+ language_name:string;
+ }
}
export interface PrivacyPolicyResponse {
diff --git a/src/components/MainFrame.tsx b/src/components/MainFrame.tsx
index 79ce468..c3e5c03 100644
--- a/src/components/MainFrame.tsx
+++ b/src/components/MainFrame.tsx
@@ -14,7 +14,7 @@ interface MainFrameProps {
const MainFrame: FC = ({ children, transperant }) => {
return (
-
+
+import MainFrame from '../MainFrame'
+export const Spinner = () =>
From 001d3464261e14a39191d7fd8635a4dee74003b6 Mon Sep 17 00:00:00 2001
From: "Siddhesh.More"
Date: Wed, 12 Feb 2025 15:35:38 +0530
Subject: [PATCH 6/7] update
---
src/Layouts/DefaultLayout.tsx | 4 +-
.../ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx | 71 ++++++++-----------
src/Routes/Nav.ts | 6 +-
src/components/MainFrame.tsx | 4 +-
src/index.css | 3 +
5 files changed, 38 insertions(+), 50 deletions(-)
diff --git a/src/Layouts/DefaultLayout.tsx b/src/Layouts/DefaultLayout.tsx
index ac7cd29..19aca88 100644
--- a/src/Layouts/DefaultLayout.tsx
+++ b/src/Layouts/DefaultLayout.tsx
@@ -56,9 +56,9 @@ const DefaultLayout: FC<{ children: React.ReactNode }> = ({ children }) => {
- {nav?.map(({ title, path, Icon, type, children }, index) => type === 'single' ?
+ {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', }}> {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})}
diff --git a/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx b/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx
index 28461d7..23ddda3 100644
--- a/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx
+++ b/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx
@@ -1,56 +1,41 @@
-import { Box, HStack, Text, Skeleton, VStack, Center } from "@chakra-ui/react";
-import MainFrame from "../../../components/MainFrame";
-import PrivacyPolicyAddModel from "./PrivacyPolicyAddModel";
+import { Badge, HStack, Text, VStack } from "@chakra-ui/react";
import { useGetPrivacyPolicyQuery } from "../../../Redux/Service/privacy.policy.service";
-import PrivacyPolicySkeleton from "./privacyPolicySkeleton";
+import MainFrame from "../../../components/MainFrame";
import { Spinner } from "../../../components/Sipnner/Spinner";
+import PrivacyPolicyAddModel from "./PrivacyPolicyAddModel";
const PrivacyPolicy = () => {
- // Fetch data using RTK Query with type annotations
const { data, isLoading, isFetching } = useGetPrivacyPolicyQuery();
-
- console.log(isLoading);
-
-
- // Log the response for debugging
- console.log("====================================");
- console.log(data);
- console.log("====================================");
-
-
return (
-
- {isLoading?
- :data?.data?.map(({id,content}, index)=>
-
-
- Privacy Policy
-
+
+ {isLoading || isFetching ?
+ : data?.data?.map(({ id, content, privacy_language }) =>
+
-
+ py={0}
+ px={0}
+ >
+
+ Privacy Policy 🎓 {privacy_language?.language_name}
+
- {/* Render multiple skeletons or content based on loading state */}
-
-
- {content}
-
-
- )}
+
+
+
+ {content}
+
+
+ )}
);
diff --git a/src/Routes/Nav.ts b/src/Routes/Nav.ts
index a962322..03cf928 100644
--- a/src/Routes/Nav.ts
+++ b/src/Routes/Nav.ts
@@ -17,7 +17,7 @@ export const nav = [
},
{
title: "Manage Users",
- // path: "/manage-users",
+ initPath: "/manage-users",
Icon: BiUserPin,
type:'multiple',
children: [
@@ -65,7 +65,7 @@ export const nav = [
},
{
title: "Manage CMS",
- // path: "",
+ initPath: "/manage-cms",
Icon: AiOutlineFileText,
type:'multiple',
children: [
@@ -104,7 +104,7 @@ export const nav = [
},
{
title: "Master Module",
- // path: "/master-module",
+ initPath: "/master-module",
Icon: BsBoxes,
type:'multiple',
children: [
diff --git a/src/components/MainFrame.tsx b/src/components/MainFrame.tsx
index c3e5c03..19e73c7 100644
--- a/src/components/MainFrame.tsx
+++ b/src/components/MainFrame.tsx
@@ -14,12 +14,12 @@ interface MainFrameProps {
const MainFrame: FC = ({ children, transperant }) => {
return (
-
+
Date: Wed, 12 Feb 2025 16:27:49 +0530
Subject: [PATCH 7/7] update
---
src/Contexts/GlobalStateContext.tsx | 7 ++++---
src/Contexts/GlobalStateProvider.tsx | 15 +++++++++++----
src/Layouts/DefaultLayout.tsx | 4 ++--
.../ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx | 11 +++++++++++
src/Pages/Profile/Profile.tsx | 18 ++++++++----------
src/components/MainFrame.tsx | 6 +++---
6 files changed, 39 insertions(+), 22 deletions(-)
diff --git a/src/Contexts/GlobalStateContext.tsx b/src/Contexts/GlobalStateContext.tsx
index 8c7e0cd..6015cbb 100644
--- a/src/Contexts/GlobalStateContext.tsx
+++ b/src/Contexts/GlobalStateContext.tsx
@@ -2,11 +2,12 @@
import { createContext, Dispatch, SetStateAction } from 'react';
// Define the shape of your context value
-type GlobalStateContextType = {
+export interface GlobalStateContextType {
isAuthenticate: boolean;
setIsAuthenticate: Dispatch>;
-};
-
+ isBarLoading: boolean;
+ setIsBarLoading: Dispatch>;
+}
// Create the context with a default value of `undefined`
const GlobalStateContext = createContext(undefined);
diff --git a/src/Contexts/GlobalStateProvider.tsx b/src/Contexts/GlobalStateProvider.tsx
index 105a8cb..82b7d9a 100644
--- a/src/Contexts/GlobalStateProvider.tsx
+++ b/src/Contexts/GlobalStateProvider.tsx
@@ -1,14 +1,21 @@
-import { ReactNode, useState } from 'react';
-import GlobalStateContext from './GlobalStateContext';
-
+import { ReactNode, useState } from "react";
+import GlobalStateContext from "./GlobalStateContext";
const GlobalStateProvider = ({ children }: { children: ReactNode }) => {
const [isAuthenticate, setIsAuthenticate] = useState(true);
+ const [isBarLoading, setIsBarLoading] = useState(false); // ✅ Fixed typo
+
+
return (
-
+
{children}
);
diff --git a/src/Layouts/DefaultLayout.tsx b/src/Layouts/DefaultLayout.tsx
index 19aca88..7dd0c7d 100644
--- a/src/Layouts/DefaultLayout.tsx
+++ b/src/Layouts/DefaultLayout.tsx
@@ -24,7 +24,7 @@ const DefaultLayout: FC<{ children: React.ReactNode }> = ({ children }) => {
if (!context) {
throw new Error('App must be used within a GlobalStateProvider');
}
- const { setIsAuthenticate } = context;
+ const { setIsAuthenticate, isBarLoading } = context;
const [ logOutAdmin ] = useLogOutMutation()
@@ -48,7 +48,7 @@ const DefaultLayout: FC<{ children: React.ReactNode }> = ({ children }) => {
return (
-
+
diff --git a/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx b/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx
index 23ddda3..869f02e 100644
--- a/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx
+++ b/src/Pages/ManageCMS/PrivacyPolicy/PrivacyPolicy.tsx
@@ -3,10 +3,21 @@ import { useGetPrivacyPolicyQuery } from "../../../Redux/Service/privacy.policy.
import MainFrame from "../../../components/MainFrame";
import { Spinner } from "../../../components/Sipnner/Spinner";
import PrivacyPolicyAddModel from "./PrivacyPolicyAddModel";
+import GlobalStateContext from "../../../Contexts/GlobalStateContext";
+import { useContext, useEffect } from "react";
const PrivacyPolicy = () => {
const { data, isLoading, isFetching } = useGetPrivacyPolicyQuery();
+
+ const context = useContext(GlobalStateContext);
+ if (!context) throw new Error('App must be used within a GlobalStateProvider');
+
+ const { setIsBarLoading } = context;
+ useEffect(() => {
+ setIsBarLoading(isFetching)
+ }, [data])
+
return (
diff --git a/src/Pages/Profile/Profile.tsx b/src/Pages/Profile/Profile.tsx
index 858216a..b32b9a0 100644
--- a/src/Pages/Profile/Profile.tsx
+++ b/src/Pages/Profile/Profile.tsx
@@ -1,7 +1,6 @@
-import { Avatar, Box, Field, Input, SimpleGrid, Stack, Text } from "@chakra-ui/react"
-import MainFrame from "../../components/MainFrame"
+import { Avatar, Box, Field, Input, SimpleGrid, Stack, Text } from "@chakra-ui/react";
import { FaCamera } from "react-icons/fa";
-import { Button } from "../../components/ui/button";
+import MainFrame from "../../components/MainFrame";
import Changepassword from "./ChangePassword";
const Profile = () => {
@@ -10,13 +9,11 @@ const Profile = () => {
alert("Avatar clicked!")}>
-
{
{`Jackson Da`.slice(0, 10) + '...'}
- {/* Employee ID: #1245679 */}
Employee ID: #1245679
@@ -35,14 +31,16 @@ const Profile = () => {
First Name
-
+
+
last Name
-
+
+
Phone Number
-
-
+
+
Update password
{/*
diff --git a/src/components/MainFrame.tsx b/src/components/MainFrame.tsx
index 19e73c7..9c66e8c 100644
--- a/src/components/MainFrame.tsx
+++ b/src/components/MainFrame.tsx
@@ -14,12 +14,12 @@ interface MainFrameProps {
const MainFrame: FC = ({ children, transperant }) => {
return (
-
+