Skip to content

Commit

Permalink
Merge pull request #1049 from deepa-s-13/Dev-2.0
Browse files Browse the repository at this point in the history
OBPAS built up area, WS road type, PT assess property  changes
  • Loading branch information
sriranjan-s committed Apr 9, 2024
2 parents 234fbf9 + 7104190 commit 98b7399
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ export const OBPSService = {
asSectionHeader: true,
isCommon: true,
values: [
{ title: "BPA_BOUNDARY_PLOT_AREA_LABEL", value: `${edcr?.planDetail?.planInformation?.plotArea}`, isNotTranslated: true, isUnit: "BPA_SQ_FT_LABEL" },
{ title: "BPA_BOUNDARY_PLOT_AREA_LABEL", value: `${edcr?.planDetail?.planInformation?.plotArea}`, isNotTranslated: true, isUnit: "BPA_SQ_YARDS_LABEL" },
{ title: "BPA_PLOT_NUMBER_LABEL", value: edcr?.planDetail?.planInformation?.plotNo || "NA", isNotTranslated: true },
{ title: "BPA_KHATHA_NUMBER_LABEL", value: edcr?.planDetail?.planInformation?.khataNo || "NA", isNotTranslated: true },
{ title: "BPA_HOLDING_NUMBER_LABEL", value: BPA?.additionalDetails?.holdingNo || "NA", isNotTranslated: true },
Expand Down Expand Up @@ -564,7 +564,7 @@ export const OBPSService = {
additionalDetails: {
values: [
{ title: BPA?.businessService !== "BPA_OC" ? "BPA_BUILDING_EXTRACT_HEADER" : "BPA_ACTUAL_BUILDING_EXTRACT_HEADER", value : " ", isHeader: true},
{ title: "BPA_TOTAL_BUILT_UP_AREA_HEADER", value: edcr?.planDetail?.blocks?.[0]?.building?.totalBuitUpArea, isUnit: "BPA_SQ_MTRS_LABEL"},
{ title: "BPA_TOTAL_BUILT_UP_AREA_HEADER", value: edcr?.planDetail?.blocks?.[0]?.building?.totalBuitUpArea, isUnit: "BPA_SQ_YARDS_LABEL"},
{ title: "BPA_SCRUTINY_DETAILS_NUMBER_OF_FLOORS_LABEL", value: edcr?.planDetail?.blocks?.[0]?.building?.totalFloors || "NA" },
{ title: "BPA_HEIGHT_FROM_GROUND_LEVEL", value: edcr?.planDetail?.blocks?.[0]?.building?.declaredBuildingHeigh , isUnit: "BPA_MTRS_LABEL" }
],
Expand All @@ -579,7 +579,7 @@ export const OBPSService = {
additionalDetails: {
values: [
{ title: "BPA_APP_DETAILS_DEMOLITION_DETAILS_LABEL", value : " ", isHeader: true},
{ title: "BPA_APPLICATION_DEMOLITION_AREA_LABEL", value: edcr?.planDetail?.planInformation?.demolitionArea, isUnit: "BPA_SQ_MTRS_LABEL" }
{ title: "BPA_APPLICATION_DEMOLITION_AREA_LABEL", value: edcr?.planDetail?.planInformation?.demolitionArea, isUnit: "BPA_SQ_YARDS_LABEL" }
],
scruntinyDetails: []
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const getMohallaLocale = (value = "", tenantId = "") => {
values: [
{
title: t("BPA_BOUNDARY_PLOT_AREA_LABEL"),
value: `${application?.data?.edcrDetails?.planDetail?.planInformation?.plotArea} sq.ft` || "NA"
value: `${application?.data?.edcrDetails?.planDetail?.planInformation?.plotArea} sq yd` || "NA"
},
{
title: t("BPA_PLOT_NUMBER_LABEL"),
Expand All @@ -113,7 +113,7 @@ const getMohallaLocale = (value = "", tenantId = "") => {
},
{
title: t("BPA_APPLICATION_DEMOLITION_AREA_LABEL"),
value: t(`${application?.data?.edcrDetails?.planDetail?.planInformation?.demolitionArea} sq.mtrs`) || "NA"
value: t(`${application?.data?.edcrDetails?.planDetail?.planInformation?.demolitionArea} sq yd`) || "NA"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const newConfig = [
name: "registrationDetails"
},
{
label: "BPA_BOUNDARY_WALL_LENGTH_LABEL",
label: "BPA_BOUNDARY_WALL_LENGTH_LABEL_INPUT",
type: "text",
validation: {},
name: "boundaryWallLength"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function onChange(data){
<Timeline flow= {checkingFlow === "OCBPA" ? "OCBPA" : ""}/>
<FormStep config={config} onSelect={handleSubmit} childrenAtTheBottom={false} t={t} _defaultValues={formData?.data} onSkip={onSkip} onChange={onChange} isDisabled={isNextDisabled}>
<StatusTable>
<Row className="border-none" label={t(`BPA_BOUNDARY_PLOT_AREA_LABEL`)} text={data?.planDetail?.planInformation?.plotArea ? `${data?.planDetail?.planInformation?.plotArea} ${t(`BPA_SQ_FT_LABEL`)}` : "NA"} />
<Row className="border-none" label={t(`BPA_BOUNDARY_PLOT_AREA_LABEL`)} text={data?.planDetail?.planInformation?.plotArea ? `${data?.planDetail?.planInformation?.plotArea} ${t(`BPA_SQ_YARDS_LABEL`)}` : "NA"} />
<Row className="border-none" label={t(`BPA_PLOT_NUMBER_LABEL`)} text={data?.planDetail?.planInformation?.plotNo} />
<Row className="border-none" label={t(`BPA_KHATHA_NUMBER_LABEL`)} text={data?.planDetail?.planInformation?.khataNo}/>
</StatusTable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ const ScrutinyDetails = ({ onSelect, userType, formData, config }) => {
label={t("BPA_TOTAL_BUILT_UP_AREA_HEADER")}
text={
data?.planDetail?.blocks?.[0]?.building?.totalBuitUpArea
? `${data?.planDetail?.blocks?.[0]?.building?.totalBuitUpArea} ${t("BPA_SQ_MTRS_LABEL")}`
? `${data?.planDetail?.blocks?.[0]?.building?.totalBuitUpArea} ${t("BPA_SQ_YARDS_LABEL")}`
: t("NA")
}
></Row>
Expand Down Expand Up @@ -351,7 +351,7 @@ const ScrutinyDetails = ({ onSelect, userType, formData, config }) => {
label={t("BPA_APPLICATION_DEMOLITION_AREA_LABEL")}
text={
data?.planDetail?.planInformation?.demolitionArea
? `${data?.planDetail?.planInformation?.demolitionArea} ${t("BPA_SQ_MTRS_LABEL")}`
? `${data?.planDetail?.planInformation?.demolitionArea} ${t("BPA_SQ_YARDS_LABEL")}`
: t("CS_NA")
}
></Row>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ console.log("mdmsData",mdmsData,mdmsData?.MalbaCharges?.BPA[1].rate,plotArea)
style={{ width: "100px", display:"inline" }}
onClick={() => routeTo(`${routeLink}/plot-details`)}
/>
<Row className="border-none" textStyle={{paddingLeft:"12px"}} label={t(`BPA_BOUNDARY_PLOT_AREA_LABEL`)} text={datafromAPI?.planDetail?.planInformation?.plotArea ? `${datafromAPI?.planDetail?.planInformation?.plotArea} ${t(`BPA_SQ_FT_LABEL`)}` : t("CS_NA")} />
<Row className="border-none" textStyle={{paddingLeft:"12px"}} label={t(`BPA_BOUNDARY_PLOT_AREA_LABEL`)} text={datafromAPI?.planDetail?.planInformation?.plotArea ? `${datafromAPI?.planDetail?.planInformation?.plotArea} ${t(`BPA_SQ_YARDS_LABEL`)}` : t("CS_NA")} />
<Row className="border-none" label={t(`BPA_PLOT_NUMBER_LABEL`)} text={datafromAPI?.planDetail?.planInformation?.plotNo || t("CS_NA")} />
<Row className="border-none" label={t(`BPA_KHATHA_NUMBER_LABEL`)} text={datafromAPI?.planDetail?.planInformation?.khataNo || t("CS_NA")}/>
<Row className="border-none" label={t(`BPA_HOLDING_NUMBER_LABEL`)} text={data?.holdingNumber || t("CS_NA")} />
Expand Down Expand Up @@ -238,7 +238,7 @@ console.log("mdmsData",mdmsData,mdmsData?.MalbaCharges?.BPA[1].rate,plotArea)
<hr style={{color:"#cccccc",backgroundColor:"#cccccc",height:"2px",marginTop:"20px",marginBottom:"20px"}}/>
<CardSubHeader style={{fontSize: "20px"}}>{t("BPA_BUILDING_EXTRACT_HEADER")}</CardSubHeader>
<StatusTable>
<Row className="border-none" label={t("BPA_TOTAL_BUILT_UP_AREA_HEADER")} text={`${datafromAPI?.planDetail?.blocks?.[0]?.building?.totalBuitUpArea} ${t("BPA_SQ_MTRS_LABEL")}`}></Row>
<Row className="border-none" label={t("BPA_TOTAL_BUILT_UP_AREA_HEADER")} text={`${datafromAPI?.planDetail?.blocks?.[0]?.building?.totalBuitUpArea} ${t("BPA_SQ_YARDS_LABEL")}`}></Row>
<Row className="border-none" label={t("BPA_SCRUTINY_DETAILS_NUMBER_OF_FLOORS_LABEL")} text={datafromAPI?.planDetail?.blocks?.[0]?.building?.totalFloors}></Row>
<Row className="border-none" label={t("BPA_HEIGHT_FROM_GROUND_LEVEL_FROM_MUMTY")} text={`${datafromAPI?.planDetail?.blocks?.[0]?.building?.declaredBuildingHeight} ${t("BPA_MTRS_LABEL")}`}></Row>
</StatusTable>
Expand Down Expand Up @@ -272,7 +272,7 @@ console.log("mdmsData",mdmsData,mdmsData?.MalbaCharges?.BPA[1].rate,plotArea)
<hr style={{color:"#cccccc",backgroundColor:"#cccccc",height:"2px",marginTop:"20px",marginBottom:"20px"}}/>
<CardSubHeader style={{fontSize: "20px"}}>{t("BPA_APP_DETAILS_DEMOLITION_DETAILS_LABEL")}</CardSubHeader>
<StatusTable style={{border:"none"}}>
<Row className="border-none" label={t("BPA_APPLICATION_DEMOLITION_AREA_LABEL")} text={datafromAPI?.planDetail?.planInformation?.demolitionArea ? `${datafromAPI?.planDetail?.planInformation?.demolitionArea} ${t("BPA_SQ_MTRS_LABEL")}` : t("CS_NA")}></Row>
<Row className="border-none" label={t("BPA_APPLICATION_DEMOLITION_AREA_LABEL")} text={datafromAPI?.planDetail?.planInformation?.demolitionArea ? `${datafromAPI?.planDetail?.planInformation?.demolitionArea} ${t("BPA_SQ_YARDS_LABEL")}` : t("CS_NA")}></Row>
</StatusTable>
</Card>
<Card style={{paddingRight:"16px"}}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const newConfig1=[
"name": "registrationDetails"
},
{
"label": "BPA_BOUNDARY_WALL_LENGTH_LABEL",
"label": "BPA_BOUNDARY_WALL_LENGTH_LABEL_INPUT",
"type": "text",
"validation": {},
"name": "boundaryWallLength"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ const CheckPage = ({ onSubmit, value }) => {
style={{ width: "100px", display: "inline" }}
onClick={() => routeTo(`${routeLink}/plot-details`)}
/>
<Row className="border-none" label={`${t(`BPA_BOUNDARY_PLOT_AREA_LABEL`)}`} text={datafromAPI?.planDetail?.planInformation?.plotArea ? `${datafromAPI?.planDetail?.planInformation?.plotArea} ${t(`BPA_SQ_FT_LABEL`)}` : t("CS_NA")} textStyle={{paddingLeft:"12px"}}/>
<Row className="border-none" label={`${t(`BPA_BOUNDARY_PLOT_AREA_LABEL`)}`} text={datafromAPI?.planDetail?.planInformation?.plotArea ? `${datafromAPI?.planDetail?.planInformation?.plotArea} ${t(`BPA_SQ_YARDS_LABEL`)}` : t("CS_NA")} textStyle={{paddingLeft:"12px"}}/>
<Row className="border-none" label={`${t(`BPA_PLOT_NUMBER_LABEL`)}`} text={datafromAPI?.planDetail?.planInformation?.plotNo || t("CS_NA")} />
<Row className="border-none" label={`${t(`BPA_KHATHA_NUMBER_LABEL`)}`} text={datafromAPI?.planDetail?.planInformation?.khataNo || t("CS_NA")} />
<Row className="border-none" label={`${t(`BPA_HOLDING_NUMBER_LABEL`)}`} text={data?.holdingNumber || t("CS_NA")} />
Expand Down Expand Up @@ -229,7 +229,7 @@ const CheckPage = ({ onSubmit, value }) => {
<hr style={{ color: "#cccccc", backgroundColor: "#cccccc", height: "2px", marginTop: "20px", marginBottom: "20px" }} />
<CardSubHeader>{`${t("BPA_ACTUAL_BUILDING_EXTRACT_HEADER")}`}</CardSubHeader>
<StatusTable>
<Row className="border-none" label={`${t("BPA_TOTAL_BUILT_UP_AREA_HEADER")}`} text={datafromAPI?.planDetail?.blocks?.[0]?.building?.totalBuitUpArea ? `${datafromAPI?.planDetail?.blocks?.[0]?.building?.totalBuitUpArea} ${t("BPA_SQ_MTRS_LABEL")}` : t("NA")}></Row>
<Row className="border-none" label={`${t("BPA_TOTAL_BUILT_UP_AREA_HEADER")}`} text={datafromAPI?.planDetail?.blocks?.[0]?.building?.totalBuitUpArea ? `${datafromAPI?.planDetail?.blocks?.[0]?.building?.totalBuitUpArea} ${t("BPA_SQ_YARDS_LABEL")}` : t("NA")}></Row>
<Row className="border-none" label={`${t("BPA_SCRUTINY_DETAILS_NUMBER_OF_FLOORS_LABEL")}`} text={datafromAPI?.planDetail?.blocks?.[0]?.building?.totalFloors}></Row>
<Row className="border-none" label={`${t("BPA_HEIGHT_FROM_GROUND_LEVEL_FROM_MUMTY")}`} text={`${datafromAPI?.planDetail?.blocks?.[0]?.building?.declaredBuildingHeight} ${t("BPA_MTRS_LABEL")}`}></Row>
</StatusTable>
Expand Down Expand Up @@ -263,7 +263,7 @@ const CheckPage = ({ onSubmit, value }) => {
<hr style={{ color: "#cccccc", backgroundColor: "#cccccc", height: "2px", marginTop: "20px", marginBottom: "20px" }} />
<CardSubHeader>{`${t("BPA_APP_DETAILS_DEMOLITION_DETAILS_LABEL")}`}</CardSubHeader>
<StatusTable style={{ border: "none" }}>
<Row className="border-none" label={`${t("BPA_APPLICATION_DEMOLITION_AREA_LABEL")}`} text={datafromAPI?.planDetail?.planInformation?.demolitionArea ? `${datafromAPI?.planDetail?.planInformation?.demolitionArea} ${t("BPA_SQ_MTRS_LABEL")}` : t("CS_NA")}></Row>
<Row className="border-none" label={`${t("BPA_APPLICATION_DEMOLITION_AREA_LABEL")}`} text={datafromAPI?.planDetail?.planInformation?.demolitionArea ? `${datafromAPI?.planDetail?.planInformation?.demolitionArea} ${t("BPA_SQ_YARDS_LABEL")}` : t("CS_NA")}></Row>
</StatusTable>
</Card>
<Card style={{paddingRight:"16px"}}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ const CheckPage = ({ onSubmit, value }) => {
<Card style={{paddingRight:"16px"}}>
<CardHeader>{t("BPA_PLOT_DETAILS_TITLE")}</CardHeader>
<StatusTable>
<Row className="border-none" label={t(`BPA_BOUNDARY_PLOT_AREA_LABEL`)} text={datafromAPI?.planDetail?.planInformation?.plotArea ? `${datafromAPI?.planDetail?.planInformation?.plotArea} ${t(`BPA_SQ_FT_LABEL`)}` : t("CS_NA")} />
<Row className="border-none" label={t(`BPA_BOUNDARY_PLOT_AREA_LABEL`)} text={datafromAPI?.planDetail?.planInformation?.plotArea ? `${datafromAPI?.planDetail?.planInformation?.plotArea} ${t(`BPA_SQ_YARDS_LABEL`)}` : t("CS_NA")} />
<Row className="border-none" label={t(`BPA_PLOT_NUMBER_LABEL`)} text={datafromAPI?.planDetail?.planInformation?.plotNo || t("CS_NA")} />
<Row className="border-none" label={t(`BPA_KHATHA_NUMBER_LABEL`)} text={datafromAPI?.planDetail?.planInformation?.khataNo || t("CS_NA")} />
<Row className="border-none" label={t(`BPA_HOLDING_NUMBER_LABEL`)} text={data?.holdingNumber || t("CS_NA")} />
Expand Down Expand Up @@ -262,7 +262,7 @@ const CheckPage = ({ onSubmit, value }) => {
<hr style={{ color: "#cccccc", backgroundColor: "#cccccc", height: "2px", marginTop: "20px", marginBottom: "20px" }} />
<CardSubHeader>{value?.uiFlow?.flow === "OCBPA" ? t("BPA_ACTUAL_BUILDING_EXTRACT_HEADER") : t("BPA_BUILDING_EXTRACT_HEADER")}</CardSubHeader>
<StatusTable>
<Row className="border-none" label={t("BPA_TOTAL_BUILT_UP_AREA_HEADER")} text={datafromAPI?.planDetail?.blocks?.[0]?.building?.totalBuitUpArea ? `${datafromAPI?.planDetail?.blocks?.[0]?.building?.totalBuitUpArea} ${t("BPA_SQ_MTRS_LABEL")}` : t("NA")}></Row>
<Row className="border-none" label={t("BPA_TOTAL_BUILT_UP_AREA_HEADER")} text={datafromAPI?.planDetail?.blocks?.[0]?.building?.totalBuitUpArea ? `${datafromAPI?.planDetail?.blocks?.[0]?.building?.totalBuitUpArea} ${t("BPA_SQ_YARDS_LABEL")}` : t("NA")}></Row>
<Row className="border-none" label={t("BPA_SCRUTINY_DETAILS_NUMBER_OF_FLOORS_LABEL")} text={datafromAPI?.planDetail?.blocks?.[0]?.building?.totalFloors}></Row>
<Row className="border-none" label={t("BPA_HEIGHT_FROM_GROUND_LEVEL_FROM_MUMTY")} text={`${datafromAPI?.planDetail?.blocks?.[0]?.building?.declaredBuildingHeight} ${t("BPA_MTRS_LABEL")}`}></Row>
</StatusTable>
Expand Down Expand Up @@ -296,7 +296,7 @@ const CheckPage = ({ onSubmit, value }) => {
<hr style={{ color: "#cccccc", backgroundColor: "#cccccc", height: "2px", marginTop: "20px", marginBottom: "20px" }} />
<CardSubHeader>{t("BPA_APP_DETAILS_DEMOLITION_DETAILS_LABEL")}</CardSubHeader>
<StatusTable style={{ border: "none" }}>
<Row className="border-none" label={t("BPA_APPLICATION_DEMOLITION_AREA_LABEL")} text={datafromAPI?.planDetail?.planInformation?.demolitionArea ? `${datafromAPI?.planDetail?.planInformation?.demolitionArea} ${t("BPA_SQ_MTRS_LABEL")} ` : t("CS_NA")}></Row>
<Row className="border-none" label={t("BPA_APPLICATION_DEMOLITION_AREA_LABEL")} text={datafromAPI?.planDetail?.planInformation?.demolitionArea ? `${datafromAPI?.planDetail?.planInformation?.demolitionArea} ${t("BPA_SQ_YARDS_LABEL")} ` : t("CS_NA")}></Row>
</StatusTable>
</Card>
{value?.uiFlow?.flow !== "OCBPA" ? <div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ const AssessmentDetails = () => {
ptCalculationEstimateMutate({ Assessment: AssessmentData });
}, []);
useEffect(()=>{
setPenalty(parseInt(ptCalculationEstimateData?.Calculation[0].taxHeadEstimates[6].estimateAmount))
setRebate(parseInt(ptCalculationEstimateData?.Calculation[0].taxHeadEstimates[5].estimateAmount))
setPenalty(parseInt(ptCalculationEstimateData?.Calculation[0]?.taxHeadEstimates[6]?.estimateAmount ))
setRebate(parseInt(ptCalculationEstimateData?.Calculation[0]?.taxHeadEstimates[5]?.estimateAmount))
},[ptCalculationEstimateLoading])
useEffect(() => {
if (applicationDetails) setAppDetailsToShow(_.cloneDeep(applicationDetails));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CardLabel, Dropdown, LabelFieldPair, LinkButton, TextInput, CardLabelError, DeleteIcon } from "@upyog/digit-ui-react-components";
import _ from "lodash";
import _, { filter } from "lodash";
import React, { useState, useEffect, useMemo } from "react";
import { useForm, Controller } from "react-hook-form";
import { stringReplaceAll } from "../utils";
Expand Down Expand Up @@ -95,9 +95,10 @@ const RoadCuttForm = (_props) => {

const roadCuttingTypeMenu = useMemo(() => {
const RoadTypes = mdmsData?.["sw-services-calculation"]?.RoadType || [];
RoadTypes?.forEach(data => data.i18nKey = `WS_ROADTYPE_${stringReplaceAll(data?.code?.toUpperCase(), " ", "_")}`);
return RoadTypes;
}, [mdmsData]);
const filteredRoadTypes = RoadTypes.filter(data => data?.isActive === true); // Filter out road types with isActive: true
filteredRoadTypes.forEach(data => data.i18nKey = `WS_ROADTYPE_${stringReplaceAll(data?.code?.toUpperCase(), " ", "_")}`);
return filteredRoadTypes;
}, [mdmsData]);

useEffect(() => {
trigger();
Expand Down

0 comments on commit 98b7399

Please sign in to comment.