Skip to content

Commit

Permalink
Merge branch 'upyog:Dev-2.0' into Dev-2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nehaniua authored May 6, 2024
2 parents 415ecf9 + 5856044 commit d02a723
Show file tree
Hide file tree
Showing 25 changed files with 850 additions and 493 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ export const OBPSService = {
{ title: "BPA_STATUS_LABEL", value: `${fetchBillRes?.Bill?.[0]?.totalAmount == 0 ? "Paid" : "Unpaid"}` }
)
}
totalAmount > 0 && collectionBillArray.push({ title: "BPA_TOT_AMT_PAID", value: `₹${totalAmount}` });
//totalAmount > 0 && collectionBillArray.push({ title: "BPA_TOT_AMT_PAID", value: `₹${totalAmount}` });

const billDetails = {
title: "BPA_FEE_DETAILS_LABEL",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,9 @@ const getMohallaLocale = (value = "", tenantId = "") => {
title: t(`BPA_NOC_DETAILS_SUMMARY`) ,
values: [
{
title: t(`BPA_${application?.nocDocuments?.NocDetails[0]?.nocType}_LABEL`),
value: application?.nocDocuments?.NocDetails[0]?.applicationNo || "NA",
},
{
title: t(`BPA_${application?.nocDocuments?.NocDetails[1]?.nocType}_LABEL`),
value: application?.nocDocuments?.NocDetails[1]?.applicationNo || "NA",

},
title: t(`BPA_NOC_NUMBER`),
value: application?.additionalDetails?.nocNumber || "NA",
}

],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ export const newConfig = [
{
label: "BPA_BOUNDARY_WALL_LENGTH_LABEL_INPUT",
type: "text",
validation: {},
validation: {
pattern:/^[0-9]*$/,
title: "Enter in Numbers[0-9]",
required: true
},
name: "boundaryWallLength"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,12 +263,12 @@ const InspectionReportForm = (_props) => {
{questionList && questionList.map((ob, ind) => (
<div key={ind} className="fieldInsepctionInsideWrapper" style={{ maxWidth: "100%" }}>
<LabelFieldPair style={{width :"100%"}}>
<CardLabel style={{ marginRight: "30px", width :"100%" }} className="card-label-smaller">{`${t(ob.question)}*`}</CardLabel>
<CardLabel style={{ marginRight: "30px", width :"100%" }} className="card-label-smaller">{`${t(ob.question)}`}</CardLabel>
<div className="field" style={{ width: "100%" }}>
<Controller
control={control}
name={`question_${ind}`}
rules={{ required: t("REQUIRED_FIELD") }}
//rules={{ required: t("REQUIRED_FIELD") }}
render={(props) => (
<Dropdown
className="form-field"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ const LocationDetails = ({ t, config, onSelect, userType, formData, ownerIndex =
<div>
<span>
<svg
style={!isMobile ? {position: "relative", left: "515px", bottom: "35px", marginTop: "-20px"} : { float: "right", position: "relative", bottom: "35px", marginTop: "-20px", marginRight: "5px" }} width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
style={!isMobile ? {position: "relative", left: "515px", bottom: "25px", marginTop: "-20px"} : { float: "right", position: "relative", bottom: "25px", marginTop: "-20px", marginRight: "5px" }} width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11 7C8.79 7 7 8.79 7 11C7 13.21 8.79 15 11 15C13.21 15 15 13.21 15 11C15 8.79 13.21 7 11 7ZM19.94 10C19.48 5.83 16.17 2.52 12 2.06V0H10V2.06C5.83 2.52 2.52 5.83 2.06 10H0V12H2.06C2.52 16.17 5.83 19.48 10 19.94V22H12V19.94C16.17 19.48 19.48 16.17 19.94 12H22V10H19.94ZM11 18C7.13 18 4 14.87 4 11C4 7.13 7.13 4 11 4C14.87 4 18 7.13 18 11C18 14.87 14.87 18 11 18Z" fill="#505A5F" />
</svg>
</span>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
import React, { useState,useEffect } from "react";
import { FormStep} from "@upyog/digit-ui-react-components";
import { FormStep,SearchIcon,TextInput } from "@upyog/digit-ui-react-components";
import Timeline from "../components/Timeline";

const NOCNumber = ({ t, config, onSelect, userType, formData, setError: setFormError, clearErrors: clearFormErrors, formState }) => {
const [nocNumber,setValueNoc]=useState(formData?.additionalDetails?.nocNumber || formData?.nocnumber?.nocNumber ||"");
const tenantId = Digit.ULBService.getCurrentTenantId();

useEffect(()=>{
if(formData?.additionalDetails?.nocNumber || formData?.nocnumber?.nocNumber){
setValueNoc(formData?.additionalDetails?.nocNumber || formData?.nocnumber?.nocNumber);
}
},[formData]);
let Webview = !Digit.Utils.browser.isMobile();

function onChange(data) {
setValueNoc(data.target.value);
setValueNoc(data.target.value);
}

function onClick(){
function onClick(e){
console.log("inside_search")
}

Expand All @@ -32,19 +27,22 @@ const NOCNumber = ({ t, config, onSelect, userType, formData, setError: setFormE
config={config}
onSelect={handleSubmit}
isDisabled={ !nocNumber }

>

<input
class="card-input"
type="text"
value={nocNumber}
onChange={onChange}
style={{marginBottom:'10px'}}
defaultValues={formData?.nocnumber?.nocNumber || formData?.additionalDetails?.nocNumber}
/>
<button onClick={onClick} style={{alignSelf:'flex-start',backgroundColor:'marron'}}></button>
<span onClick={onClick} style={{alignSelf:'flex-start', marginBottom:'5px', backgroundColor:'maroon', border:'1px solid marron',color:'white',padding:'5px 10px',borderRadius:'3px',cursor:'pointer'}}>SEARCH NOC</span>
>
<div className="field-container">
<TextInput
//style={{ background: "#FAFAFA", marginLeft:"25px"}}
class="card-input"
type={"text"}
t={t}
isMandatory={false}
optionKey="i18nKey"
name="nocNumber"
value={nocNumber}
onChange={(e) => onChange( e)}
defaultValue={formData?.nocnumber?.nocNumber || formData?.additionalDetails?.nocNumber}
/>
<div style={{ position: "relative", zIndex: "100", right: "20px", marginTop: "-24px", marginRight:Webview?"-20px":"-20px" }} onClick={(e) => onClick( e)}> <SearchIcon /> </div>
</div>
</FormStep>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ function SelectDocument({
<LabelFieldPair style={{width :"100%"}}>
<CardLabel className="card-label-smaller" style={{width :"100%"}}>
{doc?.documentType != "OLDLICENCENO" ?
`${t(`${doc?.documentType.replaceAll(".", "_")}`)}*` :
`${t(`${doc?.documentType.replaceAll(".", "_")}`)}` :
`${t(`${doc?.documentType.replaceAll(".", "_")}`)}`}
</CardLabel>
<div className="field" style={{ width: "100%" }}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,7 @@ const PlotDetails = ({ formData, onSelect, config }) => {
const tenantId = Digit.ULBService.getCurrentTenantId();
const checkingFlow = formData?.uiFlow?.flow;
const state = Digit.ULBService.getStateId();
let [isNextDisabled,setIsNextDisabled] =useState(false);
useEffect(() => {
if(checkingFlow==="BPA"){
setIsNextDisabled(true);
}
if(formData?.additionalDetails?.boundaryWallLength || formData?.data?.boundaryWallLength){
setIsNextDisabled(false);
}
if(isEditApplication){
const newConfig={
...config,
Expand All @@ -59,18 +52,10 @@ const PlotDetails = ({ formData, onSelect, config }) => {
return <Loader />;
}

function onChange(data){
if(data.target.name=="boundaryWallLength" && isNaN(parseInt(data.target.value))==false) {
setIsNextDisabled(false);
}
else if(data.target.name=="boundaryWallLength" && isNaN(parseInt(data.target.value))==true){
setIsNextDisabled(true);
}
}
return (
<div>
<Timeline flow= {checkingFlow === "OCBPA" ? "OCBPA" : ""}/>
<FormStep config={editConfig} onSelect={handleSubmit} childrenAtTheBottom={false} t={t} _defaultValues={formData?.data} onSkip={onSkip} onChange={onChange} isDisabled={isNextDisabled}>
<FormStep config={editConfig} onSelect={handleSubmit} childrenAtTheBottom={false} t={t} _defaultValues={formData?.data} onSkip={onSkip} >
<StatusTable>
<Row className="border-none" label={t(`BPA_BOUNDARY_PLOT_AREA_LABEL`)} text={data?.planDetail?.planInformation?.plotArea ? `${data?.planDetail?.planInformation?.plotArea} ${t(`BPA_SQ_MTRS_LABEL`)}` : "NA"} />
<Row className="border-none" label={t(`BPA_PLOT_NUMBER_LABEL`)} text={data?.planDetail?.planInformation?.plotNo} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ const BpaApplicationDetail = () => {
case "SEND_TO_ARCHITECT":
case "APPLY":
case "SKIP_PAYMENT":
case "POST_PAYMENT_APPROVE":
case "POST_PAYMENT_APPLY":
setShowModal(true);
}
}, [selectedAction]);
Expand Down Expand Up @@ -509,7 +511,12 @@ const BpaApplicationDetail = () => {

{/* to get Fee values */}
{detail?.additionalDetails?.inspectionReport && detail?.isFeeDetails && <ScruntinyDetails scrutinyDetails={detail?.additionalDetails} paymentsList={[]}/>}

{/*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") &&
<div style={ { marginTop: "19px", background: "#FAFAFA", border: "1px solid #D6D5D4", borderRadius: "4px", padding: "8px", lineHeight: "19px", maxWidth: "950px", minWidth: "280px"} }>
<Row className="border-none" label={t(`BLOCKING_REASON`)} labelStyle={{fontSize: "15px"}} text={data?.applicationData.additionalDetails.blockingReason || "NA"}> </Row>
</div>
}
</StatusTable>
</div>
</Card> : null }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,43 @@ setWaterCharges(Malbafees/2)
return <Loader />
}

function onSubmitCheck(){
if(development && otherCharges && lessAdjusment){
if(parseInt(lessAdjusment)>(parseInt(development)+parseInt(otherCharges)+parseInt(malbafees)+parseInt(labourCess)+parseInt(waterCharges)+parseInt(gaushalaFees))){
alert("Enterd Less Adjustment amount is invalid");
}
else{
onSubmit();
}
}}

function setOtherChargesVal(value) {
if(/^[0-9]*$/.test(value)){
setOtherCharges(value);
sessionStorage.setItem("otherCharges",value)
}
else{
//alert("Please enter numbers")
}
}
function setDevelopmentVal(value) {
if(/^[0-9]*$/.test(value)){
setDevelopment(value);
sessionStorage.setItem("development",value)
}
else{
//alert("Please enter numbers")
}
}
function setLessAdjusmentVal(value) {
if(/^[0-9]*$/.test(value)){
setLessAdjusment(value);
sessionStorage.setItem("lessAdjusment",value)
}
else{
//alert("Please enter numbers")
}
}

return (
<React.Fragment>
Expand Down Expand Up @@ -378,48 +415,48 @@ setWaterCharges(Malbafees/2)
type={"text"}
isMandatory={false}
optionKey="i18nKey"
name="email"
defaultValue={value?.additionalDetails?.selfCertificationCharges?.BPA_DEVELOPMENT_CHARGES || ""}
name="development"
defaultValue={value?.additionalDetails?.selfCertificationCharges?.BPA_DEVELOPMENT_CHARGES }
value={development}
onChange={(e) => {setDevelopment(e.target.value),sessionStorage.setItem("development",e.target.value)}}
onChange={(e) => {setDevelopmentVal(e.target.value)}}
//disable={userInfo?.info?.emailId && !isOpenLinkFlow ? true : false}
//disable={editScreen}
//{...{ required: true, pattern: "[A-Za-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$", type: "email", title: t("CORE_COMMON_APPLICANT_MOBILE_NUMBER_INVALID") }}
{...{ required: true, pattern: "^[0-9]*$" }}
/>
<CardLabel>{t("BPA_COMMON_OTHER_AMT")}</CardLabel>
<TextInput
t={t}
type={"text"}
isMandatory={false}
optionKey="i18nKey"
name="email"
defaultValue={value?.additionalDetails?.selfCertificationCharges?.BPA_OTHER_CHARGES || ""}
name="otherCharges"
defaultValue={value?.additionalDetails?.selfCertificationCharges?.BPA_OTHER_CHARGES }
value={otherCharges}
onChange={(e) => {setOtherCharges(e.target.value),sessionStorage.setItem("otherCharges",e.target.value)}}
onChange={(e) => {setOtherChargesVal(e.target.value)}}
//disable={userInfo?.info?.emailId && !isOpenLinkFlow ? true : false}
//disable={editScreen}
//{...{ required: true, pattern: "[A-Za-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$", type: "email", title: t("CORE_COMMON_APPLICANT_MOBILE_NUMBER_INVALID") }}
{...{ required: true, pattern: /^[0-9]*$/ }}
/>
<CardLabel>{t("BPA_COMMON_LESS_AMT")}</CardLabel>
<TextInput
t={t}
type={"text"}
isMandatory={false}
optionKey="i18nKey"
name="email"
defaultValue={value?.additionalDetails?.selfCertificationCharges?.BPA_LESS_ADJUSMENT_PLOT || ""}
name="lessAdjusment"
defaultValue={value?.additionalDetails?.selfCertificationCharges?.BPA_LESS_ADJUSMENT_PLOT }
value={lessAdjusment}
onChange={(e) => {setLessAdjusment(e.target.value),sessionStorage.setItem("lessAdjusment",e.target.value)}}
onChange={(e) => {setLessAdjusmentVal(e.target.value)}}
//disable={userInfo?.info?.emailId && !isOpenLinkFlow ? true : false}
//disable={editScreen}
//{...{ required: true, pattern: "[A-Za-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$", type: "email", title: t("CORE_COMMON_APPLICANT_MOBILE_NUMBER_INVALID") }}
{...{ required: true, pattern: "^[0-9]*$" }}
/>

</StatusTable>
<hr style={{color:"#cccccc",backgroundColor:"#cccccc",height:"2px",marginTop:"20px",marginBottom:"20px"}}/>
{/* <CardHeader>{t("BPA_COMMON_TOTAL_AMT")}</CardHeader>
<CardHeader>₹ {paymentDetails?.Bill?.[0]?.billDetails[0]?.amount || "0"}</CardHeader> */}
<SubmitBar label={t("BPA_SEND_TO_CITIZEN_LABEL")} onSubmit={onSubmit} disabled={(!isEditApplication) && (!development||!otherCharges||!lessAdjusment)} id/>
<SubmitBar label={t("BPA_SEND_TO_CITIZEN_LABEL")} onSubmit={onSubmitCheck} disabled={ (!development||!otherCharges||!lessAdjusment)} id/>
</Card>
</React.Fragment>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ export const newConfig1=[
{
"label": "BPA_BOUNDARY_WALL_LENGTH_LABEL_INPUT",
"type": "text",
"validation": {},
"validation": {
"pattern":"^[0-9]*$",
"title": "Enter in Numbers[0-9]",
"required": true
},
"name": "boundaryWallLength"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@ const EmployeeApp = ({ path }) => {
<Switch>
<PrivateRoute path={`${path}/stakeholder-inbox/stakeholder/:id`} component={ApplicationDetail} />
<PrivateRoute path={`${path}/search/application/stakeholder/:id`} component={ApplicationDetail} />
<PrivateRoute path={`${path}/search/application/editApplication/bpa/:id`} component={BpaApplicationDetail} />
<PrivateRoute path={`${path}/search/application/bpa/:id`} component={BpaApplicationDetail} />
<PrivateRoute path={`${path}/search/application`} component={(props) => <Search {...props} parentRoute={path} />} />
<PrivateRoute path={`${path}/inbox/editApplication/bpa/:id`} component={BpaApplicationDetail} />
<PrivateRoute path={`${path}/inbox/bpa/:id`} component={BpaApplicationDetail} />
<PrivateRoute path={`${path}/inbox`} component={(props) => <Inbox {...props} parentRoute={path} />} />
<PrivateRoute path={`${path}/stakeholder-inbox`} component={(props) => <StakeholderInbox {...props} parentRoute={path} />} />
Expand Down
Loading

0 comments on commit d02a723

Please sign in to comment.