This commit is contained in:
YasinShaikh123
2024-07-03 12:54:18 +05:30
parent 1639c200ea
commit 9ee19bb34a
5 changed files with 405 additions and 32 deletions

View File

@@ -21,7 +21,7 @@ import { CheckIcon, CloseIcon } from "@chakra-ui/icons";
const DeletionHistory = () => {
const toast = useToast();
const { slideFromRight, deleteHistory, setdeleteHistory } =
const { slideFromRight, deleteHistory, setDeleteHistory } =
useContext(GlobalStateContext);
const [searchTerm, setSearchTerm] = useState("");
const [isLoading, setIsLoading] = useState(true);
@@ -30,7 +30,7 @@ const DeletionHistory = () => {
const [mouseEntered, setMouseEntered] = useState(false);
const [mouseEnteredId, setMouseEnteredId] = useState("");
useEffect(() => {
useEffect(() => {
// Simulate loading
const timer = setTimeout(() => {
setIsLoading(false);
@@ -129,7 +129,7 @@ const DeletionHistory = () => {
</Text>
),
Quater: (
<Text
<Text
justifyContent={slideFromRight ? "right" : "left"}
as={"span"}
color={"gray.600"}

View File

@@ -6,7 +6,6 @@ import {
HStack,
Input,
Text,
Tooltip,
useToast,
} from "@chakra-ui/react";
import React, { useContext, useEffect, useState } from "react";
@@ -16,7 +15,6 @@ import Pagination from "../../Components/Pagination";
import GlobalStateContext from "../../Contexts/GlobalStateContext";
import CustomAlertDialog from "../../Components/CustomAlertDialog";
import { formatDate } from "../../Components/Functions/UTCConvertor";
import { CheckIcon, CloseIcon } from "@chakra-ui/icons";
// import { formatDate } from "../../Components/Functions/UTCConvertor";
const DeletionRequest = () => {
@@ -67,7 +65,7 @@ const DeletionRequest = () => {
"Charges (USD)",
"Year",
"Quater",
"Action",
"Amount",
];
const extractedArray = filteredData?.map((item, index) => ({
@@ -140,25 +138,26 @@ const DeletionRequest = () => {
</Text>
),
Action: (
<Box display={'flex'} justifyContent={'space-around'}>
<Tooltip rounded={'sm'} fontSize={'xs'} label='Accept' bg='#fff' color={'green.500'} placement="left-start">
<Button color="green.500" rounded={'sm'} size={'xs'}>
<CheckIcon /></Button></Tooltip>
<Tooltip rounded={'sm'} fontSize={'xs'} label='Reject' bg='#fff' color={'red.500'} placement="left-start">
<Button color="red.500" rounded={'sm'} size={'xs'}>
<CloseIcon /></Button></Tooltip>
</Box>
Amount: (
<Text
justifyContent={slideFromRight ? "right" : "left"}
as={"span"}
color={"gray.600"}
className="d-flex align-items-center web-text-small"
fontWeight={'500'}
>
{item.amount}
</Text>
),
}));
const handleDelete = () => {
const deleteRequest = sponser.filter(
const updatedSponsors = sponser.filter(
(sponsor) => sponsor.id !== actionId
);
setTimeout(() => {
setDeleteRequest(deleteRequest);
setSponser(updatedSponsors);
setDeleteAlert(false);
setIsLoading(false);
}, 100);

View File

@@ -31,7 +31,7 @@ const UpgradeHistory = () => {
const [mouseEnteredId, setMouseEnteredId] = useState("");
useEffect(() => {
// Simulate loading
// Simulate loading
const timer = setTimeout(() => {
setIsLoading(false);
}, 1500);

View File

@@ -30,7 +30,7 @@ import { debounce } from "../Master/Sponser/AddSponser";
const formatDate = (date) => new Date(date).toLocaleDateString(); // Simple date formatter
const InvestorTransactions = () => {
const InvestorTransactions = () => {
const toast = useToast();
const { investorTransaction, setInvestorTransaction, slideFromRight } =
useContext(GlobalStateContext);