From aae53923dd24b6c05a4754ac47a38e5484ea88a7 Mon Sep 17 00:00:00 2001
From: Shivankshuklaa <shuklashivank28@gmail.com>
Date: Tue, 4 Jun 2024 16:35:55 +0530
Subject: [PATCH] latitude and longitude issue resolved

---
 .../obps/src/pageComponents/DocumentDetails.js     | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/pageComponents/DocumentDetails.js b/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/pageComponents/DocumentDetails.js
index 91c9ba07279..504424236a9 100644
--- a/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/pageComponents/DocumentDetails.js
+++ b/frontend/micro-ui/web/micro-ui-internals/packages/modules/obps/src/pageComponents/DocumentDetails.js
@@ -257,7 +257,13 @@ const SelectDocument = React.memo(function MyComponent({
                     console.log('Longitude:', location.longitude);
                     setLatitude(location.latitude);
                     setLongitude(location.longitude);
-                    // Continue with your existing code
+                    {if (doc?.code === "SITEPHOTOGRAPH.ONE"){
+                        sessionStorage.setItem("Latitude",location.latitude)
+                        sessionStorage.setItem("Longitude",location.longitude)
+                    }}
+                    
+
+                    // Continue with your existing codezz
                     data = Object.fromEntries(e);
                     newArr = Object.values(data);
                     newArr = formData?.documents?.documents?.filter((ob) => ob.documentType === selectedDocument.code);
@@ -417,10 +423,10 @@ const SelectDocument = React.memo(function MyComponent({
         {doc?.uploadedDocuments?.length && <DocumentsPreview isSendBackFlow={true} documents={doc?.uploadedDocuments} />}
 
         {doc?.code === "SITEPHOTOGRAPH.ONE" && (
-            latitude !== null && longitude !== null ? (
+            (sessionStorage.getItem("Latitude")  ?  true : false ) ? (
                 <div>
-                    <p>Latitude: {latitude}</p>
-                    <p>Longitude: {longitude}</p>
+                    <p>Latitude: {sessionStorage.getItem("Latitude")}</p>
+                    <p>Longitude: {sessionStorage.getItem("Longitude")}</p>
                     {setIsNextButtonDisabled(false)} {/* Enable the "Next" button */}
                 </div>
             ):