Privacy page update

This commit is contained in:
rockyeverlast
2024-05-27 14:48:19 +05:30
parent 9aaf5c4fec
commit b04caaf167
5 changed files with 6595 additions and 752 deletions

6096
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -46,8 +46,6 @@ const Policy = () => {
size: pageSize,
});
const policy = useGetPolicyQuery({
page: currentPage,
size: pageSize,
@@ -73,10 +71,6 @@ const Policy = () => {
return nameMatches && statusMatches;
});
// ====================================================[Table Setup]================================================================
const tableHeadRow = [
"Title",
@@ -87,23 +81,23 @@ const Policy = () => {
const extractedArray = filteredData?.map((item, index) => {
return {
Title: (
<Link to={`/whitepaper/view/${item.id}`}>
<Link to={`/whitepaper/view/${item.id}`}>
<Tooltip
className="rounded-2 web-text-xsmall"
width={"fit-content"}
placement="top"
hasArrow
label={item?.title}
bg="blue.200"
>
<Box display={"flex"} alignItems={"center"} w={200}>
<Text as={"span"} isTruncated={true}>
{extractFilename(item?.title)}
</Text>
</Box>
</Tooltip></Link>
className="rounded-2 web-text-xsmall"
width={"fit-content"}
placement="top"
hasArrow
label={item?.title}
bg="blue.200"
>
<Box display={"flex"} alignItems={"center"} w={200}>
<Text as={"span"} isTruncated={true}>
{extractFilename(item?.title)}
</Text>
</Box>
</Tooltip>
</Link>
),
Active: (
<Switch
@@ -222,16 +216,12 @@ const Policy = () => {
}
};
return (
<>
<TabularView
title={"Policy"}
btnTitle={"Create policy"}
link={"/policy/add-policy"}
apiData={policy}
tableHeadRow={tableHeadRow}
extractedArray={extractedArray}
@@ -244,10 +234,7 @@ const Policy = () => {
currentPage={currentPage}
setCurrentPage={setCurrentPage}
totalPages={policy?.data?.data?.totalPages}
noDataTitle={'policy'}
noDataTitle={"policy"}
/>
<CustomAlertDialog
onClose={() => setDeleteAlert(false)}
@@ -261,8 +248,3 @@ const Policy = () => {
};
export default Policy;

View File

@@ -54,6 +54,7 @@ const Usecase = () => {
});
// ====================================================[RTK Hooks]===================================================================
const useCase = useGetUsecaseQuery({ page: currentPage, size: pageSize });
const [deleteUsecase] = useDeleteUsecaseMutation();
const [updateUsecaseStatus] = useUpdateUsecaseStatusMutation();
// ====================================================[Functions]===================================================================
@@ -136,21 +137,20 @@ const Usecase = () => {
];
const extractedArray = filteredData?.map((item, index) => {
return {
Title: (
Title: (
<RouterLink to={`view/${item.id}`}>
<Box display={"flex"} alignItems={"center"} gap={4}>
<Avatar
w={"35px"}
h={"35px"}
rounded={"full"}
src={`https://rubix.betadelivery.com/${item?.icon}`}
/>
<Text as={"span"}>{item?.title}</Text>
</Box>
<Box display={"flex"} alignItems={"center"} gap={4}>
<Avatar
w={"35px"}
h={"35px"}
rounded={"full"}
src={`https://rubix.betadelivery.com/${item?.icon}`}
/>
<Text as={"span"}>{item?.title}</Text>
</Box>
</RouterLink>
),
// Title: <RouterLink to={`view/${item.id}`}>{item?.title}</RouterLink>,
// Title: <RouterLink to={`view/${item.id}`}>{item?.title}</RouterLink>,
Discription: (
<Tooltip
className="rounded-2 web-text-xsmall"
@@ -167,22 +167,22 @@ const Usecase = () => {
</Box>
</Tooltip>
),
Content: (
<Tooltip
className="rounded-2 web-text-xsmall"
width={"fit-content"}
placement="top"
hasArrow
label={item?.content}
bg="blue.200"
>
<Box display={"flex"} alignItems={"center"} w={350}>
<Text as={"span"} isTruncated={true}>
{item?.content}
</Text>
</Box>
</Tooltip>
),
// Content: (
// <Tooltip
// className="rounded-2 web-text-xsmall"
// width={"fit-content"}
// placement="top"
// hasArrow
// label={item?.content}
// bg="blue.200"
// >
// <Box display={"flex"} alignItems={"center"} w={350}>
// <Text as={"span"} isTruncated={true}>
// {item?.content}
// </Text>
// </Box>
// </Tooltip>
// ),
"Updated Date": (
<Text as={"span"} color={"gray.600"} className=" fw-bold">
{formatDate(item?.updatedAt)}
@@ -254,7 +254,7 @@ const Usecase = () => {
currentPage={currentPage}
setCurrentPage={setCurrentPage}
totalPages={useCase?.data?.data?.totalPages}
noDataTitle={'usecase'}
noDataTitle={"usecase"}
/>
<CustomAlertDialog
onClose={() => setDeleteAlert(false)}

View File

@@ -152,7 +152,7 @@ export const RouteLink = [
{ path: "/usecase/view/:id", Component: ViewUseCase },
{ path: "/usecase/edit/:id", Component: EditUseCase },
// =============[ policy ]================
{ path: "/policy", Component: Policy },
{ path: "/policy/add-policy", Component: UnderConstruction },

1141
yarn.lock

File diff suppressed because it is too large Load Diff