Unverified Commit 732a6aa1 authored by Zhou (Link)  Fang's avatar Zhou (Link) Fang Committed by GitHub
Browse files

Fixed duplicated contacts issue (#261)

* Fixed contact id issue

* Fixed contact id changes accidentally

* Fixed Signing Authority id undefined issue
parent 78231aab
......@@ -529,21 +529,21 @@ function callSendData(
case 'representative.member':
setFieldValueObj.method(
`${setFieldValueObj.fieldName}.id`,
data?.id
data[0]?.id
);
break;
case 'representative.marketing':
setFieldValueObj.method(
`${setFieldValueObj.fieldName}.id`,
data?.id
data[0]?.id
);
break;
case 'representative.accounting':
setFieldValueObj.method(
`${setFieldValueObj.fieldName}.id`,
data?.id
data[0]?.id
);
break;
......@@ -561,11 +561,11 @@ function callSendData(
case 'signingAuthorityRepresentative':
setFieldValueObj.method.signingAuthority(
`${setFieldValueObj.fieldName}.id`,
data?.id
data[0]?.id
);
setFieldValueObj.method.companyInfo(
`${setFieldValueObj.fieldName}.id`,
data?.id
data[0]?.id
);
break;
......
......@@ -44,6 +44,7 @@ const Contacts = ({ formik }) => {
const newValues = {
...repInfo,
sameAsCompany: isChecked,
id: formik.values.representative[fieldName].id
};
formik.setFieldValue(`representative.${fieldName}`, newValues);
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment