Compare commits
10 Commits
sprint10/r
...
Sprint-10.
| Author | SHA1 | Date | |
|---|---|---|---|
| 537e1520bf | |||
|
|
b141743190 | ||
|
|
f9d0b3ce6c | ||
|
|
965263a3f2 | ||
|
|
96f813f632 | ||
|
|
79ec8d92ae | ||
| 35d3e07224 | |||
|
|
651c775c2a | ||
| 6c2a38becb | |||
| bddf7381a6 |
@@ -61,6 +61,16 @@ const ApproveHistory = () => {
|
||||
onClose: onRejectClose,
|
||||
} = useDisclosure();
|
||||
|
||||
// Debounce the search term to avoid making a request on every keystroke
|
||||
useEffect(() => {
|
||||
const handler = setTimeout(() => {
|
||||
setDebouncedSearchTerm(searchTerm);
|
||||
}, 500); // Adjust delay as needed
|
||||
return () => {
|
||||
clearTimeout(handler);
|
||||
};
|
||||
}, [searchTerm]);
|
||||
|
||||
const {
|
||||
data,
|
||||
isLoading: drawalRequestLoading,
|
||||
@@ -191,11 +201,7 @@ const ApproveHistory = () => {
|
||||
</Box>
|
||||
),
|
||||
"Deposit Date": (
|
||||
<Box
|
||||
w={"100px"}
|
||||
isTruncated={true}
|
||||
display={"flex"}
|
||||
>
|
||||
<Box w={"100px"} isTruncated={true} display={"flex"}>
|
||||
<Text as={"span"} color={"teal.900"}>
|
||||
{formatDate(item?.transaction_date)}
|
||||
</Text>
|
||||
@@ -221,28 +227,27 @@ const ApproveHistory = () => {
|
||||
fontWeight={"500"}
|
||||
className="d-flex align-items-center web-text-small"
|
||||
>
|
||||
{item?.spportFile_path&&<Badge
|
||||
px={2}
|
||||
py={0.5}
|
||||
textTransform={"inherit"}
|
||||
fontWeight={500}
|
||||
colorScheme={"forestGreen"}
|
||||
>
|
||||
<Link
|
||||
href={import.meta.env.VITE_IMAGE_URL + item?.spportFile_path}
|
||||
isExternal
|
||||
display={"flex"}
|
||||
alignItems={"center"}
|
||||
{item?.spportFile_path && (
|
||||
<Badge
|
||||
px={2}
|
||||
py={0.5}
|
||||
textTransform={"inherit"}
|
||||
fontWeight={500}
|
||||
colorScheme={"forestGreen"}
|
||||
>
|
||||
<Box me={"1px"}
|
||||
as="span"
|
||||
cursor={"pointer"}
|
||||
<Link
|
||||
href={import.meta.env.VITE_IMAGE_URL + item?.spportFile_path}
|
||||
isExternal
|
||||
display={"flex"}
|
||||
alignItems={"center"}
|
||||
>
|
||||
View
|
||||
</Box>
|
||||
<ExternalLinkIcon />
|
||||
</Link>
|
||||
</Badge>}
|
||||
<Box me={"1px"} as="span" cursor={"pointer"}>
|
||||
View
|
||||
</Box>
|
||||
<ExternalLinkIcon />
|
||||
</Link>
|
||||
</Badge>
|
||||
)}
|
||||
</Text>
|
||||
),
|
||||
Status: (
|
||||
@@ -255,12 +260,12 @@ const ApproveHistory = () => {
|
||||
rounded={4}
|
||||
colorScheme={
|
||||
item?.transactionStatus === "Approved"
|
||||
? "green"
|
||||
: item?.transactionStatus === "Pending"
|
||||
? "yellow"
|
||||
: item?.transactionStatus === "Reject"
|
||||
? "red"
|
||||
: "gray" // default border color if status doesn't match any condition
|
||||
? "green"
|
||||
: item?.transactionStatus === "Pending"
|
||||
? "yellow"
|
||||
: item?.transactionStatus === "Reject"
|
||||
? "red"
|
||||
: "gray" // default border color if status doesn't match any condition
|
||||
}
|
||||
>
|
||||
{item.transactionStatus}
|
||||
|
||||
@@ -9,7 +9,7 @@ import { baseQuery } from "./token.serivce";
|
||||
export const fawateerRequest = createApi({
|
||||
reducerPath: "fawateerRequest",
|
||||
baseQuery: baseQuery,
|
||||
tagTypes: ["getFawateerRequest" ,"getApproveHistory","getApproveComment","getRejectComment","getFawateerMakerRequest"],
|
||||
tagTypes: ["getFawateerRequest", "getApproveHistory", "getApproveComment", "getRejectComment", "getFawateerMakerRequest"],
|
||||
endpoints: (builder) => ({
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ export const fawateerRequest = createApi({
|
||||
}),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
getFawateerForMakerRequest: builder.query({
|
||||
query: ({ page, size, searchTerm }) => {
|
||||
@@ -89,10 +89,10 @@ export const fawateerRequest = createApi({
|
||||
|
||||
// Export hooks for usage in functional components
|
||||
export const {
|
||||
useGetFawateerRequestQuery,
|
||||
useGetApproveHistoryQuery,
|
||||
useApproveCommentMutation,
|
||||
useRejectCommentMutation,
|
||||
useGetFawateerForMakerRequestQuery,
|
||||
useGetFawateerInvestorsQuery
|
||||
useGetFawateerRequestQuery,
|
||||
useGetApproveHistoryQuery,
|
||||
useApproveCommentMutation,
|
||||
useRejectCommentMutation,
|
||||
useGetFawateerForMakerRequestQuery,
|
||||
useGetFawateerInvestorsQuery
|
||||
} = fawateerRequest;
|
||||
|
||||
Reference in New Issue
Block a user