[update] - io cash, IO nav and pending

This commit is contained in:
Swapnil Bendal
2024-12-11 19:36:06 +05:30
parent d84b3a0e35
commit ed27ed6939
3 changed files with 31 additions and 28 deletions

View File

@@ -20,7 +20,7 @@ import AddCaseDetails from "./AddCaseDetails";
import { useUpdateIOCaseMutation } from "../../../../Services/io.service";
import ToastBox from "../../../../Components/ToastBox";
import { useParams } from "react-router-dom";
import { encryptString } from "../../../../Constants/Constants";
import { encryptString, isMaker } from "../../../../Constants/Constants";
const IOCashDetails = () => {
const params = useParams();
@@ -88,7 +88,8 @@ const IOCashDetails = () => {
Pending
{IODetails?.ioCashStatusHistory?.Pending.length > 0 && (
<Badge rounded={"sm"} colorScheme="forestGreen" ms={2}>
{IODetails?.ioCashStatusHistory?.Pending.length !== 0 && IODetails?.ioCashStatusHistory?.Pending.length}
{IODetails?.ioCashStatusHistory?.Pending.length !== 0 &&
IODetails?.ioCashStatusHistory?.Pending.length}
</Badge>
)}
{/* <Badge rounded={"sm"} colorScheme="forestGreen" ms={2}>
@@ -106,7 +107,7 @@ const IOCashDetails = () => {
</Tab>
</TabList>
{IODetails?.isInvestedAmount
? localStorage?.getItem("role") === encryptString(import.meta.env.VITE_VITE_MAKER) && (
? isMaker() && (
<Button
onClick={handleAdd}
leftIcon={<AddIcon />}

View File

@@ -75,7 +75,7 @@ import ToastBox from "../../../../Components/ToastBox";
import { useParams } from "react-router-dom";
import AddNavDetails from "./AddNavDetails";
import { useUpdateIOCaseMutation } from "../../../../Services/io.service";
import { encryptString } from "../../../../Constants/Constants";
import { encryptString, isMaker } from "../../../../Constants/Constants";
const IONAVDetails = () => {
const params = useParams();
@@ -153,7 +153,7 @@ const IONAVDetails = () => {
</Tab>
</TabList>
{IODetails?.isInvestedAmount
? localStorage?.getItem("role") === encryptString(import.meta.env.VITE_VITE_MAKER) && (
? isMaker() && (
<Button
onClick={handleAdd}
leftIcon={<AddIcon />}

View File

@@ -27,7 +27,7 @@ import ViewAmountInvested from "./ViewAmountInvested";
import ViewDistributionInvestor from "./ViewDistributionInvestor";
import ViewExit from "./ViewExit";
import ViewCancel from "./ViewCancel";
import { encryptString } from "../../../../Constants/Constants";
import { encryptString, isMaker } from "../../../../Constants/Constants";
const formatDate = (date) => new Date(date).toLocaleDateString();
@@ -128,11 +128,7 @@ const Pending = () => {
</Text>
),
"Transaction Date": (
<Text
as={"span"}
color={"gray.600"}
fontWeight={"500"}
>
<Text as={"span"} color={"gray.600"} fontWeight={"500"}>
{formatDate(item?.transactionDate)}
</Text>
),
@@ -153,8 +149,13 @@ const Pending = () => {
</Text>
),
"Created By": (
<Text
textTransform={'capitalize'} w={"100px"} as={"span"} color={"gray.800"} fontWeight={"500"}>
<Text
textTransform={"capitalize"}
w={"100px"}
as={"span"}
color={"gray.800"}
fontWeight={"500"}
>
{item?.creator?.firstName}
</Text>
),
@@ -164,8 +165,13 @@ const Pending = () => {
</Text>
),
"Approved By": (
<Text
textTransform={'capitalize'} w={"100px"} as={"span"} color={"gray.800"} fontWeight={"500"}>
<Text
textTransform={"capitalize"}
w={"100px"}
as={"span"}
color={"gray.800"}
fontWeight={"500"}
>
{item?.modifier?.firstName}
</Text>
),
@@ -196,7 +202,11 @@ const Pending = () => {
}
}}
>
{localStorage?.getItem("role") === encryptString(import.meta.env.VITE_VITE_MAKER) ? <ViewIcon me={"4px"} /> : null} {localStorage?.getItem("role") === encryptString(import.meta.env.VITE_VITE_MAKER) ? "View" : "Approve / Reject"}
{isMaker() ? <ViewIcon me={"4px"} /> : null}{" "}
{localStorage?.getItem("role") ===
encryptString(import.meta.env.VITE_VITE_MAKER)
? "View"
: "Approve / Reject"}
</Button>
</Box>
),
@@ -263,20 +273,12 @@ const Pending = () => {
id={actionId}
/>
<ViewDistributionInvestor
isOpen={isDistInvestorOpen}
onClose={onDistInvestorClose}
id={actionId}
/>
<ViewExit
isOpen={isExitOpen}
onClose={onExitClose}
isOpen={isDistInvestorOpen}
onClose={onDistInvestorClose}
id={actionId}
/>
<ViewCancel
isOpen={isCancelOpen}
onClose={onCancelClose}
id={actionId}
/>
<ViewExit isOpen={isExitOpen} onClose={onExitClose} id={actionId} />
<ViewCancel isOpen={isCancelOpen} onClose={onCancelClose} id={actionId} />
<RequestApproveModal
// data={data?.data?.rows}
isOpen={isConfirmOpen}