diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/pageComponents/DocsRequired.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/pageComponents/DocsRequired.js index 7b182c1179d..a5861fd0f67 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/pageComponents/DocsRequired.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/pageComponents/DocsRequired.js @@ -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)); } diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/pageComponents/OwnerDetails.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/pageComponents/OwnerDetails.js index 71049e2c124..3fbae1eb500 100644 --- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/pageComponents/OwnerDetails.js +++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/pageComponents/OwnerDetails.js @@ -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";