Skip to content

Commit

Permalink
Merge pull request #1091 from abhijniua/Dev-2.0
Browse files Browse the repository at this point in the history
Changes added for architect and citizen undertaking, New additional fields added as per feedback
  • Loading branch information
deepikaarora88 authored May 15, 2024
2 parents 94a7db0 + 99087da commit 1fcc33a
Show file tree
Hide file tree
Showing 16 changed files with 1,443 additions and 95 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ import useBusinessServiceData from "./obps/useBusinessServiceData";
import useBPATaxDocuments from "./obps/useBPATaxDocuments";
import useDistricts from "./obps/useDistricts";
import useULBList from "./obps/useULBList";
import useUlbType from "./obps/useUlbType";


import useEventInbox from "./events/useEventInbox";
Expand Down Expand Up @@ -451,7 +452,8 @@ const obps = {
useBusinessServiceData,
useBPATaxDocuments,
useDistricts,
useULBList
useULBList,
useUlbType
};

const events = {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { useQuery } from "react-query";
import { MdmsService } from "../../services/elements/MDMS";

const useUlbType = (tenantId, moduleCode, type, config = {}) => {
const useULB = () => {
return useQuery("BPA_ULB", () => MdmsService.BPAUlbType(tenantId, moduleCode ,type), config);
};


switch (type) {
case "UlbType":
return useULB();
default:
return null;
}
};



export default useUlbType;
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,23 @@ const getulbtype = (tenantId, moduleCode, type) => ({
},
});

const getulblist = (tenantId, moduleCode, type) => ({
type,
details: {
tenantId,
moduleDetails: [
{
moduleName: moduleCode,
masterDetails: [
{
name: "UlbType",
},
],
},
],
},
});

const getPropertyTypeCriteria = (tenantId, moduleCode, type) => ({
type,
details: {
Expand Down Expand Up @@ -426,6 +443,16 @@ const getulb = (MdmsRes) => {
});
//return MdmsRes;
};

const getulbls = (MdmsRes) => {
return MdmsRes["BPA"].UlbType.filter((UlbType) => UlbType.active).map((ulbtypeDetails) => {
return {
...ulbtypeDetails,
i18nKey: `BPA_ULB_LIST_${ulbtypeDetails.code}`,
};
});
//return MdmsRes;
};
/////////////

const BPADistrict = (MdmsRes) => {
Expand All @@ -444,6 +471,15 @@ const BPAUlb = (MdmsRes) => {
};
});
};

const BPAUlbType = (MdmsRes) => {
MdmsRes["BPA"].UlbType.filter((UlbType) => UlbType.active).map((ulbtypelist) => {
return {
...ulbtypelist,
i18nKey: `BPA_ULB_${ulbtypelist.code}`,
};
});
};
/////////////

const getCommonFieldsCriteria = (tenantId, moduleCode, type) => ({
Expand Down Expand Up @@ -1611,12 +1647,17 @@ const transformResponse = (type, MdmsRes, moduleCode, tenantId) => {

case "Ulb":
return getulb(MdmsRes);
case "UlbType":
return getulbls(MdmsRes);

case "BPADistrict":
return BPADistrict(MdmsRes);
case "BPAUlb":
return BPAUlb(MdmsRes);

case "BPAUlbType":
return BPAUlbType(MdmsRes);




Expand Down Expand Up @@ -1770,6 +1811,9 @@ export const MdmsService = {
getulb: (tenantId, moduleCode, type) => {
return MdmsService.getDataByCriteria(tenantId, getulbtype(tenantId, moduleCode, type), moduleCode);
},
getulbls: (tenantId, moduleCode, type) => {
return MdmsService.getDataByCriteria(tenantId, getulblist(tenantId, moduleCode, type), moduleCode);
},


getPetType: (tenantId, moduleCode, type) => {
Expand All @@ -1785,6 +1829,11 @@ export const MdmsService = {
BPAUlb: (tenantId, moduleCode, type) => {
return MdmsService.getDataByCriteria(tenantId, getulbtype(tenantId, moduleCode, type), moduleCode);
},
/////bpa
BPAUlbType: (tenantId, moduleCode, type) => {
return MdmsService.getDataByCriteria(tenantId, getulblist(tenantId, moduleCode, type), moduleCode);
},
////bpa
PTRGenderType: (tenantId, moduleCode, type) => {
return MdmsService.getDataByCriteria(tenantId, getGenderTypeList(tenantId, moduleCode, type), moduleCode);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ const Home = () => {
Icon: <CaseIcon className="fill-path-primary-main" />,
onClick: () => history.push(citizenServicesObj?.props?.[2]?.navigationUrl),
},
{
name: t(citizenServicesObj?.props?.[1]?.label),
Icon: <PTRIcon className="fill-path-primary-main" />,
onClick: () => history.push(citizenServicesObj?.props?.[1]?.navigationUrl),
},
// {
// name: t(citizenServicesObj?.props?.[1]?.label),
// Icon: <PTRIcon className="fill-path-primary-main" />,
// onClick: () => history.push(citizenServicesObj?.props?.[1]?.navigationUrl),
// },
// {
// name: t("ACTION_TEST_WATER_AND_SEWERAGE"),
// Icon: <DropIcon/>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ const getMohallaLocale = (value = "", tenantId = "") => {
};
const capitalize = (text) => text.substr(0, 1).toUpperCase() + text.substr(1);
const ulbCamel = (ulb) => ulb.toLowerCase().split(" ").map(capitalize).join(" ");


const getBPAAcknowledgement=async(application,tenantInfo,t)=>{
const user = Digit.UserService.getUser();


const owner=application?.landInfo?.owners
return{
Expand Down Expand Up @@ -114,7 +118,15 @@ const getMohallaLocale = (value = "", tenantId = "") => {
{
title: t("BPA_APPLICATION_DEMOLITION_AREA_LABEL"),
value: t(`${application?.data?.edcrDetails?.planDetail?.planInformation?.demolitionArea} sq mtrs`) || "NA"
}
},
{
title: t("BPA_WARD_NUMBER_LABEL"),
value: application?.additionalDetails?.wardnumber || "NA"
},
{
title: t("BPA_KHASRA_NUMBER_LABEL"),
value: application?.additionalDetails?.khasraNumber || "NA"
}
]
},
{
Expand Down Expand Up @@ -153,6 +165,29 @@ const getMohallaLocale = (value = "", tenantId = "") => {

]
},
{
title: t("BPA_ARCHITECT_DETAILS"),
values: [
{
title: t("BPA_ARCHITECT_NAME"),
value: user?.info?.name || "NA"
},
{
title: t("BPA_ARCHITECT_MOBILE_NUMBER"),
value: user?.info?.mobileNumber || "NA"
},
{
title: t("BPA_ARCHITECT_ID"),
value: application?.additionalDetails?.architectid || "NA"
},
{
title: t("BPA_ARCHITECT_EMAIL"),
value: user?.info?.emailId || "NA"
},

]

},
{
title : t("BPA_NEW_TRADE_DETAILS_HEADER_DETAILS"),
values:[
Expand All @@ -178,6 +213,60 @@ const getMohallaLocale = (value = "", tenantId = "") => {
}
]
},
{
title: t("BPA_COLONY_DETAILS"),
values: [
{
title: t("BPA_APPROVED_COLONY"),
value: application?.additionalDetails?.approvedColony || "NA"
},
{
title: t("BPA_MASTER_PLAN"),
value: application?.additionalDetails?.masterPlan || "NA"
},
{
title: t("BPA_DISTRICT"),
value: application?.additionalDetails?.District || "NA"
},
{
title: t("BPA_ULB_NAME"),
value: application?.additionalDetails?.UlbName || "NA"
},
{
title: t("BPA_BUILDING_STATUS"),
value: application?.additionalDetails?.buildingStatus || "NA"
},
{
title: t("BPA_SCHEMES"),
value: application?.additionalDetails?.schemes || "NA"
},
{
title: t("BPA_SCHEMES_TYPE"),
value: application?.additionalDetails?.schemesselection || "NA"
},
{
title: t("BPA_PURCHASED_FAR"),
value: application?.additionalDetails?.purchasedFAR || "NA"
},
{
title: t("BPA_GREEN_BUIDINGS"),
value: application?.additionalDetails?.greenbuilding || "NA"
},
{
title: t("BPA_RESTRICTED_AREA"),
value: application?.additionalDetails?.restrictedArea || "NA"
},
{
title: t("BPA_PROPOSED_SITE_TYPE"),
value: application?.additionalDetails?.proposedSite || "NA"
},
{
title: t("BPA_CORE_AREA"),
value: application?.additionalDetails?.coreArea || "NA"
},
]
},



]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@
},
"dependencies": {
"@upyog/digit-ui-react-components": "1.7.0-beta.4",
"microbundle-crl": "^0.13.11",
"exif-js": "^2.3.0",
"jspdf": "^2.5.1",
"microbundle-crl": "^0.13.11",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-hook-form": "6.15.8",
"react-i18next": "11.16.2",
"react-modal": "^3.16.1",
"react-query": "3.6.1",
"react-router-dom": "5.3.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ import BPAAcknowledgement from "./pages/citizen/NewBuildingPermit/OBPSAcknowledg
import OCBPAAcknowledgement from "./pages/citizen/OCBuildingPermit/OBPSAcknowledgement";
import OCSendBackAcknowledgement from "./pages/citizen/OCSendBackToCitizen/Acknowledgement";
import StakeholderAcknowledgement from "./pages/citizen/StakeholderRegistration/StakeholderAcknowledgement";
import Architectconcent from "./pages/citizen/NewBuildingPermit/Architectconcent";
import CitizenConsent from "./pages/citizen/BpaApplicationDetail/CitizenConsent";



Expand Down Expand Up @@ -165,7 +167,8 @@ const componentsToRegister = {
ObpsEdcrInbox : EdcrInbox,
ObpsEmpApplicationDetail : EmpApplicationDetail,
ObpsEmployeeBpaApplicationDetail : EmployeeBpaApplicationDetail,

Architectconcent,
CitizenConsent


}
Expand Down
Loading

0 comments on commit 1fcc33a

Please sign in to comment.