diff --git a/components/questionnaire/forms/Form_1_Main/index.js b/components/questionnaire/forms/Form_1_Main/index.js
index 8fa98f4..17eb09f 100644
--- a/components/questionnaire/forms/Form_1_Main/index.js
+++ b/components/questionnaire/forms/Form_1_Main/index.js
@@ -15,6 +15,7 @@ import QuestionnaireForm from "../QuestionnaireForm";
import { reduxWrapper } from '../../../../store';
import { saveQuestionnaire } from "../../../../actions";
import FormMessage from "../FormMessage";
+import { traceDebug } from "../../../../utils";
class Form_1_Main extends QuestionnaireForm
{
@@ -150,6 +151,10 @@ class Form_1_Main extends QuestionnaireForm
{
this.ref_submit.current.click();
}
+ else
+ {
+ traceDebug({ errors });
+ }
});
}
diff --git a/components/questionnaire/forms/Form_2_Contacts/index.js b/components/questionnaire/forms/Form_2_Contacts/index.js
index ea7f57e..5832d40 100644
--- a/components/questionnaire/forms/Form_2_Contacts/index.js
+++ b/components/questionnaire/forms/Form_2_Contacts/index.js
@@ -15,6 +15,7 @@ import { reduxWrapper } from '../../../../store';
import AddressSuggests from "../../AddressSuggests";
import { saveQuestionnaire } from "../../../../actions";
import FormMessage from "../FormMessage";
+import { traceDebug } from "../../../../utils";
class Form_2_Contacts extends QuestionnaireForm
{
@@ -101,7 +102,14 @@ class Form_2_Contacts extends QuestionnaireForm
this.setState({ errors }, () =>
{
window.scroll(0, 0);
- this.ref_submit.current.click();
+ if(errors.length === 0)
+ {
+ this.ref_submit.current.click();
+ }
+ else
+ {
+ traceDebug({ errors });
+ }
});
}
diff --git a/components/questionnaire/forms/Form_3_Signer/index.js b/components/questionnaire/forms/Form_3_Signer/index.js
index 810817c..c3405e0 100644
--- a/components/questionnaire/forms/Form_3_Signer/index.js
+++ b/components/questionnaire/forms/Form_3_Signer/index.js
@@ -29,6 +29,7 @@ import { getCitizenshipTitleByCode } from "../../../../utils/citizenship";
import { removeAttachmentFiles, saveQuestionnaire, getSuggests, checkDocumentData } from "../../../../actions";
import DocumentIssuerSuggestsInput from "../../DocumentIssuerSuggestsInput";
import FormMessage from "../FormMessage";
+import { traceDebug } from "../../../../utils";
const is_valid_inn = (i) =>
{
@@ -379,9 +380,6 @@ class Form_3_Signer extends QuestionnaireForm
_handle_onSignerFromListSelect = (contact) =>
{
- //console.log(contact);
-
-
const signer = { ...JSON.parse(JSON.stringify(signer_template)), ...contact };
if(signer.identity_document === undefined || signer.identity_document === null)
{
@@ -418,7 +416,7 @@ class Form_3_Signer extends QuestionnaireForm
"identity_document.docnumber",
"identity_document.issuedate",
"identity_document.placebirth",
- "identity_document.citizenship_code",
+ "identity_document.citizenship.code",
"identity_document.registration_address.name",
/*
Запрос 2024-02-08 на удаление даты назначения и даты окончания полномочий
@@ -437,7 +435,7 @@ class Form_3_Signer extends QuestionnaireForm
{
const v = _get(head_person, head_person_check[i]);
- if(v === "" || v === null)
+ if(v === "" || v === null || v === undefined)
{
errors.push(`head_person.${ head_person_check[i] }`);
}
@@ -572,7 +570,7 @@ class Form_3_Signer extends QuestionnaireForm
}
else
{
- if(v === "" || v === null)
+ if(v === "" || v === null || v === undefined)
{
errors.push(`main.${ main_check[i] }`);
}
@@ -635,7 +633,7 @@ class Form_3_Signer extends QuestionnaireForm
{
let v = _get(signatory_person, signatory_person_check[i]);
- if(v === "" || v === null)
+ if(v === "" || v === null || v === undefined)
{
errors.push(`signatory_person.${ signatory_person_check[i] }`);
}
@@ -677,6 +675,10 @@ class Form_3_Signer extends QuestionnaireForm
{
this.ref_submit.current.click();
}
+ else
+ {
+ traceDebug({ errors });
+ }
});
});
}
@@ -705,8 +707,6 @@ class Form_3_Signer extends QuestionnaireForm
client_contacts,
} = this.state;
- //console.log({ errors });
-
let head_person_citizenship = { label: getCitizenshipTitleByCode(head_person.identity_document.citizenship.code), code: head_person.identity_document.citizenship.code };
let signatory_person_citizenship = { label: getCitizenshipTitleByCode(signatory_person.identity_document.citizenship.code), code: signatory_person.identity_document.citizenship.code };
@@ -876,7 +876,7 @@ class Form_3_Signer extends QuestionnaireForm
{ parseInt(head_person.identity_document.doctype, 10) !== 100000000 && (
-
+
-
-
- -1 ? "error" : "" }
- type="issuer"
- id="signatory_person.identity_document.issueby"
- name="signatory_person.identity_document.issueby"
- value={ this._checkStrValue(signatory_person.identity_document.issueby) }
- placeholder="Введите наименование подразделения выдавшего документ"
- onChange={ (value) => { this._removeError("signatory_person.identity_document.issueby"); this._handle_onIssuerChange("signatory_person", value); } }
- required={ true }
- disabled={ checking }
- />
-
+ { parseInt(signatory_person.identity_document.doctype, 10) === 100000000 && (
+
+
+ -1 ? "error" : "" }
+ type="issuer"
+ id="signatory_person.identity_document.issueby"
+ name="signatory_person.identity_document.issueby"
+ value={ this._checkStrValue(signatory_person.identity_document.issueby) }
+ placeholder="Введите наименование подразделения выдавшего документ"
+ onChange={ (value) => { this._removeError("signatory_person.identity_document.issueby"); this._handle_onIssuerChange("signatory_person", value); } }
+ required={ true }
+ disabled={ checking }
+ />
+
+ ) }
@@ -1388,7 +1390,7 @@ class Form_3_Signer extends QuestionnaireForm
{ parseInt(signatory_person.identity_document.doctype, 10) !== 100000000 && (
-
+
-
-
- -1 ? "error" : "" }
- type="issuer"
- id={ `founder_persons[${ index }].identity_document.issueby` }
- name={ `founder_persons[${ index }].identity_document.issueby` }
- value={ this._checkStrValue(shareholder.identity_document.issueby) }
- placeholder="Введите наименование подразделения выдавшего документ"
- onChange={ (value) => { this._handle_onIssuerChange(`founder_persons[${ index }]`, index, value); } }
- maxResults={ 10 }
- required={ true }
- disabled={ checking }
- />
-
+ { parseInt(shareholder.identity_document.doctype, 10) === 100000000 && (
+
+
+ -1 ? "error" : "" }
+ type="issuer"
+ id={ `founder_persons[${ index }].identity_document.issueby` }
+ name={ `founder_persons[${ index }].identity_document.issueby` }
+ value={ this._checkStrValue(shareholder.identity_document.issueby) }
+ placeholder="Введите наименование подразделения выдавшего документ"
+ onChange={ (value) => { this._handle_onIssuerChange(`founder_persons[${ index }]`, index, value); } }
+ maxResults={ 10 }
+ required={ true }
+ disabled={ checking }
+ />
+
+ ) }
@@ -329,7 +332,7 @@ class ShareholderForm extends React.Component
{ parseInt(shareholder.identity_document.doctype, 10) !== 100000000 && (
-
+