diff --git a/components/questionnaire/AddressSuggests.js b/components/questionnaire/AddressSuggests.js index 91a837c..bb123e0 100644 --- a/components/questionnaire/AddressSuggests.js +++ b/components/questionnaire/AddressSuggests.js @@ -141,7 +141,7 @@ export default class AddressSuggests extends React.Component
{ options.map((option, index) => ( -
{ event.preventDefault(); this._handle_onSelect(option.value); } }>{ option.value }
+
{ event.preventDefault(); this._handle_onSelect(option.value); } }>{ option.value }
)) }
diff --git a/components/questionnaire/SuggestsInput.js b/components/questionnaire/SuggestsInput.js index 944e7f3..c1750ec 100644 --- a/components/questionnaire/SuggestsInput.js +++ b/components/questionnaire/SuggestsInput.js @@ -185,11 +185,11 @@ export default class SuggestsInput extends React.Component disabled={ disabled } /> { focused && options.length > 0 && ( -
+
{ options.map((option, index) => ( -
this._handle_onSelect(option.value) }>{ option.value }
+
this._handle_onSelect(option.value) }>{ option.value }
)) }
diff --git a/components/questionnaire/forms/FormMessage.js b/components/questionnaire/forms/FormMessage.js new file mode 100644 index 0000000..924927e --- /dev/null +++ b/components/questionnaire/forms/FormMessage.js @@ -0,0 +1,27 @@ +import React from "react"; + +export default class FormMessage extends React.Component +{ + constructor(props) + { + super(props); + this.state = { + }; + } + + render() + { + const { type, title, message } = this.props; + + return ( +
+ + + +

{ title } + { message } +

+
+ ) + } +} \ No newline at end of file diff --git a/components/questionnaire/forms/Form_1_Main/index.js b/components/questionnaire/forms/Form_1_Main/index.js index 2e92e94..1196fc1 100644 --- a/components/questionnaire/forms/Form_1_Main/index.js +++ b/components/questionnaire/forms/Form_1_Main/index.js @@ -14,6 +14,7 @@ import CurrencyInput from 'react-currency-input'; import QuestionnaireForm from "../QuestionnaireForm"; import { reduxWrapper } from '../../../../store'; import { saveQuestionnaire } from "../../../../actions"; +import FormMessage from "../FormMessage"; class Form_1_Main extends QuestionnaireForm { @@ -99,6 +100,15 @@ class Form_1_Main extends QuestionnaireForm } } + if(main.websiteurl !== null && main.websiteurl !== "") + { + const r = new RegExp('^(http:\/\/|^https:\/\/)?[a-zA-ZА-я0-9][a-zA-ZА-я0-9-]{1,61}[a-zA-ZА-я0-9](?:\.[a-zA-ZА-я]{2,})+', 'g'); + if(!r.test(main.websiteurl)) + { + errors.push(`main.websiteurl`); + } + } + this.setState({ errors }, () => { window.scroll(0, 0); @@ -118,7 +128,7 @@ class Form_1_Main extends QuestionnaireForm this._handle_onFieldChange("step", 6); } } - + _handle_onFormSubmit = (event) => { event.preventDefault(); @@ -159,14 +169,7 @@ class Form_1_Main extends QuestionnaireForm

1. Информация о лизингополучателе

{ errors.length > 0 && ( -
- - - -

Ошибка - Пожалуйста, проверьте корректность заполнения данных в форме. -

-
+ ) }
@@ -191,7 +194,7 @@ class Form_1_Main extends QuestionnaireForm name="main.inn" value={ this._checkStrValue(main.inn) } placeholder="Введите ИНН" - onChange={ (event) => {this._removeError("main.inn"); this._handle_onTextFieldChange(event.target.name, event.target.value); } } + onChange={ (event) => { this._removeError("main.inn"); this._handle_onTextFieldChange(event.target.name, event.target.value); } } required={ true } disabled={ true } maxLength={ 12 } @@ -206,7 +209,7 @@ class Form_1_Main extends QuestionnaireForm name="main.kpp" value={ this._checkStrValue(main.kpp) } placeholder="Введите КПП" - onChange={ (event) => {this._removeError("main.kpp"); this._handle_onTextFieldChange(event.target.name, event.target.value); } } + onChange={ (event) => { this._removeError("main.kpp"); this._handle_onTextFieldChange(event.target.name, event.target.value); } } required={ true } disabled={ true } /> @@ -226,19 +229,21 @@ class Form_1_Main extends QuestionnaireForm placeholder="Введите номер" onChange={ (event) => { if(event.target.value !== "" && !isNaN(parseInt(event.target.value.replace(/[^\d]+/g, ''), 10)) && parseInt(event.target.value.replace(/[^\d]+/g, ''), 10) > 7) { this._removeError("main.telephone"); } this._handle_onTextFieldChange(event.target.name, event.target.value); } } required={ true } - disabled={ checking } > + disabled={ checking }>
- + -1 ? "error" : "" } id="main.websiteurl" name="main.websiteurl" value={ this._checkStrValue(main.websiteurl) } - placeholder="Введите адрес сайта, если есть" - onChange={ (event) => { this._handle_onTextFieldChange(event.target.name, event.target.value); } } + placeholder="Например https://example.com" + onChange={ (event) => { this._removeError(event.target.name); this._handle_onTextFieldChange(event.target.name, event.target.value); } } disabled={ checking } + pattern="^(http:\/\/|^https:\/\/)?[a-zA-ZА-я0-9][a-zA-ZА-я0-9-]{1,61}[a-zA-ZА-я0-9](?:\.[a-zA-ZА-я]{2,})+" />
diff --git a/components/questionnaire/forms/Form_2_Contacts/index.js b/components/questionnaire/forms/Form_2_Contacts/index.js index e344cff..22d2698 100644 --- a/components/questionnaire/forms/Form_2_Contacts/index.js +++ b/components/questionnaire/forms/Form_2_Contacts/index.js @@ -14,6 +14,7 @@ import QuestionnaireForm from "../QuestionnaireForm"; import { reduxWrapper } from '../../../../store'; import AddressSuggests from "../../AddressSuggests"; import { saveQuestionnaire } from "../../../../actions"; +import FormMessage from "../FormMessage"; class Form_2_Contacts extends QuestionnaireForm { @@ -118,14 +119,7 @@ class Form_2_Contacts extends QuestionnaireForm

2. Адреса лизингополучателя

{ errors.length > 0 && ( -
- - - -

Ошибка - Пожалуйста, проверьте корректность заполнения данных в форме. -

-
+ ) }
diff --git a/components/questionnaire/forms/Form_3_Signer/index.js b/components/questionnaire/forms/Form_3_Signer/index.js index 4e74a76..43387d1 100644 --- a/components/questionnaire/forms/Form_3_Signer/index.js +++ b/components/questionnaire/forms/Form_3_Signer/index.js @@ -28,6 +28,7 @@ import SuggestsInput from "../../SuggestsInput"; import { getCitizenshipTitleByCode } from "../../../../utils/citizenship"; import { removeAttachmentFiles, saveQuestionnaire, getSuggests } from "../../../../actions"; import DocumentIssuerSuggestsInput from "../../DocumentIssuerSuggestsInput"; +import FormMessage from "../FormMessage"; const suggestsInnDebounce = (query) => { @@ -107,7 +108,7 @@ class Form_3_Signer extends QuestionnaireForm telephone: "", email: "", identity_document: { - docype: "", + doctype: "", seria: "", docnumber: "", issuedate: "", @@ -186,6 +187,7 @@ class Form_3_Signer extends QuestionnaireForm { name: `${ branch }.identity_document.code`, value: option.data.code }, { name: `${ branch }.identity_document.issueby`, value: option.value }, ]); + this._removeError(`${ branch }.identity_document.issueby`); } } @@ -203,6 +205,7 @@ class Form_3_Signer extends QuestionnaireForm { name: `${ branch }.identity_document.code`, value: option.data.code }, { name: `${ branch }.identity_document.issueby`, value: option.value }, ]); + this._removeError(`${ branch }.identity_document.code`); } } @@ -276,6 +279,14 @@ class Form_3_Signer extends QuestionnaireForm }); } + _handle_onDocumentTypeChange = (branch, element) => + { + this._handle_onBranchChange([ + { name: `${ branch }.identity_document.doctype`, value: element.value }, + { name: `${ branch }.identity_document.citizenship_code`, value: element.value === 100000000 ? 643 : null }, + ]); + } + _handle_onNextPage = (event) => { event.preventDefault(); @@ -296,7 +307,7 @@ class Form_3_Signer extends QuestionnaireForm "identity_document.issuedate", "identity_document.placebirth", "identity_document.citizenship_code", - "identity_document.registration_address.title", + "identity_document.registration_address.name", "evo_assignment_date", ]; @@ -308,7 +319,7 @@ class Form_3_Signer extends QuestionnaireForm for(let i in head_person_check) { - let v = _get(head_person, head_person_check[i]); + const v = _get(head_person, head_person_check[i]); if(v === "" || v === null) { @@ -316,12 +327,52 @@ class Form_3_Signer extends QuestionnaireForm } } + if(head_person.evo_assignment_date !== undefined && head_person.evo_assignment_date !== null && head_person.evo_assignment_date !== "") + { + try + { + const date = moment(head_person.evo_assignment_date); + const today = moment(); + + if(date > today) + { + errors.push(`head_person.evo_assignment_date`); + errors.push(`head_person.evo_assignment_date_invalid`); + } + } + catch(e) + { + errors.push(`head_person.evo_assignment_date`); + errors.push(`head_person.evo_assignment_date_invalid`); + } + } + if(!head_person.evo_indefinite) { if(head_person.evo_credentials_dateend === "") { errors.push(`head_person.evo_credentials_dateend`); } + + if(head_person.evo_credentials_dateend !== undefined && head_person.evo_credentials_dateend !== null && head_person.evo_credentials_dateend !== "") + { + try + { + const date = moment(head_person.evo_credentials_dateend); + const today = moment(); + + if(date < today) + { + errors.push(`head_person.evo_credentials_dateend`); + errors.push(`head_person.evo_credentials_dateend_invalid`); + } + } + catch(e) + { + errors.push(`head_person.evo_credentials_dateend`); + errors.push(`head_person.evo_credentials_dateend_invalid`); + } + } } //переданы @@ -361,7 +412,9 @@ class Form_3_Signer extends QuestionnaireForm "identity_document.issuedate", "identity_document.placebirth", "identity_document.citizenship.code", - "identity_document.registration_address.title", + "identity_document.registration_address.name", + "docnumber", + "docdate", ]; if(parseInt(_get(signatory_person, "identity_document.doctype"), 10) === 100000000) @@ -400,20 +453,11 @@ class Form_3_Signer extends QuestionnaireForm this.setState({ errors }, () => { window.scroll(0, 0); - this.ref_submit.current.click(); + if(errors.length === 0) + { + this.ref_submit.current.click(); + } }); - //this.ref_form.current.submit(); - //this.ref_form.current.dispatchEvent(new Event('submit', { cancelable: true })); - } - - _removeError = (name) => - { - const errors = [ ...this.state.errors ]; - if(errors.indexOf(name) > -1) - { - errors.splice(errors.indexOf(name), 1); - } - this.setState({ errors }); } _handle_onFormSubmit = (event) => @@ -447,14 +491,7 @@ class Form_3_Signer extends QuestionnaireForm

3. Информация о единоличном исполнительном органе, подписанте договора лизинга

{ errors.length > 0 && ( -
- - - -

Ошибка - Пожалуйста, проверьте корректность заполнения данных в форме. -

-
+ ) }
@@ -469,17 +506,6 @@ class Form_3_Signer extends QuestionnaireForm required={ true } disabled={ checking } /> - {/*} - this._handle_onTextFieldChange(event.target.name, event.target.value) } - required={ true } - disabled={ checking } - /> - {*/}
@@ -494,17 +520,6 @@ class Form_3_Signer extends QuestionnaireForm required={ true } disabled={ checking } /> - {/*} - this._handle_onTextFieldChange(event.target.name, event.target.value) } - required={ true } - disabled={ checking } - /> - {*/}
@@ -518,16 +533,6 @@ class Form_3_Signer extends QuestionnaireForm required={ false } disabled={ checking } /> - {/*} - this._handle_onTextFieldChange(event.target.name, event.target.value) } - disabled={ checking } - /> - {*/}
@@ -537,11 +542,11 @@ class Form_3_Signer extends QuestionnaireForm options={ doctypes_personal } placeholder="Выберите тип документа" noOptionsMessage={ ({ inputValue }) => !inputValue ? noOptionsText :"Ничего не найдено" } - isSearchable={ true } + isSearchable={ false } className="autocomlete" classNamePrefix="react-select" value={ doctypes_personal.filter((type) => head_person.identity_document.doctype === type.value) } - onChange={ (element) => this._handle_onTextFieldChange(`head_person.identity_document.doctype`, element.value) } + onChange={ (element) => this._handle_onDocumentTypeChange("head_person", element) } required={ true } isDisabled={ checking } /> @@ -582,7 +587,9 @@ class Form_3_Signer extends QuestionnaireForm
-1 ? "error" : "" } placeholder="ДД.ММ.ГГГГ" + max={ moment().toDate() } id={ "head_person.identity_document.issuedate" } value={ this._checkStrValue(head_person.identity_document.issuedate) !== "" ? this._checkStrValue(head_person.identity_document.issuedate) : null } onChange={ (date) => { this._removeError("head_person.identity_document.issuedate"); this._handle_onTextFieldChange("head_person.identity_document.issuedate", date); } } @@ -600,25 +607,11 @@ class Form_3_Signer extends QuestionnaireForm name="head_person.identity_document.code" value={ this._checkStrValue(head_person.identity_document.code) } placeholder="Введите код" - onChange={ (value) => { this._handle_onIssuerCodeChange("head_person", value); } } + onChange={ (value) => { this._removeError("head_person.identity_document.code"); this._handle_onIssuerCodeChange("head_person", value); } } maxResults={ 5 } required={ true } disabled={ checking } /> - - {/*} - { this._removeError("head_person.identity_document.code"); this._handle_onTextFieldChange(event.target.name, event.target.value); } } - required={ true } - disabled={ checking } - /> - {*/} -
) }
@@ -633,26 +626,16 @@ class Form_3_Signer extends QuestionnaireForm name="head_person.identity_document.issueby" value={ this._checkStrValue(head_person.identity_document.issueby) } placeholder="Введите наименование подразделения выдавшего документ" - onChange={ (value) => { this._handle_onIssuerChange("head_person", value); } } + onChange={ (value) => { this._removeError("head_person.identity_document.issueby"); this._handle_onIssuerChange("head_person", value); } } required={ true } disabled={ checking } /> - {/*} - { this._removeError("head_person.identity_document.issueby"); this._handle_onTextFieldChange(event.target.name, event.target.value) } } - required={ true } - disabled={ checking } - /> - {*/}
) }
-1 ? "error" : "" } id={ "head_person.identity_document.placebirth" } value={ this._checkStrValue(head_person.identity_document.placebirth) } placeholder="Укажите место рождения" @@ -662,26 +645,29 @@ class Form_3_Signer extends QuestionnaireForm />
-
- - !inputValue ? noOptionsText :"Ничего не найдено" } + isSearchable={ true } + className="autocomlete" + classNamePrefix="react-select" + value={ head_person_citizenship.code !== null ? head_person_citizenship : undefined } + onChange={ (element) => { this._removeError("head_person.identity_document.citizenship"); this._handle_onCitizenshipChange(`head_person.identity_document.citizenship`, element.value) } } + required={ true } + isDisabled={ checking } + /> +
+ ) }
- -1 ? "error" : "" } value={ this._checkStrValue(head_person.identity_document.registration_address.name) } fias={ this._checkStrValue(head_person.identity_document.registration_address.fias_id) } placeholder="Укажите адрес регистрации" @@ -699,7 +685,7 @@ class Form_3_Signer extends QuestionnaireForm name="head_person.jobtitle" value={ this._checkStrValue(head_person.jobtitle) } placeholder="Укажите должность" - onChange={ (event) => this._handle_onTextFieldChange(event.target.name, event.target.value) } + onChange={ (event) => { this._removeError(event.target.name); this._handle_onTextFieldChange(event.target.name, event.target.value); } } required={ true } disabled={ checking } /> @@ -728,21 +714,27 @@ class Form_3_Signer extends QuestionnaireForm name={ "head_person.email" } value={ this._checkStrValue(head_person.email) } placeholder="Введите E-mail" - onChange={ (event) => this._handle_onTextFieldChange(event.target.name, event.target.value) } + onChange={ (event) => { this._removeError(event.target.name); this._handle_onTextFieldChange(event.target.name, event.target.value); } } required={ true } disabled={ checking } />
+ { errors.indexOf("head_person.evo_assignment_date_invalid") > -1 && + ( + + ) } +
-1 ? "error" : "" } placeholder="ДД.ММ.ГГГГ" + max={ moment().toDate() } id={ "head_person.evo_assignment_date" } value={ this._checkStrValue(head_person.evo_assignment_date) !== "" ? this._checkStrValue(head_person.evo_assignment_date) : null } - onChange={ (date) => { this._removeError("head_person.evo_assignment_date"); this._handle_onTextFieldChange("head_person.evo_assignment_date", date) } } + onChange={ (date) => { this._removeError([ "head_person.evo_assignment_date", "head_person.evo_assignment_date_invalid" ]); this._handle_onTextFieldChange("head_person.evo_assignment_date", date) } } required={ true } disabled={ checking } style={{maxWidth: "320px"}} @@ -761,33 +753,33 @@ class Form_3_Signer extends QuestionnaireForm
{ !head_person.evo_indefinite && ( -
- -
- -1 ? "error" : "" } - placeholder="ДД.ММ.ГГГГ" - id={ "head_person.evo_credentials_dateend" } - value={ this._checkStrValue(head_person.evo_credentials_dateend) !== "" ? this._checkStrValue(head_person.evo_credentials_dateend) : null } - onChange={ (date) => { this._handle_onTextFieldChange("head_person.evo_credentials_dateend", date) } } - required={ true } - disabled={ checking } - style={{maxWidth: "320px"}} - /> + + { errors.indexOf("head_person.evo_credentials_dateend_invalid") > -1 && + ( + + ) } +
+ +
+ -1 ? "error" : "" } + min={ moment().toDate() } + placeholder="ДД.ММ.ГГГГ" + id={ "head_person.evo_credentials_dateend" } + value={ this._checkStrValue(head_person.evo_credentials_dateend) !== "" ? this._checkStrValue(head_person.evo_credentials_dateend) : null } + onChange={ (date) => { this._removeError([ "head_person.evo_credentials_dateend", "head_person.evo_credentials_dateend_invalid" ]); this._handle_onTextFieldChange("head_person.evo_credentials_dateend", date) } } + required={ true } + disabled={ checking } + style={{maxWidth: "320px"}} + /> +
-
+ ) } { errors.indexOf("head_person_files") > -1 && ( -
- - - -

Ошибка - Пожалуйста, приложите как минимум одно отсканированное изображение или фотографию документа, подтверждающего личность. -

-
+ ) } this._handle_onInnChange(event.target.value) } + onChange={ (event) => { this._removeError(event.target.name); this._handle_onInnChange(event.target.value); } } required={ true } disabled={ checking } /> @@ -851,7 +843,7 @@ class Form_3_Signer extends QuestionnaireForm name="main.individual_executive_kpp" value={ this._checkStrValue(main.individual_executive_kpp) } placeholder="Введите КПП" - onChange={ (event) => this._handle_onTextFieldChange(event.target.name, event.target.value) } + onChange={ (event) => { this._removeError(event.target.name); this._handle_onTextFieldChange(event.target.name, event.target.value); } } required={ true } disabled={ checking } /> @@ -868,7 +860,7 @@ class Form_3_Signer extends QuestionnaireForm name="main.individual_executive_oop" value={ this._checkStrValue(main.individual_executive_oop) } placeholder="Укажите наименование" - onChange={ (event) => this._handle_onTextFieldChange(event.target.name, event.target.value) } + onChange={ (event) => { this._removeError(event.target.name); this._handle_onTextFieldChange(event.target.name, event.target.value); } } required={ true } disabled={ checking } /> @@ -884,7 +876,7 @@ class Form_3_Signer extends QuestionnaireForm name="main.individual_executive_docnum" value={ this._checkStrValue(main.individual_executive_docnum) } placeholder="Номер договора" - onChange={ (event) => this._handle_onTextFieldChange(event.target.name, event.target.value) } + onChange={ (event) => { this._removeError(event.target.name); this._handle_onTextFieldChange(event.target.name, event.target.value); } } disabled={ checking } />
@@ -895,9 +887,10 @@ class Form_3_Signer extends QuestionnaireForm className={ errors.indexOf("main.individual_executive_docdate") > -1 ? "error" : "" } style={{ width: "100%", }} placeholder="ДД.ММ.ГГГГ" + max={ moment().toDate() } id={ "main.individual_executive_docdate" } value={ this._checkStrValue(main.individual_executive_docdate) !== "" ? this._checkStrValue(main.individual_executive_docdate) : null } - onChange={ (date) => this._handle_onTextFieldChange("main.individual_executive_docdate", date) } + onChange={ (date) => { this._removeError("main.individual_executive_docdate"); this._handle_onTextFieldChange("main.individual_executive_docdate", date); } } required={ true } disabled={ checking } /> @@ -906,14 +899,7 @@ class Form_3_Signer extends QuestionnaireForm { errors.indexOf("delegation_files") > -1 && ( -
- - - -

Ошибка - Пожалуйста, приложите как минимум одно отсканированное изображение или фотографию документа, подтверждающего передачу полномочий. -

-
+ ) } this._handle_onTextFieldChange("signatory_person.lastname", value) } + onChange={ (value) => { this._removeError("signatory_person.lastname"); this._handle_onTextFieldChange("signatory_person.lastname", value); } } required={ true } disabled={ checking } /> @@ -972,7 +958,7 @@ class Form_3_Signer extends QuestionnaireForm name="signatory_person.firstname" value={ this._checkStrValue(signatory_person.firstname) } placeholder="Введите имя" - onChange={ (value) => this._handle_onTextFieldChange("signatory_person.firstname", value) } + onChange={ (value) => { this._removeError("signatory_person.firstname"); this._handle_onTextFieldChange("signatory_person.firstname", value); } } required={ true } disabled={ checking } /> @@ -1000,11 +986,11 @@ class Form_3_Signer extends QuestionnaireForm options={ doctypes_personal } placeholder="Выберите тип документа" noOptionsMessage={ ({ inputValue }) => !inputValue ? noOptionsText :"Ничего не найдено" } - isSearchable={ true } + isSearchable={ false } className="autocomlete" classNamePrefix="react-select" value={ doctypes_personal.filter((type) => signatory_person.identity_document.doctype === type.value) } - onChange={ (element) => this._handle_onTextFieldChange(`signatory_person.identity_document.doctype`, element.value) } + onChange={ (element) => this._handle_onDocumentTypeChange("signatory_person", element) } required={ true } isDisabled={ checking } /> @@ -1020,7 +1006,7 @@ class Form_3_Signer extends QuestionnaireForm name="signatory_person.identity_document.seria" value={ this._checkStrValue(signatory_person.identity_document.seria) } placeholder="Введите серию" - onChange={ (event) => this._handle_onTextFieldChange(event.target.name, event.target.value) } + onChange={ (event) => { this._removeError(event.target.name); this._handle_onTextFieldChange(event.target.name, event.target.value); } } required={ true } disabled={ checking } /> @@ -1035,7 +1021,7 @@ class Form_3_Signer extends QuestionnaireForm name="signatory_person.identity_document.docnumber" value={ this._checkStrValue(signatory_person.identity_document.docnumber) } placeholder="Введите номер" - onChange={ (event) => this._handle_onTextFieldChange(event.target.name, event.target.value) } + onChange={ (event) => { this._removeError(event.target.name); this._handle_onTextFieldChange(event.target.name, event.target.value); } } required={ true } disabled={ checking } /> @@ -1049,9 +1035,10 @@ class Form_3_Signer extends QuestionnaireForm className={ errors.indexOf("signatory_person.identity_document.issuedate") > -1 ? "error" : "" } style={{ width: "calc(100% - 198px)" }} placeholder="ДД.ММ.ГГГГ" + max={ moment().toDate() } id={ "signatory_person.identity_document.issuedate" } value={ this._checkStrValue(signatory_person.identity_document.issuedate) !== "" ? this._checkStrValue(signatory_person.identity_document.issuedate) : null } - onChange={ (date) => this._handle_onTextFieldChange("signatory_person.identity_document.issuedate", date) } + onChange={ (date) => { this._removeError("signatory_person.identity_document.issuedate"); this._handle_onTextFieldChange("signatory_person.identity_document.issuedate", date); } } required={ true } disabled={ checking } /> @@ -1066,24 +1053,11 @@ class Form_3_Signer extends QuestionnaireForm name="signatory_person.identity_document.code" value={ this._checkStrValue(signatory_person.identity_document.code) } placeholder="Введите код" - onChange={ (value) => { this._handle_onIssuerCodeChange("signatory_person", value); } } + onChange={ (value) => { this._removeError("signatory_person.identity_document.code"); this._handle_onIssuerCodeChange("signatory_person", value); } } maxResults={ 5 } required={ true } disabled={ checking } /> - {/*} - -1 ? "error" : "" } - mask='999-999' - id="signatory_person.identity_document.code" - name="signatory_person.identity_document.code" - value={ this._checkStrValue(signatory_person.identity_document.code) } - placeholder="Введите код" - onChange={ (event) => this._handle_onTextFieldChange(event.target.name, event.target.value) } - required={ true } - disabled={ checking } - /> - {*/} @@ -1096,22 +1070,10 @@ class Form_3_Signer extends QuestionnaireForm name="signatory_person.identity_document.issueby" value={ this._checkStrValue(signatory_person.identity_document.issueby) } placeholder="Введите наименование подразделения выдавшего документ" - onChange={ (value) => { this._handle_onIssuerChange("signatory_person", value); } } + onChange={ (value) => { this._removeError("signatory_person.identity_document.issueby"); this._handle_onIssuerChange("signatory_person", value); } } required={ true } disabled={ checking } /> - {/*} - -1 ? "error" : "" } - id="signatory_person.identity_document.issueby" - name="signatory_person.identity_document.issueby" - value={ this._checkStrValue(signatory_person.identity_document.issueby) } - placeholder="Введите наименование подразделения выдавшего документ" - onChange={ (event) => this._handle_onTextFieldChange(event.target.name, event.target.value) } - required={ true } - disabled={ checking } - /> - {*/}
@@ -1121,51 +1083,42 @@ class Form_3_Signer extends QuestionnaireForm id={ "signatory_person.identity_document.placebirth" } value={ this._checkStrValue(signatory_person.identity_document.placebirth) } placeholder="Укажите место рождения" - onChange={ (data) => { this._handle_onTextFieldChange("signatory_person.identity_document.placebirth", data.name); } } + onChange={ (data) => { this._removeError("signatory_person.identity_document.placebirth"); this._handle_onTextFieldChange("signatory_person.identity_document.placebirth", data.name); } } required={ true } disabled={ checking } />
-
- - -1 ? "autocomlete error" : "autocomlete" } + id="signatory_person.identity_document.citizenship" + name="signatory_person.identity_document.citizenship" + options={ citizenships } + placeholder="Выберите страну" + noOptionsMessage={ ({ inputValue }) => !inputValue ? noOptionsText :"Ничего не найдено" } + isSearchable={ true } + classNamePrefix="react-select" + value={ signatory_person_citizenship.code !== null ? signatory_person_citizenship : undefined } + onChange={ (element) => { this._removeError("signatory_person.identity_document.citizenship"); this._handle_onCitizenshipChange(`signatory_person.identity_document.citizenship`, element.value); } } + required={ true } + isDisabled={ checking } + /> +
+ ) }
-1 ? "error" : "" } + className={ errors.indexOf("signatory_person.identity_document.registration_address.name") > -1 ? "error" : "" } value={ this._checkStrValue(signatory_person.identity_document.registration_address.name) } fias={ this._checkStrValue(signatory_person.identity_document.registration_address.fias_id) } - onChange={ (data) => this._handle_onTextFieldChange("signatory_person.identity_document.registration_address", data) } + onChange={ (data) => { this._removeError("signatory_person.identity_document.registration_address.name"); this._handle_onTextFieldChange("signatory_person.identity_document.registration_address", data); } } required={ true } disabled={ checking } /> - - {/*} - this._handle_onTextFieldChange(event.target.name, event.target.value) } - required={ true } - /> - {*/}
@@ -1176,7 +1129,7 @@ class Form_3_Signer extends QuestionnaireForm name="signatory_person.jobtitle" value={ this._checkStrValue(signatory_person.jobtitle) } placeholder="Укажите должность" - onChange={ (event) => this._handle_onTextFieldChange(event.target.name, event.target.value) } + onChange={ (event) => { this._removeError("signatory_person.jobtitle"); this._handle_onTextFieldChange(event.target.name, event.target.value); } } required={ true } disabled={ checking } /> @@ -1191,7 +1144,7 @@ class Form_3_Signer extends QuestionnaireForm name={ "signatory_person.telephone" } value={ this._checkStrValue(signatory_person.telephone) } placeholder="Введите номер телефона" - onChange={ (event) => this._handle_onTextFieldChange(event.target.name, event.target.value) } + onChange={ (event) => { this._removeError("signatory_person.telephone"); this._handle_onTextFieldChange(event.target.name, event.target.value); } } required={ true } disabled={ checking } mask='+7 (999) 999 99 99' @@ -1206,7 +1159,7 @@ class Form_3_Signer extends QuestionnaireForm name="signatory_person.email" value={ this._checkStrValue(signatory_person.email) } placeholder="E-mail" - onChange={ (event) => this._handle_onTextFieldChange(event.target.name, event.target.value) } + onChange={ (event) => { this._removeError("signatory_person.email"); this._handle_onTextFieldChange(event.target.name, event.target.value); } } required={ true } disabled={ checking } /> @@ -1215,14 +1168,7 @@ class Form_3_Signer extends QuestionnaireForm { errors.indexOf("signatory_person_files") > -1 && ( -
- - - -

Ошибка - Пожалуйста, приложите как минимум одно отсканированное изображение или фотографию документа, подтверждающего личность. -

-
+ ) } signatory_person.signer_rule_basis === type.value) } - onChange={ (element) => this._handle_onTextFieldChange(`signatory_person.signer_rule_basis`, element.value) } + onChange={ (element) => { this._removeError("signatory_person.signer_rule_basis"); this._handle_onTextFieldChange(`signatory_person.signer_rule_basis`, element.value); } } required={ true } isDisabled={ checking } /> @@ -1264,7 +1210,7 @@ class Form_3_Signer extends QuestionnaireForm name="signatory_person.signer_rule_basis_add" value={ this._checkStrValue(signatory_person.signer_rule_basis_add) } placeholder="Наименование документа" - onChange={ (event) => this._handle_onTextFieldChange(event.target.name, event.target.value) } + onChange={ (event) => { this._removeError("signatory_person.signer_rule_basis_add"); this._handle_onTextFieldChange(event.target.name, event.target.value); } } required={ true } disabled={ checking } /> @@ -1282,7 +1228,7 @@ class Form_3_Signer extends QuestionnaireForm name="signatory_person.docnumber" value={ this._checkStrValue(signatory_person.docnumber) } placeholder="Номер документа" - onChange={ (event) => this._handle_onTextFieldChange(event.target.name, event.target.value) } + onChange={ (event) => { this._removeError("signatory_person.docnumber"); this._handle_onTextFieldChange(event.target.name, event.target.value); } } required={ true } disabled={ checking } /> @@ -1294,9 +1240,10 @@ class Form_3_Signer extends QuestionnaireForm className={ errors.indexOf("signatory_person.docdate") > -1 ? "error" : "" } style={{ width: "calc(100% - 198px)" }} placeholder="ДД.ММ.ГГГГ" + max={ moment().toDate() } id={ "signatory_person.docdate" } value={ this._checkStrValue(signatory_person.docdate) !== "" ? this._checkStrValue(signatory_person.docdate) : null } - onChange={ (date) => this._handle_onTextFieldChange("signatory_person.docdate", date) } + onChange={ (date) => { this._removeError("signatory_person.docdate"); this._handle_onTextFieldChange("signatory_person.docdate", date); } } required={ true } disabled={ checking } /> @@ -1305,14 +1252,7 @@ class Form_3_Signer extends QuestionnaireForm { errors.indexOf("signatory_corporate_files") > -1 && ( -
- - - -

Ошибка - Пожалуйста, приложите как минимум одно отсканированное изображение или фотографию документа, подтверждающего право подписи. -

-
+ ) } {} } value={ signatory_corporate_files.length > 0 ? signatory_corporate_files.length : "" } required={ true } style={{ opacity: 0.0, height: "0px", marginTop: "-25px", display: "flex" }}/> ) } - - {/*} -
-
-

№ 01/20/2020 (.PDF)Постановление

-
-
- {*/} ) } - {/*} -
-
- this._handle_onCheckboxFieldChange(event.target.name, !personal_data_consent ? true : false) } - disabled={ checking } - /> - -
-
- {*/} - { !checking && (