[ update changes ]
This commit is contained in:
4
.env
4
.env
@@ -4,8 +4,8 @@
|
||||
# VITE_PASSWORD="71%@L%es^bUX94`J9XT*@bh,._WWM{$%^^&&"
|
||||
# VITE_APP_NAME=MyViteApp
|
||||
# VITE_IMG_TEMPLATES='https://ssa.betadelivery.com/storage/app/public/uploads/post_templates/'
|
||||
# VITE_API_URL='https://ssa.betadelivery.com/testing/apia/v1'
|
||||
VITE_API_URL='https://ssa.betadelivery.com/apia/v1'
|
||||
VITE_API_URL='https://ssa.betadelivery.com/testing/apia/v1'
|
||||
# VITE_API_URL='https://ssa.betadelivery.com/apia/v1'
|
||||
VITE_USER_NAME="Admin"
|
||||
VITE_PASSWORD="71%@L%es^bUX94`J9XT*@bh,._WWM{$%^^&&"
|
||||
# VITE_PASSWORD="71%@L%es^bUX94`J9XT*%4&^%tUU^%Q^ffgt"
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" name="referrer" content="strict-origin-when-cross-origin" />
|
||||
<link rel="icon" type="image/png+xml" href="/src/assets/favicon.png" />
|
||||
<!-- <link rel="icon" type="image/png+xml" href="/src/assets/favicon.png" /> -->
|
||||
<link rel="icon" type="image/png" href="/favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>SEO Admin</title>
|
||||
</head>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Badge, HStack, Text, VStack } from "@chakra-ui/react";
|
||||
import { Badge, HStack, Stack, Text, VStack } from "@chakra-ui/react";
|
||||
import { useGetPrivacyPolicyQuery } from "../../../Redux/Service/privacy.policy.service";
|
||||
import MainFrame from "../../../components/MainFrame";
|
||||
import { Spinner } from "../../../components/Sipnner/Spinner";
|
||||
@@ -6,41 +6,63 @@ import PrivacyPolicyAddModel from "./PrivacyPolicyAddModel";
|
||||
import GlobalStateContext from "../../../Contexts/GlobalStateContext";
|
||||
import { useContext, useEffect } from "react";
|
||||
|
||||
|
||||
const PrivacyPolicy = () => {
|
||||
const { data, isLoading, isFetching, refetch } = useGetPrivacyPolicyQuery();
|
||||
|
||||
console.log('PRIVACY', data?.data);
|
||||
|
||||
console.log("PRIVACY", data?.data);
|
||||
|
||||
const context = useContext(GlobalStateContext);
|
||||
if (!context) throw new Error('App must be used within a GlobalStateProvider');
|
||||
if (!context)
|
||||
throw new Error("App must be used within a GlobalStateProvider");
|
||||
|
||||
const { setIsBarLoading } = context;
|
||||
useEffect(() => {
|
||||
setIsBarLoading(isFetching)
|
||||
}, [data])
|
||||
setIsBarLoading(isFetching);
|
||||
}, [data]);
|
||||
|
||||
console.log('Privacy Policy Data:', data?.data);
|
||||
console.log("Privacy Policy Data:", data?.data);
|
||||
|
||||
return (
|
||||
<MainFrame transperant={true}>
|
||||
<Stack bg={"#fff"} w={"100%"} p={4} borderRadius={4} mb={4}>
|
||||
<Text color={"black"} textAlign={"left"} fontWeight={"600"}>
|
||||
Privacy Policy
|
||||
</Text>
|
||||
</Stack>
|
||||
<VStack gap={4} pb={4} pt={0}>
|
||||
{isLoading || isFetching ?
|
||||
<Spinner /> : data?.data?.map(({ id, content, privacy_language }) => <VStack bg={'#fff'}
|
||||
boxShadow={'rgba(99, 99, 99, 0.2) 0px 2px 8px 0px'} rounded={'lg'} p={3} key={id}>
|
||||
<HStack
|
||||
w={"100%"}
|
||||
justifyContent={"space-between"}
|
||||
|
||||
py={0}
|
||||
px={0}
|
||||
{isLoading || isFetching ? (
|
||||
<Spinner />
|
||||
) : (
|
||||
data?.data?.map(({ id, content, privacy_language }) => (
|
||||
<VStack
|
||||
bg={"#fff"}
|
||||
boxShadow={"rgba(99, 99, 99, 0.2) 0px 2px 8px 0px"}
|
||||
rounded={"lg"}
|
||||
p={3}
|
||||
key={id}
|
||||
>
|
||||
<Text as={"span"} fontSize={"sm"} fontWeight={500} color={"#000"}>
|
||||
Privacy Policy <Badge variant={'surface'} colorPalette="cyan" ms={2} size={'sm'} fontSize={'xs'} px={2}>🎓 {privacy_language?.language_name}</Badge>
|
||||
<HStack w={"100%"} justifyContent={"space-between"} py={0} px={0}>
|
||||
<Text
|
||||
as={"span"}
|
||||
fontSize={"sm"}
|
||||
fontWeight={500}
|
||||
color={"#000"}
|
||||
>
|
||||
<Badge
|
||||
variant={"surface"}
|
||||
colorPalette="cyan"
|
||||
size={"sm"}
|
||||
fontSize={"xs"}
|
||||
px={2}
|
||||
>
|
||||
🎓 {privacy_language?.language_name}
|
||||
</Badge>
|
||||
</Text>
|
||||
|
||||
<PrivacyPolicyAddModel policyData={{ id, content, privacy_language }} refetch={refetch} />
|
||||
<PrivacyPolicyAddModel
|
||||
policyData={{ id, content, privacy_language }}
|
||||
refetch={refetch}
|
||||
/>
|
||||
</HStack>
|
||||
<Text
|
||||
as="p"
|
||||
@@ -49,8 +71,9 @@ console.log('Privacy Policy Data:', data?.data);
|
||||
color="#1D1D1D"
|
||||
dangerouslySetInnerHTML={{ __html: content }}
|
||||
/>
|
||||
|
||||
</VStack>)}
|
||||
</VStack>
|
||||
))
|
||||
)}
|
||||
</VStack>
|
||||
</MainFrame>
|
||||
);
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
import { Badge, HStack, Spinner, Stack, Text, VStack } from "@chakra-ui/react";
|
||||
import MainFrame from "../../../components/MainFrame"
|
||||
import MainFrame from "../../../components/MainFrame";
|
||||
import TermsAndConditionsAddModel from "./TermsAndConditionsAddModel";
|
||||
import { useGetTermsQuery } from "../../../Redux/Service/terms.and.condition.service";
|
||||
|
||||
|
||||
const TermsAndConditions = () => {
|
||||
const { data, refetch, isLoading, isFetching } = useGetTermsQuery()
|
||||
const { data, refetch, isLoading, isFetching } = useGetTermsQuery();
|
||||
|
||||
console.log(data);
|
||||
|
||||
return (
|
||||
|
||||
<MainFrame>
|
||||
<MainFrame transperant={true}>
|
||||
<VStack gap={4} pb={4} pt={0}>
|
||||
<Stack bg={"#fff"} w={"100%"} mt={2} p={4} borderRadius={4}><Text color={"black"} textAlign={"left"} fontWeight={"600"} >Terms and Conditions
|
||||
</Text></Stack>
|
||||
<Stack bg={"#fff"} w={"100%"} mt={2} p={4} borderRadius={4}>
|
||||
<Text color={"black"} textAlign={"left"} fontWeight={"600"}>
|
||||
Terms and Conditions
|
||||
</Text>
|
||||
</Stack>
|
||||
|
||||
{isLoading || isFetching ? (
|
||||
<Spinner />
|
||||
@@ -26,9 +28,13 @@ const TermsAndConditions = () => {
|
||||
p={3}
|
||||
key={id}
|
||||
>
|
||||
|
||||
<HStack w={"100%"} justifyContent={"space-between"} py={0} px={0}>
|
||||
<Text as={"span"} fontSize={"sm"} fontWeight={500} color={"#000"}>
|
||||
<Text
|
||||
as={"span"}
|
||||
fontSize={"sm"}
|
||||
fontWeight={500}
|
||||
color={"#000"}
|
||||
>
|
||||
<Badge
|
||||
variant={"surface"}
|
||||
colorPalette="cyan"
|
||||
@@ -42,7 +48,10 @@ const TermsAndConditions = () => {
|
||||
</Text>
|
||||
|
||||
{/* Pass Data to AboutUsAddModel */}
|
||||
<TermsAndConditionsAddModel termsData={{ id, content, terms_cond_language }} refetch={refetch} />
|
||||
<TermsAndConditionsAddModel
|
||||
termsData={{ id, content, terms_cond_language }}
|
||||
refetch={refetch}
|
||||
/>
|
||||
</HStack>
|
||||
<Text as="p" fontSize="sm" fontWeight={400} color="#1D1D1D">
|
||||
{/* {content} */}
|
||||
@@ -53,7 +62,6 @@ const TermsAndConditions = () => {
|
||||
)}
|
||||
</VStack>
|
||||
</MainFrame>
|
||||
</MainFrame >
|
||||
)
|
||||
}
|
||||
export default TermsAndConditions
|
||||
);
|
||||
};
|
||||
export default TermsAndConditions;
|
||||
|
||||
@@ -1,38 +1,77 @@
|
||||
import { Box, HStack, Input, Text } from "@chakra-ui/react";
|
||||
import MainFrame from "../../components/MainFrame"
|
||||
import PendingRequests from "../../Pages/ManageContact/PendingRequests"
|
||||
import MainFrame from "../../components/MainFrame";
|
||||
import PendingRequests from "../../Pages/ManageContact/PendingRequests";
|
||||
import { InputGroup } from "../../components/ui/input-group";
|
||||
import { LuSearch } from "react-icons/lu";
|
||||
import DataTable from "../../components/DataTable";
|
||||
|
||||
import { useGetContactQuery } from "../../Redux/Service/manage.contactus.service";
|
||||
import { useEffect, useState } from "react";
|
||||
import { Spinner } from "../../components/Sipnner/Spinner";
|
||||
|
||||
// table data
|
||||
const tableHeadRow = ["Sr. No", "Email id", "Name", "Date", "Action"];
|
||||
|
||||
const tableHeadRow = [
|
||||
"Sr. No",
|
||||
"Email id",
|
||||
"Name",
|
||||
"Date",
|
||||
"Action",
|
||||
];
|
||||
const ManageContact = () => {
|
||||
const { data, isLoading, isError } = useGetContactQuery();
|
||||
const [localData, setLocalData] = useState([]);
|
||||
|
||||
const managepost: any[] = [
|
||||
...Array.from({ length: 12 }, (_, i) => ({
|
||||
"Sr. No": i + 1,
|
||||
"Email id": "ABC@gmail.com",
|
||||
"Name": "Pooja",
|
||||
"Date": "11/02/1989",
|
||||
"Action": (
|
||||
useEffect(() => {
|
||||
if (data) {
|
||||
setLocalData((data as any)?.data?.data || []);
|
||||
}
|
||||
}, [data]);
|
||||
|
||||
const formatDateOfBirth = (dob: string): string => {
|
||||
return new Date(dob).toLocaleDateString("en-GB", {
|
||||
day: "2-digit",
|
||||
month: "2-digit",
|
||||
year: "numeric",
|
||||
});
|
||||
};
|
||||
|
||||
const managepost = localData?.map((agency: any, index: number) => ({
|
||||
"Sr. No": index + 1, // Typically Sr. No starts from 1, not using id which might not be sequential
|
||||
"Email id": agency?.email || "-",
|
||||
Name: agency?.first_name || "-",
|
||||
Date: formatDateOfBirth(agency?.created_at) || "-",
|
||||
Action: (
|
||||
<HStack justifyContent="center">
|
||||
<PendingRequests />
|
||||
</HStack>
|
||||
),
|
||||
})),
|
||||
];
|
||||
}));
|
||||
|
||||
const ManageContact = () => {
|
||||
if (isLoading) {
|
||||
return (
|
||||
<MainFrame>
|
||||
<Box
|
||||
display="flex"
|
||||
justifyContent="center"
|
||||
alignItems="center"
|
||||
height="100%"
|
||||
>
|
||||
<Spinner />
|
||||
</Box>
|
||||
</MainFrame>
|
||||
);
|
||||
}
|
||||
|
||||
if (isError) {
|
||||
return (
|
||||
<MainFrame>
|
||||
<Box
|
||||
display="flex"
|
||||
justifyContent="center"
|
||||
alignItems="center"
|
||||
height="100%"
|
||||
>
|
||||
<Text>Error loading data</Text>
|
||||
</Box>
|
||||
</MainFrame>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<MainFrame>
|
||||
<Box>
|
||||
<HStack
|
||||
@@ -49,7 +88,10 @@ const ManageContact = () => {
|
||||
<HStack>
|
||||
<InputGroup
|
||||
startElement={
|
||||
<LuSearch fontSize={"xs"} style={{ position: 'relative', left: '10px' }} />
|
||||
<LuSearch
|
||||
fontSize={"xs"}
|
||||
style={{ position: "relative", left: "10px" }}
|
||||
/>
|
||||
}
|
||||
color={"#000"}
|
||||
>
|
||||
@@ -63,20 +105,20 @@ const ManageContact = () => {
|
||||
size={"xs"}
|
||||
fontSize={"sm"}
|
||||
placeholder="Search..."
|
||||
bgColor={'#EEEEEE'}
|
||||
bgColor={"#EEEEEE"}
|
||||
ps={8}
|
||||
/>
|
||||
</InputGroup>
|
||||
{/* <Button bgColor={'#EEEEEE'} pl={3} pr={3}><IoMdAdd /> <Text>Add</Text></Button> */}
|
||||
</HStack>
|
||||
</HStack>
|
||||
<DataTable
|
||||
sortableColumns={["Name", "Registration Date "]}
|
||||
tableHeadRow={tableHeadRow}
|
||||
data={managepost}
|
||||
data={managepost || []} // Ensure an empty array is passed if managepost is undefined
|
||||
/>
|
||||
</Box>
|
||||
</MainFrame>
|
||||
)
|
||||
}
|
||||
export default ManageContact
|
||||
);
|
||||
};
|
||||
|
||||
export default ManageContact;
|
||||
|
||||
@@ -48,6 +48,9 @@ const managepost: any[] = [
|
||||
),
|
||||
})),
|
||||
];
|
||||
|
||||
|
||||
|
||||
const ManageGroups = () => {
|
||||
return (
|
||||
<MainFrame>
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
import {
|
||||
Box, HStack,
|
||||
Box,
|
||||
HStack,
|
||||
Image,
|
||||
// Image,
|
||||
Input, Text
|
||||
Input,
|
||||
Text,
|
||||
} from "@chakra-ui/react";
|
||||
import { LuSearch } from "react-icons/lu";
|
||||
// import { RiDeleteBin5Line } from "react-icons/ri";
|
||||
@@ -11,6 +14,15 @@ import MainFrame from "../../components/MainFrame";
|
||||
import { InputGroup } from "../../components/ui/input-group";
|
||||
import ManageJobsAdd from "./ManageJobsAdd";
|
||||
import ViewManageJob from "./ViewManageJob";
|
||||
import {
|
||||
useDeleteJobsPostMutation,
|
||||
useGetManageJobsQuery,
|
||||
} from "../../Redux/Service/manage.jobs.service";
|
||||
import { useEffect, useState } from "react";
|
||||
import { Spinner } from "../../components/Sipnner/Spinner";
|
||||
import Delete from "../../components/ActionIcons/Delete";
|
||||
import { toaster } from "../../components/ui/toaster";
|
||||
import AlertDailog from "../../components/AlertDailog";
|
||||
// import { useState } from "react";
|
||||
// import { useGetManageJobsQuery } from "../../Redux/Service/manage.jobs.service";
|
||||
// import Delete from "../../components/ActionIcons/Delete";
|
||||
@@ -27,36 +39,93 @@ const tableHeadRow = [
|
||||
"Action",
|
||||
];
|
||||
|
||||
const managepost: any[] = [
|
||||
...Array.from({ length: 12 }, (_, i) => ({
|
||||
"Sr. No": i + 1,
|
||||
"Job Title": "Freelance content writer",
|
||||
"Workspace mode": "Onsite",
|
||||
Category: "IT",
|
||||
"Sub-category": "Flutter dev",
|
||||
Salary: "3.5 LPA",
|
||||
const ManageJobs = () => {
|
||||
const [currentPage] = useState(1);
|
||||
const [localData, setLocalData] = useState([]);
|
||||
const { data, refetch, isLoading } = useGetManageJobsQuery(currentPage);
|
||||
const [deleteJobsPost] = useDeleteJobsPostMutation();
|
||||
const [deleteModal, setDeleteModal] = useState(false);
|
||||
const [selectedJobsId, setSelectedJobsId] = useState<number | null>(null);
|
||||
|
||||
useEffect(() => {
|
||||
if (data) {
|
||||
setLocalData((data as any)?.data?.data || []);
|
||||
}
|
||||
}, [data]);
|
||||
console.log(data?.data.data);
|
||||
|
||||
const handleDeleteJobs = async (jobsId: number) => {
|
||||
try {
|
||||
const response = await deleteJobsPost({ id: jobsId }).unwrap();
|
||||
if (response?.status === "success") {
|
||||
toaster.create({
|
||||
title: "Success",
|
||||
description: "Jobs deleted successfully",
|
||||
type: "Success",
|
||||
});
|
||||
refetch();
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Error deleting FAQ:", error);
|
||||
toaster.create({
|
||||
title: "Error",
|
||||
description: "Something went wrong",
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const managepost = localData?.map((agency: any, index: number) => ({
|
||||
"Sr. No": index + 1,
|
||||
"Job Title": agency?.job_title,
|
||||
"Workspace mode": agency?.workspace?.en_name,
|
||||
Category: agency?.industry?.en_name,
|
||||
"Sub-category": agency?.department?.en_name,
|
||||
Salary: agency?.ctc_amount,
|
||||
Action: (
|
||||
<HStack justifyContent="center">
|
||||
<ViewManageJob />
|
||||
<ManageJobsAdd />
|
||||
{/* <AlertDailog
|
||||
AltertTiggerIcon={() => <Delete />}
|
||||
alertText="Delete Users"
|
||||
<AlertDailog
|
||||
isOpen={deleteModal}
|
||||
AltertTiggerIcon={() => (
|
||||
<Delete
|
||||
onClick={() => {
|
||||
setSelectedJobsId(agency.id);
|
||||
setDeleteModal(true);
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
alertText="Delete FAQ"
|
||||
alertIcon={<Image src={"DeleteIcon"} h={"39px"} />}
|
||||
alertCaption="are you sure you want to delete ?"
|
||||
onClose={() => setDeleteModal(false)}
|
||||
onConfirm={() => {
|
||||
console.log("User deleted:", i + 1);
|
||||
// console.log("Deleting FAQ with ID:", selectedFaqId); // Correct ID
|
||||
if (selectedJobsId) {
|
||||
setDeleteModal(false);
|
||||
handleDeleteJobs(selectedJobsId);
|
||||
}
|
||||
}}
|
||||
/> */}
|
||||
/>
|
||||
</HStack>
|
||||
),
|
||||
})),
|
||||
];
|
||||
}));
|
||||
|
||||
const ManageJobs = () => {
|
||||
// const [currentPage, setCurrentPage] = useState(1);
|
||||
// const { data, refetch } = useGetManageJobsQuery(currentPage)
|
||||
// console.log(data?.data.data);
|
||||
if (isLoading) {
|
||||
return (
|
||||
<MainFrame>
|
||||
<Box
|
||||
display="flex"
|
||||
justifyContent="center"
|
||||
alignItems="center"
|
||||
height="100%"
|
||||
>
|
||||
<Spinner />
|
||||
</Box>
|
||||
</MainFrame>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<MainFrame>
|
||||
|
||||
@@ -27,6 +27,7 @@ import {
|
||||
SelectTrigger,
|
||||
} from "../../components/ui/select";
|
||||
import View from "../../components/ActionIcons/View";
|
||||
import { useLazyViewJobsQuery } from "../../Redux/Service/manage.jobs.service";
|
||||
|
||||
const frameworks = createListCollection({
|
||||
items: [
|
||||
@@ -37,12 +38,27 @@ const frameworks = createListCollection({
|
||||
],
|
||||
});
|
||||
function ViewManageJob() {
|
||||
const [trigger, { data }] = useLazyViewJobsQuery();
|
||||
|
||||
console.log(data);
|
||||
|
||||
// const handleView = () => {
|
||||
// trigger(id);
|
||||
// };
|
||||
|
||||
const viewJobs = data;
|
||||
|
||||
console.log();
|
||||
|
||||
return (
|
||||
<DialogRoot placement="center">
|
||||
<DialogTrigger asChild>
|
||||
<Span><View /></Span>
|
||||
<Span>
|
||||
<View />
|
||||
</Span>
|
||||
</DialogTrigger>
|
||||
|
||||
{/* {viewJobs?.map((data: any) => ( */}
|
||||
<DialogContent
|
||||
bg={"#fff"}
|
||||
// w={{ lg: "60%", md: "230px" }}
|
||||
@@ -180,7 +196,11 @@ function ViewManageJob() {
|
||||
fontSize={"12px"}
|
||||
/>
|
||||
</SelectTrigger>
|
||||
<SelectContent position={"relative"} zIndex={"9999"} bg={"#fff"}>
|
||||
<SelectContent
|
||||
position={"relative"}
|
||||
zIndex={"9999"}
|
||||
bg={"#fff"}
|
||||
>
|
||||
{frameworks.items.map((movie) => (
|
||||
<SelectItem
|
||||
item={movie}
|
||||
@@ -269,6 +289,7 @@ function ViewManageJob() {
|
||||
|
||||
<DialogCloseTrigger color="black" />
|
||||
</DialogContent>
|
||||
{/* ))} */}
|
||||
</DialogRoot>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4,30 +4,76 @@ import DataTable from "../../../components/DataTable";
|
||||
import { Switch } from "../../../components/ui/switch";
|
||||
import { InputGroup } from "../../../components/ui/input-group";
|
||||
import { LuSearch } from "react-icons/lu";
|
||||
import { useGetContactQuery } from "../../../Redux/Service/deactivated.account.service";
|
||||
import { useEffect, useState } from "react";
|
||||
import { Spinner } from "../../../components/Sipnner/Spinner";
|
||||
|
||||
const tableHeadRow = [
|
||||
"Sr. No",
|
||||
"First Name",
|
||||
"Last Name",
|
||||
"Company name",
|
||||
"User Type",
|
||||
"Activate/Deactivate",
|
||||
];
|
||||
|
||||
const manageUser: any[] = [
|
||||
...Array.from({ length: 12 }, (_, i) => ({
|
||||
"Sr. No": i + 1,
|
||||
"First Name": "Ritesh",
|
||||
"Last Name": "akanksha@gmail.com",
|
||||
"Company name": "9876543210",
|
||||
const DeactivatedAccounts = () => {
|
||||
const { data ,isLoading} = useGetContactQuery();
|
||||
const [localData, setLocalData] = useState([]);
|
||||
|
||||
useEffect(() => {
|
||||
if (data) {
|
||||
setLocalData((data as any)?.data?.data || []);
|
||||
}
|
||||
}, [data]);
|
||||
|
||||
|
||||
const manageUser = localData?.map((agency: any, index: number) => ({
|
||||
"Sr. No": index + 1,
|
||||
"First Name": agency?.first_name,
|
||||
"Last Name": agency?.last_name,
|
||||
"User Type": agency?.principal_type_xid === 3 ? "JobSeeker" : "Recruiter",
|
||||
"Activate/Deactivate": (
|
||||
<Box display={'flex'} justifyContent={'center'}>
|
||||
<Switch size={'sm'} colorPalette={'teal'} />
|
||||
<Box display={"flex"} justifyContent={"center"}>
|
||||
<Switch
|
||||
size={"sm"}
|
||||
colorPalette={"teal"}
|
||||
checked={agency.is_active === true}
|
||||
// onChange={() => handleToggle(agency.id, agency.is_active ? "1" : "0")}
|
||||
/>
|
||||
</Box>
|
||||
),
|
||||
})),
|
||||
];
|
||||
}));
|
||||
|
||||
if (isLoading) {
|
||||
return (
|
||||
<MainFrame>
|
||||
<Box
|
||||
display="flex"
|
||||
justifyContent="center"
|
||||
alignItems="center"
|
||||
height="100%"
|
||||
>
|
||||
<Spinner />
|
||||
</Box>
|
||||
</MainFrame>
|
||||
);
|
||||
}
|
||||
|
||||
// if (isError) {
|
||||
// return (
|
||||
// <MainFrame>
|
||||
// <Box
|
||||
// display="flex"
|
||||
// justifyContent="center"
|
||||
// alignItems="center"
|
||||
// height="100%"
|
||||
// >
|
||||
// <Text>Error loading data</Text>
|
||||
// </Box>
|
||||
// </MainFrame>
|
||||
// );
|
||||
// }
|
||||
|
||||
const DeactivatedAccounts = () => {
|
||||
return (
|
||||
<MainFrame>
|
||||
<Box>
|
||||
@@ -45,7 +91,10 @@ const DeactivatedAccounts = () => {
|
||||
<HStack>
|
||||
<InputGroup
|
||||
startElement={
|
||||
<LuSearch fontSize={"xs"} style={{position:'relative',left:'10px'}} />
|
||||
<LuSearch
|
||||
fontSize={"xs"}
|
||||
style={{ position: "relative", left: "10px" }}
|
||||
/>
|
||||
}
|
||||
color={"#000"}
|
||||
>
|
||||
@@ -59,7 +108,7 @@ const DeactivatedAccounts = () => {
|
||||
size={"2xs"}
|
||||
fontSize={"sm"}
|
||||
placeholder="Search..."
|
||||
bgColor={'#EEEEEE'}
|
||||
bgColor={"#EEEEEE"}
|
||||
ps={8}
|
||||
/>
|
||||
</InputGroup>
|
||||
|
||||
@@ -49,13 +49,16 @@ const SetNewPassword = () => {
|
||||
setIsLoading(true);
|
||||
|
||||
try {
|
||||
const res = await axios.post(`${import.meta.env.VITE_API_URL}/update-password`, {
|
||||
const res = await axios.post(
|
||||
`${import.meta.env.VITE_API_URL}/update-password`,
|
||||
{
|
||||
password: password,
|
||||
confirm_password: confirmPassword,
|
||||
id: Number(id)
|
||||
});
|
||||
id: Number(id),
|
||||
}
|
||||
);
|
||||
|
||||
if (res.data.status === 'success') {
|
||||
if (res.data.status === "success") {
|
||||
toaster.create({
|
||||
title: "Password updated successfully",
|
||||
type: "success",
|
||||
@@ -90,28 +93,40 @@ const SetNewPassword = () => {
|
||||
</HStack>
|
||||
|
||||
<Center w="100%" h="93%" p={8}>
|
||||
<Box p={8} borderWidth={1} borderRadius="lg" boxShadow="lg">
|
||||
<Text fontSize="24px" fontWeight="bold" color="#313039" textAlign="center">
|
||||
<Box p={8} borderWidth={1} borderRadius="lg" boxShadow="lg" w={"400px"}>
|
||||
<Text
|
||||
fontSize="20px"
|
||||
fontWeight="bold"
|
||||
color="#313039"
|
||||
marginBottom={"20px"}
|
||||
>
|
||||
Create a Password
|
||||
</Text>
|
||||
|
||||
<Stack p={2}>
|
||||
<Text color="black" pt={1} fontSize="12px">New password</Text>
|
||||
<Stack>
|
||||
<Box mb={3}>
|
||||
<Text color="black" fontSize="12px" mb={2}>
|
||||
New password
|
||||
</Text>
|
||||
<InputGroup
|
||||
width={'100%'}
|
||||
width={"100%"}
|
||||
endElement={
|
||||
<IconButton
|
||||
aria-label={showOldPassword ? "Hide password" : "Show password"}
|
||||
aria-label={
|
||||
showOldPassword ? "Hide password" : "Show password"
|
||||
}
|
||||
size="sm"
|
||||
// variant="outline"
|
||||
onClick={() => setShowOldPassword(!showOldPassword)}
|
||||
_hover={{ bg: "transparent" }}
|
||||
height={'fit-content'}
|
||||
// _hover={{ bg: "transparent" }}
|
||||
bg={"transparent"}
|
||||
color={"#000"}
|
||||
height={"fit-content"}
|
||||
mr={2}
|
||||
>
|
||||
{showOldPassword ? <LuEye /> : <LuEyeOff />}
|
||||
</IconButton>
|
||||
}>
|
||||
}
|
||||
>
|
||||
<Input
|
||||
color="black"
|
||||
pl={1}
|
||||
@@ -120,25 +135,33 @@ const SetNewPassword = () => {
|
||||
border="1px solid grey"
|
||||
value={password}
|
||||
onChange={(e) => setPassword(e.target.value)}
|
||||
size={"sm"}
|
||||
/>
|
||||
</InputGroup>
|
||||
</Box>
|
||||
|
||||
<Text color="black" pt={1} fontSize="12px">Confirm password</Text>
|
||||
<Box>
|
||||
<Text color="black" mb={2} fontSize="12px">
|
||||
Confirm password
|
||||
</Text>
|
||||
<InputGroup
|
||||
width={'100%'}
|
||||
width={"100%"}
|
||||
endElement={
|
||||
<IconButton
|
||||
aria-label={showNewPassword ? "Hide password" : "Show password"}
|
||||
aria-label={
|
||||
showNewPassword ? "Hide password" : "Show password"
|
||||
}
|
||||
size="sm"
|
||||
// variant="outline"
|
||||
onClick={() => setShowNewPassword(!showNewPassword)}
|
||||
_hover={{ bg: "transparent" }}
|
||||
height={'fit-content'}
|
||||
bg={"transparent"}
|
||||
color={"#000"}
|
||||
mr={2}
|
||||
>
|
||||
{showNewPassword ? <LuEye /> : <LuEyeOff />}
|
||||
</IconButton>
|
||||
}>
|
||||
}
|
||||
>
|
||||
<Input
|
||||
color="black"
|
||||
pl={1}
|
||||
@@ -147,8 +170,10 @@ const SetNewPassword = () => {
|
||||
border="1px solid grey"
|
||||
value={confirmPassword}
|
||||
onChange={(e) => setConfirmPassword(e.target.value)}
|
||||
size={"sm"}
|
||||
/>
|
||||
</InputGroup>
|
||||
</Box>
|
||||
</Stack>
|
||||
|
||||
<Button
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { useState } from "react";
|
||||
import { Button } from "../../components/ui/button";
|
||||
import {
|
||||
DialogBody,
|
||||
@@ -10,45 +9,32 @@ import {
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from "../../components/ui/dialog";
|
||||
import {
|
||||
Field,
|
||||
Grid,
|
||||
Heading,
|
||||
Input,
|
||||
Stack,
|
||||
Text,
|
||||
} from "@chakra-ui/react";
|
||||
import { Field, Grid, Heading, Input, Stack, Text } from "@chakra-ui/react";
|
||||
import { IoMdAdd } from "react-icons/io";
|
||||
import { Checkbox } from "../../components/ui/checkbox";
|
||||
import { useCreateSubAdminPostMutation } from "../../Redux/Service/manage.subadmin.service";
|
||||
import { toaster } from "../../components/ui/toaster";
|
||||
import { useState } from "react";
|
||||
|
||||
function AddModel({ refetch }: { refetch: VoidFunction }) {
|
||||
const [createSubAdminPost, { isLoading }] = useCreateSubAdminPostMutation();
|
||||
const [createSubAdminPost] = useCreateSubAdminPostMutation();
|
||||
|
||||
const [formData, setFormData] = useState({
|
||||
firstName: "",
|
||||
lastName: "",
|
||||
dob: "",
|
||||
gender: "",
|
||||
email: "",
|
||||
phone: ""
|
||||
});
|
||||
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
|
||||
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
const { name, value } = e.target;
|
||||
setFormData(prev => ({
|
||||
...prev,
|
||||
[name]: value
|
||||
}));
|
||||
};
|
||||
// State fields
|
||||
const [firstName, setFirstName] = useState("");
|
||||
const [lastName, setLastName] = useState("");
|
||||
const [userName, setUserName] = useState("");
|
||||
const [dateOfBirth, setDateOfBirth] = useState("");
|
||||
const [gender, setGender] = useState("");
|
||||
const [ setIsOpen] = useState(false);
|
||||
|
||||
const handleSubmit = async () => {
|
||||
const { firstName, lastName, dob, gender, email, phone } = formData;
|
||||
|
||||
if (!firstName || !lastName || !dob || !gender || !email || !phone) {
|
||||
if (
|
||||
!firstName.trim() ||
|
||||
!lastName.trim() ||
|
||||
!userName.trim() ||
|
||||
!dateOfBirth.trim() ||
|
||||
!gender.trim()
|
||||
) {
|
||||
toaster.create({
|
||||
title: "Error",
|
||||
description: "Please fill in all required fields",
|
||||
@@ -58,45 +44,46 @@ function AddModel({ refetch }: { refetch: VoidFunction }) {
|
||||
}
|
||||
|
||||
const payload = {
|
||||
// principal_type_xid: 4,
|
||||
// principal_source_xid: 1,
|
||||
// user_name: `${firstName} ${lastName}`,
|
||||
principal_type_xid: 4,
|
||||
principal_source_xid: 1,
|
||||
user_name: userName,
|
||||
first_name: firstName,
|
||||
last_name: lastName,
|
||||
date_of_birth: dob,
|
||||
gender,
|
||||
email_address: email,
|
||||
phone_number: phone,
|
||||
date_of_birth: dateOfBirth,
|
||||
gender: gender,
|
||||
email_address: "example@yopmail.com", // Hardcoded
|
||||
phone_number: "9876543210", // Hardcoded
|
||||
created_by: 1,
|
||||
};
|
||||
|
||||
try {
|
||||
const response = await createSubAdminPost(payload).unwrap();
|
||||
|
||||
if (response.status === "success") {
|
||||
if (response) {
|
||||
toaster.create({
|
||||
title: "Success",
|
||||
description: response.message || "Sub-admin added successfully",
|
||||
description: "Sub-admin created successfully",
|
||||
type: "success",
|
||||
});
|
||||
refetch();
|
||||
setIsOpen(false);
|
||||
setFirstName("");
|
||||
setLastName("");
|
||||
setUserName("");
|
||||
setDateOfBirth("");
|
||||
setGender("");
|
||||
}
|
||||
} catch (error: any) {
|
||||
} catch (error) {
|
||||
console.error("Error creating sub-admin:", error);
|
||||
toaster.create({
|
||||
title: "Error",
|
||||
description: error?.data?.message || "Failed to create sub-admin",
|
||||
description: "Failed to create sub-admin",
|
||||
type: "error",
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<DialogRoot
|
||||
open={isOpen}
|
||||
onOpenChange={(details) => setIsOpen(details.open)}
|
||||
placement="center"
|
||||
>
|
||||
<DialogRoot placement="center">
|
||||
<DialogTrigger asChild>
|
||||
<Button rounded={"md"} px={4} py={2} size={"xs"} bg={"#02A0A0"}>
|
||||
<IoMdAdd /> Add
|
||||
@@ -110,6 +97,7 @@ function AddModel({ refetch }: { refetch: VoidFunction }) {
|
||||
overflow={"scroll"}
|
||||
overflowX="hidden"
|
||||
p={3}
|
||||
bgSize={"md"}
|
||||
>
|
||||
<DialogHeader bg="white">
|
||||
<DialogTitle alignSelf="center" color="black" fontSize="14px">
|
||||
@@ -124,99 +112,76 @@ function AddModel({ refetch }: { refetch: VoidFunction }) {
|
||||
First Name
|
||||
</Field.Label>
|
||||
<Input
|
||||
name="firstName"
|
||||
placeholder="Enter the First Name"
|
||||
value={formData.firstName}
|
||||
onChange={handleChange}
|
||||
bgColor="#EEEEEE"
|
||||
color="black"
|
||||
border="none"
|
||||
pl={1}
|
||||
fontSize="12px"
|
||||
height="30px"
|
||||
value={firstName}
|
||||
onChange={(e) => setFirstName(e.target.value)}
|
||||
/>
|
||||
|
||||
<Field.Label color="black" pt={1} fontSize="12px">
|
||||
Last Name
|
||||
</Field.Label>
|
||||
<Input
|
||||
name="lastName"
|
||||
placeholder="Enter the Last Name"
|
||||
value={formData.lastName}
|
||||
onChange={handleChange}
|
||||
bgColor="#EEEEEE"
|
||||
color="black"
|
||||
border="none"
|
||||
pl={1}
|
||||
fontSize="12px"
|
||||
height="30px"
|
||||
value={lastName}
|
||||
onChange={(e) => setLastName(e.target.value)}
|
||||
/>
|
||||
|
||||
<Field.Label color="black" pt={1} fontSize="12px">
|
||||
Username
|
||||
</Field.Label>
|
||||
<Input
|
||||
placeholder="Enter the Username"
|
||||
bgColor="#EEEEEE"
|
||||
color="black"
|
||||
border="none"
|
||||
pl={1}
|
||||
fontSize="12px"
|
||||
height="30px"
|
||||
value={userName}
|
||||
onChange={(e) => setUserName(e.target.value)}
|
||||
/>
|
||||
|
||||
<Field.Label color="black" pt={1} fontSize="12px">
|
||||
DOB
|
||||
</Field.Label>
|
||||
<Input
|
||||
name="dob"
|
||||
placeholder="YYYY-MM-DD"
|
||||
value={formData.dob}
|
||||
onChange={handleChange}
|
||||
type="date"
|
||||
placeholder="Enter the DOB"
|
||||
bgColor="#EEEEEE"
|
||||
color="black"
|
||||
border="none"
|
||||
pl={1}
|
||||
fontSize="12px"
|
||||
height="30px"
|
||||
type="date"
|
||||
value={dateOfBirth}
|
||||
onChange={(e) => setDateOfBirth(e.target.value)}
|
||||
/>
|
||||
|
||||
<Field.Label color="black" pt={1} fontSize="12px">
|
||||
Gender
|
||||
</Field.Label>
|
||||
<Input
|
||||
name="gender"
|
||||
placeholder="Enter the Gender"
|
||||
value={formData.gender}
|
||||
onChange={handleChange}
|
||||
bgColor="#EEEEEE"
|
||||
color="black"
|
||||
border="none"
|
||||
pl={1}
|
||||
fontSize="12px"
|
||||
height="30px"
|
||||
/>
|
||||
|
||||
<Field.Label color="black" pt={1} fontSize="12px">
|
||||
Email
|
||||
</Field.Label>
|
||||
<Input
|
||||
name="email"
|
||||
placeholder="Enter the Email"
|
||||
value={formData.email}
|
||||
onChange={handleChange}
|
||||
type="email"
|
||||
bgColor="#EEEEEE"
|
||||
color="black"
|
||||
border="none"
|
||||
pl={1}
|
||||
fontSize="12px"
|
||||
height="30px"
|
||||
/>
|
||||
|
||||
<Field.Label color="black" pt={1} fontSize="12px">
|
||||
Phone Number
|
||||
</Field.Label>
|
||||
<Input
|
||||
name="phone"
|
||||
placeholder="Enter the Phone Number"
|
||||
value={formData.phone}
|
||||
onChange={handleChange}
|
||||
type="tel"
|
||||
bgColor="#EEEEEE"
|
||||
color="black"
|
||||
border="none"
|
||||
pl={1}
|
||||
fontSize="12px"
|
||||
height="30px"
|
||||
value={gender}
|
||||
onChange={(e) => setGender(e.target.value)}
|
||||
/>
|
||||
|
||||
<Heading mt={5} color={"#000"} fontSize={"sm"}>
|
||||
@@ -225,42 +190,24 @@ function AddModel({ refetch }: { refetch: VoidFunction }) {
|
||||
</Field.Root>
|
||||
|
||||
<Grid templateColumns="repeat(2, 1fr)" gap={4}>
|
||||
<Checkbox size={"sm"} color={"black"}>
|
||||
<Text fontSize={12}>Dashboard</Text>
|
||||
</Checkbox>
|
||||
<Checkbox size={"sm"} color={"black"}>
|
||||
<Text fontSize={12}>Manage contact us</Text>
|
||||
</Checkbox>
|
||||
<Checkbox size={"sm"} color={"black"}>
|
||||
<Text fontSize={12}>Manage User</Text>
|
||||
</Checkbox>
|
||||
<Checkbox size={"sm"} color={"black"}>
|
||||
<Text fontSize={12}>Manage CMS</Text>
|
||||
</Checkbox>
|
||||
<Checkbox size={"sm"} color={"black"}>
|
||||
<Text fontSize={12}>Manage Post</Text>
|
||||
</Checkbox>
|
||||
<Checkbox size={"sm"} color={"black"}>
|
||||
<Text fontSize={12}>Manage Reports</Text>
|
||||
</Checkbox>
|
||||
<Checkbox size={"sm"} color={"black"}>
|
||||
<Text fontSize={12}>Manage Sub-Admin</Text>
|
||||
</Checkbox>
|
||||
<Checkbox size={"sm"} color={"black"}>
|
||||
<Text fontSize={12}>My Profile</Text>
|
||||
</Checkbox>
|
||||
<Checkbox size={"sm"} color={"black"}>
|
||||
<Text fontSize={12}>Manage Jobs</Text>
|
||||
</Checkbox>
|
||||
<Checkbox size={"sm"} color={"black"}>
|
||||
<Text fontSize={12}>Manage Feedbacks</Text>
|
||||
</Checkbox>
|
||||
<Checkbox size={"sm"} color={"black"}>
|
||||
<Text fontSize={12}>Manage Community</Text>
|
||||
</Checkbox>
|
||||
<Checkbox size={"sm"} color={"black"}>
|
||||
<Text fontSize={12}>Notification</Text>
|
||||
{[
|
||||
"Dashboard",
|
||||
"Manage contact us",
|
||||
"manage User",
|
||||
"Manage CMS",
|
||||
"Manage Post",
|
||||
"Manage Reports",
|
||||
"manage Sub-Admin",
|
||||
"My profile",
|
||||
"Manage Jobs",
|
||||
"manage feedbacks",
|
||||
"Manage community",
|
||||
"Notification",
|
||||
].map((permission) => (
|
||||
<Checkbox size="sm" color="black" key={permission}>
|
||||
<Text fontSize={12}>{permission}</Text>
|
||||
</Checkbox>
|
||||
))}
|
||||
</Grid>
|
||||
</Stack>
|
||||
</DialogBody>
|
||||
@@ -272,8 +219,6 @@ function AddModel({ refetch }: { refetch: VoidFunction }) {
|
||||
bg="#02A0A0"
|
||||
color={"#fff"}
|
||||
onClick={handleSubmit}
|
||||
// isLoading={isLoading}
|
||||
disabled={isLoading}
|
||||
>
|
||||
Save
|
||||
</Button>
|
||||
|
||||
@@ -99,3 +99,4 @@ export const {
|
||||
useAgencyMasterToggleMutation,
|
||||
useUpdateAgencyMasterMutation,
|
||||
} = agencyMasterModule;
|
||||
|
||||
@@ -1,26 +1,30 @@
|
||||
import { createApi } from "@reduxjs/toolkit/query";
|
||||
import { createApi } from "@reduxjs/toolkit/query/react"; // add /react for auto-generated hooks
|
||||
import { baseQueryWithReauth } from "./apiSlice";
|
||||
|
||||
interface DeactivatedData {
|
||||
id: number;
|
||||
email: string;
|
||||
first_name: string;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
interface ApiResponse {
|
||||
data: {
|
||||
data: DeactivatedData[];
|
||||
};
|
||||
}
|
||||
|
||||
export const deactivatedAccounts = createApi({
|
||||
reducerPath: "deactivatedAccounts",
|
||||
baseQuery: baseQueryWithReauth, // Use enhanced baseQuery with error handling
|
||||
baseQuery: baseQueryWithReauth,
|
||||
tagTypes: ["Deactivated"],
|
||||
endpoints: (builder) => ({
|
||||
|
||||
|
||||
|
||||
getPosts: builder.query<Post[], void>({ query: () => "/posts" }),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
getContact: builder.query<ApiResponse, void>({
|
||||
query: () => "/manage-user-deactivate-list",
|
||||
providesTags: ["Deactivated"],
|
||||
}),
|
||||
}),
|
||||
});
|
||||
|
||||
export const { } = deactivatedAccounts;
|
||||
|
||||
export type Post = {
|
||||
id: number;
|
||||
title: string;
|
||||
body: string;
|
||||
};
|
||||
// ✅ Export the auto-generated hook
|
||||
export const { useGetContactQuery } = deactivatedAccounts;
|
||||
|
||||
@@ -1,26 +1,33 @@
|
||||
import { createApi } from "@reduxjs/toolkit/query";
|
||||
import { createApi } from "@reduxjs/toolkit/query/react";
|
||||
import { baseQueryWithReauth } from "./apiSlice";
|
||||
|
||||
interface ContactData {
|
||||
id: number;
|
||||
email: string;
|
||||
first_name: string;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
interface ApiResponse {
|
||||
data: {
|
||||
data: ContactData[];
|
||||
};
|
||||
}
|
||||
|
||||
export const manageContactUs = createApi({
|
||||
reducerPath: "manageContactUs",
|
||||
baseQuery: baseQueryWithReauth, // Use enhanced baseQuery with error handling
|
||||
tagTypes: ["Contact"],
|
||||
endpoints: (builder) => ({
|
||||
|
||||
|
||||
|
||||
getPosts: builder.query<Post[], void>({ query: () => "/posts" }),
|
||||
|
||||
|
||||
|
||||
getContact: builder.query<ApiResponse, void>({
|
||||
query: () => "/contact-us",
|
||||
providesTags: ["Contact"],
|
||||
}),
|
||||
|
||||
|
||||
}),
|
||||
});
|
||||
|
||||
export const { } = manageContactUs;
|
||||
|
||||
export type Post = {
|
||||
id: number;
|
||||
title: string;
|
||||
body: string;
|
||||
};
|
||||
export const { useGetContactQuery } = manageContactUs;
|
||||
|
||||
@@ -70,10 +70,22 @@ export const manageJobs = createApi({
|
||||
reducerPath: "manageJobs",
|
||||
baseQuery: baseQueryWithReauth, // Use enhanced baseQuery with error handling
|
||||
endpoints: (builder) => ({
|
||||
|
||||
getManageJobs: builder.query<ApiResponse, number>({
|
||||
query: (page = 1) => `/manage-jobs-list?page=${page}`,
|
||||
}),
|
||||
|
||||
viewJobs: builder.query<ApiResponse, number>({
|
||||
query: (id) => `/manage-jobs-list/${id}`,
|
||||
}),
|
||||
|
||||
deleteJobsPost: builder.mutation<{ status: string; message: string }, { id: number }>({
|
||||
query: ({ id }) => ({
|
||||
url: `/manage-jobs-delete`,
|
||||
method: "POST",
|
||||
body: { id },
|
||||
}),
|
||||
}),
|
||||
|
||||
|
||||
|
||||
@@ -81,4 +93,4 @@ export const manageJobs = createApi({
|
||||
}),
|
||||
});
|
||||
|
||||
export const { useGetManageJobsQuery } = manageJobs;
|
||||
export const { useGetManageJobsQuery,useLazyViewJobsQuery,useDeleteJobsPostMutation } = manageJobs;
|
||||
|
||||
@@ -104,6 +104,7 @@ export const manageSubAdmin = createApi({
|
||||
baseQuery: baseQueryWithReauth, // Use enhanced baseQuery with error handling
|
||||
tagTypes: ["SubAdmin"],
|
||||
endpoints: (builder) => ({
|
||||
|
||||
createFaqPost: builder.mutation<Post, Partial<Post>>({
|
||||
query: (data) => ({
|
||||
url: "/faq-store",
|
||||
@@ -111,6 +112,7 @@ export const manageSubAdmin = createApi({
|
||||
body: data,
|
||||
}),
|
||||
}),
|
||||
|
||||
getSubAdmin: builder.query<ApiResponse, void>({
|
||||
query: () => `/sub-admin`,
|
||||
}),
|
||||
@@ -127,7 +129,10 @@ export const manageSubAdmin = createApi({
|
||||
}),
|
||||
}),
|
||||
|
||||
createSubAdminPost: builder.mutation<CreateSubAdminResponse, CreateSubAdminPayload>({
|
||||
createSubAdminPost: builder.mutation<
|
||||
CreateSubAdminResponse,
|
||||
CreateSubAdminPayload
|
||||
>({
|
||||
query: (data) => ({
|
||||
url: "/sub-admin-create",
|
||||
method: "POST",
|
||||
@@ -158,7 +163,7 @@ export const {
|
||||
useLazyViewSubAdminQuery,
|
||||
useUpdateSubAdminMutation,
|
||||
useDeleteSubAdminPostMutation,
|
||||
useCreateSubAdminPostMutation
|
||||
useCreateSubAdminPostMutation,
|
||||
} = manageSubAdmin;
|
||||
|
||||
export type Post = {
|
||||
|
||||
@@ -40,6 +40,7 @@ const AlertDailog: React.FC<DeleteConfirmationDialogProps> = ({
|
||||
size={"xs"}
|
||||
role="alertdialog"
|
||||
open={isOpen}
|
||||
|
||||
>
|
||||
<DialogTrigger asChild >
|
||||
{button ? (
|
||||
@@ -134,3 +135,16 @@ const AlertDailog: React.FC<DeleteConfirmationDialogProps> = ({
|
||||
};
|
||||
|
||||
export default AlertDailog;
|
||||
|
||||
|
||||
// import React from 'react'
|
||||
|
||||
// const AlertDailog = () => {
|
||||
// return (
|
||||
// <div>
|
||||
|
||||
// </div>
|
||||
// )
|
||||
// }
|
||||
|
||||
// export default AlertDailog
|
||||
|
||||
Reference in New Issue
Block a user