2025-02-10 12:09:15 +05:30
|
|
|
import { Box, HStack, Image, Input, Text } from "@chakra-ui/react";
|
2025-02-04 13:56:43 +05:30
|
|
|
import MainFrame from "../../../components/MainFrame"
|
2025-02-07 16:38:38 +05:30
|
|
|
import EditDetails from "./EditDetails";
|
2025-02-06 14:48:27 +05:30
|
|
|
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";
|
2025-02-07 16:38:38 +05:30
|
|
|
import FaqAddModel from "./FaqAddModel";
|
2025-02-12 13:25:22 +05:30
|
|
|
import Delete from "../../../components/ActionIcons/Delete";
|
2025-02-04 13:56:43 +05:30
|
|
|
|
|
|
|
|
|
2025-02-06 14:48:27 +05:30
|
|
|
// table data
|
|
|
|
|
|
|
|
|
|
const tableHeadRow = [
|
|
|
|
|
"Sr. No",
|
|
|
|
|
"Question",
|
|
|
|
|
"Answer",
|
|
|
|
|
"Action",
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
const managepost: any[] = [
|
|
|
|
|
...Array.from({ length: 12 }, (_, i) => ({
|
|
|
|
|
"Sr. No": i + 1,
|
|
|
|
|
"Question": "Lorem Ipsum",
|
|
|
|
|
"Answer": "Lorem Ipsum",
|
|
|
|
|
"Action": (
|
|
|
|
|
<HStack justifyContent="center">
|
|
|
|
|
<Box>
|
2025-02-25 13:58:13 +05:30
|
|
|
<Switch colorPalette={'teal'} size={"xs"} />
|
2025-02-06 14:48:27 +05:30
|
|
|
</Box>
|
2025-02-25 13:58:13 +05:30
|
|
|
{/* <EditDetails /> */}
|
2025-03-06 13:16:38 +05:30
|
|
|
<EditDetails id={(i + 1).toString()} question="Lorem Ipsum" answer="Lorem Ipsum" />
|
2025-02-25 13:58:13 +05:30
|
|
|
|
2025-02-06 14:48:27 +05:30
|
|
|
<AlertDailog
|
2025-02-25 13:58:13 +05:30
|
|
|
AltertTiggerIcon={() => <Delete />}
|
2025-02-06 14:48:27 +05:30
|
|
|
alertText="Delete Users"
|
|
|
|
|
alertIcon={<Image src={"DeleteIcon"} h={"39px"} />}
|
|
|
|
|
alertCaption="are you sure you want to delete ?"
|
|
|
|
|
onConfirm={() => {
|
|
|
|
|
console.log("User deleted:", i + 1);
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
</HStack>
|
|
|
|
|
),
|
|
|
|
|
})),
|
|
|
|
|
];
|
|
|
|
|
|
2025-02-04 13:56:43 +05:30
|
|
|
const FAQ = () => {
|
2025-02-06 14:48:27 +05:30
|
|
|
return (
|
|
|
|
|
|
|
|
|
|
<MainFrame>
|
|
|
|
|
<Box>
|
|
|
|
|
<HStack
|
|
|
|
|
w={"100%"}
|
|
|
|
|
justifyContent={"space-between"}
|
|
|
|
|
mb={4}
|
|
|
|
|
py={0}
|
|
|
|
|
px={3}
|
|
|
|
|
>
|
|
|
|
|
<Text as={"span"} fontSize={"sm"} fontWeight={500} color={"#000"}>
|
2025-02-25 13:58:13 +05:30
|
|
|
FAQs
|
2025-02-06 14:48:27 +05:30
|
|
|
</Text>
|
|
|
|
|
|
2025-02-07 16:38:38 +05:30
|
|
|
<HStack >
|
2025-02-25 13:58:13 +05:30
|
|
|
<InputGroup
|
2025-02-06 14:48:27 +05:30
|
|
|
startElement={
|
|
|
|
|
<LuSearch fontSize={"xs"} style={{ position: 'relative', left: '10px' }} />
|
|
|
|
|
}
|
|
|
|
|
color={"#000"}
|
|
|
|
|
>
|
|
|
|
|
<Input
|
|
|
|
|
p={3}
|
|
|
|
|
w={300}
|
|
|
|
|
bg={"#fff"}
|
|
|
|
|
colorPalette={"blue"}
|
|
|
|
|
_focus={{ border: "1px solid #02A0A0" }}
|
|
|
|
|
rounded={"md"}
|
2025-02-12 11:54:21 +05:30
|
|
|
size={"xs"}
|
2025-02-06 14:48:27 +05:30
|
|
|
fontSize={"2sm"}
|
|
|
|
|
placeholder="Search..."
|
|
|
|
|
bgColor={'#EEEEEE'}
|
|
|
|
|
ps={8}
|
|
|
|
|
/>
|
|
|
|
|
</InputGroup>
|
|
|
|
|
{/* <Button bgColor={'#EEEEEE'} pl={3} pr={3}><IoMdAdd /> <Text>Add</Text></Button> */}
|
|
|
|
|
<FaqAddModel />
|
|
|
|
|
</HStack>
|
|
|
|
|
</HStack>
|
|
|
|
|
<DataTable
|
|
|
|
|
sortableColumns={["Name", "Registration Date "]}
|
|
|
|
|
tableHeadRow={tableHeadRow}
|
|
|
|
|
data={managepost}
|
|
|
|
|
/>
|
2025-02-25 13:58:13 +05:30
|
|
|
</Box>
|
2025-02-06 14:48:27 +05:30
|
|
|
</MainFrame>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
export default FAQ
|