diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/obps/useBPAInbox.js b/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/obps/useBPAInbox.js index 2a3ff7bab03..4965bc5b07e 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/obps/useBPAInbox.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/libraries/src/hooks/obps/useBPAInbox.js @@ -47,12 +47,13 @@ const useBPAInbox = ({ tenantId, filters, config={} }) => { table: data?.items.map( application => ({ applicationId: application.businessObject.applicationNo || application.businessObject.applicationNumber, date: application.businessObject.auditDetails.createdTime, + submissionDate: application?.ProcessInstanceForBPA?.auditDetails?.createdTime , businessService: application?.ProcessInstance?.businessService, applicationType: application?.businessObject?.additionalDetails?.applicationType ? `WF_BPA_${application?.businessObject?.additionalDetails?.applicationType}` : "-", locality: `${application.businessObject?.tenantId?.toUpperCase()?.split(".")?.join("_")}_REVENUE_${application.businessObject?.landInfo?.address?.locality?.code?.toUpperCase()}`, status: application?.ProcessInstance?.state?.state, state: application?.ProcessInstance?.state?.state, - owner: application?.ProcessInstance?.assignes?.[0]?.name || "NA", + owner: application?.businessObject?.additionalDetails?.ownerName || "NA", sla: application?.businessObject?.status.match(/^(APPROVED)$/) ? "CS_NA" : Math.round(application.ProcessInstance?.businesssServiceSla / (24 * 60 * 60 * 1000)) })), totalCount: data.totalCount, diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/getBPAAcknowledgement.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/getBPAAcknowledgement.js index c773bd90af7..43b1abc47b3 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/getBPAAcknowledgement.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/getBPAAcknowledgement.js @@ -129,16 +129,15 @@ const getMohallaLocale = (value = "", tenantId = "") => { } ] }, - { - title: t(`BPA_NOC_DETAILS_SUMMARY`) , - values: [ - { - title: t(`BPA_NOC_NUMBER`), - value: application?.additionalDetails?.nocNumber || "NA", - } - - ], - }, + // { + // title: t(`BPA_NOC_DETAILS_SUMMARY`) , + // values: [ + // { + // title: t(`BPA_NOC_NUMBER`), + // value: application?.additionalDetails?.nocNumber || "NA", + // } + // ], + // }, { title: t("BPA_APPLICANT_DETAILS_HEADER"), values: [ diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/components/SearchApplication/SearchFormFieldsComponent.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/components/SearchApplication/SearchFormFieldsComponent.js index 1c3bf32079d..4c40670c71a 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/components/SearchApplication/SearchFormFieldsComponent.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/components/SearchApplication/SearchFormFieldsComponent.js @@ -112,6 +112,10 @@ const SearchFormFieldsComponent = ({ formState, Controller, register, control, t + + + + { !window.location.href.includes("citizen/obps/search/application") && @@ -190,6 +194,7 @@ const SearchFormFieldsComponent = ({ formState, Controller, register, control, t applicationNo: "", mobileNumber: window.location.href.includes("/search/obps-application") ? currentUserPhoneNumber : "", // mobileNumber: "", + name:"", fromDate: "", toDate: "", status: "", diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/components/SearchApplication/index.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/components/SearchApplication/index.js index cfe24cac0f6..3715a876df3 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/components/SearchApplication/index.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/components/SearchApplication/index.js @@ -31,6 +31,7 @@ const OBPSSearchApplication = ({ tenantId, t, onSubmit, data, error, searchData, applicationNo: "", mobileNumber: window.location.href.includes("/search/obps-application") ? currentUserPhoneNumber : "", // mobileNumber: "", + name:"", fromDate: "", toDate: "", status: "", @@ -80,6 +81,7 @@ const OBPSSearchApplication = ({ tenantId, t, onSubmit, data, error, searchData, applicationNo: "", // mobileNumber: "", mobileNumber: window.location.href.includes("/search/obps-application") ? Digit.UserService.getUser()?.info?.mobileNumber : "", + name:"", fromDate: "", toDate: "", status: "", diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/components/SearchApplication/useTableConfig.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/components/SearchApplication/useTableConfig.js index 43332e5d716..b7b333b1f1d 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/components/SearchApplication/useTableConfig.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/components/SearchApplication/useTableConfig.js @@ -55,8 +55,8 @@ const useSearchApplicationTableConfig = ({t}) => { accessor: (row) => GetCell(t(row.additionalDetails?.serviceType || t(`TRADELICENSE_TRADETYPE_${row?.tradeLicenseDetail?.tradeUnits?.[0]?.tradeType?.split(".")[0]}`) || "-")), }, { - Header: t("BPA_CURRENT_OWNER_HEAD"), - accessor: (row) => GetCell(row?.assignee || "-"), + Header: t("BPA_OWNER_HEAD"), + accessor: (row) => GetCell(row?.additionalDetails?.ownerName || "NA"), // accessor: (row) => GetCell(row.businessService === "BPAREG"?row?.tradeLicenseDetail?.owners.map( o => o.name ). join(",") || "-" : row?.landInfo?.owners.map( o => o.name ). join(",") || "-"), disableSortBy: true, }, diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/components/Timeline.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/components/Timeline.js index 8cad7ad68b9..81e3eeb1396 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/components/Timeline.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/components/Timeline.js @@ -15,8 +15,8 @@ const getAction = (flow) => { default: actions = [ "BPA_STEPPER_SCRUTINY_DETAILS_HEADER", + "COLONY_DETAILS", "BPA_OWNER_AND_DOCUMENT_DETAILS_LABEL", - "BPA_NOC_DETAILS_SUMMARY", "BPA_STEPPER_SUMMARY_HEADER", ]; } diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/pageComponents/BPANewBuildingdetails.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/pageComponents/BPANewBuildingdetails.js index 82cabc21265..9e1e9f75be9 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/pageComponents/BPANewBuildingdetails.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/pageComponents/BPANewBuildingdetails.js @@ -1,5 +1,6 @@ import React, { useEffect, useState, Fragment } from "react"; - import { FormStep, TextInput, CardLabel, Dropdown } from "@upyog/digit-ui-react-components"; + import { FormStep, TextInput, CardLabel, Dropdown,UploadFile,SearchIcon } from "@upyog/digit-ui-react-components"; + import Timeline from "../components/Timeline"; import { useLocation, useRouteMatch } from "react-router-dom"; import { Controller, useForm } from "react-hook-form"; @@ -25,7 +26,36 @@ const [schemeName, setschemeName] = useState(formData?.owners?.schemeName || ""); const [transferredscheme, settransferredscheme] = useState("Pre-Approved Standard Designs" || ""); const [Ulblisttype, setUlblisttype] = useState(formData?.owners?.Ulblisttype || ""); - + const [uploadedFile, setUploadedFile] = useState(formData?.owners?.uploadedFile); + const [file, setFile] = useState(); + const [error, setError] = useState(null); + const [uploadMessage, setUploadMessage] = useState(""); + let Webview = !Digit.Utils.browser.isMobile(); + let acceptFormat = ".pdf" + useEffect(() => { + (async () => { + setError(null); + if (file&& file?.type) { + if(!(acceptFormat?.split(",")?.includes(`.${file?.type?.split("/")?.pop()}`))) + { + setError(t("PT_UPLOAD_FORMAT_NOT_SUPPORTED")); + } + else if (file.size >= 2000000) { + setError(t("PT_MAXIMUM_UPLOAD_SIZE_EXCEEDED")); + } else { + try { + const response = await Digit.UploadServices.Filestorage("property-upload", file, Digit.ULBService.getStateId()); + if (response?.data?.files?.length > 0) { + setUploadedFile(response?.data?.files[0]?.fileStoreId); + } else { + setError(t("PT_FILE_UPLOAD_ERROR")); + } + } catch (err) { + } + } + } + })(); + }, [file]); @@ -202,22 +232,34 @@ function TransferredScheme(e){ settransferredscheme(e.target.value); } - + function selectfile(e) { + setUploadedFile(e.target.files[0]); + setFile(e.target.files[0]); + } + function onClick(e){ + console.log("inside_NOC_search") + } const goNext = () => { let owners = formData.owners && formData.owners[index]; - let ownerStep = { ...owners, approvedColony, UlbName, Ulblisttype, District, masterPlan, coreArea, buildingStatus, schemes, schemesselection, purchasedFAR, greenbuilding, restrictedArea, proposedSite, nameofApprovedcolony, schemeName, transferredscheme, NocNumber }; + let ownerStep = { ...owners, approvedColony, UlbName, Ulblisttype, District, masterPlan, coreArea, buildingStatus, schemes, schemesselection, purchasedFAR, greenbuilding, restrictedArea, proposedSite, nameofApprovedcolony, schemeName, transferredscheme, NocNumber, uploadedFile }; let updatedFormData = { ...formData }; // Check if owners array exists in formData if not , then it will add it if (!updatedFormData.owners) { updatedFormData.owners = []; } - - onSelect(config.key, { ...formData[config.key], ...ownerStep }, updatedFormData, false, index); - - + if((approvedColony?.code=="NO") ) + { if(NocNumber || uploadedFile || formData?.owners?.uploadedFile || formData?.owners?.NocNumber){ + onSelect(config.key, { ...formData[config.key], ...ownerStep }, updatedFormData, false, index); + } + else{ + alert("Please fill NOC number or Upload NOC Document") + } } + else{ + onSelect(config.key, { ...formData[config.key], ...ownerStep }, updatedFormData, false, index); + } }; @@ -253,25 +295,40 @@ case "NO": return ( <> - {`${t("BPA_NOC_NUMBER")}`} + {`${t("BPA_NOC_NUMBER")}`} +
- +
onClick( e)}>
+
+
OR
+ { + setUploadedFile(null); + setFile(""); + }} + message={uploadedFile ? `1 ${t(`FILEUPLOADED`)}` : t(`ES_NO_FILE_SELECTED_LABEL`)} + error={error} + uploadMessage={uploadMessage} + /> ); default: @@ -354,6 +411,7 @@ return ( + {`${t("BPA_MASTER_PLAN")}`} + {`${t("BPA_MASTER_PLAN")}`} - + {!isLoading ? { if(found){ setCanmovenext(false); - setownerRoleCheck(found); + //setownerRoleCheck(found); setShowToast({ key: "true", error: true, message: `BPA_OWNER_VALIDATION_${found?.code}` }); return; } @@ -342,7 +342,8 @@ const OwnerDetails = ({ t, config, onSelect, userType, formData }) => { payload.additionalDetails.height = (formData?.data.edcrDetails.planDetail.blocks[0].building.buildingHeight).toString() || "NA"; payload.additionalDetails.usage = formData?.data.occupancyType || "NA"; payload.additionalDetails.builtUpArea =(formData?.data.edcrDetails.planDetail.blocks[0].building.totalBuitUpArea).toString(); - payload.additionalDetails.nocNumber=(formData?.nocnumber?.nocNumber).toString(); + //payload.additionalDetails.nocNumber=(formData?.nocnumber?.nocNumber).toString(); + payload.additionalDetails.ownerName=conversionOwners.map(obj=>obj.name).join(','); if (formData?.data?.registrationDetails) payload.additionalDetails.registrationDetails = formData?.data?.registrationDetails; if (formData?.data?.applicationType) payload.additionalDetails.applicationType = formData?.data?.applicationType; @@ -380,7 +381,7 @@ const OwnerDetails = ({ t, config, onSelect, userType, formData }) => { if (formData?.owners?.schemeName) payload.additionalDetails.schemeName = formData?.owners?.schemeName; if (formData?.owners?.transferredscheme) payload.additionalDetails.transferredscheme = formData?.owners?.transferredscheme; if (formData?.owners?.Ulblisttype?.code) payload.additionalDetails.Ulblisttype = formData?.owners?.Ulblisttype?.code; - + if (formData?.owners?.uploadedFile) payload.additionalDetails.uploadedFileNoc = formData?.owners?.uploadedFile; //For LandInfo payload.landInfo = {}; @@ -507,7 +508,7 @@ const OwnerDetails = ({ t, config, onSelect, userType, formData }) => { return (
- + {!isLoading ?
diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/pages/citizen/BpaApplicationDetail/index.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/pages/citizen/BpaApplicationDetail/index.js index edb1e8a016a..198d536850e 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/pages/citizen/BpaApplicationDetail/index.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/pages/citizen/BpaApplicationDetail/index.js @@ -675,7 +675,7 @@ const BpaApplicationDetail = () => { {/* to get Fee values */} {detail?.additionalDetails?.inspectionReport && detail?.isFeeDetails && } {/*blocking reason*/} - {detail?.additionalDetails?.inspectionReport && detail?.isFeeDetails && (workflowDetails?.data?.actionState?.nextActions[0]?.state=="POST_PAYMENT_CITIZEN_APPROVAL_PENDING"|| workflowDetails?.data?.actionState?.state=="POST_PAYMENT_CITIZEN_APPROVAL_PENDING") && + {detail?.additionalDetails?.inspectionReport && detail?.isFeeDetails && (workflowDetails?.data?.actionState?.nextActions[0]?.state=="POST_PAYMENT_CITIZEN_APPROVAL_PENDING"|| workflowDetails?.data?.actionState?.state=="POST_PAYMENT_CITIZEN_APPROVAL_PENDING" || workflowDetails?.data?.actionState?.state=="POST_PAYMENT_INPROGRESS") &&
diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/pages/citizen/NewBuildingPermit/CheckPage.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/pages/citizen/NewBuildingPermit/CheckPage.js index 04cb6b8f190..14427869f43 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/pages/citizen/NewBuildingPermit/CheckPage.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/pages/citizen/NewBuildingPermit/CheckPage.js @@ -1,6 +1,6 @@ import { Card, CardHeader, CardSubHeader, CardText,TextInput,CardLabel,CheckBox, LabelFieldPair, UploadFile, - CitizenInfoLabel, Header, LinkButton, Row, StatusTable, SubmitBar, Table, CardSectionHeader, EditIcon, PDFSvg, Loader + CitizenInfoLabel, Header, LinkButton, Row, StatusTable, SubmitBar, Table, CardSectionHeader, EditIcon, PDFSvg, Loader,TextArea } from "@upyog/digit-ui-react-components"; import React,{ useEffect, useMemo, useState } from "react"; import { useTranslation } from "react-i18next"; @@ -27,6 +27,14 @@ import { const tenantId = user?.info?.permanentCity || value?.tenantId ||Digit.ULBService.getCurrentTenantId() ; const { isMdmsLoading, data: mdmsData } = Digit.Hooks.obps.useMDMS(state, "BPA", ["GaushalaFees","MalbaCharges","LabourCess"]); + const [otherChargesDisc, setOtherChargesDisc] = useState() + const [uploadedFile, setUploadedFile] = useState(); + const [uploadedFileLess, setUploadedFileLess] = useState([]); + const [file, setFile] = useState(); + const [uploadMessage, setUploadMessage] = useState(""); + const [errorFile, setError] = useState(null); + const [docLessAdjustment, setDocuments] = useState({}); + let acceptFormat = ".pdf" let BusinessService; if(value.businessService === "BPA_LOW") BusinessService="BPA.LOW_RISK_PERMIT_FEE"; @@ -151,11 +159,40 @@ import { const isValidMobileNumber = mobileNumber.length === 10 && /^[0-9]+$/.test(mobileNumber); - - + useEffect(() => { + (async () => { + setError(null); + if (file&& file?.type) { + if(!(acceptFormat?.split(",")?.includes(`.${file?.type?.split("/")?.pop()}`))) + { + setError(t("PT_UPLOAD_FORMAT_NOT_SUPPORTED")); + } + else if (file.size >= 2000000) { + setError(t("PT_MAXIMUM_UPLOAD_SIZE_EXCEEDED")); + } else { + try { + const response = await Digit.UploadServices.Filestorage("property-upload", file, Digit.ULBService.getStateId()); + if (response?.data?.files?.length > 0) { + setUploadedFileLess([...uploadedFileLess,{fileStoreId:response?.data?.files[0]?.fileStoreId, time:new Date()}]); + } else { + setError(t("PT_FILE_UPLOAD_ERROR")); + } + } catch (err) { + } + } + } + })(); + }, [file]); + useEffect(()=>{ + sessionStorage.setItem("uploadedFileLess",JSON.stringify(uploadedFileLess)); + },[uploadedFileLess]) useEffect(()=>{ + if (value?.additionalDetails?.lessAdjustmentFeeFiles?.length) { + const fileStoresIds = value?.additionalDetails?.lessAdjustmentFeeFiles.map((document,index) =>(index===value?.additionalDetails?.lessAdjustmentFeeFiles?.length-1 ? value?.additionalDetails?.lessAdjustmentFeeFiles[value?.additionalDetails?.lessAdjustmentFeeFiles?.length-1]?.fileStoreId : null)); + Digit.UploadServices.Filefetch(fileStoresIds, state).then((res) => setDocuments(res?.data)); + } if(isEditApplication){ setDevelopment(value?.additionalDetails?.selfCertificationCharges?.BPA_DEVELOPMENT_CHARGES); sessionStorage.setItem("development",value?.additionalDetails?.selfCertificationCharges?.BPA_DEVELOPMENT_CHARGES); @@ -163,6 +200,9 @@ import { sessionStorage.setItem("otherCharges",value?.additionalDetails?.selfCertificationCharges?.BPA_OTHER_CHARGES); setLessAdjusment(value?.additionalDetails?.selfCertificationCharges?.BPA_LESS_ADJUSMENT_PLOT); sessionStorage.setItem("lessAdjusment",value?.additionalDetails?.selfCertificationCharges?.BPA_LESS_ADJUSMENT_PLOT); + setOtherChargesDisc(value?.additionalDetails?.otherFeesDiscription); + sessionStorage.setItem("otherChargesDisc",value?.additionalDetails?.otherFeesDiscription); + setUploadedFileLess(value?.additionalDetails?.lessAdjustmentFeeFiles); } let plotArea = parseInt(sessionStorage.getItem("plotArea")) || datafromAPI?.planDetail?.planInformation?.plotArea || value?.additionalDetails?.area; const LabourCess = plotArea > 909 ?mdmsData?.BPA?.LabourCess[1].rate * plotArea : 0 @@ -349,6 +389,15 @@ setWaterCharges(Malbafees/2) //alert("Please enter numbers") } } + function setOtherChargesDis(value) { + setOtherChargesDisc(value); + sessionStorage.setItem("otherChargesDisc",value) ; +} + +function selectfile(e) { + setUploadedFile(e.target.files[0]); + setFile(e.target.files[0]); + } return ( @@ -520,15 +569,15 @@ setWaterCharges(Malbafees/2) {} - - + {/* + {t("BPA_NOC_DETAILS_SUMMARY")} } style={{ width: "100px", display: "inline" }} onClick={() => routeTo(`${routeLink}/noc-number`)} /> - + */} {/* {nocDocuments && nocDocuments?.NocDetails.map((noc, index) => (
1 ?{ marginTop: "19px", background: "#FAFAFA", border: "1px solid #D6D5D4", borderRadius: "4px", padding: "8px", lineHeight: "19px", maxWidth: "960px", minWidth: "280px" } : {}}> {`${t(`BPA_${noc?.nocType}_HEADER`)}`} @@ -543,8 +592,8 @@ setWaterCharges(Malbafees/2)
))} */} -
-
+ {/*
+
*/} {t("BPA_SUMMARY_FEE_EST")} @@ -591,6 +640,16 @@ setWaterCharges(Malbafees/2) //disable={editScreen} {...{ required: true, pattern: /^[0-9]*$/ }} /> + {t("BPA_COMMON_OTHER_AMT_DISCRIPTION")} +