Skip to content

Commit

Permalink
Merge pull request upyog#1039 from abhijniua/Dev-2.0
Browse files Browse the repository at this point in the history
Adding  Lat long feature from image with new additional fields as well
  • Loading branch information
rahul01987 authored Apr 4, 2024
2 parents d8055c4 + 24002ed commit ec3f112
Show file tree
Hide file tree
Showing 13 changed files with 1,114 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ import useServiceTypeFromApplicationType from "./obps/useServiceTypeFromApplicat
import useBusinessServiceBasedOnServiceType from "./obps/useBusinessServiceBasedOnServiceType";
import useBusinessServiceData from "./obps/useBusinessServiceData";
import useBPATaxDocuments from "./obps/useBPATaxDocuments";
import useDistricts from "./obps/useDistricts";
import useULBList from "./obps/useULBList";


import useEventInbox from "./events/useEventInbox";
import useEventDetails from "./events/useEventDetails";
Expand Down Expand Up @@ -447,6 +450,8 @@ const obps = {
useBusinessServiceBasedOnServiceType,
useBusinessServiceData,
useBPATaxDocuments,
useDistricts,
useULBList
};

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 useDistricts = (tenantId, moduleCode, type, config = {}) => {
const usedistricttype = () => {
return useQuery("BPA_DISTRICTS", () => MdmsService.BPADistrict(tenantId, moduleCode ,type), config);
};


switch (type) {
case "Districts":
return usedistricttype();
default:
return null;
}
};



export default useDistricts;
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 useULBList = (tenantId, moduleCode, type, config = {}) => {
const useULBType = () => {
return useQuery("BPA_ULB_TYPE", () => MdmsService.BPAUlb(tenantId, moduleCode ,type), config);
};


switch (type) {
case "Ulb":
return useULBType();
default:
return null;
}
};



export default useULBList;
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,38 @@ const getApplicationChannelCriteria = (tenantId, moduleCode) => ({
],
},
});
const getdistricttype = (tenantId, moduleCode, type) => ({
type,
details: {
tenantId,
moduleDetails: [
{
moduleName: moduleCode,
masterDetails: [
{
name: "Districts",
},
],
},
],
},
});
const getulbtype = (tenantId, moduleCode, type) => ({
type,
details: {
tenantId,
moduleDetails: [
{
moduleName: moduleCode,
masterDetails: [
{
name: "Ulb",
},
],
},
],
},
});

const getPropertyTypeCriteria = (tenantId, moduleCode, type) => ({
type,
Expand Down Expand Up @@ -375,6 +407,45 @@ const PTRBreedType = (MdmsRes) => {
};
///////////

const getdistrict = (MdmsRes) => {
return MdmsRes["BPA"].Districts.filter((Districts) => Districts.active).map((districtDetails) => {
return {
...districtDetails,
i18nKey: `BPA_DISTRICT_${districtDetails.code}`,
};
});
//return MdmsRes;
};

const getulb = (MdmsRes) => {
return MdmsRes["BPA"].Ulb.filter((Ulb) => Ulb.active).map((ulbDetails) => {
return {
...ulbDetails,
i18nKey: `BPA_DISTRICT_${ulbDetails.code}`,
};
});
//return MdmsRes;
};
/////////////

const BPADistrict = (MdmsRes) => {
MdmsRes["BPA"].Districts.filter((Districts) => Districts.active).map((districts) => {
return {
...districts,
i18nKey: `BPA_DISTRICTS_${districts.code}`,
};
});
};
const BPAUlb = (MdmsRes) => {
MdmsRes["BPA"].Ulb.filter((Ulb) => Ulb.active).map((ulblist) => {
return {
...ulblist,
i18nKey: `BPA_ULB_${ulblist.code}`,
};
});
};
/////////////

const getCommonFieldsCriteria = (tenantId, moduleCode, type) => ({
type,
details: {
Expand Down Expand Up @@ -1122,7 +1193,7 @@ const GetPropertyType = (MdmsRes) =>
i18nKey: `PROPERTYTYPE_MASTERS_${item.code}`,
code: item.code,
}));

const GetPropertySubtype = (MdmsRes) =>
MdmsRes["FSM"].PropertyType.filter((property) => property.active && property.propertyType).map((item) => ({
...item,
Expand Down Expand Up @@ -1534,6 +1605,20 @@ const transformResponse = (type, MdmsRes, moduleCode, tenantId) => {

case "PTRBreedType":
return PTRBreedType(MdmsRes);

case "Districts":
return getdistrict(MdmsRes);

case "Ulb":
return getulb(MdmsRes);

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






Expand Down Expand Up @@ -1679,13 +1764,27 @@ export const MdmsService = {
return MdmsService.getDataByCriteria(tenantId, getPetDocumentsRequiredScreenCategory(tenantId, moduleCode), moduleCode);
},

getdistrict: (tenantId, moduleCode, type) => {
return MdmsService.getDataByCriteria(tenantId, getdistricttype(tenantId, moduleCode, type), moduleCode);
},
getulb: (tenantId, moduleCode, type) => {
return MdmsService.getDataByCriteria(tenantId, getulbtype(tenantId, moduleCode, type), moduleCode);
},


getPetType: (tenantId, moduleCode, type) => {
return MdmsService.getDataByCriteria(tenantId, getPetTypeList(tenantId, moduleCode, type), moduleCode);
},

getBreedType: (tenantId, moduleCode, type) => {
return MdmsService.getDataByCriteria(tenantId, getBreedTypeList(tenantId, moduleCode, type), moduleCode);
},
BPADistrict: (tenantId, moduleCode, type) => {
return MdmsService.getDataByCriteria(tenantId, getdistricttype(tenantId, moduleCode, type), moduleCode);
},
BPAUlb: (tenantId, moduleCode, type) => {
return MdmsService.getDataByCriteria(tenantId, getulbtype(tenantId, moduleCode, type), moduleCode);
},
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 @@ -20,6 +20,7 @@
"dependencies": {
"@upyog/digit-ui-react-components": "1.7.0-beta.4",
"microbundle-crl": "^0.13.11",
"exif-js": "^2.3.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-hook-form": "6.15.8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ import BasicDetails from "./pageComponents/BasicDetails";
import DocsRequired from "./pageComponents/DocsRequired";
import PlotDetails from "./pageComponents/PlotDetails";
import ScrutinyDetails from "./pageComponents/ScrutinyDetails";
import BPANewBuildingdetails from "./pageComponents/BPANewBuildingdetails"
import OwnerDetails from "./pageComponents/OwnerDetails";
import DocumentDetails from "./pageComponents/DocumentDetails";
import NOCDetails from "./pageComponents/NOCDetails";
import NOCNumber from "./pageComponents/NOCNumber";
import LocationDetails from "./pageComponents/LocationDetails";
import StakeholderDocsRequired from "./pageComponents/StakeholderDocsRequired";
import GIS from "./pageComponents/GIS";

import OCEDCRDocsRequired from "./pageComponents/OCEDCRDocsRequired";
import OCeDCRScrutiny from "./pageComponents/OCeDCRScrutiny";
import OCUploadPlanDiagram from "./pageComponents/OCUploadPlanDiagram";
Expand Down Expand Up @@ -57,6 +59,12 @@ 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";








const OBPSModule = ({ stateCode, userType, tenants }) => {
Expand Down Expand Up @@ -113,6 +121,7 @@ const componentsToRegister = {
DocsRequired,
PlotDetails,
ScrutinyDetails,
BPANewBuildingdetails,
OwnerDetails,
DocumentDetails,
NOCDetails,
Expand Down Expand Up @@ -155,7 +164,10 @@ const componentsToRegister = {
ObpsOCSendBackToCitizen : OCSendBackToCitizen,
ObpsEdcrInbox : EdcrInbox,
ObpsEmpApplicationDetail : EmpApplicationDetail,
ObpsEmployeeBpaApplicationDetail : EmployeeBpaApplicationDetail
ObpsEmployeeBpaApplicationDetail : EmployeeBpaApplicationDetail,



}

export const initOBPSComponents = () => {
Expand Down
Loading

0 comments on commit ec3f112

Please sign in to comment.