edit a partial completed appeal
This commit is contained in:
@@ -22,6 +22,7 @@ import {
|
||||
subYears,
|
||||
subMonths,
|
||||
subDays,
|
||||
parseISO,
|
||||
} from "date-fns";
|
||||
|
||||
const RenderTextfield = ({
|
||||
@@ -92,7 +93,9 @@ export function Textfield(props) {
|
||||
disabled
|
||||
/>
|
||||
</div>
|
||||
<div className="govuk-body">{t(hint)}</div>
|
||||
<div className="govuk-body">
|
||||
{t("newappeal:new-appeal-introduction-paragraph")}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
} else {
|
||||
@@ -342,18 +345,29 @@ const RenderDatePicker = ({
|
||||
{errorMsg}
|
||||
</span>
|
||||
)}
|
||||
|
||||
{/* {value}
|
||||
<br />
|
||||
{moment(value).format("DD/MM/YY")}
|
||||
<br /> */}
|
||||
|
||||
<DatePicker
|
||||
{...custom}
|
||||
locale={router.locale}
|
||||
autoOk={true}
|
||||
dateFormat="dd/MM/yyyy"
|
||||
onChange={onChange}
|
||||
selected={value || null}
|
||||
selected={
|
||||
value
|
||||
? typeof value != "object"
|
||||
? parseISO(value)
|
||||
: value
|
||||
: null
|
||||
} //{parseISO(value) || null}
|
||||
className="govuk-input govuk-input--width-10"
|
||||
minDate={minDate}
|
||||
maxDate={maxDate}
|
||||
|
||||
// value={!value ? null : new Date(value)}
|
||||
//value={!value ? null : moment(value, "DD/MM/yyyy")}
|
||||
/>
|
||||
</fieldset>
|
||||
</div>
|
||||
@@ -554,6 +568,7 @@ const RenderYesNo = ({
|
||||
type="radio"
|
||||
className="govuk-radios__input"
|
||||
value={options[key]}
|
||||
//checked={value == options[key]}
|
||||
onChange={(e) => {
|
||||
let docListObj = custom.documentList;
|
||||
if (
|
||||
@@ -690,6 +705,10 @@ const RenderRadio = ({
|
||||
type="radio"
|
||||
className="govuk-radios__input"
|
||||
value={options[key].split("|")[0]}
|
||||
// checked={
|
||||
// value ==
|
||||
// parseInt(options[key].split("|")[0])
|
||||
// }
|
||||
onChange={(e) => {
|
||||
let docListObj = custom.documentList;
|
||||
if (
|
||||
@@ -748,15 +767,23 @@ export function Radiofield(props) {
|
||||
.split(",");
|
||||
|
||||
//parentFieldShowOnValue
|
||||
var showIfHasParentShowValue =
|
||||
parentField != false &&
|
||||
!_.isEmpty(formProps[form]) &&
|
||||
_.has(formProps[form].values, parentField) &&
|
||||
parentFieldShowOnValue.indexOf(
|
||||
formProps[form].values[parentField].toString()
|
||||
) > -1;
|
||||
var showIfHasParentShowValue = parentField != false;
|
||||
//debugger;
|
||||
// parentField != false &&
|
||||
// !_.isEmpty(formProps[form]) &&
|
||||
// _.has(formProps[form].values, parentField) &&
|
||||
// parentFieldShowOnValue.indexOf(
|
||||
// formProps[form].values[parentField].toString()
|
||||
// ) > -1;
|
||||
|
||||
// console.log(showIfHasParentShowValue);
|
||||
(showIfHasParentShowValue == parentField) != false &&
|
||||
showIfHasParentShowValue;
|
||||
|
||||
console.log(
|
||||
datafieldname,
|
||||
showIfHasParentShowValue,
|
||||
formProps[form].values[parentField]
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user