investment update
This commit is contained in:
@@ -70,12 +70,12 @@ const InvestmentType = () => {
|
||||
// toast({
|
||||
// render: () => <ToastBox message={"Status changed succesfully.!"} />,
|
||||
// });
|
||||
// }, 300);
|
||||
// }, 300);
|
||||
|
||||
// ===========================[Table Filter]=============================
|
||||
|
||||
const filteredData = investmentTypes?.data?.rows?.filter((item) => {
|
||||
const name = item.investmentTypeName;
|
||||
const name = item?.investmentTypeName;
|
||||
const searchLower = searchTerm.toLowerCase();
|
||||
const nameMatches = name.toLowerCase().includes(searchLower);
|
||||
|
||||
@@ -95,16 +95,16 @@ const InvestmentType = () => {
|
||||
const extractedArray = filteredData?.map((item, index) => ({
|
||||
"Sr No": (
|
||||
<Text
|
||||
w={'24px'}
|
||||
w={"24px"}
|
||||
justifyContent={slideFromRight ? "right" : "left"}
|
||||
as={"span"}
|
||||
color={"gray.600"}
|
||||
className="d-flex align-items-center fw-bold web-text-small"
|
||||
>
|
||||
{/* {item.id} */}
|
||||
{generateSerialNumber(index,currentPage, pageSize )}
|
||||
|
||||
</Text>),
|
||||
{generateSerialNumber(index, currentPage, pageSize)}
|
||||
</Text>
|
||||
),
|
||||
"Investment Type": (
|
||||
<Text
|
||||
justifyContent={slideFromRight ? "right" : "left"}
|
||||
@@ -114,7 +114,7 @@ const InvestmentType = () => {
|
||||
isTruncated={true}
|
||||
className="d-flex align-items-center web-text-small"
|
||||
>
|
||||
{item.investmentTypeName}
|
||||
{item?.investmentTypeName}
|
||||
</Text>
|
||||
),
|
||||
Description: (
|
||||
@@ -137,15 +137,15 @@ const InvestmentType = () => {
|
||||
textOverflow="ellipsis"
|
||||
cursor={"grab"}
|
||||
>
|
||||
{item.note ? item: "---"}
|
||||
{item?.note ? item?.note : "---"}
|
||||
</Text>
|
||||
</Tooltip>
|
||||
),
|
||||
Status: (
|
||||
<Box isTruncated={true}>
|
||||
<Text as={"span"} fontWeight={"500"}>
|
||||
<Badge
|
||||
bg={index % 2 === 0 ? "#6311cb14" : "#fff"}
|
||||
<Badge
|
||||
bg={index % 2 === 0 ? "#6311cb14" : "#fff"}
|
||||
fontWeight={"500"}
|
||||
textTransform={"none"}
|
||||
color={item.isActive ? "green" : "red"}
|
||||
@@ -192,7 +192,7 @@ const InvestmentType = () => {
|
||||
>
|
||||
<Button
|
||||
onClick={() =>
|
||||
navigate(`/investment-type/add-investment/${item.id}`)
|
||||
navigate(`/investment-type/add-investment/${item?.id}`)
|
||||
}
|
||||
// _hover={{ color: "blue.500" }}
|
||||
// color="blue.400"
|
||||
|
||||
Reference in New Issue
Block a user