update status
This commit is contained in:
@@ -79,6 +79,8 @@ const FawateerRequest = () => {
|
||||
clearTimeout(handler);
|
||||
};
|
||||
}, [searchTerm]);
|
||||
|
||||
|
||||
const {
|
||||
data: investorDetails,
|
||||
isLoading: investorDetailsLoading,
|
||||
|
||||
@@ -19,7 +19,7 @@ import DrawalRequestReject from "../../WithDrawal/DrawalRequest/DrawalRequestRej
|
||||
import NormalTable from "../../../Components/DataTable/NormalTable";
|
||||
import DrawalRequestApprove from "../../WithDrawal/DrawalRequest/DrawalRequestApprove";
|
||||
import { generateSerialNumber } from "../../../Constants/Constants";
|
||||
import { useGetFawateerRequestQuery } from "../../../Services/fawateer.request.service";
|
||||
import { useGetApproveHistoryQuery, useGetFawateerRequestQuery } from "../../../Services/fawateer.request.service";
|
||||
import { TABLE_PAGINATION } from "../../../Constants/Paginations";
|
||||
import { OPACITY_ON_LOAD } from "../../../Layout/animations";
|
||||
|
||||
@@ -61,9 +61,9 @@ import { OPACITY_ON_LOAD } from "../../../Layout/animations";
|
||||
isLoading: drawalRequestLoading,
|
||||
error,
|
||||
refetch
|
||||
} = useGetFawateerRequestQuery();
|
||||
} = useGetApproveHistoryQuery();
|
||||
|
||||
// console.log(data?.data);
|
||||
console.log(data);
|
||||
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ import { OPACITY_ON_LOAD } from "../../../Layout/animations";
|
||||
"Phone Number",
|
||||
"Transaction Date",
|
||||
"Transaction Amount",
|
||||
"Action",
|
||||
"Status"
|
||||
];
|
||||
|
||||
|
||||
@@ -182,7 +182,7 @@ import { OPACITY_ON_LOAD } from "../../../Layout/animations";
|
||||
</Box>
|
||||
),
|
||||
"Transaction Amount": (
|
||||
<Box w={"130px"} isTruncated={true} display={'flex'} justifyContent={'end'}>
|
||||
<Box w={"130px"} isTruncated={true} display={'flex'}>
|
||||
<Text as={"span"} color={"teal.900"}>
|
||||
{/* {item.investorAmount} */}
|
||||
{parseFloat(item?.transaction_amount || 0).toLocaleString(undefined, {
|
||||
@@ -193,62 +193,11 @@ import { OPACITY_ON_LOAD } from "../../../Layout/animations";
|
||||
</Text>
|
||||
</Box>
|
||||
),
|
||||
Action: (
|
||||
<Box display={"flex"} justifyContent={"center"} gap={2}>
|
||||
<Tooltip
|
||||
rounded={"sm"}
|
||||
fontSize={"xs"}
|
||||
label="Approve"
|
||||
bg="#fff"
|
||||
color={"green.500"}
|
||||
placement="left-start"
|
||||
>
|
||||
<Button
|
||||
// colorScheme="forestGreen"
|
||||
// color="green.500"
|
||||
rounded={"sm"}
|
||||
size={"xs"}
|
||||
textTransform={"inherit"}
|
||||
fontWeight={500}
|
||||
px={2}
|
||||
py={1}
|
||||
onClick={() => {
|
||||
setActionId(item.id);
|
||||
onConfirmOpen();
|
||||
}}
|
||||
colorScheme="green"
|
||||
variant={"solid"}
|
||||
cursor={"pointer"}
|
||||
>
|
||||
<CheckIcon fontSize={"12px"} />
|
||||
</Button>
|
||||
</Tooltip>
|
||||
<Tooltip
|
||||
rounded={"sm"}
|
||||
fontSize={"xs"}
|
||||
label="Reject"
|
||||
bg="#fff"
|
||||
color={"red.500"}
|
||||
placement="left-start"
|
||||
>
|
||||
<Button
|
||||
colorScheme="red"
|
||||
// color="red.500"
|
||||
rounded={"sm"}
|
||||
size={"xs"}
|
||||
textTransform={"inherit"}
|
||||
fontWeight={500}
|
||||
px={2}
|
||||
onClick={() => {
|
||||
setActionId(item.id);
|
||||
onRejectOpen();
|
||||
}}
|
||||
py={1}
|
||||
// variant={"solid"}
|
||||
>
|
||||
<CloseIcon fontSize={"10px"} />
|
||||
</Button>
|
||||
</Tooltip>
|
||||
"Status": (
|
||||
<Box isTruncated={true} display={'flex'} >
|
||||
<Badge colorScheme='green' fontWeight={500} px={2} py={"2px"} rounded={4}>
|
||||
{item.transactionStatus}
|
||||
</Badge>
|
||||
</Box>
|
||||
),
|
||||
}));
|
||||
|
||||
@@ -136,6 +136,7 @@ import RequestRejectModal from "./RequestRejectModal";
|
||||
"Phone Number",
|
||||
"Transaction Date",
|
||||
"Transaction Amount",
|
||||
"Status",
|
||||
role === "Checker"&&"Action",
|
||||
];
|
||||
|
||||
@@ -213,6 +214,13 @@ import RequestRejectModal from "./RequestRejectModal";
|
||||
</Text>
|
||||
</Box>
|
||||
),
|
||||
"Status": (
|
||||
<Box isTruncated={true} display={'flex'} >
|
||||
<Badge colorScheme='green' fontWeight={500} px={2} py={"2px"} rounded={4}>
|
||||
{item.transactionStatus}
|
||||
</Badge>
|
||||
</Box>
|
||||
),
|
||||
Action: (
|
||||
<Box display={"flex"} justifyContent={"center"} gap={2}>
|
||||
<Tooltip
|
||||
|
||||
@@ -9,7 +9,7 @@ import { baseQuery } from "./token.serivce";
|
||||
export const fawateerRequest = createApi({
|
||||
reducerPath: "fawateerRequest",
|
||||
baseQuery: baseQuery,
|
||||
tagTypes: ["getFawateerRequest"],
|
||||
tagTypes: ["getFawateerRequest" ,"getApproveHistory"],
|
||||
endpoints: (builder) => ({
|
||||
|
||||
|
||||
@@ -24,14 +24,15 @@ export const fawateerRequest = createApi({
|
||||
providesTags: ["getFawateerRequest"],
|
||||
}),
|
||||
|
||||
// getDrawalHistory: builder.query({
|
||||
// query: () => `/withdrawal/admin/history`,
|
||||
// providesTags: ["getDepositHistory"],
|
||||
// }),
|
||||
getApproveHistory: builder.query({
|
||||
query: () => `/fawateer/admin/getAll`,
|
||||
providesTags: ["getApproveHistory"],
|
||||
}),
|
||||
}),
|
||||
});
|
||||
|
||||
// Export hooks for usage in functional components
|
||||
export const {
|
||||
useGetFawateerRequestQuery,
|
||||
useGetApproveHistoryQuery
|
||||
} = fawateerRequest;
|
||||
|
||||
Reference in New Issue
Block a user