From 53e96b18bd79e2114625bc6c261d5edb9f999319 Mon Sep 17 00:00:00 2001 From: rdbsolutions Date: Tue, 4 Jun 2024 07:56:35 +0100 Subject: [PATCH] updated to fix breadcrumb --- components/case/representation/index.js | 6 +- .../representation/representationAgent.js | 49 +++++++-------- .../representation/representationAppellant.js | 50 ++++++++-------- .../representation/representationElements.js | 7 ++- .../representationInterestedPartyPerson.js | 59 ++++++++++--------- .../representation/representationLandowner.js | 40 +++++++------ components/myportal/viewall.js | 1 + 7 files changed, 112 insertions(+), 100 deletions(-) diff --git a/components/case/representation/index.js b/components/case/representation/index.js index db17e814..fdc56e91 100644 --- a/components/case/representation/index.js +++ b/components/case/representation/index.js @@ -322,9 +322,9 @@ let MakeRepresentation = (props) => { todaysDate <= statementDueDate && buildArr.push("Statement"); - currentView.caseReference.appealType != 846040004 && - currentView.caseReference.appealType == 846040015 && - currentView.caseReference.specialistProcess != 846040001 && + (currentView.caseReference.appealType != 846040004 || + (currentView.caseReference.appealType == 846040015 && + currentView.caseReference.specialistProcess != 846040001)) && todaysDate >= statementDueDate && todaysDate <= finalCommentsDate && buildArr.push("Final comments"); diff --git a/components/case/representation/representationAgent.js b/components/case/representation/representationAgent.js index 64d97291..2babc922 100644 --- a/components/case/representation/representationAgent.js +++ b/components/case/representation/representationAgent.js @@ -196,31 +196,34 @@ const RepAgent = (props) => { )} -
-
- + {typeof formObj.representationForm.values.representationType != + "undefined" && ( +
+
+ - { - setRepresentationCapacity(); - props.updateField( - "representationForm", - "representationCapacity", - "" - ); - }} - className="govuk-link" - > - {t("common:back-link")} - + { + setRepresentationCapacity(); + props.updateField( + "representationForm", + "representationCapacity", + "" + ); + }} + className="govuk-link" + > + {t("common:back-link")} + +
-
+ )} ); }; diff --git a/components/case/representation/representationAppellant.js b/components/case/representation/representationAppellant.js index f7f8d9e1..a61f748f 100644 --- a/components/case/representation/representationAppellant.js +++ b/components/case/representation/representationAppellant.js @@ -180,31 +180,33 @@ const RepAppellant = (props) => {
{" "} )} -
-
- - - { - setRepresentationCapacity(); - props.updateField( - "representationForm", - "representationType", - "" - ); - }} - className="govuk-link" - > - {t("common:back-link")} - + {typeof formObj.representationForm.values.representationType != + "undefined" && ( +
+
+ + { + setRepresentationCapacity(); + props.updateField( + "representationForm", + "representationType", + "" + ); + }} + className="govuk-link" + > + {t("common:back-link")} + +
-
+ )} ); }; diff --git a/components/case/representation/representationElements.js b/components/case/representation/representationElements.js index 78551695..18257770 100644 --- a/components/case/representation/representationElements.js +++ b/components/case/representation/representationElements.js @@ -468,7 +468,7 @@ export const RenderPickList = ({ datafieldname, name, label, - input, + input: { onChange, value }, optionsArr, meta: { touched, error }, errorMsg, @@ -493,14 +493,15 @@ export const RenderPickList = ({ {errorMsg} )} - + {value}