15439 fix for app error in advanced search
This commit is contained in:
+39
-15
@@ -46,21 +46,45 @@ const GoogleMapComponent = (props) => {
|
|||||||
// yesIWantToUseGoogleMapApiInternals
|
// yesIWantToUseGoogleMapApiInternals
|
||||||
// onGoogleApiLoaded={({ map, maps }) => ModelsMap(map, maps)}
|
// onGoogleApiLoaded={({ map, maps }) => ModelsMap(map, maps)}
|
||||||
// ></GoogleMapReact>
|
// ></GoogleMapReact>
|
||||||
|
<>
|
||||||
<iframe
|
{" "}
|
||||||
src={
|
<div className="govuk-grid-row">
|
||||||
"https://datamap.gov.wales/maps/pedw-dev/embed?center=" +
|
<div className="govuk-grid-column-full">
|
||||||
props.center.lng +
|
<a
|
||||||
"," +
|
href={
|
||||||
props.center.lat +
|
"https://datamap.gov.wales/maps/pedw-dev/embed?center=" +
|
||||||
"&zoom=6#/"
|
props.center.lng +
|
||||||
}
|
"," +
|
||||||
//src={"https://datamap.gov.wales/maps/pedw-dev/embed#/"}
|
props.center.lat +
|
||||||
width={"100%"}
|
"&zoom=7#/"
|
||||||
maxheight={"400px"}
|
}
|
||||||
height={"100%"}
|
rel="noreferrer noopener"
|
||||||
className={"mappingFrame"}
|
className="govuk-link govuk-link--no-underline govuk-!-font-size-14 "
|
||||||
></iframe>
|
target="_blank"
|
||||||
|
>
|
||||||
|
See this map on Datamap Wales
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="govuk-grid-row">
|
||||||
|
<div className="govuk-grid-column-full">
|
||||||
|
<iframe
|
||||||
|
src={
|
||||||
|
"https://datamap.gov.wales/maps/pedw-dev/embed?center=" +
|
||||||
|
props.center.lng +
|
||||||
|
"," +
|
||||||
|
props.center.lat +
|
||||||
|
"&zoom=7#/"
|
||||||
|
}
|
||||||
|
//src={"https://datamap.gov.wales/maps/pedw-dev/embed#/"}
|
||||||
|
width={"100%"}
|
||||||
|
maxheight={"400px"}
|
||||||
|
height={"500px"}
|
||||||
|
className={"mappingFrame"}
|
||||||
|
></iframe>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -580,10 +580,10 @@ let AdvancedSearch = (props) => {
|
|||||||
label={t("search:appealtype-label")}
|
label={t("search:appealtype-label")}
|
||||||
errormsg="Appeal type is required"
|
errormsg="Appeal type is required"
|
||||||
/>
|
/>
|
||||||
{props.props?.props.form[
|
|
||||||
props.form
|
{props.appealTypesValue?.split(
|
||||||
]?.values?.appealTypes.split(",")[0] ===
|
","
|
||||||
"846040002" && (
|
)[0] === "846040002" && (
|
||||||
<Field
|
<Field
|
||||||
name="projecttype"
|
name="projecttype"
|
||||||
id="projecttype"
|
id="projecttype"
|
||||||
@@ -778,6 +778,14 @@ const mapDispatchToProps = (dispatch) => {
|
|||||||
|
|
||||||
const selector = formValueSelector("advancedSearchForm"); // <-- same as form name
|
const selector = formValueSelector("advancedSearchForm"); // <-- same as form name
|
||||||
|
|
||||||
|
AdvancedSearch = connect((state) => {
|
||||||
|
const appealTypesValue = selector(state, "appealTypes");
|
||||||
|
|
||||||
|
return {
|
||||||
|
appealTypesValue,
|
||||||
|
};
|
||||||
|
})(AdvancedSearch);
|
||||||
|
|
||||||
export default connect(
|
export default connect(
|
||||||
mapStateToProps,
|
mapStateToProps,
|
||||||
mapDispatchToProps
|
mapDispatchToProps
|
||||||
|
|||||||
@@ -753,12 +753,12 @@ const DNSSearchResults = (props) => {
|
|||||||
{showMap == "true" && (
|
{showMap == "true" && (
|
||||||
<div className="govuk-grid-column-one-half">
|
<div className="govuk-grid-column-one-half">
|
||||||
<div
|
<div
|
||||||
style={{
|
// style={{
|
||||||
height: "45vh",
|
// height: "45vh",
|
||||||
width: "100%",
|
// width: "100%",
|
||||||
}}
|
// }}
|
||||||
>
|
>
|
||||||
<GoogleMapReact
|
{/* <GoogleMapReact
|
||||||
options={function (maps) {
|
options={function (maps) {
|
||||||
return {
|
return {
|
||||||
overviewMapControl: true,
|
overviewMapControl: true,
|
||||||
@@ -777,7 +777,18 @@ const DNSSearchResults = (props) => {
|
|||||||
onGoogleApiLoaded={({ map, maps }) =>
|
onGoogleApiLoaded={({ map, maps }) =>
|
||||||
ModelsMap(map, maps)
|
ModelsMap(map, maps)
|
||||||
}
|
}
|
||||||
/>
|
/> */}
|
||||||
|
|
||||||
|
<iframe
|
||||||
|
src={
|
||||||
|
"https://datamap.gov.wales/maps/pedw-dev/embed?center=-3.6553189192727347,52.214962933659415&zoom=2#/"
|
||||||
|
}
|
||||||
|
//src={"https://datamap.gov.wales/maps/pedw-dev/embed#/"}
|
||||||
|
width={"100%"}
|
||||||
|
maxheight={"400px"}
|
||||||
|
height={"500px"}
|
||||||
|
className={"mappingFrame"}
|
||||||
|
></iframe>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -53,19 +53,6 @@ ApiProxy.post(async (req, res) => {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// for (const [fileName, fileDetails] of Object.entries(req.files)) {
|
|
||||||
// if (allowedMimeTypes.includes(fileDetails[0].headers["content-type"])) {
|
|
||||||
// allowedFilesFormData[fileName] = fileDetails.map((file) => ({
|
|
||||||
// fieldName: file.fieldName,
|
|
||||||
// originalFilename: file.originalFilename,
|
|
||||||
// path: file.path,
|
|
||||||
// size: file.size,
|
|
||||||
// headers: file.headers,
|
|
||||||
// contentType: file.headers["content-type"],
|
|
||||||
// }));
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
for (const [fileName, fileDetails] of Object.entries(req.files)) {
|
for (const [fileName, fileDetails] of Object.entries(req.files)) {
|
||||||
const file = fileDetails[0];
|
const file = fileDetails[0];
|
||||||
const filePath = file.path;
|
const filePath = file.path;
|
||||||
|
|||||||
Reference in New Issue
Block a user