15439 fix for app error in advanced search
This commit is contained in:
+39
-15
@@ -46,21 +46,45 @@ const GoogleMapComponent = (props) => {
|
||||
// yesIWantToUseGoogleMapApiInternals
|
||||
// onGoogleApiLoaded={({ map, maps }) => ModelsMap(map, maps)}
|
||||
// ></GoogleMapReact>
|
||||
|
||||
<iframe
|
||||
src={
|
||||
"https://datamap.gov.wales/maps/pedw-dev/embed?center=" +
|
||||
props.center.lng +
|
||||
"," +
|
||||
props.center.lat +
|
||||
"&zoom=6#/"
|
||||
}
|
||||
//src={"https://datamap.gov.wales/maps/pedw-dev/embed#/"}
|
||||
width={"100%"}
|
||||
maxheight={"400px"}
|
||||
height={"100%"}
|
||||
className={"mappingFrame"}
|
||||
></iframe>
|
||||
<>
|
||||
{" "}
|
||||
<div className="govuk-grid-row">
|
||||
<div className="govuk-grid-column-full">
|
||||
<a
|
||||
href={
|
||||
"https://datamap.gov.wales/maps/pedw-dev/embed?center=" +
|
||||
props.center.lng +
|
||||
"," +
|
||||
props.center.lat +
|
||||
"&zoom=7#/"
|
||||
}
|
||||
rel="noreferrer noopener"
|
||||
className="govuk-link govuk-link--no-underline govuk-!-font-size-14 "
|
||||
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")}
|
||||
errormsg="Appeal type is required"
|
||||
/>
|
||||
{props.props?.props.form[
|
||||
props.form
|
||||
]?.values?.appealTypes.split(",")[0] ===
|
||||
"846040002" && (
|
||||
|
||||
{props.appealTypesValue?.split(
|
||||
","
|
||||
)[0] === "846040002" && (
|
||||
<Field
|
||||
name="projecttype"
|
||||
id="projecttype"
|
||||
@@ -778,6 +778,14 @@ const mapDispatchToProps = (dispatch) => {
|
||||
|
||||
const selector = formValueSelector("advancedSearchForm"); // <-- same as form name
|
||||
|
||||
AdvancedSearch = connect((state) => {
|
||||
const appealTypesValue = selector(state, "appealTypes");
|
||||
|
||||
return {
|
||||
appealTypesValue,
|
||||
};
|
||||
})(AdvancedSearch);
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
|
||||
@@ -753,12 +753,12 @@ const DNSSearchResults = (props) => {
|
||||
{showMap == "true" && (
|
||||
<div className="govuk-grid-column-one-half">
|
||||
<div
|
||||
style={{
|
||||
height: "45vh",
|
||||
width: "100%",
|
||||
}}
|
||||
// style={{
|
||||
// height: "45vh",
|
||||
// width: "100%",
|
||||
// }}
|
||||
>
|
||||
<GoogleMapReact
|
||||
{/* <GoogleMapReact
|
||||
options={function (maps) {
|
||||
return {
|
||||
overviewMapControl: true,
|
||||
@@ -777,7 +777,18 @@ const DNSSearchResults = (props) => {
|
||||
onGoogleApiLoaded={({ 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>
|
||||
)}
|
||||
|
||||
@@ -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)) {
|
||||
const file = fileDetails[0];
|
||||
const filePath = file.path;
|
||||
|
||||
Reference in New Issue
Block a user