fix for signer and executive
This commit is contained in:
parent
a73b96d3c2
commit
b6d186ae0c
@ -162,6 +162,32 @@ export const getQuestionnaire = ({ dispatch, id }) =>
|
||||
}
|
||||
}
|
||||
|
||||
const main_params = [
|
||||
"board_of_directors",
|
||||
"collective_executive",
|
||||
"high_level",
|
||||
"individual_executive",
|
||||
"other_control",
|
||||
"individual_executive_docdate",
|
||||
"individual_executive_docnum",
|
||||
"individual_executive_inn",
|
||||
"individual_executive_kpp",
|
||||
"individual_executive_oop",
|
||||
];
|
||||
|
||||
for(let i in main_params)
|
||||
{
|
||||
if(response.data[main_params[i]] !== null)
|
||||
{
|
||||
questionnaire.main[main_params[i]] = response.data[main_params[i]];
|
||||
}
|
||||
}
|
||||
|
||||
if(response.data.is_individual_executive)
|
||||
{
|
||||
questionnaire.main.is_individual_executive = true;
|
||||
}
|
||||
|
||||
//questionnaire.founder_persons = { ...questionnaire.head_person, ...response.data.head_person };
|
||||
|
||||
console.log("questionnairequestionnairequestionnaire FROM JSON", questionnaire);
|
||||
|
||||
@ -518,7 +518,7 @@ class Form_3_Signer extends QuestionnaireForm
|
||||
|
||||
if(main_check[i] === "individual_executive_inn")
|
||||
{
|
||||
if(!is_valid_inn(v.replace(/[^\d]+/g, '')))
|
||||
if(v !== null && !is_valid_inn(v.replace(/[^\d]+/g, '')))
|
||||
{
|
||||
errors.push(`main.individual_executive_inn`);
|
||||
}
|
||||
@ -612,6 +612,17 @@ class Form_3_Signer extends QuestionnaireForm
|
||||
|
||||
if(head_person_files.length === 0) { errors.push(`head_person_files`); }
|
||||
|
||||
if(head_person.lastname !== null && head_person.lastname !== "" && head_person.firstname !== null && head_person.firstname !== "")
|
||||
{
|
||||
if(signatory_person.lastname !== null && signatory_person.lastname !== "" && signatory_person.firstname !== null && signatory_person.firstname !== "")
|
||||
{
|
||||
if(head_person.lastname === signatory_person.lastname && head_person.firstname === signatory_person.firstname)
|
||||
{
|
||||
errors.push(`signatory_person.identical`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.setState({ errors, loading: false }, () =>
|
||||
{
|
||||
window.scroll(0, 0);
|
||||
@ -1094,6 +1105,11 @@ class Form_3_Signer extends QuestionnaireForm
|
||||
</React.Fragment>
|
||||
) }
|
||||
|
||||
{ errors.indexOf("signatory_person.identical") > -1 &&
|
||||
(
|
||||
<FormMessage type="error" title="Ошибка" message="Единоличный исполнительный орган и подписант договора лизинга совпадают. Укажите иного подписанта или откажитесь от указания иного подписанта."/>
|
||||
) }
|
||||
|
||||
<div className="form_field">
|
||||
<div className="form_field checkbox">
|
||||
<input type="checkbox"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user