Update DepositHistory component: rename "Reversal" to "Reversal Action" and clean up commented code
This commit is contained in:
@@ -99,7 +99,7 @@ const DepositHistory = () => {
|
||||
"Deposit Date",
|
||||
"Status",
|
||||
"Supporting's",
|
||||
"Reversal"
|
||||
"Reversal Action",
|
||||
];
|
||||
|
||||
const handleUpdateStatus = debounce((id) => {
|
||||
@@ -275,7 +275,7 @@ const DepositHistory = () => {
|
||||
{item.transactionStatus === "Approved" ? (
|
||||
<Text
|
||||
as={"span"}
|
||||
color={!item.isReversal ? "green.500" : "yellow.500"}
|
||||
color={!item.isReversal ? "green.500" : "#FFBB00"}
|
||||
fontWeight={700}
|
||||
>
|
||||
{!item.isReversal ? (
|
||||
@@ -299,34 +299,20 @@ const DepositHistory = () => {
|
||||
)}
|
||||
</Box>
|
||||
),
|
||||
"Reversal": (
|
||||
<Box isTruncated={true} display={"flex"}>
|
||||
<Badge
|
||||
fontWeight={"500"}
|
||||
textTransform={"none"}
|
||||
color={item?.reversal === false ? "red" : "#FFBB00"}
|
||||
px={2}
|
||||
py={0.5}
|
||||
variant={"ghost"}
|
||||
>
|
||||
{item?.reversal === true ? "Initiate Reversal" : "Under Process"}
|
||||
</Badge>
|
||||
</Box>
|
||||
),
|
||||
}));
|
||||
|
||||
const handleDelete = () => {
|
||||
const IOtype = investmentType.filter(
|
||||
(investmentType) => investmentType.id !== actionId
|
||||
);
|
||||
// const handleDelete = () => {
|
||||
// const IOtype = investmentType.filter(
|
||||
// (investmentType) => investmentType.id !== actionId
|
||||
// );
|
||||
|
||||
setTimeout(() => {
|
||||
setInvestmentType(IOtype);
|
||||
setDeleteAlert(false);
|
||||
setIsLoading(false);
|
||||
}, 100);
|
||||
setIsLoading(true);
|
||||
};
|
||||
// setTimeout(() => {
|
||||
// setInvestmentType(IOtype);
|
||||
// setDeleteAlert(false);
|
||||
// setIsLoading(false);
|
||||
// }, 100);
|
||||
// setIsLoading(true);
|
||||
// };
|
||||
|
||||
const handelApproved = async (data) => {
|
||||
console.log(data, reversalId);
|
||||
@@ -381,13 +367,13 @@ const DepositHistory = () => {
|
||||
setMouseEntered={setMouseEntered}
|
||||
/>
|
||||
|
||||
<CustomAlertDialog
|
||||
{/* <CustomAlertDialog
|
||||
onClose={() => setDeleteAlert(false)}
|
||||
isOpen={deleteAlert}
|
||||
message={"Are you sure you want to delete sponers?"}
|
||||
alertHandler={handleDelete}
|
||||
isLoading={isLoading}
|
||||
/>
|
||||
/> */}
|
||||
|
||||
<InitiateReversalPopup
|
||||
onClose={onCloseInRev}
|
||||
|
||||
Reference in New Issue
Block a user