Можно как-то привести к более короткой записи?
handleSubmitFormAdd = async (fields) => {
const {
inn,
kpp,
ogrn,
ogrnIssueDate,
organizationName,
phone,
email,
webAddress,
address,
accreditationState,
accreditationDate,
accreditationEndDate,
description,
} = fields;
const data = {
data: {
inn: inn || null,
kpp: kpp || null,
ogrn: ogrn || null,
ogrnIssueDate: ogrnIssueDate ? convertToDtoDate(ogrnIssueDate) : null,
organizationName: organizationName || null,
phone: phone || null,
email: email || null,
webAddress: webAddress || null,
address: address || null,
accreditationState: accreditationState || null,
accreditationDate: accreditationDate ? convertToDtoDate(accreditationDate) : null,
accreditationEndDate: accreditationEndDate ? convertToDtoDate(accreditationEndDate) : null,
description: description || null,
},
};
const response = await this.props.saveEvaluationCompany(data);
this.setState({
isErrorAdd: response.exception ? 'FAILED' : 'SUCCESS',
});
}