Skip to content

Commit

Permalink
Merge pull request #1075 from deepa-s-13/Dev-2.0
Browse files Browse the repository at this point in the history
OBPAS changes
  • Loading branch information
sriranjan-s authored Apr 25, 2024
2 parents 6cd675f + 85d1f25 commit da96df4
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 38 deletions.
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 @@ -187,6 +187,33 @@ setWaterCharges(Malbafees/2)
return <Loader />
}

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

return (
<React.Fragment>
Expand Down Expand Up @@ -378,41 +405,41 @@ setWaterCharges(Malbafees/2)
type={"text"}
isMandatory={false}
optionKey="i18nKey"
name="email"
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"
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"
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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,33 @@ const ScruntinyDetails = ({ scrutinyDetails, paymentsList=[],additionalDetails }
else if (data?.value) return data?.value;
else t("NA");
}
function setOtherChargesVal(value) {
if(/^[0-9]*$/.test(value)){
setOtherCharges(value);
sessionStorage.setItem("otherCharges",e.target.value)
}
else{
//alert("Please enter numbers")
}
}
function setDevelopmentVal(value) {
if(/^[0-9]*$/.test(value)){
setDevelopment(value);
sessionStorage.setItem("development",e.target.value)
}
else{
//alert("Please enter numbers")
}
}
function setLessAdjusmentVal(value) {
if(/^[0-9]*$/.test(value)){
setLessAdjusment(value);
sessionStorage.setItem("lessAdjusment",e.target.value)
}
else{
//alert("Please enter numbers")
}
}
return (
<Fragment>
{!scrutinyDetails?.isChecklist && <div style={{ background: "#FAFAFA", border: "1px solid #D6D5D4", padding: "8px", borderRadius: "4px", maxWidth: "950px" }}>
Expand Down Expand Up @@ -60,7 +87,8 @@ const ScruntinyDetails = ({ scrutinyDetails, paymentsList=[],additionalDetails }
defaultValue={additionalDetails?.selfCertificationCharges?.BPA_DEVELOPMENT_CHARGES || ""}
value={development}
disabled={!isEditApplication}
onChange={(e) => {setDevelopment(e.target.value),sessionStorage.setItem("development",e.target.value)}}
onChange={(e) => {setDevelopmentVal(e.target.value)}}
{...{ required: true, pattern: "^[0-9]*$", type: "text" }}
/>
<CardLabel>{t("BPA_COMMON_OTHER_AMT")}</CardLabel>
<TextInput
Expand All @@ -72,10 +100,8 @@ const ScruntinyDetails = ({ scrutinyDetails, paymentsList=[],additionalDetails }
defaultValue={additionalDetails?.selfCertificationCharges?.BPA_OTHER_CHARGES || ""}
value={otherCharges}
disabled={!isEditApplication}
onChange={(e) => {setOtherCharges(e.target.value),sessionStorage.setItem("otherCharges",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") }}
onChange={(e) => {setOtherChargesVal(e.target.value)}}
{...{ required: true, pattern: "^[0-9]*$", type: "text" }}
/>
<CardLabel>{t("BPA_COMMON_LESS_AMT")}</CardLabel>
<TextInput
Expand All @@ -87,7 +113,8 @@ const ScruntinyDetails = ({ scrutinyDetails, paymentsList=[],additionalDetails }
defaultValue={additionalDetails?.selfCertificationCharges?.BPA_LESS_ADJUSMENT_PLOT || ""}
value={lessAdjusment}
disabled={!isEditApplication}
onChange={(e) => {setLessAdjusment(e.target.value),sessionStorage.setItem("lessAdjusment",e.target.value)}}
onChange={(e) => {setLessAdjusmentVal(e.target.value)}}
{...{ required: true, pattern: "^[0-9]*$", type: "text" }}
/>
</div>
}
Expand Down

0 comments on commit da96df4

Please sign in to comment.