fixes for errors display
This commit is contained in:
parent
31dbba1399
commit
89c5ae821b
@ -141,7 +141,7 @@ export default class AddressSuggests extends React.Component
|
||||
<div className="react-select__menu-list">
|
||||
{ options.map((option, index) =>
|
||||
(
|
||||
<div className="react-select__option" style={{ height: "26px", background: "#FFF", }} key={ `${ index }_${ option.value }` } onClick={ (event) => { event.preventDefault(); this._handle_onSelect(option.value); } }><span>{ option.value }</span></div>
|
||||
<div className="react-select__option" style={{ minHeight: "26px", background: "#FFF", lineHeight: "18px", }} key={ `${ index }_${ option.value }` } onClick={ (event) => { event.preventDefault(); this._handle_onSelect(option.value); } }><span>{ option.value }</span></div>
|
||||
)) }
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -185,11 +185,11 @@ export default class SuggestsInput extends React.Component
|
||||
disabled={ disabled }
|
||||
/>
|
||||
{ focused && options.length > 0 && (
|
||||
<div className="react-select__menu" style={{ position: "absolute", zIndex: 100, background: "#fff", width: "100%", left: "0px", top: "40px" }}>
|
||||
<div className="react-select__menu" style={{ position: "absolute", zIndex: 1000, background: "#FFF", width: "100%", left: "0px", top: "40px" }}>
|
||||
<div className="react-select__menu-list">
|
||||
{ options.map((option, index) =>
|
||||
(
|
||||
<div className="react-select__option" aria-disabled="false" tab-index="-1" key={ index } onClick={ () => this._handle_onSelect(option.value) }>{ option.value }</div>
|
||||
<div className="react-select__option" style={{ minHeight: "26px", background: "#FFF", lineHeight: "18px", }} key={ index } onClick={ () => this._handle_onSelect(option.value) }>{ option.value }</div>
|
||||
)) }
|
||||
</div>
|
||||
</div>
|
||||
|
||||
27
components/questionnaire/forms/FormMessage.js
Normal file
27
components/questionnaire/forms/FormMessage.js
Normal file
@ -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 (
|
||||
<div className={`questionnaire message ${ type }`}>
|
||||
<svg width="44" height="45" viewBox="0 0 44 45" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M40.5425 31.1863L25.7969 8.08116C24.9653 6.77804 23.5459 6 22 6C20.4539 6 19.0345 6.77804 18.2032 8.08116L3.45741 31.1862C2.57234 32.5732 2.51363 34.3313 3.30467 35.7746C4.09572 37.2173 5.60918 38.1137 7.25444 38.1137H36.7456C38.3909 38.1137 39.9044 37.2175 40.6956 35.7742C41.4863 34.3313 41.4276 32.5733 40.5425 31.1863ZM22 34.2245C20.644 34.2245 19.5448 33.1252 19.5448 31.7694C19.5448 30.4133 20.6441 29.3141 22 29.3141C23.356 29.3141 24.4551 30.4133 24.4551 31.7694C24.4551 33.1252 23.3559 34.2245 22 34.2245ZM25.403 17.1635L24.1937 25.3052C24.0157 26.5037 22.8999 27.3309 21.7016 27.1529C20.7334 27.0091 20.0075 26.25 19.8582 25.333L18.5451 17.2074C18.2394 15.3155 19.5251 13.534 21.417 13.2283C23.3089 12.9226 25.0904 14.2083 25.3962 16.1002C25.4536 16.4565 25.4517 16.8243 25.403 17.1635Z" fill="white"/>
|
||||
</svg>
|
||||
<p><b>{ title }</b>
|
||||
{ message }
|
||||
</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -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
|
||||
<p className="title">1. Информация о лизингополучателе</p>
|
||||
{ errors.length > 0 &&
|
||||
(
|
||||
<div className="questionnaire message error">
|
||||
<svg width="44" height="45" viewBox="0 0 44 45" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M40.5425 31.1863L25.7969 8.08116C24.9653 6.77804 23.5459 6 22 6C20.4539 6 19.0345 6.77804 18.2032 8.08116L3.45741 31.1862C2.57234 32.5732 2.51363 34.3313 3.30467 35.7746C4.09572 37.2173 5.60918 38.1137 7.25444 38.1137H36.7456C38.3909 38.1137 39.9044 37.2175 40.6956 35.7742C41.4863 34.3313 41.4276 32.5733 40.5425 31.1863ZM22 34.2245C20.644 34.2245 19.5448 33.1252 19.5448 31.7694C19.5448 30.4133 20.6441 29.3141 22 29.3141C23.356 29.3141 24.4551 30.4133 24.4551 31.7694C24.4551 33.1252 23.3559 34.2245 22 34.2245ZM25.403 17.1635L24.1937 25.3052C24.0157 26.5037 22.8999 27.3309 21.7016 27.1529C20.7334 27.0091 20.0075 26.25 19.8582 25.333L18.5451 17.2074C18.2394 15.3155 19.5251 13.534 21.417 13.2283C23.3089 12.9226 25.0904 14.2083 25.3962 16.1002C25.4536 16.4565 25.4517 16.8243 25.403 17.1635Z" fill="white"/>
|
||||
</svg>
|
||||
<p><b>Ошибка</b>
|
||||
Пожалуйста, проверьте корректность заполнения данных в форме.
|
||||
</p>
|
||||
</div>
|
||||
<FormMessage type="error" title="Ошибка" message="Пожалуйста, проверьте корректность заполнения данных в форме."/>
|
||||
) }
|
||||
<div className="form_field">
|
||||
<label>Краткое наименование <sup className="required_label">*</sup></label>
|
||||
@ -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 }>
|
||||
</InputMask>
|
||||
</div>
|
||||
|
||||
<div className="form_field">
|
||||
<label>Сайт</label>
|
||||
<label>Сайт<small>Опционально</small></label>
|
||||
<input type="text"
|
||||
className={ errors.indexOf("main.websiteurl") > -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,})+"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -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
|
||||
<p className="title">2. Адреса лизингополучателя</p>
|
||||
{ errors.length > 0 &&
|
||||
(
|
||||
<div className="questionnaire message error">
|
||||
<svg width="44" height="45" viewBox="0 0 44 45" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M40.5425 31.1863L25.7969 8.08116C24.9653 6.77804 23.5459 6 22 6C20.4539 6 19.0345 6.77804 18.2032 8.08116L3.45741 31.1862C2.57234 32.5732 2.51363 34.3313 3.30467 35.7746C4.09572 37.2173 5.60918 38.1137 7.25444 38.1137H36.7456C38.3909 38.1137 39.9044 37.2175 40.6956 35.7742C41.4863 34.3313 41.4276 32.5733 40.5425 31.1863ZM22 34.2245C20.644 34.2245 19.5448 33.1252 19.5448 31.7694C19.5448 30.4133 20.6441 29.3141 22 29.3141C23.356 29.3141 24.4551 30.4133 24.4551 31.7694C24.4551 33.1252 23.3559 34.2245 22 34.2245ZM25.403 17.1635L24.1937 25.3052C24.0157 26.5037 22.8999 27.3309 21.7016 27.1529C20.7334 27.0091 20.0075 26.25 19.8582 25.333L18.5451 17.2074C18.2394 15.3155 19.5251 13.534 21.417 13.2283C23.3089 12.9226 25.0904 14.2083 25.3962 16.1002C25.4536 16.4565 25.4517 16.8243 25.403 17.1635Z" fill="white"/>
|
||||
</svg>
|
||||
<p><b>Ошибка</b>
|
||||
Пожалуйста, проверьте корректность заполнения данных в форме.
|
||||
</p>
|
||||
</div>
|
||||
<FormMessage type="error" title="Ошибка" message="Пожалуйста, проверьте корректность заполнения данных в форме."/>
|
||||
) }
|
||||
|
||||
<div className="form_field">
|
||||
|
||||
@ -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
|
||||
<p className="title">3. Информация о единоличном исполнительном органе, подписанте договора лизинга</p>
|
||||
{ errors.length > 0 &&
|
||||
(
|
||||
<div className="questionnaire message error">
|
||||
<svg width="44" height="45" viewBox="0 0 44 45" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M40.5425 31.1863L25.7969 8.08116C24.9653 6.77804 23.5459 6 22 6C20.4539 6 19.0345 6.77804 18.2032 8.08116L3.45741 31.1862C2.57234 32.5732 2.51363 34.3313 3.30467 35.7746C4.09572 37.2173 5.60918 38.1137 7.25444 38.1137H36.7456C38.3909 38.1137 39.9044 37.2175 40.6956 35.7742C41.4863 34.3313 41.4276 32.5733 40.5425 31.1863ZM22 34.2245C20.644 34.2245 19.5448 33.1252 19.5448 31.7694C19.5448 30.4133 20.6441 29.3141 22 29.3141C23.356 29.3141 24.4551 30.4133 24.4551 31.7694C24.4551 33.1252 23.3559 34.2245 22 34.2245ZM25.403 17.1635L24.1937 25.3052C24.0157 26.5037 22.8999 27.3309 21.7016 27.1529C20.7334 27.0091 20.0075 26.25 19.8582 25.333L18.5451 17.2074C18.2394 15.3155 19.5251 13.534 21.417 13.2283C23.3089 12.9226 25.0904 14.2083 25.3962 16.1002C25.4536 16.4565 25.4517 16.8243 25.403 17.1635Z" fill="white"/>
|
||||
</svg>
|
||||
<p><b>Ошибка</b>
|
||||
Пожалуйста, проверьте корректность заполнения данных в форме.
|
||||
</p>
|
||||
</div>
|
||||
<FormMessage type="error" title="Ошибка" message="Пожалуйста, проверьте корректность заполнения данных в форме."/>
|
||||
) }
|
||||
<div className="form_field">
|
||||
<label>Фамилия <sup className="required_label">*</sup></label>
|
||||
@ -469,17 +506,6 @@ class Form_3_Signer extends QuestionnaireForm
|
||||
required={ true }
|
||||
disabled={ checking }
|
||||
/>
|
||||
{/*}
|
||||
<input type="text"
|
||||
id="head_person.lastname"
|
||||
name="head_person.lastname"
|
||||
value={ head_person.lastname }
|
||||
placeholder="Введите фамилию"
|
||||
onChange={ (event) => this._handle_onTextFieldChange(event.target.name, event.target.value) }
|
||||
required={ true }
|
||||
disabled={ checking }
|
||||
/>
|
||||
{*/}
|
||||
</div>
|
||||
<div className="form_field">
|
||||
<label>Имя <sup className="required_label">*</sup></label>
|
||||
@ -494,17 +520,6 @@ class Form_3_Signer extends QuestionnaireForm
|
||||
required={ true }
|
||||
disabled={ checking }
|
||||
/>
|
||||
{/*}
|
||||
<input type="text"
|
||||
id="head_person.firstname"
|
||||
name="head_person.firstname"
|
||||
value={ head_person.firstname }
|
||||
placeholder="Введите имя"
|
||||
onChange={ (event) => this._handle_onTextFieldChange(event.target.name, event.target.value) }
|
||||
required={ true }
|
||||
disabled={ checking }
|
||||
/>
|
||||
{*/}
|
||||
</div>
|
||||
<div className="form_field">
|
||||
<label>Отчество <small>если имеется</small></label>
|
||||
@ -518,16 +533,6 @@ class Form_3_Signer extends QuestionnaireForm
|
||||
required={ false }
|
||||
disabled={ checking }
|
||||
/>
|
||||
{/*}
|
||||
<input type="text"
|
||||
id="head_person.middlename"
|
||||
name="head_person.middlename"
|
||||
value={ head_person.middlename }
|
||||
placeholder="Введите отчество"
|
||||
onChange={ (event) => this._handle_onTextFieldChange(event.target.name, event.target.value) }
|
||||
disabled={ checking }
|
||||
/>
|
||||
{*/}
|
||||
</div>
|
||||
<div className="form_field">
|
||||
<label>Тип документа <sup className="required_label">*</sup></label>
|
||||
@ -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
|
||||
<div className="form_field">
|
||||
<label>Дата выдачи <sup className="required_label">*</sup></label>
|
||||
<CalendarDatePicker
|
||||
className={ errors.indexOf("head_person.identity_document.issuedate") > -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 }
|
||||
/>
|
||||
|
||||
{/*}
|
||||
<InputMask
|
||||
mask='999-999'
|
||||
id="head_person.identity_document.code"
|
||||
name="head_person.identity_document.code"
|
||||
value={ this._checkStrValue(head_person.identity_document.code) }
|
||||
placeholder="Введите код"
|
||||
onChange={ (event) => { this._removeError("head_person.identity_document.code"); this._handle_onTextFieldChange(event.target.name, event.target.value); } }
|
||||
required={ true }
|
||||
disabled={ checking }
|
||||
/>
|
||||
{*/}
|
||||
|
||||
</div>
|
||||
) }
|
||||
</div>
|
||||
@ -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 }
|
||||
/>
|
||||
{/*}
|
||||
<input type="text"
|
||||
id="head_person.identity_document.issueby"
|
||||
name="head_person.identity_document.issueby"
|
||||
value={ this._checkStrValue(head_person.identity_document.issueby) }
|
||||
placeholder="Введите наименование подразделения выдавшего документ"
|
||||
onChange={ (event) => { this._removeError("head_person.identity_document.issueby"); this._handle_onTextFieldChange(event.target.name, event.target.value) } }
|
||||
required={ true }
|
||||
disabled={ checking }
|
||||
/>
|
||||
{*/}
|
||||
</div>
|
||||
) }
|
||||
<div className="form_field">
|
||||
<label>Место рождения <sup className="required_label">*</sup></label>
|
||||
<AddressSuggests
|
||||
className={ errors.indexOf("head_person.identity_document.placebirth") > -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
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="form_field">
|
||||
<label>Гражданство <sup className="required_label">*</sup></label>
|
||||
<Select
|
||||
id="head_person.identity_document.citizenship"
|
||||
name="head_person.identity_document.citizenship"
|
||||
options={ citizenships }
|
||||
placeholder="Выберите страну"
|
||||
noOptionsMessage={ ({ inputValue }) => !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 }
|
||||
/>
|
||||
</div>
|
||||
{ parseInt(head_person.identity_document.doctype, 10) !== 100000000 && (
|
||||
<div className="form_field">
|
||||
<label>Гражданство <sup className="required_label">*</sup></label>
|
||||
<Select
|
||||
id="head_person.identity_document.citizenship"
|
||||
name="head_person.identity_document.citizenship"
|
||||
options={ citizenships }
|
||||
placeholder="Выберите страну"
|
||||
noOptionsMessage={ ({ inputValue }) => !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 }
|
||||
/>
|
||||
</div>
|
||||
) }
|
||||
<div className="form_field">
|
||||
<label>Адрес регистрации <sup className="required_label">*</sup></label>
|
||||
<AddressSuggests
|
||||
<AddressSuggests
|
||||
className={ errors.indexOf("head_person.identity_document.registration_address.name") > -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 }
|
||||
/>
|
||||
</div>
|
||||
|
||||
{ errors.indexOf("head_person.evo_assignment_date_invalid") > -1 &&
|
||||
(
|
||||
<FormMessage type="error" title="Ошибка" message="Пожалуйста, укажите прошедшую дату."/>
|
||||
) }
|
||||
|
||||
<div className="form_field picker">
|
||||
<label>Дата назначения <sup className="required_label">*</sup></label>
|
||||
<div style={{ display: "flex", flexWrap: "wrap", width: "calc(100% - 198px)"}}>
|
||||
<CalendarDatePicker
|
||||
className={ errors.indexOf("head_person.evo_assignment_date") > -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
|
||||
</div>
|
||||
</div>
|
||||
{ !head_person.evo_indefinite && (
|
||||
<div className="form_field picker">
|
||||
<label>Дата окончания полномочий <sup className="required_label">*</sup></label>
|
||||
<div style={{ display: "flex", flexWrap: "wrap", width: "calc(100% - 198px)" }}>
|
||||
<CalendarDatePicker
|
||||
className={ errors.indexOf("head_person.evo_credentials_dateend") > -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"}}
|
||||
/>
|
||||
<React.Fragment>
|
||||
{ errors.indexOf("head_person.evo_credentials_dateend_invalid") > -1 &&
|
||||
(
|
||||
<FormMessage type="error" title="Ошибка" message="Срок полномочий пройден. Пожалуйста, введите корректную дату."/>
|
||||
) }
|
||||
<div className="form_field picker">
|
||||
<label>Дата окончания полномочий <sup className="required_label">*</sup></label>
|
||||
<div style={{ display: "flex", flexWrap: "wrap", width: "calc(100% - 198px)" }}>
|
||||
<CalendarDatePicker
|
||||
className={ errors.indexOf("head_person.evo_credentials_dateend") > -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"}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
) }
|
||||
|
||||
{ errors.indexOf("head_person_files") > -1 &&
|
||||
(
|
||||
<div className="questionnaire message error">
|
||||
<svg width="44" height="45" viewBox="0 0 44 45" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M40.5425 31.1863L25.7969 8.08116C24.9653 6.77804 23.5459 6 22 6C20.4539 6 19.0345 6.77804 18.2032 8.08116L3.45741 31.1862C2.57234 32.5732 2.51363 34.3313 3.30467 35.7746C4.09572 37.2173 5.60918 38.1137 7.25444 38.1137H36.7456C38.3909 38.1137 39.9044 37.2175 40.6956 35.7742C41.4863 34.3313 41.4276 32.5733 40.5425 31.1863ZM22 34.2245C20.644 34.2245 19.5448 33.1252 19.5448 31.7694C19.5448 30.4133 20.6441 29.3141 22 29.3141C23.356 29.3141 24.4551 30.4133 24.4551 31.7694C24.4551 33.1252 23.3559 34.2245 22 34.2245ZM25.403 17.1635L24.1937 25.3052C24.0157 26.5037 22.8999 27.3309 21.7016 27.1529C20.7334 27.0091 20.0075 26.25 19.8582 25.333L18.5451 17.2074C18.2394 15.3155 19.5251 13.534 21.417 13.2283C23.3089 12.9226 25.0904 14.2083 25.3962 16.1002C25.4536 16.4565 25.4517 16.8243 25.403 17.1635Z" fill="white"/>
|
||||
</svg>
|
||||
<p><b>Ошибка</b>
|
||||
Пожалуйста, приложите как минимум одно отсканированное изображение или фотографию документа, подтверждающего личность.
|
||||
</p>
|
||||
</div>
|
||||
<FormMessage type="error" title="Ошибка" message="Пожалуйста, приложите как минимум одно отсканированное изображение или фотографию документа, подтверждающего личность."/>
|
||||
) }
|
||||
<FilesList
|
||||
maxFiles={ 2 }
|
||||
@ -834,7 +826,7 @@ class Form_3_Signer extends QuestionnaireForm
|
||||
name="main.individual_executive_inn"
|
||||
value={ this._checkStrValue(main.individual_executive_inn) }
|
||||
placeholder="Введите ИНН"
|
||||
onChange={ (event) => 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 }
|
||||
/>
|
||||
</div>
|
||||
@ -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 &&
|
||||
(
|
||||
<div className="questionnaire message error">
|
||||
<svg width="44" height="45" viewBox="0 0 44 45" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M40.5425 31.1863L25.7969 8.08116C24.9653 6.77804 23.5459 6 22 6C20.4539 6 19.0345 6.77804 18.2032 8.08116L3.45741 31.1862C2.57234 32.5732 2.51363 34.3313 3.30467 35.7746C4.09572 37.2173 5.60918 38.1137 7.25444 38.1137H36.7456C38.3909 38.1137 39.9044 37.2175 40.6956 35.7742C41.4863 34.3313 41.4276 32.5733 40.5425 31.1863ZM22 34.2245C20.644 34.2245 19.5448 33.1252 19.5448 31.7694C19.5448 30.4133 20.6441 29.3141 22 29.3141C23.356 29.3141 24.4551 30.4133 24.4551 31.7694C24.4551 33.1252 23.3559 34.2245 22 34.2245ZM25.403 17.1635L24.1937 25.3052C24.0157 26.5037 22.8999 27.3309 21.7016 27.1529C20.7334 27.0091 20.0075 26.25 19.8582 25.333L18.5451 17.2074C18.2394 15.3155 19.5251 13.534 21.417 13.2283C23.3089 12.9226 25.0904 14.2083 25.3962 16.1002C25.4536 16.4565 25.4517 16.8243 25.403 17.1635Z" fill="white"/>
|
||||
</svg>
|
||||
<p><b>Ошибка</b>
|
||||
Пожалуйста, приложите как минимум одно отсканированное изображение или фотографию документа, подтверждающего передачу полномочий.
|
||||
</p>
|
||||
</div>
|
||||
<FormMessage type="error" title="Ошибка" message="Пожалуйста, приложите как минимум одно отсканированное изображение или фотографию документа, подтверждающего передачу полномочий."/>
|
||||
) }
|
||||
<FilesList
|
||||
maxFiles={ 2 }
|
||||
@ -957,7 +943,7 @@ class Form_3_Signer extends QuestionnaireForm
|
||||
name="signatory_person.lastname"
|
||||
value={ this._checkStrValue(signatory_person.lastname) }
|
||||
placeholder="Введите фамилию"
|
||||
onChange={ (value) => 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 }
|
||||
/>
|
||||
{/*}
|
||||
<InputMask
|
||||
className={ errors.indexOf("signatory_person.identity_document.code") > -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 }
|
||||
/>
|
||||
{*/}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -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 }
|
||||
/>
|
||||
{/*}
|
||||
<input type="text"
|
||||
className={ errors.indexOf("signatory_person.identity_document.issueby") > -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 }
|
||||
/>
|
||||
{*/}
|
||||
</div>
|
||||
|
||||
<div className="form_field">
|
||||
@ -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 }
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="form_field">
|
||||
<label>Гражданство <sup className="required_label">*</sup></label>
|
||||
<Select
|
||||
id="signatory_person.identity_document.citizenship"
|
||||
name="signatory_person.identity_document.citizenship"
|
||||
options={ citizenships }
|
||||
placeholder="Выберите страну"
|
||||
noOptionsMessage={ ({ inputValue }) => !inputValue ? noOptionsText :"Ничего не найдено" }
|
||||
isSearchable={ true }
|
||||
className="autocomlete"
|
||||
classNamePrefix="react-select"
|
||||
value={ signatory_person_citizenship.code !== null ? signatory_person_citizenship : undefined }
|
||||
onChange={ (element) => this._handle_onCitizenshipChange(`signatory_person.identity_document.citizenship`, element.value) }
|
||||
required={ true }
|
||||
isDisabled={ checking }
|
||||
/>
|
||||
</div>
|
||||
{ parseInt(signatory_person.identity_document.doctype, 10) !== 100000000 && (
|
||||
<div className="form_field">
|
||||
<label>Гражданство <sup className="required_label">*</sup></label>
|
||||
<Select
|
||||
className={ errors.indexOf("signatory_person.identity_document.placebirth") > -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 }
|
||||
/>
|
||||
</div>
|
||||
) }
|
||||
|
||||
<div className="form_field">
|
||||
<label>Адрес регистрации <sup className="required_label">*</sup></label>
|
||||
<AddressSuggests
|
||||
className={ errors.indexOf("signatory_person.identity_document.registration_address") > -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 }
|
||||
/>
|
||||
|
||||
{/*}
|
||||
<input type="text"
|
||||
id="signatory_person.identity_document.registration_address.title"
|
||||
name="signatory_person.identity_document.registration_address.title"
|
||||
value={ this._checkStrValue(signatory_person.identity_document.registration_address.title) }
|
||||
placeholder="Введите адрес"
|
||||
onChange={ (event) => this._handle_onTextFieldChange(event.target.name, event.target.value) }
|
||||
required={ true }
|
||||
/>
|
||||
{*/}
|
||||
</div>
|
||||
|
||||
<div className="form_field">
|
||||
@ -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 &&
|
||||
(
|
||||
<div className="questionnaire message error">
|
||||
<svg width="44" height="45" viewBox="0 0 44 45" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M40.5425 31.1863L25.7969 8.08116C24.9653 6.77804 23.5459 6 22 6C20.4539 6 19.0345 6.77804 18.2032 8.08116L3.45741 31.1862C2.57234 32.5732 2.51363 34.3313 3.30467 35.7746C4.09572 37.2173 5.60918 38.1137 7.25444 38.1137H36.7456C38.3909 38.1137 39.9044 37.2175 40.6956 35.7742C41.4863 34.3313 41.4276 32.5733 40.5425 31.1863ZM22 34.2245C20.644 34.2245 19.5448 33.1252 19.5448 31.7694C19.5448 30.4133 20.6441 29.3141 22 29.3141C23.356 29.3141 24.4551 30.4133 24.4551 31.7694C24.4551 33.1252 23.3559 34.2245 22 34.2245ZM25.403 17.1635L24.1937 25.3052C24.0157 26.5037 22.8999 27.3309 21.7016 27.1529C20.7334 27.0091 20.0075 26.25 19.8582 25.333L18.5451 17.2074C18.2394 15.3155 19.5251 13.534 21.417 13.2283C23.3089 12.9226 25.0904 14.2083 25.3962 16.1002C25.4536 16.4565 25.4517 16.8243 25.403 17.1635Z" fill="white"/>
|
||||
</svg>
|
||||
<p><b>Ошибка</b>
|
||||
Пожалуйста, приложите как минимум одно отсканированное изображение или фотографию документа, подтверждающего личность.
|
||||
</p>
|
||||
</div>
|
||||
<FormMessage type="error" title="Ошибка" message="Пожалуйста, приложите как минимум одно отсканированное изображение или фотографию документа, подтверждающего личность."/>
|
||||
) }
|
||||
<FilesList
|
||||
maxFiles={ 2 }
|
||||
@ -1249,7 +1195,7 @@ class Form_3_Signer extends QuestionnaireForm
|
||||
className="autocomlete"
|
||||
classNamePrefix="react-select"
|
||||
value={ doctypes_corporate.filter((type) => 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 &&
|
||||
(
|
||||
<div className="questionnaire message error">
|
||||
<svg width="44" height="45" viewBox="0 0 44 45" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M40.5425 31.1863L25.7969 8.08116C24.9653 6.77804 23.5459 6 22 6C20.4539 6 19.0345 6.77804 18.2032 8.08116L3.45741 31.1862C2.57234 32.5732 2.51363 34.3313 3.30467 35.7746C4.09572 37.2173 5.60918 38.1137 7.25444 38.1137H36.7456C38.3909 38.1137 39.9044 37.2175 40.6956 35.7742C41.4863 34.3313 41.4276 32.5733 40.5425 31.1863ZM22 34.2245C20.644 34.2245 19.5448 33.1252 19.5448 31.7694C19.5448 30.4133 20.6441 29.3141 22 29.3141C23.356 29.3141 24.4551 30.4133 24.4551 31.7694C24.4551 33.1252 23.3559 34.2245 22 34.2245ZM25.403 17.1635L24.1937 25.3052C24.0157 26.5037 22.8999 27.3309 21.7016 27.1529C20.7334 27.0091 20.0075 26.25 19.8582 25.333L18.5451 17.2074C18.2394 15.3155 19.5251 13.534 21.417 13.2283C23.3089 12.9226 25.0904 14.2083 25.3962 16.1002C25.4536 16.4565 25.4517 16.8243 25.403 17.1635Z" fill="white"/>
|
||||
</svg>
|
||||
<p><b>Ошибка</b>
|
||||
Пожалуйста, приложите как минимум одно отсканированное изображение или фотографию документа, подтверждающего право подписи.
|
||||
</p>
|
||||
</div>
|
||||
<FormMessage type="error" title="Ошибка" message="Пожалуйста, приложите как минимум одно отсканированное изображение или фотографию документа, подтверждающего право подписи."/>
|
||||
) }
|
||||
<FilesList
|
||||
maxFiles={ 2 }
|
||||
@ -1326,33 +1266,9 @@ class Form_3_Signer extends QuestionnaireForm
|
||||
<input type="text" id="signatory_corporate_files_error_check" onChange={ () => {} } value={ signatory_corporate_files.length > 0 ? signatory_corporate_files.length : "" } required={ true } style={{ opacity: 0.0, height: "0px", marginTop: "-25px", display: "flex" }}/>
|
||||
</>
|
||||
) }
|
||||
|
||||
{/*}
|
||||
<div className="dosc_list medium-icon">
|
||||
<div className="row">
|
||||
<p className="doc_name i-pdf extension">№ 01/20/2020 (.PDF)<span style={{width: "100%"}}>Постановление</span></p>
|
||||
</div>
|
||||
</div>
|
||||
{*/}
|
||||
</React.Fragment>
|
||||
) }
|
||||
|
||||
{/*}
|
||||
<div className="form_field">
|
||||
<div className="form_field checkbox">
|
||||
<input type="checkbox"
|
||||
hidden=""
|
||||
id="personal_data_consent"
|
||||
name="personal_data_consent"
|
||||
checked={ personal_data_consent }
|
||||
onChange={ (event) => this._handle_onCheckboxFieldChange(event.target.name, !personal_data_consent ? true : false) }
|
||||
disabled={ checking }
|
||||
/>
|
||||
<label htmlFor="personal_data_consent" className="unselectable">Даю согласие на <a style={{ cursor: "pointer", }} onClick={ () => { this.setState({ modal_show_personal_data: true, }) } }>обработку персональных данных</a></label>
|
||||
</div>
|
||||
</div>
|
||||
{*/}
|
||||
|
||||
{ !checking && (
|
||||
<div className="action">
|
||||
<button type="button" className="button button-blue" onClick={ this._handle_onNextPage }>
|
||||
|
||||
@ -22,6 +22,8 @@ import { getCitizenshipTitleByCode } from "../../../../utils/citizenship";
|
||||
import { saveQuestionnaire } from "../../../../actions";
|
||||
import SuggestsInput from "../../SuggestsInput";
|
||||
import DocumentIssuerSuggestsInput from "../../DocumentIssuerSuggestsInput";
|
||||
import moment from "moment";
|
||||
import FormMessage from "../FormMessage";
|
||||
|
||||
class ShareholderForm extends React.Component
|
||||
{
|
||||
@ -32,6 +34,7 @@ class ShareholderForm extends React.Component
|
||||
_removeError = this.props._removeError;
|
||||
_handle_onIssuerCodeChange = this.props._handle_onIssuerCodeChange;
|
||||
_handle_onIssuerChange = this.props._handle_onIssuerChange;
|
||||
_handle_onDocumentTypeChange = this.props._handle_onDocumentTypeChange;
|
||||
|
||||
_handle_onCitizenshipChange = (name, value) =>
|
||||
{
|
||||
@ -52,17 +55,20 @@ class ShareholderForm extends React.Component
|
||||
console.log("shareholder", "citizenship", citizenship);
|
||||
console.log("shareholder", shareholder);
|
||||
|
||||
console.log("shareholder errors", errors);
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<div className="form_field">
|
||||
<label>Фамилия <sup className="required_label">*</sup></label>
|
||||
<SuggestsInput
|
||||
className={ errors.indexOf("lastname") > -1 ? "error" : "" }
|
||||
type="lastname"
|
||||
id={ `founder_persons[${ index }].lastname` }
|
||||
name={ `founder_persons[${ index }].lastname` }
|
||||
value={ this._checkStrValue(shareholder.lastname) }
|
||||
placeholder="Введите фамилию"
|
||||
onChange={ (value) => this._handle_onTextFieldChange(`founder_persons[${ index }].lastname`, value) }
|
||||
onChange={ (value) => { this._removeError("lastname"); this._handle_onTextFieldChange(`founder_persons[${ index }].lastname`, value) } }
|
||||
required={ true }
|
||||
disabled={ checking }
|
||||
/>
|
||||
@ -71,12 +77,13 @@ class ShareholderForm extends React.Component
|
||||
<div className="form_field">
|
||||
<label>Имя <sup className="required_label">*</sup></label>
|
||||
<SuggestsInput
|
||||
className={ errors.indexOf("firstname") > -1 ? "error" : "" }
|
||||
type="firstname"
|
||||
id={ `founder_persons[${ index }].firstname` }
|
||||
name={ `founder_persons[${ index }].firstname` }
|
||||
value={ this._checkStrValue(shareholder.firstname) }
|
||||
placeholder="Введите имя"
|
||||
onChange={ (value) => this._handle_onTextFieldChange(`founder_persons[${ index }].firstname`, value) }
|
||||
onChange={ (value) => { this._removeError("firstname"); this._handle_onTextFieldChange(`founder_persons[${ index }].firstname`, value) } }
|
||||
required={ true }
|
||||
disabled={ checking }
|
||||
/>
|
||||
@ -85,6 +92,7 @@ class ShareholderForm extends React.Component
|
||||
<div className="form_field">
|
||||
<label>Отчество <small>если имеется</small></label>
|
||||
<SuggestsInput
|
||||
className={ errors.indexOf("middlename") > -1 ? "error" : "" }
|
||||
type="middlename"
|
||||
id={ `founder_persons[${ index }].middlename` }
|
||||
name={ `founder_persons[${ index }].middlename` }
|
||||
@ -97,7 +105,7 @@ class ShareholderForm extends React.Component
|
||||
</div>
|
||||
|
||||
<div className="form_field">
|
||||
<label>Должность <sup className="required_label">*</sup><small>если имеется</small></label>
|
||||
<label>Должность <small>если имеется</small></label>
|
||||
<input type="text"
|
||||
id={ `founder_persons[${ index }].jobtitle` }
|
||||
name={ `founder_persons[${ index }].jobtitle` }
|
||||
@ -112,12 +120,13 @@ class ShareholderForm extends React.Component
|
||||
<div className="form_field">
|
||||
<label>Телефон <sup className="required_label">*</sup></label>
|
||||
<InputMask
|
||||
className={ errors.indexOf("telephone") > -1 ? "error" : "" }
|
||||
mask='+7 (999) 999 99 99'
|
||||
id={ `founder_persons[${ index }].telephone` }
|
||||
name={ `founder_persons[${ index }].telephone` }
|
||||
value={ this._checkStrValue(shareholder.telephone) }
|
||||
placeholder="Введите номер телефона"
|
||||
onChange={ (event) => this._handle_onTextFieldChange(event.target.name, event.target.value) }
|
||||
onChange={ (event) => { this._removeError("telephone"); this._handle_onTextFieldChange(event.target.name, event.target.value) } }
|
||||
required={ true }
|
||||
disabled={ checking }
|
||||
/>
|
||||
@ -126,11 +135,12 @@ class ShareholderForm extends React.Component
|
||||
<div className="form_field">
|
||||
<label>Адрес E-mail <sup className="required_label">*</sup></label>
|
||||
<input type="text"
|
||||
className={ errors.indexOf("email") > -1 ? "error" : "" }
|
||||
id={ `founder_persons[${ index }].email` }
|
||||
name={ `founder_persons[${ index }].email` }
|
||||
value={ this._checkStrValue(shareholder.email) }
|
||||
placeholder="Введите E-mail"
|
||||
onChange={ (event) => this._handle_onTextFieldChange(event.target.name, event.target.value) }
|
||||
onChange={ (event) => { this._removeError("email"); this._handle_onTextFieldChange(event.target.name, event.target.value) } }
|
||||
required={ true }
|
||||
disabled={ checking }
|
||||
/>
|
||||
@ -144,11 +154,12 @@ class ShareholderForm extends React.Component
|
||||
options={ doctypes_personal }
|
||||
placeholder="Выберите тип документа"
|
||||
noOptionsMessage={ ({ inputValue }) => !inputValue ? noOptionsText :"Ничего не найдено" }
|
||||
isSearchable={ true }
|
||||
isSearchable={ false }
|
||||
className="autocomlete"
|
||||
classNamePrefix="react-select"
|
||||
value={ doctypes_personal.filter((type) => shareholder.identity_document.doctype === type.value) }
|
||||
onChange={ (element) => this._handle_onTextFieldChange(`founder_persons[${ index }].identity_document.doctype`, element.value) }
|
||||
onChange={ (element) => { this._removeError("identity_document.doctype"); this._handle_onDocumentTypeChange(`founder_persons[${ index }]`, element); } }
|
||||
//onChange={ (element) => this._handle_onTextFieldChange(`founder_persons[${ index }].identity_document.doctype`, element.value) }
|
||||
required={ true }
|
||||
isDisabled={ checking }
|
||||
/>
|
||||
@ -160,24 +171,26 @@ class ShareholderForm extends React.Component
|
||||
<div className="formgroup">
|
||||
<div className="form_field">
|
||||
<InputMask
|
||||
className={ errors.indexOf("identity_document.seria") > -1 ? "error" : "" }
|
||||
mask='9999'
|
||||
id={ `founder_persons[${ index }].identity_document.seria` }
|
||||
name={ `founder_persons[${ index }].identity_document.seria` }
|
||||
value={ this._checkStrValue(shareholder.identity_document.seria) }
|
||||
placeholder="Введите серию"
|
||||
onChange={ (event) => this._handle_onTextFieldChange(event.target.name, event.target.value) }
|
||||
onChange={ (event) => { this._removeError("identity_document.seria"); this._handle_onTextFieldChange(event.target.name, event.target.value) } }
|
||||
required={ true }
|
||||
disabled={ checking }
|
||||
/>
|
||||
</div>
|
||||
<div className="form_field">
|
||||
<InputMask
|
||||
className={ errors.indexOf("identity_document.docnumber") > -1 ? "error" : "" }
|
||||
mask='999999'
|
||||
id={ `founder_persons[${ index }].identity_document.docnumber` }
|
||||
name={ `founder_persons[${ index }].identity_document.docnumber` }
|
||||
value={ this._checkStrValue(shareholder.identity_document.docnumber) }
|
||||
placeholder="Введите номер"
|
||||
onChange={ (event) => this._handle_onTextFieldChange(event.target.name, event.target.value) }
|
||||
onChange={ (event) => { this._removeError("identity_document.docnumber"); this._handle_onTextFieldChange(event.target.name, event.target.value); } }
|
||||
required={ true }
|
||||
disabled={ checking }
|
||||
/>
|
||||
@ -192,20 +205,22 @@ class ShareholderForm extends React.Component
|
||||
<div className="formgroup">
|
||||
<div className="form_field">
|
||||
<CalendarDatePicker
|
||||
className={ errors.indexOf("identity_document.issuedate") > -1 ? "error" : "" }
|
||||
//style={{ width: "calc(100% - 198px)" }}
|
||||
placeholder="ДД.ММ.ГГГГ"
|
||||
max={ moment().toDate() }
|
||||
id={ `founder_persons[${ index }].identity_document.issuedate` }
|
||||
value={ this._checkStrValue(shareholder.identity_document.issuedate) !== "" ? this._checkStrValue(shareholder.identity_document.issuedate) : null }
|
||||
onChange={ (date) => this._handle_onTextFieldChange(`founder_persons[${ index }].identity_document.issuedate`, date) }
|
||||
onChange={ (date) => { this._removeError("identity_document.issuedate"); this._handle_onTextFieldChange(`founder_persons[${ index }].identity_document.issuedate`, date) } }
|
||||
required={ true }
|
||||
disabled={ checking }
|
||||
/>
|
||||
</div>
|
||||
<div className="form_field">
|
||||
<DocumentIssuerSuggestsInput
|
||||
className={ errors.indexOf("identity_document.code") > -1 ? "error" : "" }
|
||||
style={{ width: "calc(100% - 198px)" }}
|
||||
innerStyle={{ width: "100%", }}
|
||||
className={ errors.indexOf(`founder_persons[${ index }].identity_document.code`) > -1 ? "error" : "" }
|
||||
type="issuer"
|
||||
id={ `founder_persons[${ index }].identity_document.code` }
|
||||
name={ `founder_persons[${ index }].identity_document.code` }
|
||||
@ -216,18 +231,6 @@ class ShareholderForm extends React.Component
|
||||
required={ true }
|
||||
disabled={ checking }
|
||||
/>
|
||||
{/*}
|
||||
<InputMask
|
||||
mask='999-999'
|
||||
id={ `founder_persons[${ index }].identity_document.code` }
|
||||
name={ `founder_persons[${ index }].identity_document.code` }
|
||||
value={ this._checkStrValue(shareholder.identity_document.code) }
|
||||
placeholder="Введите код"
|
||||
onChange={ (event) => this._handle_onTextFieldChange(event.target.name, event.target.value) }
|
||||
required={ true }
|
||||
disabled={ checking }
|
||||
/>
|
||||
{*/}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -236,7 +239,7 @@ class ShareholderForm extends React.Component
|
||||
<div className="form_field">
|
||||
<label>Кем выдан <sup className="required_label">*</sup></label>
|
||||
<DocumentIssuerSuggestsInput
|
||||
className={ errors.indexOf(`founder_persons[${ index }].identity_document.issueby`) > -1 ? "error" : "" }
|
||||
className={ errors.indexOf(`identity_document.issueby`) > -1 ? "error" : "" }
|
||||
type="issuer"
|
||||
id={ `founder_persons[${ index }].identity_document.issueby` }
|
||||
name={ `founder_persons[${ index }].identity_document.issueby` }
|
||||
@ -247,55 +250,48 @@ class ShareholderForm extends React.Component
|
||||
required={ true }
|
||||
disabled={ checking }
|
||||
/>
|
||||
{/*}
|
||||
<input type="text"
|
||||
id={ `founder_persons[${ index }].identity_document.issueby` }
|
||||
name={ `founder_persons[${ index }].identity_document.issueby` }
|
||||
value={ this._checkStrValue(shareholder.identity_document.issueby) }
|
||||
placeholder="Введите наименование подразделения выдавшего документ"
|
||||
onChange={ (event) => this._handle_onTextFieldChange(event.target.name, event.target.value) }
|
||||
required={ true }
|
||||
disabled={ checking }
|
||||
/>
|
||||
{*/}
|
||||
</div>
|
||||
|
||||
<div className="form_field" style={{ flex: 1 }}>
|
||||
<label>Место рождения <sup className="required_label">*</sup></label>
|
||||
<AddressSuggests
|
||||
className={ errors.indexOf("identity_document.placebirth") > -1 ? "error" : "" }
|
||||
id={ `founder_persons[${ index }].identity_document.placebirth` }
|
||||
value={ this._checkStrValue(shareholder.identity_document.placebirth) }
|
||||
onChange={ (data) => this._handle_onTextFieldChange(`founder_persons[${ index }].identity_document.placebirth`, data.name) }
|
||||
onChange={ (data) => { this._removeError("identity_document.placebirth"); this._handle_onTextFieldChange(`founder_persons[${ index }].identity_document.placebirth`, data.name) } }
|
||||
required={ true }
|
||||
disabled={ checking }
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="form_field">
|
||||
<label>Гражданство <sup className="required_label">*</sup></label>
|
||||
<Select
|
||||
id={ `founder_persons[${ index }].identity_document.citizenship` }
|
||||
name={ `founder_persons[${ index }].identity_document.citizenship` }
|
||||
options={ [ ...citizenships ] }
|
||||
placeholder="Выберите страну"
|
||||
noOptionsMessage={ ({ inputValue }) => !inputValue ? noOptionsText :"Ничего не найдено" }
|
||||
isSearchable={ true }
|
||||
className="autocomlete"
|
||||
classNamePrefix="react-select"
|
||||
value={ citizenship.code !== null ? citizenship : undefined }
|
||||
onChange={ (element) => this._handle_onCitizenshipChange(`founder_persons[${ index }].identity_document.citizenship`, element.value) }
|
||||
required={ true }
|
||||
isDisabled={ checking }
|
||||
/>
|
||||
</div>
|
||||
{ parseInt(shareholder.identity_document.doctype, 10) !== 100000000 && (
|
||||
<div className="form_field">
|
||||
<label>Гражданство <sup className="required_label">*</sup></label>
|
||||
<Select
|
||||
className={ errors.indexOf("identity_document.placebirth") > -1 ? "autocomlete error" : "autocomlete" }
|
||||
id={ `founder_persons[${ index }].identity_document.citizenship` }
|
||||
name={ `founder_persons[${ index }].identity_document.citizenship` }
|
||||
options={ [ ...citizenships ] }
|
||||
placeholder="Выберите страну"
|
||||
noOptionsMessage={ ({ inputValue }) => !inputValue ? noOptionsText :"Ничего не найдено" }
|
||||
isSearchable={ true }
|
||||
classNamePrefix="react-select"
|
||||
value={ citizenship.code !== null ? citizenship : undefined }
|
||||
onChange={ (element) => this._handle_onCitizenshipChange(`founder_persons[${ index }].identity_document.citizenship`, element.value) }
|
||||
required={ true }
|
||||
isDisabled={ checking }
|
||||
/>
|
||||
</div>
|
||||
) }
|
||||
|
||||
<div className="form_field">
|
||||
<label>Адрес регистрации <sup className="required_label">*</sup></label>
|
||||
<AddressSuggests
|
||||
className={ errors.indexOf("identity_document.registration_address.name") > -1 ? "error" : "" }
|
||||
id={ `founder_persons[${ index }].identity_document.registration_address` }
|
||||
value={ this._checkStrValue(shareholder.identity_document.registration_address.name) }
|
||||
fias={ this._checkStrValue(shareholder.identity_document.registration_address.fias_id) }
|
||||
onChange={ (data) => this._handle_onTextFieldChange(`founder_persons[${ index }].identity_document.registration_address`, data) }
|
||||
onChange={ (data) => { this._removeError("identity_document.registration_address.name"); this._handle_onTextFieldChange(`founder_persons[${ index }].identity_document.registration_address`, data) } }
|
||||
required={ true }
|
||||
disabled={ checking }
|
||||
/>
|
||||
@ -606,7 +602,7 @@ class Form_4_Shareholders extends QuestionnaireForm
|
||||
|
||||
_handle_onIssuerCodeChange = (branch, index, option) =>
|
||||
{
|
||||
this._onRemoveError(index, `${ branch }.identity_document.code`);
|
||||
this._onRemoveError(index, `identity_document.code`);
|
||||
|
||||
if(typeof option === "string")
|
||||
{
|
||||
@ -618,12 +614,13 @@ class Form_4_Shareholders extends QuestionnaireForm
|
||||
{ name: `${ branch }.identity_document.code`, value: option.data.code },
|
||||
{ name: `${ branch }.identity_document.issueby`, value: option.value },
|
||||
]);
|
||||
this._onRemoveError(index, `identity_document.issueby`);
|
||||
}
|
||||
}
|
||||
|
||||
_handle_onIssuerChange = (branch, index, option) =>
|
||||
{
|
||||
this._onRemoveError(index, `${ branch }.identity_document.issueby`);
|
||||
this._onRemoveError(index, `identity_document.issueby`);
|
||||
|
||||
if(typeof option === "string")
|
||||
{
|
||||
@ -635,10 +632,18 @@ class Form_4_Shareholders extends QuestionnaireForm
|
||||
{ name: `${ branch }.identity_document.code`, value: option.data.code },
|
||||
{ name: `${ branch }.identity_document.issueby`, value: option.value },
|
||||
]);
|
||||
this._onRemoveError(index, `identity_document.code`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
_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_onFormSubmit = (event) =>
|
||||
{
|
||||
event.preventDefault();
|
||||
@ -669,11 +674,11 @@ class Form_4_Shareholders extends QuestionnaireForm
|
||||
"identity_document.seria",
|
||||
"identity_document.docnumber",
|
||||
"identity_document.issuedate",
|
||||
"identity_document.icode",
|
||||
"identity_document.code",
|
||||
"identity_document.issueby",
|
||||
"identity_document.placebirth",
|
||||
"identity_document.citizenship.code",
|
||||
"identity_document.registration_address.title",
|
||||
"identity_document.registration_address.name",
|
||||
];
|
||||
|
||||
if(parseInt(_get("signatory_person.identity_document.doctype"), 10) === 100000000)
|
||||
@ -684,7 +689,9 @@ class Form_4_Shareholders extends QuestionnaireForm
|
||||
{
|
||||
for(let i in check)
|
||||
{
|
||||
if(_get(founder_persons[f], check[i]) === "")
|
||||
const v = _get(founder_persons[f], check[i]);
|
||||
|
||||
if(v === "" || v === null)
|
||||
{
|
||||
errors[f].push(check[i]);
|
||||
}
|
||||
@ -694,17 +701,36 @@ class Form_4_Shareholders extends QuestionnaireForm
|
||||
this.setState({ errors }, () =>
|
||||
{
|
||||
window.scroll(0, 0);
|
||||
this.ref_submit.current.click();
|
||||
if(errors.length === 0)
|
||||
{
|
||||
this.ref_submit.current.click();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
_onRemoveError = (index, name) =>
|
||||
{
|
||||
const errors = [ ...this.state.errors ];
|
||||
if(errors.indexOf(name) > -1)
|
||||
console.log("_onRemoveError", { index, name, errors });
|
||||
|
||||
if(typeof name === "string")
|
||||
{
|
||||
errors[index].splice(errors[index].indexOf(name), 1);
|
||||
if(errors[index].indexOf(name) > -1)
|
||||
{
|
||||
errors[index].splice(errors[index].indexOf(name), 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for(let i in name)
|
||||
{
|
||||
if(errors[index].indexOf(name[i]) > -1)
|
||||
{
|
||||
errors[index].splice(errors[index].indexOf(name[i]), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.setState({ errors });
|
||||
}
|
||||
|
||||
@ -741,14 +767,7 @@ class Form_4_Shareholders extends QuestionnaireForm
|
||||
</p>
|
||||
{ this._checkErrorsList() &&
|
||||
(
|
||||
<div className="questionnaire message error">
|
||||
<svg width="44" height="45" viewBox="0 0 44 45" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M40.5425 31.1863L25.7969 8.08116C24.9653 6.77804 23.5459 6 22 6C20.4539 6 19.0345 6.77804 18.2032 8.08116L3.45741 31.1862C2.57234 32.5732 2.51363 34.3313 3.30467 35.7746C4.09572 37.2173 5.60918 38.1137 7.25444 38.1137H36.7456C38.3909 38.1137 39.9044 37.2175 40.6956 35.7742C41.4863 34.3313 41.4276 32.5733 40.5425 31.1863ZM22 34.2245C20.644 34.2245 19.5448 33.1252 19.5448 31.7694C19.5448 30.4133 20.6441 29.3141 22 29.3141C23.356 29.3141 24.4551 30.4133 24.4551 31.7694C24.4551 33.1252 23.3559 34.2245 22 34.2245ZM25.403 17.1635L24.1937 25.3052C24.0157 26.5037 22.8999 27.3309 21.7016 27.1529C20.7334 27.0091 20.0075 26.25 19.8582 25.333L18.5451 17.2074C18.2394 15.3155 19.5251 13.534 21.417 13.2283C23.3089 12.9226 25.0904 14.2083 25.3962 16.1002C25.4536 16.4565 25.4517 16.8243 25.403 17.1635Z" fill="white"/>
|
||||
</svg>
|
||||
<p><b>Ошибка</b>
|
||||
Пожалуйста, проверьте корректность заполнения данных в форме.
|
||||
</p>
|
||||
</div>
|
||||
<FormMessage type="error" title="Ошибка" message="Пожалуйста, проверьте корректность заполнения данных в форме."/>
|
||||
) }
|
||||
{ founder_persons.map((shareholder, index) => (
|
||||
<Shareholder
|
||||
@ -762,6 +781,7 @@ class Form_4_Shareholders extends QuestionnaireForm
|
||||
_handle_onFieldChange={ this._handle_onFieldChange }
|
||||
_handle_onIssuerCodeChange={ this._handle_onIssuerCodeChange }
|
||||
_handle_onIssuerChange={ this._handle_onIssuerChange }
|
||||
_handle_onDocumentTypeChange={ this._handle_onDocumentTypeChange }
|
||||
_checkStrValue={ this._checkStrValue }
|
||||
_removeError={ (name) => this._onRemoveError(index, name) }
|
||||
removeShareholder={ this._handle_onRemoveShareholder }
|
||||
|
||||
@ -12,6 +12,7 @@ import { withRouter } from 'next/router';
|
||||
import QuestionnaireForm from "../QuestionnaireForm";
|
||||
import { reduxWrapper } from '../../../../store';
|
||||
import { saveQuestionnaire } from "../../../../actions";
|
||||
import FormMessage from "../FormMessage";
|
||||
|
||||
class Form_5_Regulatory extends QuestionnaireForm
|
||||
{
|
||||
@ -83,7 +84,10 @@ class Form_5_Regulatory extends QuestionnaireForm
|
||||
this.setState({ errors }, () =>
|
||||
{
|
||||
window.scroll(0, 0);
|
||||
this.ref_submit.current.click();
|
||||
if(errors.length === 0)
|
||||
{
|
||||
this.ref_submit.current.click();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -100,14 +104,7 @@ class Form_5_Regulatory extends QuestionnaireForm
|
||||
<p>Заполняется юридическими лицами, индивидуальными предпринимателями не заполняется</p>
|
||||
{ errors.length > 0 &&
|
||||
(
|
||||
<div className="questionnaire message error">
|
||||
<svg width="44" height="45" viewBox="0 0 44 45" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M40.5425 31.1863L25.7969 8.08116C24.9653 6.77804 23.5459 6 22 6C20.4539 6 19.0345 6.77804 18.2032 8.08116L3.45741 31.1862C2.57234 32.5732 2.51363 34.3313 3.30467 35.7746C4.09572 37.2173 5.60918 38.1137 7.25444 38.1137H36.7456C38.3909 38.1137 39.9044 37.2175 40.6956 35.7742C41.4863 34.3313 41.4276 32.5733 40.5425 31.1863ZM22 34.2245C20.644 34.2245 19.5448 33.1252 19.5448 31.7694C19.5448 30.4133 20.6441 29.3141 22 29.3141C23.356 29.3141 24.4551 30.4133 24.4551 31.7694C24.4551 33.1252 23.3559 34.2245 22 34.2245ZM25.403 17.1635L24.1937 25.3052C24.0157 26.5037 22.8999 27.3309 21.7016 27.1529C20.7334 27.0091 20.0075 26.25 19.8582 25.333L18.5451 17.2074C18.2394 15.3155 19.5251 13.534 21.417 13.2283C23.3089 12.9226 25.0904 14.2083 25.3962 16.1002C25.4536 16.4565 25.4517 16.8243 25.403 17.1635Z" fill="white"/>
|
||||
</svg>
|
||||
<p><b>Ошибка</b>
|
||||
Пожалуйста, проверьте корректность заполнения данных в форме.
|
||||
</p>
|
||||
</div>
|
||||
<FormMessage type="error" title="Ошибка" message="Пожалуйста, проверьте корректность заполнения данных в форме."/>
|
||||
) }
|
||||
<div className="form_field bg">
|
||||
<label>Наименование органа управления</label>
|
||||
|
||||
@ -12,6 +12,7 @@ import { withRouter } from 'next/router';
|
||||
import QuestionnaireForm from "../QuestionnaireForm";
|
||||
import { reduxWrapper } from '../../../../store';
|
||||
import { saveQuestionnaire } from "../../../../actions";
|
||||
import FormMessage from "../FormMessage";
|
||||
|
||||
class Form_6_NonProfit extends QuestionnaireForm
|
||||
{
|
||||
@ -200,14 +201,7 @@ class Form_6_NonProfit extends QuestionnaireForm
|
||||
<p className="title">6. Данные о некомерческой организации</p>
|
||||
{ errors.indexOf("non_profit.fin_source") > -1 &&
|
||||
(
|
||||
<div className="questionnaire message error">
|
||||
<svg width="44" height="45" viewBox="0 0 44 45" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M40.5425 31.1863L25.7969 8.08116C24.9653 6.77804 23.5459 6 22 6C20.4539 6 19.0345 6.77804 18.2032 8.08116L3.45741 31.1862C2.57234 32.5732 2.51363 34.3313 3.30467 35.7746C4.09572 37.2173 5.60918 38.1137 7.25444 38.1137H36.7456C38.3909 38.1137 39.9044 37.2175 40.6956 35.7742C41.4863 34.3313 41.4276 32.5733 40.5425 31.1863ZM22 34.2245C20.644 34.2245 19.5448 33.1252 19.5448 31.7694C19.5448 30.4133 20.6441 29.3141 22 29.3141C23.356 29.3141 24.4551 30.4133 24.4551 31.7694C24.4551 33.1252 23.3559 34.2245 22 34.2245ZM25.403 17.1635L24.1937 25.3052C24.0157 26.5037 22.8999 27.3309 21.7016 27.1529C20.7334 27.0091 20.0075 26.25 19.8582 25.333L18.5451 17.2074C18.2394 15.3155 19.5251 13.534 21.417 13.2283C23.3089 12.9226 25.0904 14.2083 25.3962 16.1002C25.4536 16.4565 25.4517 16.8243 25.403 17.1635Z" fill="white"/>
|
||||
</svg>
|
||||
<p><b>Ошибка</b>
|
||||
Необходимо указать источник происхождения денежных средств.
|
||||
</p>
|
||||
</div>
|
||||
<FormMessage type="error" title="Ошибка" message="Необходимо указать источник происхождения денежных средств."/>
|
||||
) }
|
||||
<p>Источники происхождения денежных средств, из которых будут осуществляться лизинговые платежи:</p>
|
||||
|
||||
@ -301,16 +295,8 @@ class Form_6_NonProfit extends QuestionnaireForm
|
||||
|
||||
{ errors.indexOf("non_profit.fin_goals") > -1 &&
|
||||
(
|
||||
<div className="questionnaire message error">
|
||||
<svg width="44" height="45" viewBox="0 0 44 45" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M40.5425 31.1863L25.7969 8.08116C24.9653 6.77804 23.5459 6 22 6C20.4539 6 19.0345 6.77804 18.2032 8.08116L3.45741 31.1862C2.57234 32.5732 2.51363 34.3313 3.30467 35.7746C4.09572 37.2173 5.60918 38.1137 7.25444 38.1137H36.7456C38.3909 38.1137 39.9044 37.2175 40.6956 35.7742C41.4863 34.3313 41.4276 32.5733 40.5425 31.1863ZM22 34.2245C20.644 34.2245 19.5448 33.1252 19.5448 31.7694C19.5448 30.4133 20.6441 29.3141 22 29.3141C23.356 29.3141 24.4551 30.4133 24.4551 31.7694C24.4551 33.1252 23.3559 34.2245 22 34.2245ZM25.403 17.1635L24.1937 25.3052C24.0157 26.5037 22.8999 27.3309 21.7016 27.1529C20.7334 27.0091 20.0075 26.25 19.8582 25.333L18.5451 17.2074C18.2394 15.3155 19.5251 13.534 21.417 13.2283C23.3089 12.9226 25.0904 14.2083 25.3962 16.1002C25.4536 16.4565 25.4517 16.8243 25.403 17.1635Z" fill="white"/>
|
||||
</svg>
|
||||
<p><b>Ошибка</b>
|
||||
Необходимо указать цели использования предмета лизинга для любой из категорий.
|
||||
</p>
|
||||
</div>
|
||||
<FormMessage type="error" title="Ошибка" message="Необходимо указать цели использования предмета лизинга для любой из категорий."/>
|
||||
) }
|
||||
|
||||
<p>Укажите цели использования предмета лизинга и подтвердите их соответствие уставным целям для каждого предмета лизинга отдельно</p>
|
||||
|
||||
<div className="form_field">
|
||||
|
||||
579
css/var.css
579
css/var.css
File diff suppressed because one or more lines are too long
26
css/var.less
26
css/var.less
@ -453,6 +453,9 @@ div {
|
||||
{
|
||||
background: url("/assets/images/icons/icon-file.svg") no-repeat left center;
|
||||
position: relative;
|
||||
min-height: 50px!important;
|
||||
background-size: 50px!important;
|
||||
padding-left: 58px!important;
|
||||
|
||||
&:before {
|
||||
content: attr(data-format);
|
||||
@ -464,18 +467,20 @@ div {
|
||||
bottom: 1px;
|
||||
top: 0;
|
||||
font-size: 10px;
|
||||
width: 35px;
|
||||
width: 48px!important;
|
||||
display: flex;
|
||||
align-content: center;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
text-transform: uppercase;
|
||||
word-break: break-all;
|
||||
word-break: break-all;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@media all and (max-width: 1600px) and (min-width: 1280px) {
|
||||
padding-left: 56px;
|
||||
background-size: 42px;
|
||||
height: 50px!important;
|
||||
|
||||
&:before {
|
||||
width: 27px;
|
||||
@ -483,20 +488,21 @@ div {
|
||||
left: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media all and (max-width: 960px) {
|
||||
padding-left: 42px;
|
||||
background-size: 32px;
|
||||
background-position: 0 5px;
|
||||
min-height: 58px!important;
|
||||
|
||||
&:before {
|
||||
font-size: 7px;
|
||||
width: 24px;
|
||||
height: 42px;
|
||||
line-height: 11px;
|
||||
text-align: center;
|
||||
left: 4px;
|
||||
right: 5px;
|
||||
font-size: 7px;
|
||||
width: 24px;
|
||||
height: 60px !important;
|
||||
line-height: 11px;
|
||||
text-align: center;
|
||||
left: 4px;
|
||||
right: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user