Merged PR 2288: add in company name for appellant and autofill agent details in new appeal
add in company name for appellant and autofill agent details in new appeal Related work items: #22842
This commit is contained in:
@@ -452,6 +452,14 @@ let AboutYou = (props) => {
|
||||
const isAgentSelected = appellantAgentValue == "846040001";
|
||||
const isAppellantSelected = appellantAgentValue == "846040000";
|
||||
|
||||
console.log(
|
||||
"================",
|
||||
props.initialValues.pinswg_typeofinvolvement
|
||||
);
|
||||
|
||||
//props.initialValues.pinswg_typeofinvolvement === 846040000 &&
|
||||
// setIsAgent(true);
|
||||
|
||||
const yesNo = isWelsh ? ["Ydw", "Na"] : ["Yes", "No"];
|
||||
const appellantAgent = isWelsh
|
||||
? ["Apelydd", "Asiant"]
|
||||
@@ -499,11 +507,14 @@ let AboutYou = (props) => {
|
||||
if (isAgentSelected && isAgent == false) {
|
||||
updateField("caseForm", "pinswg_appellantfirstname", "");
|
||||
updateField("caseForm", "pinswg_appellantlastname", "");
|
||||
updateField("caseForm", "company", "");
|
||||
updateField("caseForm", "pinswg_appellantemailaddress", "");
|
||||
updateField("caseForm", "pinswg_appellantaddress", "");
|
||||
updateField("caseForm", "pinswg_appellantphonenumber", "");
|
||||
setIsAgent(true);
|
||||
} //else {
|
||||
}
|
||||
|
||||
//else {
|
||||
// updateField(
|
||||
// "caseForm",
|
||||
// "pinswg_appellantfirstname",
|
||||
@@ -602,6 +613,18 @@ let AboutYou = (props) => {
|
||||
)}
|
||||
maxFieldLength="200"
|
||||
/>
|
||||
<Field
|
||||
name={"pinswg_appellantcompany"}
|
||||
id={"pinswg_appellantcompany"}
|
||||
component={RenderTextfield}
|
||||
type="text"
|
||||
className="govuk-input govuk-input--width-20"
|
||||
validate={[required, emojicheck]}
|
||||
label={t(
|
||||
"newappeal:about-you-agent-contact-details-companyname-label"
|
||||
)}
|
||||
maxFieldLength="200"
|
||||
/>
|
||||
<Field
|
||||
name={"pinswg_appellantaddress"}
|
||||
id={"pinswg_appellantaddress"}
|
||||
@@ -889,12 +912,27 @@ const mapStateToProps = (state) => {
|
||||
state.accountDetails.accountDetails.firstname,
|
||||
pinswg_appellantlastname:
|
||||
state.accountDetails.accountDetails.lastname,
|
||||
pinswg_appellantcompany:
|
||||
state.accountDetails.accountDetails.company,
|
||||
pinswg_appellantemailaddress:
|
||||
state.accountDetails.accountDetails.emailaddress1,
|
||||
pinswg_appellantaddress:
|
||||
state.accountDetails.accountDetails.address1_composite,
|
||||
pinswg_appellantphonenumber:
|
||||
state.accountDetails.accountDetails.telephone1
|
||||
state.accountDetails.accountDetails.telephone1,
|
||||
pinswg_agentcompanyname:
|
||||
state.accountDetails.accountDetails.company,
|
||||
pinswg_agentfirstname:
|
||||
state.accountDetails.accountDetails.firstname,
|
||||
pinswg_agentlastname: state.accountDetails.accountDetails.lastname,
|
||||
pinswg_agentemailaddress:
|
||||
state.accountDetails.accountDetails.emailaddress1,
|
||||
pinswg_agentaddress:
|
||||
state.accountDetails.accountDetails.address1_composite,
|
||||
pinswg_agentphonenumber:
|
||||
state.accountDetails.accountDetails.telephone1,
|
||||
pinswg_typeofinvolvement:
|
||||
state.accountDetails.accountDetails.pinswg_typeofinvolvement
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user