added display of representatons on my portal
This commit is contained in:
@@ -49,6 +49,7 @@ let MakeRepresentation = (props) => {
|
||||
watchedCases,
|
||||
awaitingSubmission,
|
||||
searchResultsObj,
|
||||
representationSubmit,
|
||||
currentType,
|
||||
currentView,
|
||||
setRepresentationCapacity,
|
||||
@@ -160,7 +161,7 @@ let MakeRepresentation = (props) => {
|
||||
/>
|
||||
);
|
||||
break;
|
||||
case "interestedpartyperson":
|
||||
case "interestedparty/person":
|
||||
// setRepresentationCapacity("interestedpartyperson");
|
||||
return (
|
||||
<RepInterestedPartyPerson
|
||||
@@ -232,27 +233,31 @@ let MakeRepresentation = (props) => {
|
||||
|
||||
return (
|
||||
<div>
|
||||
{repForm["representationForm.submitSucceeded"] == true ? (
|
||||
<RepCompleteSubmit
|
||||
formObj={formObj}
|
||||
capacityOptionsArr={capacityOptionsArr}
|
||||
currentType={currentType}
|
||||
casesObj={casesObj}
|
||||
setRepresentationCapacity={setRepresentationCapacity}
|
||||
setRepresentationSubmit={setRepresentationSubmit}
|
||||
currentView={currentView}
|
||||
setSubmitBack={setSubmitBack}
|
||||
setRepresentationSubmitConfirmation={
|
||||
setRepresentationSubmitConfirmation
|
||||
}
|
||||
/>
|
||||
) : (
|
||||
<form onSubmit={handleSubmit(onHandleSubmit)}>
|
||||
{whichControl()}
|
||||
</form>
|
||||
)}
|
||||
|
||||
{console.log("is submitted", currentView.representationSubmit)}
|
||||
<form onSubmit={handleSubmit(onHandleSubmit)}>
|
||||
{representationSubmit == true ? (
|
||||
<RepCompleteSubmit
|
||||
formObj={formObj}
|
||||
capacityOptionsArr={capacityOptionsArr}
|
||||
currentType={currentType}
|
||||
casesObj={casesObj}
|
||||
setRepresentationCapacity={setRepresentationCapacity}
|
||||
setRepresentationSubmit={setRepresentationSubmit}
|
||||
currentView={currentView}
|
||||
setSubmitBack={setSubmitBack}
|
||||
setRepresentationSubmitConfirmation={
|
||||
setRepresentationSubmitConfirmation
|
||||
}
|
||||
/>
|
||||
) : (
|
||||
<>
|
||||
<h1 className="govuk-heading-l">
|
||||
Make a representation on:{" "}
|
||||
{currentView.caseReference.currentReference}
|
||||
</h1>
|
||||
{whichControl()}
|
||||
</>
|
||||
)}
|
||||
</form>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -271,8 +276,8 @@ const mapStateToProps = (state) => {
|
||||
const mapDispatchToProps = (dispatch) => {
|
||||
return {
|
||||
setRepresentationCapacity: (representationCapacity) => {
|
||||
dispatch(setRepresentationCapacity(representationCapacity));
|
||||
dispatch(reset("representationForm"));
|
||||
dispatch(setRepresentationCapacity(representationCapacity));
|
||||
},
|
||||
setRepresentationSubmit: (representationSubmit) => {
|
||||
dispatch(setRepresentationSubmit(representationSubmit));
|
||||
|
||||
Reference in New Issue
Block a user