Merge pull request 'update modal close' (#15) from Yasin into release/sprint-8
Reviewed-on: #15
This commit is contained in:
@@ -166,8 +166,8 @@ const Pending = () => {
|
||||
),
|
||||
Actions: (
|
||||
<Box display={"flex"} justifyContent={"center"}>
|
||||
{localStorage?.getItem("role") !== "Maker" ? <Box>
|
||||
<Box display={"flex"} justifyContent={"center"} gap={2}>
|
||||
{localStorage?.getItem("role") !== "Maker" ? <Box>
|
||||
{index===0&&<Box display={"flex"} justifyContent={"center"} gap={2}>
|
||||
<Tooltip
|
||||
rounded={"sm"}
|
||||
fontSize={"xs"}
|
||||
@@ -221,8 +221,8 @@ const Pending = () => {
|
||||
>
|
||||
<CloseIcon fontSize={"10px"} />
|
||||
</Button>
|
||||
</Tooltip>
|
||||
</Box>
|
||||
</Tooltip></Box>}
|
||||
|
||||
</Box> : <Button
|
||||
colorScheme="green"
|
||||
rounded={"sm"}
|
||||
|
||||
@@ -142,7 +142,7 @@ import {
|
||||
</Text>
|
||||
)}
|
||||
<FormHelperText fontSize="xs" color="gray.500">
|
||||
Maximum length should be 200 characters. You have entered
|
||||
<Box as="span" me={1}> Maximum length should be 200 characters. You have entered</Box>
|
||||
{watch("checkerComment")?.length || 0} characters.
|
||||
</FormHelperText>
|
||||
</FormControl>
|
||||
|
||||
@@ -33,7 +33,7 @@ import {
|
||||
.max(200, "Approve Comment cannot be more than 200 characters"),
|
||||
});
|
||||
|
||||
const ApproveInvestedModal = ({ isOpen, onClose, firstField ,id}) => {
|
||||
const ApproveInvestedModal = ({ isOpen, onClose, firstField ,id,onBigModalClose}) => {
|
||||
const [isBtnLoading , setIsBtnLoading] = useState(false)
|
||||
|
||||
const toast = useToast()
|
||||
@@ -69,6 +69,7 @@ import {
|
||||
),
|
||||
});
|
||||
onClose()
|
||||
onBigModalClose()
|
||||
setIsBtnLoading(false)
|
||||
}else{
|
||||
toast({
|
||||
@@ -139,7 +140,7 @@ import {
|
||||
</Text>
|
||||
)}
|
||||
<FormHelperText fontSize="xs" color="gray.500">
|
||||
Maximum length should be 200 characters. You have entered
|
||||
<Box as="span" me={1}>Maximum length should be 200 characters. You have entered</Box>
|
||||
{watch("checkerComment")?.length || 0} characters.
|
||||
</FormHelperText>
|
||||
</FormControl>
|
||||
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
import {useApproveCancleTransactionMutation, useApproveExitTransactionMutation} from "../../../../Services/io.service";
|
||||
|
||||
|
||||
const ApprovedCancelTransaction = ({ isOpen, onClose, firstField ,id}) => {
|
||||
const ApprovedCancelTransaction = ({ isOpen, onClose, firstField ,id,onBigModalClose}) => {
|
||||
const [isBtnLoading , setIsBtnLoading] = useState(false)
|
||||
|
||||
const toast = useToast()
|
||||
@@ -58,6 +58,7 @@ import {
|
||||
),
|
||||
});
|
||||
onClose()
|
||||
onBigModalClose()
|
||||
setIsBtnLoading(false)
|
||||
}else{
|
||||
toast({
|
||||
@@ -123,7 +124,7 @@ import {
|
||||
</Text>
|
||||
)}
|
||||
<FormHelperText fontSize="xs" color="gray.500">
|
||||
Maximum length should be 200 characters. You have entered
|
||||
<Box as="span" me={1}>Maximum length should be 200 characters. You have entered</Box>
|
||||
{watch("checkerComment")?.length || 0} characters.
|
||||
</FormHelperText>
|
||||
</FormControl>
|
||||
|
||||
@@ -30,7 +30,7 @@ import {
|
||||
.max(200, "Approve Comment cannot be more than 200 characters"),
|
||||
});
|
||||
|
||||
const ApprovedExit = ({ isOpen, onClose, firstField ,id}) => {
|
||||
const ApprovedExit = ({ isOpen, onClose, firstField ,id,onBigModalClose}) => {
|
||||
const [isBtnLoading , setIsBtnLoading] = useState(false)
|
||||
|
||||
const toast = useToast()
|
||||
@@ -66,6 +66,7 @@ import {
|
||||
),
|
||||
});
|
||||
onClose()
|
||||
onBigModalClose()
|
||||
setIsBtnLoading(false)
|
||||
}else{
|
||||
toast({
|
||||
@@ -137,7 +138,7 @@ import {
|
||||
</Text>
|
||||
)}
|
||||
<FormHelperText fontSize="xs" color="gray.500">
|
||||
Maximum length should be 200 characters. You have entered
|
||||
<Box as="span" me={1}>Maximum length should be 200 characters. You have entered</Box>
|
||||
{watch("checkerComment")?.length || 0} characters.
|
||||
</FormHelperText>
|
||||
</FormControl>
|
||||
|
||||
@@ -276,11 +276,13 @@ const ViewAmountInvested = ({ isOpen, onClose, id: investorId }) => {
|
||||
<ApproveInvestedModal
|
||||
isOpen={isConfirmOpen}
|
||||
onClose={onConfirmClose}
|
||||
onBigModalClose={onClose}
|
||||
id={investorId}
|
||||
/>
|
||||
<RequestRejectModal
|
||||
isOpen={isRejectOpen}
|
||||
onClose={onRejectClose}
|
||||
onBigModalClose={onClose}
|
||||
id={investorId}
|
||||
/>
|
||||
</Modal>
|
||||
|
||||
@@ -348,11 +348,13 @@ import RequestRejectModal from "./RequestRejectModal";
|
||||
<ApprovedCancelTransaction
|
||||
isOpen={isConfirmOpen}
|
||||
onClose={onConfirmClose}
|
||||
onBigModalClose={onClose}
|
||||
id={cancleId}
|
||||
/>
|
||||
<RequestRejectModal
|
||||
isOpen={isRejectOpen}
|
||||
onClose={onRejectClose}
|
||||
onBigModalClose={onClose}
|
||||
id={cancleId}
|
||||
/>
|
||||
</Modal>
|
||||
|
||||
@@ -309,11 +309,13 @@ import RequestRejectModal from "./RequestRejectModal";
|
||||
<ApprovedExit
|
||||
isOpen={isConfirmOpen}
|
||||
onClose={onConfirmClose}
|
||||
onBigModalClose={onClose}
|
||||
id={investerId}
|
||||
/>
|
||||
<RequestRejectModal
|
||||
isOpen={isRejectOpen}
|
||||
onClose={onRejectClose}
|
||||
onBigModalClose={onClose}
|
||||
id={investerId}
|
||||
/>
|
||||
</Modal>
|
||||
|
||||
@@ -147,11 +147,11 @@ const ViewIOdataHeader = ({ data, isLoading }) => {
|
||||
const res = await updateTransaction(id)
|
||||
|
||||
if (res?.data) {
|
||||
toast({
|
||||
render: () => (
|
||||
<ToastBox status={"success"} message={res?.data?.message} />
|
||||
),
|
||||
});
|
||||
// toast({
|
||||
// render: () => (
|
||||
// <ToastBox status={"success"} message={res?.data?.message} />
|
||||
// ),
|
||||
// });
|
||||
// setIsLoading(false);
|
||||
onExitOpen()
|
||||
|
||||
@@ -174,11 +174,11 @@ const ViewIOdataHeader = ({ data, isLoading }) => {
|
||||
const res = await updateTransaction(id)
|
||||
|
||||
if (res?.data) {
|
||||
toast({
|
||||
render: () => (
|
||||
<ToastBox status={"success"} message={res?.data?.message} />
|
||||
),
|
||||
});
|
||||
// toast({
|
||||
// render: () => (
|
||||
// <ToastBox status={"success"} message={res?.data?.message} />
|
||||
// ),
|
||||
// });
|
||||
// setIsLoading(false);
|
||||
onInvestmentOpen()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user