diff --git a/actions/selectQueryTypes.js b/actions/selectQueryTypes.js
index 5f3ec848..019a7717 100644
--- a/actions/selectQueryTypes.js
+++ b/actions/selectQueryTypes.js
@@ -75,7 +75,7 @@ export const getSelectQuery = (appealTypeName) => {
break;
case "pinswg_sipses":
// return "&$select=pinswg_anticipatedgridreferenceeastingtext,pinswg_anticipatedgridreferencenorthingtext,_pinswg_appellant_value,pinswg_name,pinswg_addressline1,pinswg_addressline2,pinswg_postcode,pinswg_addresstown,_pinswg_associatedlpa_value,pinswg_addresscounty,pinswg_applicationacceptedasvalid,pinswg_applicationrejectedasinvalid,pinswg_choiceofprocedure,pinswg_confirmrequesttovaryapplication,pinswg_dateeventrequested,pinswg_dateofdecision,pinswg_dateofrequesttovarytheapplication,pinswg_dateofsubmissionofapplication,pinswg_dateprojectpublishedonwebsite,pinswg_deadlineforsubmissionofapplication,pinswg_decision,pinswg_endofrepresentationperiod,pinswg_inspectorreportsubmittedtowelshgovernment,pinswg_procedureconfirmed,pinswg_projectdescription,pinswg_projectlocation,pinswg_recommendation,pinswg_rejectrequesttovaryapplication,pinswg_reportdueby,pinswg_suspensiondates,pinswg_suspensionenddates,pinswg_suspensionstartdates,pinswg_validnoticeofintentiontosubmitanapplicati,pinswg_webaddress,pinswg_withdrawndate,pinswg_writtenacceptanceofnotification,statuscode,pinswg_casestage,_pinswg_dnsids_value,pinswg_startdateofevent,pinswg_typeofevent";
- return "&$select=pinswg_anticipatedgridrefeasting,pinswg_anticipatedgridrefnorthing,_pinswg_appellant_value,pinswg_name,_pinswg_associatedlpa_value,pinswg_choiceofprocedure,pinswg_decision,pinswg_projectdescription,pinswg_projectlocation,pinswg_recommendation,statuscode,pinswg_casestage,_pinswg_sipscase_value,pinswg_writtenacceptanceofnotification,pinswg_validnoticeofintentiontosubmit,pinswg_deadlineforsubmissionofapplication,pinswg_screeningstartdate,pinswg_eiatargetdate,pinswg_targetextended,pinswg_directionissueddate,pinswg_eiarequired,pinswg_scopingstartdate,pinswg_scopingtargetdate,pinswg_scopingtargetextended,pinswg_scopingoutcomeissueddate";
+ return "&$select=pinswg_eiarequired,pinswg_anticipatedgridrefeasting,pinswg_anticipatedgridrefnorthing,_pinswg_appellant_value,pinswg_name,_pinswg_associatedlpa_value,pinswg_choiceofprocedure,pinswg_decision,pinswg_projectdescription,pinswg_projectlocation,pinswg_recommendation,statuscode,pinswg_casestage,_pinswg_sipscase_value,pinswg_writtenacceptanceofnotification,pinswg_validnoticeofintentiontosubmit,pinswg_deadlineforsubmissionofapplication,pinswg_screeningstartdate,pinswg_eiatargetdate,pinswg_targetextended,pinswg_directionissueddate,pinswg_eiarequired,pinswg_scopingstartdate,pinswg_scopingtargetdate,pinswg_scopingtargetextended,pinswg_scopingoutcomeissueddate";
break;
default:
return "";
diff --git a/components/case/summary.js b/components/case/summary.js
index c970e2c0..93781285 100644
--- a/components/case/summary.js
+++ b/components/case/summary.js
@@ -61,6 +61,9 @@ import Pinswg_wayleaveid from "./summaryTypes/pinswg_wayleaveid";
import CaseNoticeBanner from "./caseNoticeBanner";
import WatchModal from "./watchmodal";
+import GoogleMapComponent from "../mapping";
+import OSPoint from "ospoint";
+
const CaseSummary = (props) => {
let { t } = useTranslation();
@@ -94,6 +97,7 @@ const CaseSummary = (props) => {
const { data: session, status } = useSession();
const [isModalOpen, setIsModalOpen] = useState(false);
+ const [whichTab, setWhichTab] = useState("case-details");
const handleOpenModal = () => {
setIsModalOpen(true);
@@ -229,566 +233,1023 @@ const CaseSummary = (props) => {
let hasEndDate = typeof d != "undefined";
+ let point = {};
+ let siteCoords = {};
+ let center = {};
+
+ point = new OSPoint(
+ detailsObj.pinswg_anticipatedgridreferencenorthingtext ||
+ detailsObj.pinswg_anticipatedgridrefnorthing,
+ detailsObj.pinswg_anticipatedgridreferenceeastingtext ||
+ detailsObj.pinswg_anticipatedgridrefeasting
+ );
+ siteCoords = point.toOSGB36();
+ //console.log(siteCoords);
+ center = {
+ id: "",
+ lat: isNaN(parseFloat(siteCoords.latitude))
+ ? 52.412272
+ : parseFloat(siteCoords.latitude),
+ lng: isNaN(parseFloat(siteCoords.longitude))
+ ? -3.437989
+ : parseFloat(siteCoords.longitude),
+ };
+
+ const zoom = isNaN(parseFloat(siteCoords.latitude)) ? 7 : 12;
+
+ function hasValidKey(obj, key) {
+ return (
+ obj.hasOwnProperty(key) &&
+ obj[key] !== null &&
+ obj[key] !== undefined &&
+ obj[key] !== ""
+ );
+ }
+
+ function hasOwnPropertyAndNotNull(obj, property) {
+ return obj.hasOwnProperty(property) && obj[property] !== null;
+ }
+
+ function isObjectNotEmpty(obj, key) {
+ return obj.hasOwnProperty(key) && Object.keys(obj[key]).length > 0;
+ }
+
let showDetailsBlock =
showDetails == true ? (
<>
-
-
-
- {t("case:summary-reference-label")}:{" "}
- {currentType == "searchResultsObj"
- ? detailsObj.pinswg_name
- : currentType == "directResultsObj"
- ? casesObj.title
- : currentType == "watchedCases"
- ? casesObj.pinswg_title
- : casesObj.reference}
-
- {props.messagesObj["@odata.count"] > 0 && (
-
- )}
-
-
-
-
- {getFormCollectionByID(appealTypeID)
- .PrimaryIdAttribute == "pinswg_dnsid"
- ? t("case:summary-applicantonly-label")
- : getFormCollectionByID(appealTypeID)
- .PrimaryIdAttribute ==
- "pinswg_nonvalidationid"
- ? t("case:summary-appellantonly-label")
- : t("case:summary-applicant-label")}
-
- -
- {casesObj.pinswg_appellantagent == 846040001
- ? casesObj.pinswg_appellantfirstname +
- " " +
- casesObj.pinswg_appellantlastname
- : detailsObj[
- "_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
- ] || "not entered"}
-
-
- {detailsObj.pinswg_agentcontactname != null &&
- (_.has(
+
+
+
+
+ {t("case:summary-reference-label")}:{" "}
+ {currentType == "searchResultsObj"
+ ? detailsObj.pinswg_name
+ : currentType == "directResultsObj"
+ ? casesObj.title
+ : currentType == "watchedCases"
+ ? casesObj.pinswg_title
+ : casesObj.reference}
+
+
+
+
+
Contents
+
+ -
+ setWhichTab("case-details")}
+ >
+ {" "}
+ Details{" "}
+
+
+ -
+ setWhichTab("case-summary")}
+ >
+ {" "}
+ Summary{" "}
+
+
+ {((hasValidKey(
+ detailsObj,
+ "pinswg_anticipatedgridreferencenorthingtext"
+ ) &&
+ hasValidKey(
detailsObj,
- "pinswg_agentcontactname"
- ) ? (
-
-
-
- {t("case:summary-agent-label")}
-
-
-
- {_.has(
+ "pinswg_anticipatedgridreferenceeastingtext"
+ )) ||
+ (hasValidKey(
+ detailsObj,
+ "pinswg_anticipatedgridrefeasting"
+ ) &&
+ hasValidKey(
+ detailsObj,
+ "pinswg_anticipatedgridrefnorthing"
+ ))) && (
+
-
+ setWhichTab("case-map")}
+ >
+ {" "}
+ Map{" "}
+
+
+ )}
+ {isObjectNotEmpty(props, "eventsObj") && (
+ -
+
+ setWhichTab("case-events")
+ }
+ >
+ {" "}
+ Events{" "}
+
+
+ )}
+ -
+
+ setWhichTab("case-documents")
+ }
+ >
+ {" "}
+ Documents{" "}
+
+
+
+
+
+
+ {/*
+
*/}
+ {props.messagesObj["@odata.count"] > 0 && (
+
+ )}
+
+
+
-
+ {getFormCollectionByID(
+ appealTypeID
+ ).PrimaryIdAttribute ==
+ "pinswg_dnsid"
+ ? t(
+ "case:summary-applicantonly-label"
+ )
+ : getFormCollectionByID(
+ appealTypeID
+ ).PrimaryIdAttribute ==
+ "pinswg_nonvalidationid"
+ ? t(
+ "case:summary-appellantonly-label"
+ )
+ : t(
+ "case:summary-applicant-label"
+ )}
+
+ -
+ {casesObj.pinswg_appellantagent ==
+ 846040001
+ ? casesObj.pinswg_appellantfirstname +
+ " " +
+ casesObj.pinswg_appellantlastname
+ : detailsObj[
+ "_pinswg_appellant_value@OData.Community.Display.V1.FormattedValue"
+ ] || "not entered"}
+
+
+ {detailsObj.pinswg_agentcontactname !=
+ null &&
+ (_.has(
detailsObj,
"pinswg_agentcontactname"
- )
- ? detailsObj.pinswg_agentcontactname
- : ""}
-
-
- ) : (
- ""
- ))}
-
-
-
- {t("case:summary-site-address-label")}
-
- -
- {getFormCollectionByID(appealTypeID)
- .PrimaryIdAttribute == "pinswg_dnsid" ||
- getFormCollectionByID(appealTypeID)
- .PrimaryIdAttribute == "pinswg_sipscase"
- ? detailsObj.pinswg_projectlocation !=
- null
- ? detailsObj.pinswg_projectlocation.indexOf(
- ";"
- ) < 0
- ? detailsObj.pinswg_projectlocation
- : router.locale == "cy"
- ? detailsObj.pinswg_projectlocation.split(
- ";"
- )[1]
- : detailsObj.pinswg_projectlocation.split(
- ";"
- )[0]
- : ""
- : ""}
- {_.has(
- detailsObj,
- "pinswg_siteaddressline1"
- )
- ? detailsObj.pinswg_siteaddressline1
- : ""}
- {_.has(detailsObj, "pinswg_addressline1")
- ? detailsObj.pinswg_addressline1
- : ""}
- {_.has(
- detailsObj,
- "pinswg_siteaddressline1"
- ) &&
- detailsObj.pinswg_siteaddressline1 !=
- null &&
}
- {_.has(detailsObj, "pinswg_addressline1") &&
- detailsObj.pinswg_addressline1 !=
- null &&
}
- {_.has(
- detailsObj,
- "pinswg_siteaddressline2"
- )
- ? detailsObj.pinswg_siteaddressline2
- : ""}
- {_.has(detailsObj, "pinswg_addressline2")
- ? detailsObj.pinswg_addressline2
- : ""}
- {_.has(detailsObj, "pinswg_addressline2") &&
- detailsObj.pinswg_addressline2 !=
- null &&
}
- {_.has(detailsObj, "pinswg_siteaddresstown")
- ? detailsObj.pinswg_siteaddresstown
- : ""}
- {_.has(detailsObj, "pinswg_addresstown")
- ? detailsObj.pinswg_addresstown
- : ""}
- {_.has(
- detailsObj,
- "pinswg_siteaddresstown"
- ) &&
- detailsObj.pinswg_siteaddresstown !=
- null &&
}
- {_.has(detailsObj, "pinswg_addresstown") &&
- detailsObj.pinswg_addresstown !=
- null &&
}
- {_.has(
- detailsObj,
- "pinswg_siteaddresscounty"
- )
- ? detailsObj.pinswg_siteaddresscounty
- : ""}
- {_.has(detailsObj, "pinswg_addresscounty")
- ? detailsObj.pinswg_addresscounty
- : ""}
- {_.has(
- detailsObj,
- "pinswg_siteaddresscounty"
- ) &&
- detailsObj.pinswg_siteaddresscounty !=
- null &&
}
- {_.has(
- detailsObj,
- "pinswg_addresscounty"
- ) &&
- detailsObj.pinswg_addresscounty !=
- null &&
}
- {_.has(
- detailsObj,
- "pinswg_siteaddresspostcode"
- )
- ? detailsObj.pinswg_siteaddresspostcode
- : ""}
- {_.has(detailsObj, "pinswg_postcode")
- ? detailsObj.pinswg_postcode
- : ""}
-
-
- {casesObj.description != null && (
-
-
-
- {t("case:summary-description-label")}
-
-
-
- {casesObj.description.indexOf(";") < 0
- ? casesObj.description
- : router.locale == "cy"
- ? casesObj.description.split(";")[1]
- : casesObj.description.split(
- ";"
- )[0]}
-
+ ) ? (
+
+
-
+ {t(
+ "case:summary-agent-label"
+ )}
+
+ -
+ {_.has(
+ detailsObj,
+ "pinswg_agentcontactname"
+ )
+ ? detailsObj.pinswg_agentcontactname
+ : ""}
+
+
+ ) : (
+ ""
+ ))}
+
+
-
+ {t(
+ "case:summary-site-address-label"
+ )}
+
+ -
+ {getFormCollectionByID(
+ appealTypeID
+ ).PrimaryIdAttribute ==
+ "pinswg_dnsid" ||
+ getFormCollectionByID(
+ appealTypeID
+ ).PrimaryIdAttribute ==
+ "pinswg_sipscase"
+ ? detailsObj.pinswg_projectlocation !=
+ null
+ ? detailsObj.pinswg_projectlocation.indexOf(
+ ";"
+ ) < 0
+ ? detailsObj.pinswg_projectlocation
+ : router.locale ==
+ "cy"
+ ? detailsObj.pinswg_projectlocation.split(
+ ";"
+ )[1]
+ : detailsObj.pinswg_projectlocation.split(
+ ";"
+ )[0]
+ : ""
+ : ""}
+ {_.has(
+ detailsObj,
+ "pinswg_siteaddressline1"
+ )
+ ? detailsObj.pinswg_siteaddressline1
+ : ""}
+ {_.has(
+ detailsObj,
+ "pinswg_addressline1"
+ )
+ ? detailsObj.pinswg_addressline1
+ : ""}
+ {_.has(
+ detailsObj,
+ "pinswg_siteaddressline1"
+ ) &&
+ detailsObj.pinswg_siteaddressline1 !=
+ null &&
}
+ {_.has(
+ detailsObj,
+ "pinswg_addressline1"
+ ) &&
+ detailsObj.pinswg_addressline1 !=
+ null &&
}
+ {_.has(
+ detailsObj,
+ "pinswg_siteaddressline2"
+ )
+ ? detailsObj.pinswg_siteaddressline2
+ : ""}
+ {_.has(
+ detailsObj,
+ "pinswg_addressline2"
+ )
+ ? detailsObj.pinswg_addressline2
+ : ""}
+ {_.has(
+ detailsObj,
+ "pinswg_addressline2"
+ ) &&
+ detailsObj.pinswg_addressline2 !=
+ null &&
}
+ {_.has(
+ detailsObj,
+ "pinswg_siteaddresstown"
+ )
+ ? detailsObj.pinswg_siteaddresstown
+ : ""}
+ {_.has(
+ detailsObj,
+ "pinswg_addresstown"
+ )
+ ? detailsObj.pinswg_addresstown
+ : ""}
+ {_.has(
+ detailsObj,
+ "pinswg_siteaddresstown"
+ ) &&
+ detailsObj.pinswg_siteaddresstown !=
+ null &&
}
+ {_.has(
+ detailsObj,
+ "pinswg_addresstown"
+ ) &&
+ detailsObj.pinswg_addresstown !=
+ null &&
}
+ {_.has(
+ detailsObj,
+ "pinswg_siteaddresscounty"
+ )
+ ? detailsObj.pinswg_siteaddresscounty
+ : ""}
+ {_.has(
+ detailsObj,
+ "pinswg_addresscounty"
+ )
+ ? detailsObj.pinswg_addresscounty
+ : ""}
+ {_.has(
+ detailsObj,
+ "pinswg_siteaddresscounty"
+ ) &&
+ detailsObj.pinswg_siteaddresscounty !=
+ null &&
}
+ {_.has(
+ detailsObj,
+ "pinswg_addresscounty"
+ ) &&
+ detailsObj.pinswg_addresscounty !=
+ null &&
}
+ {_.has(
+ detailsObj,
+ "pinswg_siteaddresspostcode"
+ )
+ ? detailsObj.pinswg_siteaddresspostcode
+ : ""}
+ {_.has(
+ detailsObj,
+ "pinswg_postcode"
+ )
+ ? detailsObj.pinswg_postcode
+ : ""}
+
+
+ {casesObj.description != null && (
+
+
-
+ {t(
+ "case:summary-description-label"
+ )}
+
+ -
+ {casesObj.description.indexOf(
+ ";"
+ ) < 0
+ ? casesObj.description
+ : router.locale == "cy"
+ ? casesObj.description.split(
+ ";"
+ )[1]
+ : casesObj.description.split(
+ ";"
+ )[0]}
+
+
+ )}
+ {detailsObj.pinswg_casestage !=
+ null && (
+
+
-
+ {t(
+ "case:summary-case-stage-label"
+ )}
+
+ -
+ {router.locale == "cy"
+ ? jsonpath(
+ '$..[?(@.value=="' +
+ detailsObj[
+ "pinswg_casestage@OData.Community.Display.V1.FormattedValue"
+ ] +
+ '")].value_cy',
+ transLookup
+ )
+ : detailsObj[
+ "pinswg_casestage@OData.Community.Display.V1.FormattedValue"
+ ] ||
+ t(
+ "case:summary-no-date-entered-label"
+ )}
+
+
+ )}
+
+
-
+ {t(
+ "case:summary-last-modified-label"
+ )}
+
+ -
+ {detailsObj.modifiedon >
+ casesObj.modifiedon
+ ? formatDates(
+ detailsObj.modifiedon
+ )
+ : formatDates(
+ casesObj.modifiedon
+ )}
+
+
+
- )}
- {detailsObj.pinswg_casestage != null && (
-
-
-
- {t("case:summary-case-stage-label")}
-
- -
- {router.locale == "cy"
- ? jsonpath(
- '$..[?(@.value=="' +
- detailsObj[
- "pinswg_casestage@OData.Community.Display.V1.FormattedValue"
- ] +
- '")].value_cy',
- transLookup
- )
- : detailsObj[
- "pinswg_casestage@OData.Community.Display.V1.FormattedValue"
- ] ||
- t(
- "case:summary-no-date-entered-label"
- )}
-
-
- )}
-
-
-
- {t("case:summary-last-modified-label")}
-
- -
- {detailsObj.modifiedon > casesObj.modifiedon
- ? formatDates(detailsObj.modifiedon)
- : formatDates(casesObj.modifiedon)}
-
-
-
-
- {showLoginCheck == "true" && (
- <>
-
-
-
- {(_.has(detailsObj, "pinswg_startdate") ||
- _.has(
- detailsObj,
- "pinswg_applicationacceptedasvalid"
- ) ||
- _.has(
- detailsObj,
- "pinswg_startdates"
- )) &&
- showReps(
- detailsObj.pinswg_startdate ||
- detailsObj.pinswg_startdates ||
- detailsObj.pinswg_applicationacceptedasvalid,
- detailsObj.pinswg_finalcommentsduedate ||
- detailsObj.pinswg_endofrepresentationperiod
- ) && (
- <>
- {showRepButton(
- props.currentView
- .caseReference
- .appealType
- ) ? (
- <>
-
- {t(
- "case:summary-make-representation-label"
- )}
-
+ {showLoginCheck == "true" && (
+ <>
+
+
+
+ {(_.has(
+ detailsObj,
+ "pinswg_startdate"
+ ) ||
+ _.has(
+ detailsObj,
+ "pinswg_applicationacceptedasvalid"
+ ) ||
+ _.has(
+ detailsObj,
+ "pinswg_startdates"
+ )) &&
+ showReps(
+ detailsObj.pinswg_startdate ||
+ detailsObj.pinswg_startdates ||
+ detailsObj.pinswg_applicationacceptedasvalid,
+ detailsObj.pinswg_finalcommentsduedate ||
+ detailsObj.pinswg_endofrepresentationperiod
+ ) && (
+ <>
+ {showRepButton(
+ props
+ .currentView
+ .caseReference
+ .appealType
+ ) ? (
+ <>
+
+ {t(
+ "case:summary-make-representation-label"
+ )}
+
-
{
- //spinnerState();
- router.back();
- }}
- className="govuk-button govuk-button--secondary"
- >
- {t(
- "case:summary-back-button-label"
+ {
+ //spinnerState();
+ router.back();
+ }}
+ className="govuk-button govuk-button--secondary"
+ >
+ {t(
+ "case:summary-back-button-label"
+ )}
+
+ >
+ ) : !isLPA &&
+ props.currentView
+ .caseReference
+ .appealType ==
+ 846040004 ? (
+ ""
+ ) : (
+ <>
+
+
+
+ {t(
+ "case:representation-date-passed-label",
+ {
+ startDate:
+ formatDates(
+ detailsObj.pinswg_startdate
+ ),
+ endDate:
+ props
+ .currentView
+ .caseReference
+ .appealType ==
+ 846040019
+ ? formatDates(
+ detailsObj.pinswg_statementduedate
+ )
+ : formatDates(
+ detailsObj.pinswg_finalcommentsduedate
+ ),
+ }
+ )}
+
{" "}
+ {t(
+ "case:representation-date-passed-additional-label"
+ )}{" "}
+
+ {t(
+ "home:login-contact-email"
+ )}
+
+
+
+
+ >
)}
-
- >
- ) : !isLPA &&
- props.currentView
- .caseReference
- .appealType ==
- 846040004 ? (
- ""
- ) : (
- <>
-
-
-
- {t(
- "case:representation-date-passed-label",
- {
- startDate:
- formatDates(
- detailsObj.pinswg_startdate
- ),
- endDate:
+ >
+ )}
+
+ {session &&
+ (isWatchedCase(
+ props.currentView
+ .caseReference
+ .incidentid
+ ).length >
+ 0 ==
+ true ? (
+
-
- >
- )}
- >
- )}
-
- {session &&
- (isWatchedCase(
- props.currentView.caseReference
- .incidentid
- ).length >
- 0 ==
- true ? (
-
- ) : (
- <>
-
- {/*
+ ) : (
+ <>
+
+ {/* */}
- >
- ))}
+ >
+ ))}
- {!session && (
- <>
-
+
+
+
+
+
+ {_.has(
+ detailsObj,
+ "pinswg_startdate"
+ ) &&
+ (detailsObj.pinswg_startdate !=
+ null ||
+ detailsObj.pinswg_finalcommentsduedate !=
+ null) &&
+ showRepsEnded(
+ detailsObj.pinswg_startdate,
+ detailsObj.pinswg_finalcommentsduedate
+ ) && (
+
+ {t(
+ "case:representation-period-ended-on-label"
+ )}
+ {props.currentView
+ .caseReference
+ .appealType ==
+ 846040019
+ ? formatDates(
+ detailsObj.pinswg_statementduedate
+ )
+ : formatDates(
+ detailsObj.pinswg_finalcommentsduedate
+ )}
+
+ )}
+
+
+ >
+ )}
+
+
+ {showSummary(casesObj, detailsObj)}
+
+
+ {((hasValidKey(
+ detailsObj,
+ "pinswg_anticipatedgridreferencenorthingtext"
+ ) &&
+ hasValidKey(
+ detailsObj,
+ "pinswg_anticipatedgridreferenceeastingtext"
+ )) ||
+ (hasValidKey(
+ detailsObj,
+ "pinswg_anticipatedgridrefeasting"
+ ) &&
+ hasValidKey(
+ detailsObj,
+ "pinswg_anticipatedgridrefnorthing"
+ ))) && (
+
+
+
+
+
+
+
-
+ {t(
+ "case:summary-site-address-label"
+ )}
+
+ -
+ {getFormCollectionByID(
+ appealTypeID
+ ).PrimaryIdAttribute ==
+ "pinswg_dnsid" ||
+ getFormCollectionByID(
+ appealTypeID
+ ).PrimaryIdAttribute ==
+ "pinswg_sipscase"
+ ? detailsObj.pinswg_projectlocation !=
+ null
+ ? detailsObj.pinswg_projectlocation.indexOf(
+ ";"
+ ) < 0
+ ? detailsObj.pinswg_projectlocation
+ : router.locale ==
+ "cy"
+ ? detailsObj.pinswg_projectlocation.split(
+ ";"
+ )[1]
+ : detailsObj.pinswg_projectlocation.split(
+ ";"
+ )[0]
+ : ""
+ : ""}
+ {_.has(
+ detailsObj,
+ "pinswg_siteaddressline1"
+ )
+ ? detailsObj.pinswg_siteaddressline1
+ : ""}
+ {_.has(
+ detailsObj,
+ "pinswg_addressline1"
+ )
+ ? detailsObj.pinswg_addressline1
+ : ""}
+ {_.has(
+ detailsObj,
+ "pinswg_siteaddressline1"
+ ) &&
+ detailsObj.pinswg_siteaddressline1 !=
+ null &&
}
+ {_.has(
+ detailsObj,
+ "pinswg_addressline1"
+ ) &&
+ detailsObj.pinswg_addressline1 !=
+ null &&
}
+ {_.has(
+ detailsObj,
+ "pinswg_siteaddressline2"
+ )
+ ? detailsObj.pinswg_siteaddressline2
+ : ""}
+ {_.has(
+ detailsObj,
+ "pinswg_addressline2"
+ )
+ ? detailsObj.pinswg_addressline2
+ : ""}
+ {_.has(
+ detailsObj,
+ "pinswg_addressline2"
+ ) &&
+ detailsObj.pinswg_addressline2 !=
+ null &&
}
+ {_.has(
+ detailsObj,
+ "pinswg_siteaddresstown"
+ )
+ ? detailsObj.pinswg_siteaddresstown
+ : ""}
+ {_.has(
+ detailsObj,
+ "pinswg_addresstown"
+ )
+ ? detailsObj.pinswg_addresstown
+ : ""}
+ {_.has(
+ detailsObj,
+ "pinswg_siteaddresstown"
+ ) &&
+ detailsObj.pinswg_siteaddresstown !=
+ null &&
}
+ {_.has(
+ detailsObj,
+ "pinswg_addresstown"
+ ) &&
+ detailsObj.pinswg_addresstown !=
+ null &&
}
+ {_.has(
+ detailsObj,
+ "pinswg_siteaddresscounty"
+ )
+ ? detailsObj.pinswg_siteaddresscounty
+ : ""}
+ {_.has(
+ detailsObj,
+ "pinswg_addresscounty"
+ )
+ ? detailsObj.pinswg_addresscounty
+ : ""}
+ {_.has(
+ detailsObj,
+ "pinswg_siteaddresscounty"
+ ) &&
+ detailsObj.pinswg_siteaddresscounty !=
+ null &&
}
+ {_.has(
+ detailsObj,
+ "pinswg_addresscounty"
+ ) &&
+ detailsObj.pinswg_addresscounty !=
+ null &&
}
+ {_.has(
+ detailsObj,
+ "pinswg_siteaddresspostcode"
+ )
+ ? detailsObj.pinswg_siteaddresspostcode
+ : ""}
+ {_.has(
+ detailsObj,
+ "pinswg_postcode"
+ )
+ ? detailsObj.pinswg_postcode
+ : ""}
+
+
+
-
-
-
- {_.has(detailsObj, "pinswg_startdate") &&
- (detailsObj.pinswg_startdate != null ||
- detailsObj.pinswg_finalcommentsduedate !=
- null) &&
- showRepsEnded(
- detailsObj.pinswg_startdate,
- detailsObj.pinswg_finalcommentsduedate
- ) && (
-
- {t(
- "case:representation-period-ended-on-label"
- )}
- {props.currentView.caseReference
- .appealType == 846040019
- ? formatDates(
- detailsObj.pinswg_statementduedate
- )
- : formatDates(
- detailsObj.pinswg_finalcommentsduedate
- )}
-
- )}
+ )}
+ {isObjectNotEmpty(props, "eventsObj") && (
+
+
+ )}
+
+
+
- >
- )}
-
- {showSummary(casesObj, detailsObj)}
-
-
-
- {/*
*/}
+
+
>
) : (
<>
@@ -801,7 +1262,7 @@ const CaseSummary = (props) => {
{showLoginCheck == "true" && (
-
+
{noRepresentationLink.includes(
router.pathname
diff --git a/components/case/summaryTypes/pinswg_sipscase.js b/components/case/summaryTypes/pinswg_sipscase.js
index 7c20471e..8ae252fe 100644
--- a/components/case/summaryTypes/pinswg_sipscase.js
+++ b/components/case/summaryTypes/pinswg_sipscase.js
@@ -10,32 +10,12 @@ import OSPoint from "ospoint";
const Pinswg_sipscase = (props) => {
let { t } = useTranslation();
- const { casesObj, detailsObj, formatDates, linkedCasesList, showMap } =
- props;
+ const { casesObj, detailsObj, formatDates, linkedCasesList } = props;
const router = useRouter();
const { locale } = router;
- let point = {};
- let siteCoords = {};
- let center = {};
- point = new OSPoint(
- detailsObj.pinswg_anticipatedgridrefnorthing,
- detailsObj.pinswg_anticipatedgridrefeasting
- );
- siteCoords = point.toOSGB36();
//console.log(siteCoords);
- center = {
- id: "",
- lat: isNaN(parseFloat(siteCoords.latitude))
- ? 52.412272
- : parseFloat(siteCoords.latitude),
- lng: isNaN(parseFloat(siteCoords.longitude))
- ? -3.437989
- : parseFloat(siteCoords.longitude),
- };
-
- const zoom = isNaN(parseFloat(siteCoords.latitude)) ? 7 : 12;
function hasValidKey(obj, key) {
return (
@@ -51,13 +31,7 @@ const Pinswg_sipscase = (props) => {
{detailsObj.pinswg_projectdescription != null ? (
-
+
{t("case:summary-project-details-label")}
@@ -93,22 +67,6 @@ const Pinswg_sipscase = (props) => {
: ""}
*/}
- {showMap == "true" && (
-
- )}
) : (
@@ -235,6 +193,30 @@ const Pinswg_sipscase = (props) => {
)}
+
+
-
+ {t(
+ "case:summary-eia-required-label"
+ )}
+
+ -
+ {router.locale == "cy"
+ ? jsonpath(
+ '$..[?(@.value=="' +
+ detailsObj[
+ "pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
+ ] +
+ '")].value_cy',
+ transLookup
+ )
+ : detailsObj[
+ "pinswg_eiarequired@OData.Community.Display.V1.FormattedValue"
+ ] ||
+ t(
+ "case:summary-to-be-confirmed-label"
+ )}
+
+
{/*
-
{t("case:summary-status-label")}
@@ -762,7 +744,6 @@ const Pinswg_sipscase = (props) => {
"case:summary-awaiting-information-label"
)}
- )
)}
diff --git a/styles/sass/welshgov/_application.scss b/styles/sass/welshgov/_application.scss
index f87ddb5a..87e36f36 100644
--- a/styles/sass/welshgov/_application.scss
+++ b/styles/sass/welshgov/_application.scss
@@ -65,6 +65,11 @@ h5,
height: 1.8rem;
}
+.govuk-tabs__panel .govuk-grid-row {
+ margin-left: 0px;
+ margin-right: 0px;
+}
+
body {
margin: 0;
background-color: #ffffff;