Skip to content

Commit

Permalink
Merge pull request #1055 from Puli-shilpa/Dev-2.0
Browse files Browse the repository at this point in the history
added stakeholder details into BPA payload
  • Loading branch information
sriranjan-s authored Apr 12, 2024
2 parents 0f8f5b3 + c5d385a commit cbfa812
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,19 @@ const DocsRequired = ({ onSelect, onSkip, config }) => {
}

useEffect(() => {
let architectName = "", isDone = true;
let architectName = "", stakeholderRegistrationNumber="", stakeholderName="", stakeholderAddress="",isDone = true;
let isSelfCertificationRequired;
for (let i = 0; i < LicenseData?.Licenses?.length; i++) {
if (LicenseData?.Licenses?.[i]?.status === "APPROVED" && isDone) {
isDone = false;
architectName = LicenseData?.Licenses?.[i]?.tradeLicenseDetail?.tradeUnits?.[0]?.tradeType?.split('.')[0] || "ARCHITECT";
stakeholderRegistrationNumber = LicenseData?.Licenses?.[i]?.applicationNumber ;
stakeholderName=LicenseData?.Licenses?.[i]?.tradeLicenseDetail?.owners[0]?.name;
stakeholderAddress=LicenseData?.Licenses?.[i]?.tradeLicenseDetail?.owners[0]?.permanentAddress;
sessionStorage.setItem("BPA_ARCHITECT_NAME", JSON.stringify(architectName));
sessionStorage.setItem("BPA_STAKEHOLDER_REGISTRATION_NUMBER", JSON.stringify(stakeholderRegistrationNumber));
sessionStorage.setItem("BPA_STAKEHOLDER_NAME", JSON.stringify(stakeholderName));
sessionStorage.setItem("BPA_STAKEHOLDER_ADDRESS", JSON.stringify(stakeholderAddress));
isSelfCertificationRequired=LicenseData?.Licenses?.[i]?.tradeLicenseDetail.additionalDetail.isSelfCertificationRequired;
sessionStorage.setItem("isSelfCertificationRequired", JSON.stringify(isSelfCertificationRequired));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,9 @@ const OwnerDetails = ({ t, config, onSelect, userType, formData }) => {
let nameOfAchitect = sessionStorage.getItem("BPA_ARCHITECT_NAME");
let parsedArchitectName = nameOfAchitect ? JSON.parse(nameOfAchitect) : "ARCHITECT";
payload.additionalDetails.typeOfArchitect = parsedArchitectName;
payload.additionalDetails.stakeholderName=JSON.parse(sessionStorage.getItem("BPA_STAKEHOLDER_NAME"))
payload.additionalDetails.stakeholderRegistrationNumber=JSON.parse(sessionStorage.getItem("BPA_STAKEHOLDER_REGISTRATION_NUMBER"));
payload.additionalDetails.stakeholderAddress=JSON.parse(sessionStorage.getItem("BPA_STAKEHOLDER_ADDRESS"))
let isSelfCertificationRequired=sessionStorage.getItem("isSelfCertificationRequired");
if(isSelfCertificationRequired==="undefined"){
isSelfCertificationRequired="false";
Expand Down

0 comments on commit cbfa812

Please sign in to comment.