diff --git a/src/Components/FormField.jsx b/src/Components/FormField.jsx index b05eb76..f417351 100644 --- a/src/Components/FormField.jsx +++ b/src/Components/FormField.jsx @@ -22,12 +22,14 @@ import { Td, InputGroup, InputRightAddon, + HStack, } from "@chakra-ui/react"; import { Controller } from "react-hook-form"; import { TiWarning } from "react-icons/ti"; import { motion } from "framer-motion"; import { AddIcon, CloseIcon } from "@chakra-ui/icons"; import CurrencyInput from "./CurrencyInput"; +import ShariahLogo from "../../src/assets/shariah-icon.png" const today = new Date().toISOString().split("T")[0]; @@ -506,7 +508,18 @@ const FormField = ({ // value={dateValue} /> - );} else{ + );} + else if(type === 'checkBox'){ + return ( + + {/* */} + + Is This Sharia Compliant + + + );} else{ return ( { @@ -63,7 +73,7 @@ const Notification = () => { handleSubmit, formState: { errors }, } = useForm({ - resolver: yupResolver(notification), + resolver: yupResolver(notificationNew), }); console.log(errors); @@ -112,39 +122,22 @@ const Notification = () => { { label: "Investment Name", placeHolder: " ", - name: "investmentNameEnglish", + name: "title", type: "text", isRequired: true, section: "Add Details", // value: contact?.phoneNumber || "", }, { - label: "Manual Date", - name: "ManualDate", + label: "Message", placeHolder: " ", - type: "date", + name: "message", + type: "textarea", isRequired: true, section: "Add Details", - // value: contact?.emailAddress || "", - }, - { - label: "Manual Time", - name: "ManualTime", - placeHolder: " ", - type: "time", - isRequired: true, - section: "Add Details", - // value: contact?.websiteUrl || "", - }, - { - label: "Expected Return", - name: "expectedReturn", - placeHolder: " ", - type: "text", - isRequired: true, - section: "Add Details", - // value: contact?.websiteUrl || "", + // value: contact?.phoneNumber || "", }, + ]; const groupedFields = formFields.reduce((groups, field) => { diff --git a/src/Pages/FawateerChecker/ApproveHistory/ApproveHistoryMaker.jsx b/src/Pages/FawateerChecker/ApproveHistory/ApproveHistoryMaker.jsx index de0a3b4..db922eb 100644 --- a/src/Pages/FawateerChecker/ApproveHistory/ApproveHistoryMaker.jsx +++ b/src/Pages/FawateerChecker/ApproveHistory/ApproveHistoryMaker.jsx @@ -138,6 +138,7 @@ import { ]; const extractedArray = filteredData?.map((item, idx) => ({ + // id: item?.id, "Sr.no": ( { holdingPeriod: yup.string().required("Holding period is required"), holdingPeriodArabic: yup.string().required("Holding period is required"), + isShariah: yup.string().required("CheckBox is required"), + // minInvestmentAmount: yup // .number() @@ -308,7 +313,7 @@ const IODetails = ({ enableNextTab, index, data }) => { //=======================[ Creator ] const formFields = [ { - label: "IO Name ", + label: "IO Name", name: "investmentNameEnglish", value: IObyID?.data?.investmentNameEnglish, type: "text", @@ -387,7 +392,7 @@ const IODetails = ({ enableNextTab, index, data }) => { type: "text", isRequired: true, section: " ", - width: "49%", + width: "32.3%", value: IObyID?.data?.expectedReturn, }, @@ -398,9 +403,18 @@ const IODetails = ({ enableNextTab, index, data }) => { isRequired: true, arabic: true, section: " ", - width: "49%", + width: "32.3%", value: IObyID?.data?.expectedReturnArabic, }, + { + label: "Shariah", + name: "isShariah", + type: "checkBox", + isRequired: true, + section: " ", + width: "32.3%", + value: IObyID?.data?.isShariah, + }, { @@ -752,7 +766,13 @@ const IODetails = ({ enableNextTab, index, data }) => { onSubmit={handleSubmit(onSubmit)} btnLoading={isLoading} submitTitle={id ? "Update" : "Submit"} - > + > + {/* + + Shariah + + */} + ); }; diff --git a/src/Services/contact.service.js b/src/Services/contact.service.js index 465a780..c8eb562 100644 --- a/src/Services/contact.service.js +++ b/src/Services/contact.service.js @@ -35,9 +35,18 @@ export const contact = createApi({ // ========[Update Investment]======= + // sendNotification: builder.mutation({ + // query: (data) => ({ + // url: `/notification/admin/create`, + // method: "POST", + // body: data, + // }), + // }), + + sendNotification: builder.mutation({ query: (data) => ({ - url: `/notification/admin/create`, + url: `/notification/admin/create-with-title-message`, method: "POST", body: data, }), diff --git a/src/assets/shariah-icon.png b/src/assets/shariah-icon.png new file mode 100644 index 0000000..20feea1 Binary files /dev/null and b/src/assets/shariah-icon.png differ