Files
SSA-Admin-Panel/src/Pages/MasterModule/AgencyMaster/AgencyMaster.tsx
2025-02-07 20:14:58 +05:30

99 lines
2.6 KiB
TypeScript

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 { Switch } from "../../../components/ui/switch";
import EditAgencyMaster from "./EditAgencyMaster";
import ViewAgencyAddModel from "./ViewAgencyAddModel";
import ViewAgencyMaster from "./ViewAgencyMaster";
// table data
const tableHeadRow = [
"Sr. No",
"Agency Name",
"RC no.",
"State",
"RC Status",
"Registered Office Address",
"Website/Domain",
"GST no.",
"Action"
];
const managepost: any[] = [
...Array.from({ length: 12 }, (_, i) => ({
"Sr. No": i + 1,
"Agency Name": "Lorem Ipsum",
"RC no.": "Lorem Ipsum",
"State": "Lorem Ipsum",
"RC Status": "Active",
"Registered Office Address": "Lorem Ipsum",
"Website/Domain": "Lorem Ipsum",
"GST no.": "Lorem Ipsum",
"Action": (
<HStack justifyContent="center">
<ViewAgencyMaster/>
<EditAgencyMaster />
<Box>
<Switch colorPalette={'teal'} size={"xs"}/>
</Box>
</HStack>
),
})),
];
const AgencyMaster = () => {
return (
<MainFrame>
<Box>
<HStack
w={"100%"}
justifyContent={"space-between"}
mb={4}
py={0}
px={3}
>
<Text as={"span"} fontSize={"sm"} fontWeight={500} color={"#000"}>
Agency Master
</Text>
<HStack mr={5}>
<InputGroup marginRight={"1rem"}
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"}
size={"2xs"}
fontSize={"2sm"}
placeholder="Search..."
bgColor={'#EEEEEE'}
ps={8}
/>
</InputGroup>
{/* <Button bgColor={'#EEEEEE'} pl={3} pr={3}><IoMdAdd /> <Text>Add</Text></Button> */}
<ViewAgencyAddModel />
</HStack>
</HStack>
<DataTable
sortableColumns={["Name", "Registration Date "]}
tableHeadRow={tableHeadRow}
data={managepost}
/>
</Box>
</MainFrame>
)
}
export default AgencyMaster