uat defect 115
This commit is contained in:
@@ -9,7 +9,7 @@ import React, { useMemo, useState } from "react";
|
|||||||
import DatePicker from "react-datepicker";
|
import DatePicker from "react-datepicker";
|
||||||
import "react-datepicker/dist/react-datepicker.css";
|
import "react-datepicker/dist/react-datepicker.css";
|
||||||
import Dropzone from "react-dropzone";
|
import Dropzone from "react-dropzone";
|
||||||
import { Field, FieldArray } from "redux-form";
|
import { Field, FieldArray, change } from "redux-form";
|
||||||
import {
|
import {
|
||||||
deleteBlob,
|
deleteBlob,
|
||||||
getFilesFromBlobHashed,
|
getFilesFromBlobHashed,
|
||||||
@@ -2364,6 +2364,8 @@ export const FieldArrayForm = (props) => {
|
|||||||
maxSubField,
|
maxSubField,
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
|
const dispatch = useDispatch(); // Get dispatch using useDispatch hook
|
||||||
|
|
||||||
var showIfHasParentShowValue =
|
var showIfHasParentShowValue =
|
||||||
parentField != false &&
|
parentField != false &&
|
||||||
!_.isEmpty(formProps[form]) &&
|
!_.isEmpty(formProps[form]) &&
|
||||||
@@ -2375,6 +2377,8 @@ export const FieldArrayForm = (props) => {
|
|||||||
(showIfHasParentShowValue == parentField) != false &&
|
(showIfHasParentShowValue == parentField) != false &&
|
||||||
showIfHasParentShowValue;
|
showIfHasParentShowValue;
|
||||||
|
|
||||||
|
!showIfHasParentShowValue && dispatch(change("appealForm", name, null));
|
||||||
|
|
||||||
parentFieldShowOnValue;
|
parentFieldShowOnValue;
|
||||||
const { handleSubmit, pristine, reset, submitting } = props;
|
const { handleSubmit, pristine, reset, submitting } = props;
|
||||||
|
|
||||||
|
|||||||
@@ -302,35 +302,41 @@ let BuildCheckRow = (props) => {
|
|||||||
"undefined" &&
|
"undefined" &&
|
||||||
props.props.form["appealForm"].values[
|
props.props.form["appealForm"].values[
|
||||||
datafieldname[0].value
|
datafieldname[0].value
|
||||||
].map((tenant, index) => {
|
] != null ? (
|
||||||
console.log(
|
props.props.form["appealForm"].values[
|
||||||
typeof tenant.pinswg_owners
|
datafieldname[0].value
|
||||||
);
|
].map((tenant, index) => {
|
||||||
return typeof tenant.pinswg_owners !=
|
console.log(
|
||||||
"undefined" ||
|
typeof tenant.pinswg_owners
|
||||||
typeof tenant.pinswg_agriculturaltenantname !=
|
);
|
||||||
"undefined" ? (
|
return typeof tenant.pinswg_owners !=
|
||||||
<div
|
"undefined" ||
|
||||||
key={index}
|
typeof tenant.pinswg_agriculturaltenantname !=
|
||||||
style={{
|
"undefined" ? (
|
||||||
display: "flex",
|
<div
|
||||||
}}
|
key={index}
|
||||||
>
|
style={{
|
||||||
<div className="govuk-!-width-one-half">
|
display: "flex",
|
||||||
{tenant.pinswg_agriculturaltenantname ||
|
}}
|
||||||
tenant.pinswg_owners}
|
>
|
||||||
|
<div className="govuk-!-width-one-half">
|
||||||
|
{tenant.pinswg_agriculturaltenantname ||
|
||||||
|
tenant.pinswg_owners}
|
||||||
|
</div>
|
||||||
|
<div className="govuk-!-width-one-half">
|
||||||
|
Served:{" "}
|
||||||
|
{formatDate(
|
||||||
|
tenant.dateserved
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="govuk-!-width-one-half">
|
) : (
|
||||||
Served:{" "}
|
""
|
||||||
{formatDate(
|
);
|
||||||
tenant.dateserved
|
})
|
||||||
)}
|
) : (
|
||||||
</div>
|
"N/A"
|
||||||
</div>
|
)
|
||||||
) : (
|
|
||||||
""
|
|
||||||
);
|
|
||||||
})
|
|
||||||
) : (
|
) : (
|
||||||
props.props.form["appealForm"].values[
|
props.props.form["appealForm"].values[
|
||||||
datafieldname[0].value
|
datafieldname[0].value
|
||||||
@@ -358,6 +364,7 @@ let BuildCheckRow = (props) => {
|
|||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
})}
|
})}
|
||||||
|
|||||||
Reference in New Issue
Block a user