updated coords and address fix

This commit is contained in:
2025-03-14 15:20:06 +00:00
parent 9eace1b626
commit 68d03ed93d
15 changed files with 347 additions and 727 deletions
+1
View File
@@ -890,6 +890,7 @@ const DocumentDetails = (props) => {
)
// .then((data) => data)
.then((data) => {
setDocumentSearchState(true);
setDocumentDetails(data);
setShowSpinnerState(false);
});
+3 -1
View File
@@ -296,7 +296,9 @@ const CaseSummary = (props) => {
</dt>
<dd className="govuk-summary-list__value">
{getFormCollectionByID(appealTypeID)
.PrimaryIdAttribute == "pinswg_dnsid"
.PrimaryIdAttribute == "pinswg_dnsid" ||
getFormCollectionByID(appealTypeID)
.PrimaryIdAttribute == "pinswg_sipscase"
? detailsObj.pinswg_projectlocation !=
null
? detailsObj.pinswg_projectlocation.indexOf(
@@ -20,8 +20,8 @@ const Pinswg_sipscase = (props) => {
let center = {};
point = new OSPoint(
detailsObj.pinswg_anticipatedgridreferencenorthingtext,
detailsObj.pinswg_anticipatedgridreferenceeastingtext
detailsObj.pinswg_anticipatedgridrefnorthing,
detailsObj.pinswg_anticipatedgridrefeasting
);
siteCoords = point.toOSGB36();
//console.log(siteCoords);
+34 -2
View File
@@ -64,8 +64,12 @@ const DNSSearchResults = (props) => {
if (showMap == "true") {
dnsCoords.map((item) => {
let point = new OSPoint(
item.pinswg_anticipatedgridreferencenorthingtext || 0,
item.pinswg_anticipatedgridreferenceeastingtext || 0
item.pinswg_anticipatedgridrefnorthing ||
item.pinswg_anticipatedgridreferencenorthingtext ||
0,
item.pinswg_anticipatedgridrefeasting ||
item.pinswg_anticipatedgridreferenceeastingtext ||
0
);
let siteCoords = point.toOSGB36();
//console.log(siteCoords);
@@ -193,6 +197,15 @@ const DNSSearchResults = (props) => {
});
};
function hasValidKey(obj, key) {
return (
obj.hasOwnProperty(key) &&
obj[key] !== null &&
obj[key] !== undefined &&
obj[key] !== ""
);
}
const ResultsView = (resultsArr) => {
return (
<div className="govuk-grid-row govuk-!-margin-top-9">
@@ -394,7 +407,26 @@ const DNSSearchResults = (props) => {
";"
)[0]
: ""
: hasValidKey(
item,
"pinswg_caseaddress"
)
? item.pinswg_caseaddress !=
null
? item.pinswg_caseaddress.indexOf(
";"
) < 0
? item.pinswg_caseaddress
: router.locale == "cy"
? item.pinswg_caseaddress.split(
";"
)[1]
: item.pinswg_caseaddress.split(
";"
)[0]
: ""
: ""}
{_.has(
detailsObj,
"pinswg_siteaddressline1"
+26
View File
@@ -128,6 +128,15 @@ const SearchResults = (props) => {
});
};
function hasValidKey(obj, key) {
return (
obj.hasOwnProperty(key) &&
obj[key] !== null &&
obj[key] !== undefined &&
obj[key] !== ""
);
}
const ResultsView = (resultsArr) => {
return (
<>
@@ -337,6 +346,23 @@ const SearchResults = (props) => {
";"
)[0]
: ""
: hasValidKey(
item,
"pinswg_caseaddress"
)
? item.pinswg_caseaddress != null
? item.pinswg_caseaddress.indexOf(
";"
) < 0
? item.pinswg_caseaddress
: router.locale == "cy"
? item.pinswg_caseaddress.split(
";"
)[1]
: item.pinswg_caseaddress.split(
";"
)[0]
: ""
: ""}
{_.has(
detailsObj,