update bugs

This commit is contained in:
YasinShaikh123
2024-11-07 19:32:55 +05:30
parent 986e531896
commit 9740fff33c
5 changed files with 40 additions and 9 deletions

View File

@@ -36,7 +36,7 @@ const EditBankDetails = () => {
const [isSwitchOn, setIsSwitchOn] = useState(false);
const [updateBankDetails] = useUpdateBankDetailsMutation();
const { data: bankDetails, error, isLoading } = useGetBankDetailsQuery({ id }, { skip: !id });
const { data: bankDetails, error, isLoading, refetch } = useGetBankDetailsQuery({ id }, { skip: !id });
console.log(bankDetails);
@@ -54,6 +54,7 @@ const EditBankDetails = () => {
setInvestorDetails({
...bankDetails?.data,
});
// refetch()
if (bankDetails?.data) {
reset({
accountName: bankDetails?.data?.accountName,
@@ -87,6 +88,7 @@ const EditBankDetails = () => {
setIsLoadingBtn(false);
setAlert(false);
refetch()
navigate("/bank-details");
} else {
throw new Error("Something went wrong");
@@ -121,7 +123,7 @@ const EditBankDetails = () => {
name: "accountName",
placeHolder: "",
type: "text",
// isRequired: true,
isRequired: true,
section: "Add Details",
// maxLength: 255,
width: "32%",
@@ -133,6 +135,7 @@ const EditBankDetails = () => {
type: "text",
section: "Add Details",
width: "32%",
isRequired: true,
},
{
label: "IBAN Number",
@@ -141,6 +144,7 @@ const EditBankDetails = () => {
type: "text",
section: "Add Details",
width: "32%",
isRequired: true,
},
{
label: "SWIFT Code",
@@ -150,6 +154,7 @@ const EditBankDetails = () => {
type: "text",
section: "Add Details",
width: "32%",
isRequired: true,
},
{
label: "Bank Name",
@@ -158,6 +163,7 @@ const EditBankDetails = () => {
type: "text",
section: "Add Details",
width: "32%",
isRequired: true,
},
{
label: "Bank Address",
@@ -166,6 +172,7 @@ const EditBankDetails = () => {
type: "text",
section: "Add Details",
width: "32%",
isRequired: true,
},
];

View File

@@ -223,7 +223,7 @@ const CreateRequest = () => {
name="transaction_amount"
control={control}
render={({ field }) => (
<CurrencyInput {...field} textAlign={'right'} fontSize={"sm"} type="number" size={"sm"} />
<CurrencyInput bg={"#F5F8F6"} {...field} textAlign={'right'} fontSize={"sm"} type="number" size={"sm"} />
)}
/>
<FormHelperText fontSize={'xs'} fontWeight={500} style={{ color: "red" }}>

View File

@@ -2,6 +2,7 @@ import {
Box,
Button,
FormControl,
FormHelperText,
FormLabel,
Input,
Modal,
@@ -25,7 +26,12 @@ import ToastBox from "../../../Components/ToastBox";
import { useApproveCommentMutation } from "../../../Services/fawateer.request.service";
export const conformModalSchema = yup.object().shape({
checkerComment: yup.string().required("Comment is required"),
// checkerComment: yup.string().required("Comment is required")
// .max(50, "Investment name cannot be more than 50 characters"),
checkerComment: yup
.string()
.required("Comment is required")
.max(200, "Approve Comment cannot be more than 200 characters"),
});
const RequestApproveModal = ({ isOpen, onClose, firstField ,id}) => {
@@ -36,6 +42,7 @@ const RequestApproveModal = ({ isOpen, onClose, firstField ,id}) => {
const {
register,
reset,
watch,
handleSubmit,
formState: { errors },
} = useForm({
@@ -99,7 +106,7 @@ const RequestApproveModal = ({ isOpen, onClose, firstField ,id}) => {
const heandleOnClose = () =>{
reset()
onClose()
onClose()
}
return (
@@ -126,12 +133,17 @@ const RequestApproveModal = ({ isOpen, onClose, firstField ,id}) => {
placeholder={"Enter your checkerComment...."}
rounded={"md"}
resize={"none"}
maxLength={200}
/>
{errors.checkerComment && (
<Text fontSize="xs" color="red">
{errors.checkerComment.message}
</Text>
)}
<FormHelperText fontSize="xs" color="gray.500">
Maximum length should be 200 characters. You have entered
{watch("checkerComment")?.length || 0} characters.
</FormHelperText>
</FormControl>
</ModalBody>
<ModalFooter>

View File

@@ -124,12 +124,24 @@ const IONAVDetails = () => {
</Text>
),
Comments: (
// <Text
// justifyContent={"center"}
// as={"span"}
// color={"teal.900"}
// fontWeight={"500"}
// className="d-flex align-items-center web-text-small"
// >
// {item.comments}
// </Text>
<Text
justifyContent={"center"}
as={"span"}
color={"teal.900"}
fontWeight={"500"}
className="d-flex align-items-center web-text-small"
maxWidth="200px" // Adjust width as needed
display="block" // Ensure block display for proper truncation
overflow="hidden"
isTruncated
textOverflow="ellipsis"
>
{item.comments}
</Text>

View File

@@ -156,7 +156,7 @@ const KeyMeritsAdd = ({ isOpen, onClose, firstField, id, icons }) => {
<DrawerOverlay />
<DrawerContent>
<DrawerCloseButton />
<DrawerHeader fontSize={"sm"}>Key Merits </DrawerHeader>
<DrawerHeader fontSize={"sm"}>Key Merits</DrawerHeader>
<DrawerBody>
<HStack spacing={2} w={"100%"} flexWrap={"wrap"}>
@@ -339,7 +339,7 @@ const KeyMeritsAdd = ({ isOpen, onClose, firstField, id, icons }) => {
rounded={"sm"}
size={"sm"}
mr={3}
onClick={onClose}
onClick={onClose}
>
Cancel
</Button>