fixes for errors display

This commit is contained in:
merelendor 2023-04-12 11:45:46 +03:00
parent 31dbba1399
commit 89c5ae821b
11 changed files with 916 additions and 388 deletions

View File

@ -141,7 +141,7 @@ export default class AddressSuggests extends React.Component
<div className="react-select__menu-list"> <div className="react-select__menu-list">
{ options.map((option, index) => { 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>
</div> </div>

View File

@ -185,11 +185,11 @@ export default class SuggestsInput extends React.Component
disabled={ disabled } disabled={ disabled }
/> />
{ focused && options.length > 0 && ( { 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"> <div className="react-select__menu-list">
{ options.map((option, index) => { 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>
</div> </div>

View 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>
)
}
}

View File

@ -14,6 +14,7 @@ import CurrencyInput from 'react-currency-input';
import QuestionnaireForm from "../QuestionnaireForm"; import QuestionnaireForm from "../QuestionnaireForm";
import { reduxWrapper } from '../../../../store'; import { reduxWrapper } from '../../../../store';
import { saveQuestionnaire } from "../../../../actions"; import { saveQuestionnaire } from "../../../../actions";
import FormMessage from "../FormMessage";
class Form_1_Main extends QuestionnaireForm 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 }, () => this.setState({ errors }, () =>
{ {
window.scroll(0, 0); window.scroll(0, 0);
@ -118,7 +128,7 @@ class Form_1_Main extends QuestionnaireForm
this._handle_onFieldChange("step", 6); this._handle_onFieldChange("step", 6);
} }
} }
_handle_onFormSubmit = (event) => _handle_onFormSubmit = (event) =>
{ {
event.preventDefault(); event.preventDefault();
@ -159,14 +169,7 @@ class Form_1_Main extends QuestionnaireForm
<p className="title">1. Информация о лизингополучателе</p> <p className="title">1. Информация о лизингополучателе</p>
{ errors.length > 0 && { errors.length > 0 &&
( (
<div className="questionnaire message error"> <FormMessage type="error" title="Ошибка" message="Пожалуйста, проверьте корректность заполнения данных в форме."/>
<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>
) } ) }
<div className="form_field"> <div className="form_field">
<label>Краткое наименование <sup className="required_label">*</sup></label> <label>Краткое наименование <sup className="required_label">*</sup></label>
@ -191,7 +194,7 @@ class Form_1_Main extends QuestionnaireForm
name="main.inn" name="main.inn"
value={ this._checkStrValue(main.inn) } value={ this._checkStrValue(main.inn) }
placeholder="Введите ИНН" 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 } required={ true }
disabled={ true } disabled={ true }
maxLength={ 12 } maxLength={ 12 }
@ -206,7 +209,7 @@ class Form_1_Main extends QuestionnaireForm
name="main.kpp" name="main.kpp"
value={ this._checkStrValue(main.kpp) } value={ this._checkStrValue(main.kpp) }
placeholder="Введите КПП" 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 } required={ true }
disabled={ true } disabled={ true }
/> />
@ -226,19 +229,21 @@ class Form_1_Main extends QuestionnaireForm
placeholder="Введите номер" 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); } } 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 } required={ true }
disabled={ checking } > disabled={ checking }>
</InputMask> </InputMask>
</div> </div>
<div className="form_field"> <div className="form_field">
<label>Сайт</label> <label>Сайт<small>Опционально</small></label>
<input type="text" <input type="text"
className={ errors.indexOf("main.websiteurl") > -1 ? "error" : "" }
id="main.websiteurl" id="main.websiteurl"
name="main.websiteurl" name="main.websiteurl"
value={ this._checkStrValue(main.websiteurl) } value={ this._checkStrValue(main.websiteurl) }
placeholder="Введите адрес сайта, если есть" placeholder="Например https://example.com"
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 } 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>
</div> </div>

View File

@ -14,6 +14,7 @@ import QuestionnaireForm from "../QuestionnaireForm";
import { reduxWrapper } from '../../../../store'; import { reduxWrapper } from '../../../../store';
import AddressSuggests from "../../AddressSuggests"; import AddressSuggests from "../../AddressSuggests";
import { saveQuestionnaire } from "../../../../actions"; import { saveQuestionnaire } from "../../../../actions";
import FormMessage from "../FormMessage";
class Form_2_Contacts extends QuestionnaireForm class Form_2_Contacts extends QuestionnaireForm
{ {
@ -118,14 +119,7 @@ class Form_2_Contacts extends QuestionnaireForm
<p className="title">2. Адреса лизингополучателя</p> <p className="title">2. Адреса лизингополучателя</p>
{ errors.length > 0 && { errors.length > 0 &&
( (
<div className="questionnaire message error"> <FormMessage type="error" title="Ошибка" message="Пожалуйста, проверьте корректность заполнения данных в форме."/>
<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>
) } ) }
<div className="form_field"> <div className="form_field">

View File

@ -28,6 +28,7 @@ import SuggestsInput from "../../SuggestsInput";
import { getCitizenshipTitleByCode } from "../../../../utils/citizenship"; import { getCitizenshipTitleByCode } from "../../../../utils/citizenship";
import { removeAttachmentFiles, saveQuestionnaire, getSuggests } from "../../../../actions"; import { removeAttachmentFiles, saveQuestionnaire, getSuggests } from "../../../../actions";
import DocumentIssuerSuggestsInput from "../../DocumentIssuerSuggestsInput"; import DocumentIssuerSuggestsInput from "../../DocumentIssuerSuggestsInput";
import FormMessage from "../FormMessage";
const suggestsInnDebounce = (query) => const suggestsInnDebounce = (query) =>
{ {
@ -107,7 +108,7 @@ class Form_3_Signer extends QuestionnaireForm
telephone: "", telephone: "",
email: "", email: "",
identity_document: { identity_document: {
docype: "", doctype: "",
seria: "", seria: "",
docnumber: "", docnumber: "",
issuedate: "", issuedate: "",
@ -186,6 +187,7 @@ class Form_3_Signer extends QuestionnaireForm
{ name: `${ branch }.identity_document.code`, value: option.data.code }, { name: `${ branch }.identity_document.code`, value: option.data.code },
{ name: `${ branch }.identity_document.issueby`, value: option.value }, { 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.code`, value: option.data.code },
{ name: `${ branch }.identity_document.issueby`, value: option.value }, { 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) => _handle_onNextPage = (event) =>
{ {
event.preventDefault(); event.preventDefault();
@ -296,7 +307,7 @@ class Form_3_Signer extends QuestionnaireForm
"identity_document.issuedate", "identity_document.issuedate",
"identity_document.placebirth", "identity_document.placebirth",
"identity_document.citizenship_code", "identity_document.citizenship_code",
"identity_document.registration_address.title", "identity_document.registration_address.name",
"evo_assignment_date", "evo_assignment_date",
]; ];
@ -308,7 +319,7 @@ class Form_3_Signer extends QuestionnaireForm
for(let i in head_person_check) 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) 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_indefinite)
{ {
if(head_person.evo_credentials_dateend === "") if(head_person.evo_credentials_dateend === "")
{ {
errors.push(`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.issuedate",
"identity_document.placebirth", "identity_document.placebirth",
"identity_document.citizenship.code", "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) if(parseInt(_get(signatory_person, "identity_document.doctype"), 10) === 100000000)
@ -400,20 +453,11 @@ class Form_3_Signer extends QuestionnaireForm
this.setState({ errors }, () => this.setState({ errors }, () =>
{ {
window.scroll(0, 0); 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) => _handle_onFormSubmit = (event) =>
@ -447,14 +491,7 @@ class Form_3_Signer extends QuestionnaireForm
<p className="title">3. Информация о единоличном исполнительном органе, подписанте договора лизинга</p> <p className="title">3. Информация о единоличном исполнительном органе, подписанте договора лизинга</p>
{ errors.length > 0 && { errors.length > 0 &&
( (
<div className="questionnaire message error"> <FormMessage type="error" title="Ошибка" message="Пожалуйста, проверьте корректность заполнения данных в форме."/>
<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>
) } ) }
<div className="form_field"> <div className="form_field">
<label>Фамилия <sup className="required_label">*</sup></label> <label>Фамилия <sup className="required_label">*</sup></label>
@ -469,17 +506,6 @@ class Form_3_Signer extends QuestionnaireForm
required={ true } required={ true }
disabled={ checking } 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>
<div className="form_field"> <div className="form_field">
<label>Имя <sup className="required_label">*</sup></label> <label>Имя <sup className="required_label">*</sup></label>
@ -494,17 +520,6 @@ class Form_3_Signer extends QuestionnaireForm
required={ true } required={ true }
disabled={ checking } 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>
<div className="form_field"> <div className="form_field">
<label>Отчество <small>если имеется</small></label> <label>Отчество <small>если имеется</small></label>
@ -518,16 +533,6 @@ class Form_3_Signer extends QuestionnaireForm
required={ false } required={ false }
disabled={ checking } 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>
<div className="form_field"> <div className="form_field">
<label>Тип документа <sup className="required_label">*</sup></label> <label>Тип документа <sup className="required_label">*</sup></label>
@ -537,11 +542,11 @@ class Form_3_Signer extends QuestionnaireForm
options={ doctypes_personal } options={ doctypes_personal }
placeholder="Выберите тип документа" placeholder="Выберите тип документа"
noOptionsMessage={ ({ inputValue }) => !inputValue ? noOptionsText :"Ничего не найдено" } noOptionsMessage={ ({ inputValue }) => !inputValue ? noOptionsText :"Ничего не найдено" }
isSearchable={ true } isSearchable={ false }
className="autocomlete" className="autocomlete"
classNamePrefix="react-select" classNamePrefix="react-select"
value={ doctypes_personal.filter((type) => head_person.identity_document.doctype === type.value) } 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 } required={ true }
isDisabled={ checking } isDisabled={ checking }
/> />
@ -582,7 +587,9 @@ class Form_3_Signer extends QuestionnaireForm
<div className="form_field"> <div className="form_field">
<label>Дата выдачи <sup className="required_label">*</sup></label> <label>Дата выдачи <sup className="required_label">*</sup></label>
<CalendarDatePicker <CalendarDatePicker
className={ errors.indexOf("head_person.identity_document.issuedate") > -1 ? "error" : "" }
placeholder="ДД.ММ.ГГГГ" placeholder="ДД.ММ.ГГГГ"
max={ moment().toDate() }
id={ "head_person.identity_document.issuedate" } id={ "head_person.identity_document.issuedate" }
value={ this._checkStrValue(head_person.identity_document.issuedate) !== "" ? this._checkStrValue(head_person.identity_document.issuedate) : null } 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); } } 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" name="head_person.identity_document.code"
value={ this._checkStrValue(head_person.identity_document.code) } value={ this._checkStrValue(head_person.identity_document.code) }
placeholder="Введите код" 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 } maxResults={ 5 }
required={ true } required={ true }
disabled={ checking } 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>
) } ) }
</div> </div>
@ -633,26 +626,16 @@ class Form_3_Signer extends QuestionnaireForm
name="head_person.identity_document.issueby" name="head_person.identity_document.issueby"
value={ this._checkStrValue(head_person.identity_document.issueby) } value={ this._checkStrValue(head_person.identity_document.issueby) }
placeholder="Введите наименование подразделения выдавшего документ" 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 } required={ true }
disabled={ checking } 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>
) } ) }
<div className="form_field"> <div className="form_field">
<label>Место рождения <sup className="required_label">*</sup></label> <label>Место рождения <sup className="required_label">*</sup></label>
<AddressSuggests <AddressSuggests
className={ errors.indexOf("head_person.identity_document.placebirth") > -1 ? "error" : "" }
id={ "head_person.identity_document.placebirth" } id={ "head_person.identity_document.placebirth" }
value={ this._checkStrValue(head_person.identity_document.placebirth) } value={ this._checkStrValue(head_person.identity_document.placebirth) }
placeholder="Укажите место рождения" placeholder="Укажите место рождения"
@ -662,26 +645,29 @@ class Form_3_Signer extends QuestionnaireForm
/> />
</div> </div>
<div className="form_field"> { parseInt(head_person.identity_document.doctype, 10) !== 100000000 && (
<label>Гражданство <sup className="required_label">*</sup></label> <div className="form_field">
<Select <label>Гражданство <sup className="required_label">*</sup></label>
id="head_person.identity_document.citizenship" <Select
name="head_person.identity_document.citizenship" id="head_person.identity_document.citizenship"
options={ citizenships } name="head_person.identity_document.citizenship"
placeholder="Выберите страну" options={ citizenships }
noOptionsMessage={ ({ inputValue }) => !inputValue ? noOptionsText :"Ничего не найдено" } placeholder="Выберите страну"
isSearchable={ true } noOptionsMessage={ ({ inputValue }) => !inputValue ? noOptionsText :"Ничего не найдено" }
className="autocomlete" isSearchable={ true }
classNamePrefix="react-select" className="autocomlete"
value={ head_person_citizenship.code !== null ? head_person_citizenship : undefined } classNamePrefix="react-select"
onChange={ (element) => { this._removeError("head_person.identity_document.citizenship"); this._handle_onCitizenshipChange(`head_person.identity_document.citizenship`, element.value) } } value={ head_person_citizenship.code !== null ? head_person_citizenship : undefined }
required={ true } onChange={ (element) => { this._removeError("head_person.identity_document.citizenship"); this._handle_onCitizenshipChange(`head_person.identity_document.citizenship`, element.value) } }
isDisabled={ checking } required={ true }
/> isDisabled={ checking }
</div> />
</div>
) }
<div className="form_field"> <div className="form_field">
<label>Адрес регистрации <sup className="required_label">*</sup></label> <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) } value={ this._checkStrValue(head_person.identity_document.registration_address.name) }
fias={ this._checkStrValue(head_person.identity_document.registration_address.fias_id) } fias={ this._checkStrValue(head_person.identity_document.registration_address.fias_id) }
placeholder="Укажите адрес регистрации" placeholder="Укажите адрес регистрации"
@ -699,7 +685,7 @@ class Form_3_Signer extends QuestionnaireForm
name="head_person.jobtitle" name="head_person.jobtitle"
value={ this._checkStrValue(head_person.jobtitle) } value={ this._checkStrValue(head_person.jobtitle) }
placeholder="Укажите должность" 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 } required={ true }
disabled={ checking } disabled={ checking }
/> />
@ -728,21 +714,27 @@ class Form_3_Signer extends QuestionnaireForm
name={ "head_person.email" } name={ "head_person.email" }
value={ this._checkStrValue(head_person.email) } value={ this._checkStrValue(head_person.email) }
placeholder="Введите E-mail" 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 } required={ true }
disabled={ checking } disabled={ checking }
/> />
</div> </div>
{ errors.indexOf("head_person.evo_assignment_date_invalid") > -1 &&
(
<FormMessage type="error" title="Ошибка" message="Пожалуйста, укажите прошедшую дату."/>
) }
<div className="form_field picker"> <div className="form_field picker">
<label>Дата назначения <sup className="required_label">*</sup></label> <label>Дата назначения <sup className="required_label">*</sup></label>
<div style={{ display: "flex", flexWrap: "wrap", width: "calc(100% - 198px)"}}> <div style={{ display: "flex", flexWrap: "wrap", width: "calc(100% - 198px)"}}>
<CalendarDatePicker <CalendarDatePicker
className={ errors.indexOf("head_person.evo_assignment_date") > -1 ? "error" : "" } className={ errors.indexOf("head_person.evo_assignment_date") > -1 ? "error" : "" }
placeholder="ДД.ММ.ГГГГ" placeholder="ДД.ММ.ГГГГ"
max={ moment().toDate() }
id={ "head_person.evo_assignment_date" } id={ "head_person.evo_assignment_date" }
value={ this._checkStrValue(head_person.evo_assignment_date) !== "" ? this._checkStrValue(head_person.evo_assignment_date) : null } 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 } required={ true }
disabled={ checking } disabled={ checking }
style={{maxWidth: "320px"}} style={{maxWidth: "320px"}}
@ -761,33 +753,33 @@ class Form_3_Signer extends QuestionnaireForm
</div> </div>
</div> </div>
{ !head_person.evo_indefinite && ( { !head_person.evo_indefinite && (
<div className="form_field picker"> <React.Fragment>
<label>Дата окончания полномочий <sup className="required_label">*</sup></label> { errors.indexOf("head_person.evo_credentials_dateend_invalid") > -1 &&
<div style={{ display: "flex", flexWrap: "wrap", width: "calc(100% - 198px)" }}> (
<CalendarDatePicker <FormMessage type="error" title="Ошибка" message="Срок полномочий пройден. Пожалуйста, введите корректную дату."/>
className={ errors.indexOf("head_person.evo_credentials_dateend") > -1 ? "error" : "" } ) }
placeholder="ДД.ММ.ГГГГ" <div className="form_field picker">
id={ "head_person.evo_credentials_dateend" } <label>Дата окончания полномочий <sup className="required_label">*</sup></label>
value={ this._checkStrValue(head_person.evo_credentials_dateend) !== "" ? this._checkStrValue(head_person.evo_credentials_dateend) : null } <div style={{ display: "flex", flexWrap: "wrap", width: "calc(100% - 198px)" }}>
onChange={ (date) => { this._handle_onTextFieldChange("head_person.evo_credentials_dateend", date) } } <CalendarDatePicker
required={ true } className={ errors.indexOf("head_person.evo_credentials_dateend") > -1 ? "error" : "" }
disabled={ checking } min={ moment().toDate() }
style={{maxWidth: "320px"}} 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>
</div> </React.Fragment>
) } ) }
{ errors.indexOf("head_person_files") > -1 && { errors.indexOf("head_person_files") > -1 &&
( (
<div className="questionnaire message error"> <FormMessage type="error" title="Ошибка" message="Пожалуйста, приложите как минимум одно отсканированное изображение или фотографию документа, подтверждающего личность."/>
<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>
) } ) }
<FilesList <FilesList
maxFiles={ 2 } maxFiles={ 2 }
@ -834,7 +826,7 @@ class Form_3_Signer extends QuestionnaireForm
name="main.individual_executive_inn" name="main.individual_executive_inn"
value={ this._checkStrValue(main.individual_executive_inn) } value={ this._checkStrValue(main.individual_executive_inn) }
placeholder="Введите ИНН" placeholder="Введите ИНН"
onChange={ (event) => this._handle_onInnChange(event.target.value) } onChange={ (event) => { this._removeError(event.target.name); this._handle_onInnChange(event.target.value); } }
required={ true } required={ true }
disabled={ checking } disabled={ checking }
/> />
@ -851,7 +843,7 @@ class Form_3_Signer extends QuestionnaireForm
name="main.individual_executive_kpp" name="main.individual_executive_kpp"
value={ this._checkStrValue(main.individual_executive_kpp) } value={ this._checkStrValue(main.individual_executive_kpp) }
placeholder="Введите КПП" 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 } required={ true }
disabled={ checking } disabled={ checking }
/> />
@ -868,7 +860,7 @@ class Form_3_Signer extends QuestionnaireForm
name="main.individual_executive_oop" name="main.individual_executive_oop"
value={ this._checkStrValue(main.individual_executive_oop) } value={ this._checkStrValue(main.individual_executive_oop) }
placeholder="Укажите наименование" 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 } required={ true }
disabled={ checking } disabled={ checking }
/> />
@ -884,7 +876,7 @@ class Form_3_Signer extends QuestionnaireForm
name="main.individual_executive_docnum" name="main.individual_executive_docnum"
value={ this._checkStrValue(main.individual_executive_docnum) } value={ this._checkStrValue(main.individual_executive_docnum) }
placeholder="Номер договора" 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 } disabled={ checking }
/> />
</div> </div>
@ -895,9 +887,10 @@ class Form_3_Signer extends QuestionnaireForm
className={ errors.indexOf("main.individual_executive_docdate") > -1 ? "error" : "" } className={ errors.indexOf("main.individual_executive_docdate") > -1 ? "error" : "" }
style={{ width: "100%", }} style={{ width: "100%", }}
placeholder="ДД.ММ.ГГГГ" placeholder="ДД.ММ.ГГГГ"
max={ moment().toDate() }
id={ "main.individual_executive_docdate" } id={ "main.individual_executive_docdate" }
value={ this._checkStrValue(main.individual_executive_docdate) !== "" ? this._checkStrValue(main.individual_executive_docdate) : null } 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 } required={ true }
disabled={ checking } disabled={ checking }
/> />
@ -906,14 +899,7 @@ class Form_3_Signer extends QuestionnaireForm
{ errors.indexOf("delegation_files") > -1 && { errors.indexOf("delegation_files") > -1 &&
( (
<div className="questionnaire message error"> <FormMessage type="error" title="Ошибка" message="Пожалуйста, приложите как минимум одно отсканированное изображение или фотографию документа, подтверждающего передачу полномочий."/>
<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>
) } ) }
<FilesList <FilesList
maxFiles={ 2 } maxFiles={ 2 }
@ -957,7 +943,7 @@ class Form_3_Signer extends QuestionnaireForm
name="signatory_person.lastname" name="signatory_person.lastname"
value={ this._checkStrValue(signatory_person.lastname) } value={ this._checkStrValue(signatory_person.lastname) }
placeholder="Введите фамилию" 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 } required={ true }
disabled={ checking } disabled={ checking }
/> />
@ -972,7 +958,7 @@ class Form_3_Signer extends QuestionnaireForm
name="signatory_person.firstname" name="signatory_person.firstname"
value={ this._checkStrValue(signatory_person.firstname) } value={ this._checkStrValue(signatory_person.firstname) }
placeholder="Введите имя" 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 } required={ true }
disabled={ checking } disabled={ checking }
/> />
@ -1000,11 +986,11 @@ class Form_3_Signer extends QuestionnaireForm
options={ doctypes_personal } options={ doctypes_personal }
placeholder="Выберите тип документа" placeholder="Выберите тип документа"
noOptionsMessage={ ({ inputValue }) => !inputValue ? noOptionsText :"Ничего не найдено" } noOptionsMessage={ ({ inputValue }) => !inputValue ? noOptionsText :"Ничего не найдено" }
isSearchable={ true } isSearchable={ false }
className="autocomlete" className="autocomlete"
classNamePrefix="react-select" classNamePrefix="react-select"
value={ doctypes_personal.filter((type) => signatory_person.identity_document.doctype === type.value) } 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 } required={ true }
isDisabled={ checking } isDisabled={ checking }
/> />
@ -1020,7 +1006,7 @@ class Form_3_Signer extends QuestionnaireForm
name="signatory_person.identity_document.seria" name="signatory_person.identity_document.seria"
value={ this._checkStrValue(signatory_person.identity_document.seria) } value={ this._checkStrValue(signatory_person.identity_document.seria) }
placeholder="Введите серию" 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 } required={ true }
disabled={ checking } disabled={ checking }
/> />
@ -1035,7 +1021,7 @@ class Form_3_Signer extends QuestionnaireForm
name="signatory_person.identity_document.docnumber" name="signatory_person.identity_document.docnumber"
value={ this._checkStrValue(signatory_person.identity_document.docnumber) } value={ this._checkStrValue(signatory_person.identity_document.docnumber) }
placeholder="Введите номер" 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 } required={ true }
disabled={ checking } disabled={ checking }
/> />
@ -1049,9 +1035,10 @@ class Form_3_Signer extends QuestionnaireForm
className={ errors.indexOf("signatory_person.identity_document.issuedate") > -1 ? "error" : "" } className={ errors.indexOf("signatory_person.identity_document.issuedate") > -1 ? "error" : "" }
style={{ width: "calc(100% - 198px)" }} style={{ width: "calc(100% - 198px)" }}
placeholder="ДД.ММ.ГГГГ" placeholder="ДД.ММ.ГГГГ"
max={ moment().toDate() }
id={ "signatory_person.identity_document.issuedate" } id={ "signatory_person.identity_document.issuedate" }
value={ this._checkStrValue(signatory_person.identity_document.issuedate) !== "" ? this._checkStrValue(signatory_person.identity_document.issuedate) : null } 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 } required={ true }
disabled={ checking } disabled={ checking }
/> />
@ -1066,24 +1053,11 @@ class Form_3_Signer extends QuestionnaireForm
name="signatory_person.identity_document.code" name="signatory_person.identity_document.code"
value={ this._checkStrValue(signatory_person.identity_document.code) } value={ this._checkStrValue(signatory_person.identity_document.code) }
placeholder="Введите код" 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 } maxResults={ 5 }
required={ true } required={ true }
disabled={ checking } 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>
</div> </div>
@ -1096,22 +1070,10 @@ class Form_3_Signer extends QuestionnaireForm
name="signatory_person.identity_document.issueby" name="signatory_person.identity_document.issueby"
value={ this._checkStrValue(signatory_person.identity_document.issueby) } value={ this._checkStrValue(signatory_person.identity_document.issueby) }
placeholder="Введите наименование подразделения выдавшего документ" 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 } required={ true }
disabled={ checking } 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>
<div className="form_field"> <div className="form_field">
@ -1121,51 +1083,42 @@ class Form_3_Signer extends QuestionnaireForm
id={ "signatory_person.identity_document.placebirth" } id={ "signatory_person.identity_document.placebirth" }
value={ this._checkStrValue(signatory_person.identity_document.placebirth) } value={ this._checkStrValue(signatory_person.identity_document.placebirth) }
placeholder="Укажите место рождения" 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 } required={ true }
disabled={ checking } disabled={ checking }
/> />
</div> </div>
<div className="form_field"> { parseInt(signatory_person.identity_document.doctype, 10) !== 100000000 && (
<label>Гражданство <sup className="required_label">*</sup></label> <div className="form_field">
<Select <label>Гражданство <sup className="required_label">*</sup></label>
id="signatory_person.identity_document.citizenship" <Select
name="signatory_person.identity_document.citizenship" className={ errors.indexOf("signatory_person.identity_document.placebirth") > -1 ? "autocomlete error" : "autocomlete" }
options={ citizenships } id="signatory_person.identity_document.citizenship"
placeholder="Выберите страну" name="signatory_person.identity_document.citizenship"
noOptionsMessage={ ({ inputValue }) => !inputValue ? noOptionsText :"Ничего не найдено" } options={ citizenships }
isSearchable={ true } placeholder="Выберите страну"
className="autocomlete" noOptionsMessage={ ({ inputValue }) => !inputValue ? noOptionsText :"Ничего не найдено" }
classNamePrefix="react-select" isSearchable={ true }
value={ signatory_person_citizenship.code !== null ? signatory_person_citizenship : undefined } classNamePrefix="react-select"
onChange={ (element) => this._handle_onCitizenshipChange(`signatory_person.identity_document.citizenship`, element.value) } value={ signatory_person_citizenship.code !== null ? signatory_person_citizenship : undefined }
required={ true } onChange={ (element) => { this._removeError("signatory_person.identity_document.citizenship"); this._handle_onCitizenshipChange(`signatory_person.identity_document.citizenship`, element.value); } }
isDisabled={ checking } required={ true }
/> isDisabled={ checking }
</div> />
</div>
) }
<div className="form_field"> <div className="form_field">
<label>Адрес регистрации <sup className="required_label">*</sup></label> <label>Адрес регистрации <sup className="required_label">*</sup></label>
<AddressSuggests <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) } value={ this._checkStrValue(signatory_person.identity_document.registration_address.name) }
fias={ this._checkStrValue(signatory_person.identity_document.registration_address.fias_id) } 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 } required={ true }
disabled={ checking } 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>
<div className="form_field"> <div className="form_field">
@ -1176,7 +1129,7 @@ class Form_3_Signer extends QuestionnaireForm
name="signatory_person.jobtitle" name="signatory_person.jobtitle"
value={ this._checkStrValue(signatory_person.jobtitle) } value={ this._checkStrValue(signatory_person.jobtitle) }
placeholder="Укажите должность" 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 } required={ true }
disabled={ checking } disabled={ checking }
/> />
@ -1191,7 +1144,7 @@ class Form_3_Signer extends QuestionnaireForm
name={ "signatory_person.telephone" } name={ "signatory_person.telephone" }
value={ this._checkStrValue(signatory_person.telephone) } value={ this._checkStrValue(signatory_person.telephone) }
placeholder="Введите номер телефона" 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 } required={ true }
disabled={ checking } disabled={ checking }
mask='+7 (999) 999 99 99' mask='+7 (999) 999 99 99'
@ -1206,7 +1159,7 @@ class Form_3_Signer extends QuestionnaireForm
name="signatory_person.email" name="signatory_person.email"
value={ this._checkStrValue(signatory_person.email) } value={ this._checkStrValue(signatory_person.email) }
placeholder="E-mail" 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 } required={ true }
disabled={ checking } disabled={ checking }
/> />
@ -1215,14 +1168,7 @@ class Form_3_Signer extends QuestionnaireForm
{ errors.indexOf("signatory_person_files") > -1 && { errors.indexOf("signatory_person_files") > -1 &&
( (
<div className="questionnaire message error"> <FormMessage type="error" title="Ошибка" message="Пожалуйста, приложите как минимум одно отсканированное изображение или фотографию документа, подтверждающего личность."/>
<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>
) } ) }
<FilesList <FilesList
maxFiles={ 2 } maxFiles={ 2 }
@ -1249,7 +1195,7 @@ class Form_3_Signer extends QuestionnaireForm
className="autocomlete" className="autocomlete"
classNamePrefix="react-select" classNamePrefix="react-select"
value={ doctypes_corporate.filter((type) => signatory_person.signer_rule_basis === type.value) } 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 } required={ true }
isDisabled={ checking } isDisabled={ checking }
/> />
@ -1264,7 +1210,7 @@ class Form_3_Signer extends QuestionnaireForm
name="signatory_person.signer_rule_basis_add" name="signatory_person.signer_rule_basis_add"
value={ this._checkStrValue(signatory_person.signer_rule_basis_add) } value={ this._checkStrValue(signatory_person.signer_rule_basis_add) }
placeholder="Наименование документа" 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 } required={ true }
disabled={ checking } disabled={ checking }
/> />
@ -1282,7 +1228,7 @@ class Form_3_Signer extends QuestionnaireForm
name="signatory_person.docnumber" name="signatory_person.docnumber"
value={ this._checkStrValue(signatory_person.docnumber) } value={ this._checkStrValue(signatory_person.docnumber) }
placeholder="Номер документа" 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 } required={ true }
disabled={ checking } disabled={ checking }
/> />
@ -1294,9 +1240,10 @@ class Form_3_Signer extends QuestionnaireForm
className={ errors.indexOf("signatory_person.docdate") > -1 ? "error" : "" } className={ errors.indexOf("signatory_person.docdate") > -1 ? "error" : "" }
style={{ width: "calc(100% - 198px)" }} style={{ width: "calc(100% - 198px)" }}
placeholder="ДД.ММ.ГГГГ" placeholder="ДД.ММ.ГГГГ"
max={ moment().toDate() }
id={ "signatory_person.docdate" } id={ "signatory_person.docdate" }
value={ this._checkStrValue(signatory_person.docdate) !== "" ? this._checkStrValue(signatory_person.docdate) : null } 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 } required={ true }
disabled={ checking } disabled={ checking }
/> />
@ -1305,14 +1252,7 @@ class Form_3_Signer extends QuestionnaireForm
{ errors.indexOf("signatory_corporate_files") > -1 && { errors.indexOf("signatory_corporate_files") > -1 &&
( (
<div className="questionnaire message error"> <FormMessage type="error" title="Ошибка" message="Пожалуйста, приложите как минимум одно отсканированное изображение или фотографию документа, подтверждающего право подписи."/>
<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>
) } ) }
<FilesList <FilesList
maxFiles={ 2 } 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" }}/> <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> </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">Даю согласие на&nbsp;<a style={{ cursor: "pointer", }} onClick={ () => { this.setState({ modal_show_personal_data: true, }) } }>обработку персональных данных</a></label>
</div>
</div>
{*/}
{ !checking && ( { !checking && (
<div className="action"> <div className="action">
<button type="button" className="button button-blue" onClick={ this._handle_onNextPage }> <button type="button" className="button button-blue" onClick={ this._handle_onNextPage }>

View File

@ -22,6 +22,8 @@ import { getCitizenshipTitleByCode } from "../../../../utils/citizenship";
import { saveQuestionnaire } from "../../../../actions"; import { saveQuestionnaire } from "../../../../actions";
import SuggestsInput from "../../SuggestsInput"; import SuggestsInput from "../../SuggestsInput";
import DocumentIssuerSuggestsInput from "../../DocumentIssuerSuggestsInput"; import DocumentIssuerSuggestsInput from "../../DocumentIssuerSuggestsInput";
import moment from "moment";
import FormMessage from "../FormMessage";
class ShareholderForm extends React.Component class ShareholderForm extends React.Component
{ {
@ -32,6 +34,7 @@ class ShareholderForm extends React.Component
_removeError = this.props._removeError; _removeError = this.props._removeError;
_handle_onIssuerCodeChange = this.props._handle_onIssuerCodeChange; _handle_onIssuerCodeChange = this.props._handle_onIssuerCodeChange;
_handle_onIssuerChange = this.props._handle_onIssuerChange; _handle_onIssuerChange = this.props._handle_onIssuerChange;
_handle_onDocumentTypeChange = this.props._handle_onDocumentTypeChange;
_handle_onCitizenshipChange = (name, value) => _handle_onCitizenshipChange = (name, value) =>
{ {
@ -52,17 +55,20 @@ class ShareholderForm extends React.Component
console.log("shareholder", "citizenship", citizenship); console.log("shareholder", "citizenship", citizenship);
console.log("shareholder", shareholder); console.log("shareholder", shareholder);
console.log("shareholder errors", errors);
return ( return (
<React.Fragment> <React.Fragment>
<div className="form_field"> <div className="form_field">
<label>Фамилия <sup className="required_label">*</sup></label> <label>Фамилия <sup className="required_label">*</sup></label>
<SuggestsInput <SuggestsInput
className={ errors.indexOf("lastname") > -1 ? "error" : "" }
type="lastname" type="lastname"
id={ `founder_persons[${ index }].lastname` } id={ `founder_persons[${ index }].lastname` }
name={ `founder_persons[${ index }].lastname` } name={ `founder_persons[${ index }].lastname` }
value={ this._checkStrValue(shareholder.lastname) } value={ this._checkStrValue(shareholder.lastname) }
placeholder="Введите фамилию" 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 } required={ true }
disabled={ checking } disabled={ checking }
/> />
@ -71,12 +77,13 @@ class ShareholderForm extends React.Component
<div className="form_field"> <div className="form_field">
<label>Имя <sup className="required_label">*</sup></label> <label>Имя <sup className="required_label">*</sup></label>
<SuggestsInput <SuggestsInput
className={ errors.indexOf("firstname") > -1 ? "error" : "" }
type="firstname" type="firstname"
id={ `founder_persons[${ index }].firstname` } id={ `founder_persons[${ index }].firstname` }
name={ `founder_persons[${ index }].firstname` } name={ `founder_persons[${ index }].firstname` }
value={ this._checkStrValue(shareholder.firstname) } value={ this._checkStrValue(shareholder.firstname) }
placeholder="Введите имя" 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 } required={ true }
disabled={ checking } disabled={ checking }
/> />
@ -85,6 +92,7 @@ class ShareholderForm extends React.Component
<div className="form_field"> <div className="form_field">
<label>Отчество <small>если имеется</small></label> <label>Отчество <small>если имеется</small></label>
<SuggestsInput <SuggestsInput
className={ errors.indexOf("middlename") > -1 ? "error" : "" }
type="middlename" type="middlename"
id={ `founder_persons[${ index }].middlename` } id={ `founder_persons[${ index }].middlename` }
name={ `founder_persons[${ index }].middlename` } name={ `founder_persons[${ index }].middlename` }
@ -97,7 +105,7 @@ class ShareholderForm extends React.Component
</div> </div>
<div className="form_field"> <div className="form_field">
<label>Должность <sup className="required_label">*</sup><small>если имеется</small></label> <label>Должность <small>если имеется</small></label>
<input type="text" <input type="text"
id={ `founder_persons[${ index }].jobtitle` } id={ `founder_persons[${ index }].jobtitle` }
name={ `founder_persons[${ index }].jobtitle` } name={ `founder_persons[${ index }].jobtitle` }
@ -112,12 +120,13 @@ class ShareholderForm extends React.Component
<div className="form_field"> <div className="form_field">
<label>Телефон <sup className="required_label">*</sup></label> <label>Телефон <sup className="required_label">*</sup></label>
<InputMask <InputMask
className={ errors.indexOf("telephone") > -1 ? "error" : "" }
mask='+7 (999) 999 99 99' mask='+7 (999) 999 99 99'
id={ `founder_persons[${ index }].telephone` } id={ `founder_persons[${ index }].telephone` }
name={ `founder_persons[${ index }].telephone` } name={ `founder_persons[${ index }].telephone` }
value={ this._checkStrValue(shareholder.telephone) } value={ this._checkStrValue(shareholder.telephone) }
placeholder="Введите номер телефона" 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 } required={ true }
disabled={ checking } disabled={ checking }
/> />
@ -126,11 +135,12 @@ class ShareholderForm extends React.Component
<div className="form_field"> <div className="form_field">
<label>Адрес E-mail <sup className="required_label">*</sup></label> <label>Адрес E-mail <sup className="required_label">*</sup></label>
<input type="text" <input type="text"
className={ errors.indexOf("email") > -1 ? "error" : "" }
id={ `founder_persons[${ index }].email` } id={ `founder_persons[${ index }].email` }
name={ `founder_persons[${ index }].email` } name={ `founder_persons[${ index }].email` }
value={ this._checkStrValue(shareholder.email) } value={ this._checkStrValue(shareholder.email) }
placeholder="Введите E-mail" 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 } required={ true }
disabled={ checking } disabled={ checking }
/> />
@ -144,11 +154,12 @@ class ShareholderForm extends React.Component
options={ doctypes_personal } options={ doctypes_personal }
placeholder="Выберите тип документа" placeholder="Выберите тип документа"
noOptionsMessage={ ({ inputValue }) => !inputValue ? noOptionsText :"Ничего не найдено" } noOptionsMessage={ ({ inputValue }) => !inputValue ? noOptionsText :"Ничего не найдено" }
isSearchable={ true } isSearchable={ false }
className="autocomlete" className="autocomlete"
classNamePrefix="react-select" classNamePrefix="react-select"
value={ doctypes_personal.filter((type) => shareholder.identity_document.doctype === type.value) } 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 } required={ true }
isDisabled={ checking } isDisabled={ checking }
/> />
@ -160,24 +171,26 @@ class ShareholderForm extends React.Component
<div className="formgroup"> <div className="formgroup">
<div className="form_field"> <div className="form_field">
<InputMask <InputMask
className={ errors.indexOf("identity_document.seria") > -1 ? "error" : "" }
mask='9999' mask='9999'
id={ `founder_persons[${ index }].identity_document.seria` } id={ `founder_persons[${ index }].identity_document.seria` }
name={ `founder_persons[${ index }].identity_document.seria` } name={ `founder_persons[${ index }].identity_document.seria` }
value={ this._checkStrValue(shareholder.identity_document.seria) } value={ this._checkStrValue(shareholder.identity_document.seria) }
placeholder="Введите серию" 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 } required={ true }
disabled={ checking } disabled={ checking }
/> />
</div> </div>
<div className="form_field"> <div className="form_field">
<InputMask <InputMask
className={ errors.indexOf("identity_document.docnumber") > -1 ? "error" : "" }
mask='999999' mask='999999'
id={ `founder_persons[${ index }].identity_document.docnumber` } id={ `founder_persons[${ index }].identity_document.docnumber` }
name={ `founder_persons[${ index }].identity_document.docnumber` } name={ `founder_persons[${ index }].identity_document.docnumber` }
value={ this._checkStrValue(shareholder.identity_document.docnumber) } value={ this._checkStrValue(shareholder.identity_document.docnumber) }
placeholder="Введите номер" 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 } required={ true }
disabled={ checking } disabled={ checking }
/> />
@ -192,20 +205,22 @@ class ShareholderForm extends React.Component
<div className="formgroup"> <div className="formgroup">
<div className="form_field"> <div className="form_field">
<CalendarDatePicker <CalendarDatePicker
className={ errors.indexOf("identity_document.issuedate") > -1 ? "error" : "" }
//style={{ width: "calc(100% - 198px)" }} //style={{ width: "calc(100% - 198px)" }}
placeholder="ДД.ММ.ГГГГ" placeholder="ДД.ММ.ГГГГ"
max={ moment().toDate() }
id={ `founder_persons[${ index }].identity_document.issuedate` } id={ `founder_persons[${ index }].identity_document.issuedate` }
value={ this._checkStrValue(shareholder.identity_document.issuedate) !== "" ? this._checkStrValue(shareholder.identity_document.issuedate) : null } 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 } required={ true }
disabled={ checking } disabled={ checking }
/> />
</div> </div>
<div className="form_field"> <div className="form_field">
<DocumentIssuerSuggestsInput <DocumentIssuerSuggestsInput
className={ errors.indexOf("identity_document.code") > -1 ? "error" : "" }
style={{ width: "calc(100% - 198px)" }} style={{ width: "calc(100% - 198px)" }}
innerStyle={{ width: "100%", }} innerStyle={{ width: "100%", }}
className={ errors.indexOf(`founder_persons[${ index }].identity_document.code`) > -1 ? "error" : "" }
type="issuer" type="issuer"
id={ `founder_persons[${ index }].identity_document.code` } id={ `founder_persons[${ index }].identity_document.code` }
name={ `founder_persons[${ index }].identity_document.code` } name={ `founder_persons[${ index }].identity_document.code` }
@ -216,18 +231,6 @@ class ShareholderForm extends React.Component
required={ true } required={ true }
disabled={ checking } 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> </div>
</div> </div>
@ -236,7 +239,7 @@ class ShareholderForm extends React.Component
<div className="form_field"> <div className="form_field">
<label>Кем выдан <sup className="required_label">*</sup></label> <label>Кем выдан <sup className="required_label">*</sup></label>
<DocumentIssuerSuggestsInput <DocumentIssuerSuggestsInput
className={ errors.indexOf(`founder_persons[${ index }].identity_document.issueby`) > -1 ? "error" : "" } className={ errors.indexOf(`identity_document.issueby`) > -1 ? "error" : "" }
type="issuer" type="issuer"
id={ `founder_persons[${ index }].identity_document.issueby` } id={ `founder_persons[${ index }].identity_document.issueby` }
name={ `founder_persons[${ index }].identity_document.issueby` } name={ `founder_persons[${ index }].identity_document.issueby` }
@ -247,55 +250,48 @@ class ShareholderForm extends React.Component
required={ true } required={ true }
disabled={ checking } 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>
<div className="form_field" style={{ flex: 1 }}> <div className="form_field" style={{ flex: 1 }}>
<label>Место рождения <sup className="required_label">*</sup></label> <label>Место рождения <sup className="required_label">*</sup></label>
<AddressSuggests <AddressSuggests
className={ errors.indexOf("identity_document.placebirth") > -1 ? "error" : "" }
id={ `founder_persons[${ index }].identity_document.placebirth` } id={ `founder_persons[${ index }].identity_document.placebirth` }
value={ this._checkStrValue(shareholder.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 } required={ true }
disabled={ checking } disabled={ checking }
/> />
</div> </div>
<div className="form_field"> { parseInt(shareholder.identity_document.doctype, 10) !== 100000000 && (
<label>Гражданство <sup className="required_label">*</sup></label> <div className="form_field">
<Select <label>Гражданство <sup className="required_label">*</sup></label>
id={ `founder_persons[${ index }].identity_document.citizenship` } <Select
name={ `founder_persons[${ index }].identity_document.citizenship` } className={ errors.indexOf("identity_document.placebirth") > -1 ? "autocomlete error" : "autocomlete" }
options={ [ ...citizenships ] } id={ `founder_persons[${ index }].identity_document.citizenship` }
placeholder="Выберите страну" name={ `founder_persons[${ index }].identity_document.citizenship` }
noOptionsMessage={ ({ inputValue }) => !inputValue ? noOptionsText :"Ничего не найдено" } options={ [ ...citizenships ] }
isSearchable={ true } placeholder="Выберите страну"
className="autocomlete" noOptionsMessage={ ({ inputValue }) => !inputValue ? noOptionsText :"Ничего не найдено" }
classNamePrefix="react-select" isSearchable={ true }
value={ citizenship.code !== null ? citizenship : undefined } classNamePrefix="react-select"
onChange={ (element) => this._handle_onCitizenshipChange(`founder_persons[${ index }].identity_document.citizenship`, element.value) } value={ citizenship.code !== null ? citizenship : undefined }
required={ true } onChange={ (element) => this._handle_onCitizenshipChange(`founder_persons[${ index }].identity_document.citizenship`, element.value) }
isDisabled={ checking } required={ true }
/> isDisabled={ checking }
</div> />
</div>
) }
<div className="form_field"> <div className="form_field">
<label>Адрес регистрации <sup className="required_label">*</sup></label> <label>Адрес регистрации <sup className="required_label">*</sup></label>
<AddressSuggests <AddressSuggests
className={ errors.indexOf("identity_document.registration_address.name") > -1 ? "error" : "" }
id={ `founder_persons[${ index }].identity_document.registration_address` } id={ `founder_persons[${ index }].identity_document.registration_address` }
value={ this._checkStrValue(shareholder.identity_document.registration_address.name) } value={ this._checkStrValue(shareholder.identity_document.registration_address.name) }
fias={ this._checkStrValue(shareholder.identity_document.registration_address.fias_id) } 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 } required={ true }
disabled={ checking } disabled={ checking }
/> />
@ -606,7 +602,7 @@ class Form_4_Shareholders extends QuestionnaireForm
_handle_onIssuerCodeChange = (branch, index, option) => _handle_onIssuerCodeChange = (branch, index, option) =>
{ {
this._onRemoveError(index, `${ branch }.identity_document.code`); this._onRemoveError(index, `identity_document.code`);
if(typeof option === "string") 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.code`, value: option.data.code },
{ name: `${ branch }.identity_document.issueby`, value: option.value }, { name: `${ branch }.identity_document.issueby`, value: option.value },
]); ]);
this._onRemoveError(index, `identity_document.issueby`);
} }
} }
_handle_onIssuerChange = (branch, index, option) => _handle_onIssuerChange = (branch, index, option) =>
{ {
this._onRemoveError(index, `${ branch }.identity_document.issueby`); this._onRemoveError(index, `identity_document.issueby`);
if(typeof option === "string") 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.code`, value: option.data.code },
{ name: `${ branch }.identity_document.issueby`, value: option.value }, { 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) => _handle_onFormSubmit = (event) =>
{ {
event.preventDefault(); event.preventDefault();
@ -669,11 +674,11 @@ class Form_4_Shareholders extends QuestionnaireForm
"identity_document.seria", "identity_document.seria",
"identity_document.docnumber", "identity_document.docnumber",
"identity_document.issuedate", "identity_document.issuedate",
"identity_document.icode", "identity_document.code",
"identity_document.issueby", "identity_document.issueby",
"identity_document.placebirth", "identity_document.placebirth",
"identity_document.citizenship.code", "identity_document.citizenship.code",
"identity_document.registration_address.title", "identity_document.registration_address.name",
]; ];
if(parseInt(_get("signatory_person.identity_document.doctype"), 10) === 100000000) 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) 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]); errors[f].push(check[i]);
} }
@ -694,17 +701,36 @@ class Form_4_Shareholders extends QuestionnaireForm
this.setState({ errors }, () => this.setState({ errors }, () =>
{ {
window.scroll(0, 0); window.scroll(0, 0);
this.ref_submit.current.click(); if(errors.length === 0)
{
this.ref_submit.current.click();
}
}); });
} }
_onRemoveError = (index, name) => _onRemoveError = (index, name) =>
{ {
const errors = [ ...this.state.errors ]; 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 }); this.setState({ errors });
} }
@ -741,14 +767,7 @@ class Form_4_Shareholders extends QuestionnaireForm
</p> </p>
{ this._checkErrorsList() && { this._checkErrorsList() &&
( (
<div className="questionnaire message error"> <FormMessage type="error" title="Ошибка" message="Пожалуйста, проверьте корректность заполнения данных в форме."/>
<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>
) } ) }
{ founder_persons.map((shareholder, index) => ( { founder_persons.map((shareholder, index) => (
<Shareholder <Shareholder
@ -762,6 +781,7 @@ class Form_4_Shareholders extends QuestionnaireForm
_handle_onFieldChange={ this._handle_onFieldChange } _handle_onFieldChange={ this._handle_onFieldChange }
_handle_onIssuerCodeChange={ this._handle_onIssuerCodeChange } _handle_onIssuerCodeChange={ this._handle_onIssuerCodeChange }
_handle_onIssuerChange={ this._handle_onIssuerChange } _handle_onIssuerChange={ this._handle_onIssuerChange }
_handle_onDocumentTypeChange={ this._handle_onDocumentTypeChange }
_checkStrValue={ this._checkStrValue } _checkStrValue={ this._checkStrValue }
_removeError={ (name) => this._onRemoveError(index, name) } _removeError={ (name) => this._onRemoveError(index, name) }
removeShareholder={ this._handle_onRemoveShareholder } removeShareholder={ this._handle_onRemoveShareholder }

View File

@ -12,6 +12,7 @@ import { withRouter } from 'next/router';
import QuestionnaireForm from "../QuestionnaireForm"; import QuestionnaireForm from "../QuestionnaireForm";
import { reduxWrapper } from '../../../../store'; import { reduxWrapper } from '../../../../store';
import { saveQuestionnaire } from "../../../../actions"; import { saveQuestionnaire } from "../../../../actions";
import FormMessage from "../FormMessage";
class Form_5_Regulatory extends QuestionnaireForm class Form_5_Regulatory extends QuestionnaireForm
{ {
@ -83,7 +84,10 @@ class Form_5_Regulatory extends QuestionnaireForm
this.setState({ errors }, () => this.setState({ errors }, () =>
{ {
window.scroll(0, 0); 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> <p>Заполняется юридическими лицами, индивидуальными предпринимателями не заполняется</p>
{ errors.length > 0 && { errors.length > 0 &&
( (
<div className="questionnaire message error"> <FormMessage type="error" title="Ошибка" message="Пожалуйста, проверьте корректность заполнения данных в форме."/>
<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>
) } ) }
<div className="form_field bg"> <div className="form_field bg">
<label>Наименование органа управления</label> <label>Наименование органа управления</label>

View File

@ -12,6 +12,7 @@ import { withRouter } from 'next/router';
import QuestionnaireForm from "../QuestionnaireForm"; import QuestionnaireForm from "../QuestionnaireForm";
import { reduxWrapper } from '../../../../store'; import { reduxWrapper } from '../../../../store';
import { saveQuestionnaire } from "../../../../actions"; import { saveQuestionnaire } from "../../../../actions";
import FormMessage from "../FormMessage";
class Form_6_NonProfit extends QuestionnaireForm class Form_6_NonProfit extends QuestionnaireForm
{ {
@ -200,14 +201,7 @@ class Form_6_NonProfit extends QuestionnaireForm
<p className="title">6. Данные о некомерческой организации</p> <p className="title">6. Данные о некомерческой организации</p>
{ errors.indexOf("non_profit.fin_source") > -1 && { errors.indexOf("non_profit.fin_source") > -1 &&
( (
<div className="questionnaire message error"> <FormMessage type="error" title="Ошибка" message="Необходимо указать источник происхождения денежных средств."/>
<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>
) } ) }
<p>Источники происхождения денежных средств, из которых будут осуществляться лизинговые платежи:</p> <p>Источники происхождения денежных средств, из которых будут осуществляться лизинговые платежи:</p>
@ -301,16 +295,8 @@ class Form_6_NonProfit extends QuestionnaireForm
{ errors.indexOf("non_profit.fin_goals") > -1 && { errors.indexOf("non_profit.fin_goals") > -1 &&
( (
<div className="questionnaire message error"> <FormMessage type="error" title="Ошибка" message="Необходимо указать цели использования предмета лизинга для любой из категорий."/>
<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>
) } ) }
<p>Укажите цели использования предмета лизинга и подтвердите их соответствие уставным целям для каждого предмета лизинга отдельно</p> <p>Укажите цели использования предмета лизинга и подтвердите их соответствие уставным целям для каждого предмета лизинга отдельно</p>
<div className="form_field"> <div className="form_field">

File diff suppressed because one or more lines are too long

View File

@ -453,6 +453,9 @@ div {
{ {
background: url("/assets/images/icons/icon-file.svg") no-repeat left center; background: url("/assets/images/icons/icon-file.svg") no-repeat left center;
position: relative; position: relative;
min-height: 50px!important;
background-size: 50px!important;
padding-left: 58px!important;
&:before { &:before {
content: attr(data-format); content: attr(data-format);
@ -464,18 +467,20 @@ div {
bottom: 1px; bottom: 1px;
top: 0; top: 0;
font-size: 10px; font-size: 10px;
width: 35px; width: 48px!important;
display: flex; display: flex;
align-content: center; align-content: center;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
text-transform: uppercase; text-transform: uppercase;
word-break: break-all; word-break: break-all;
text-align: center;
} }
@media all and (max-width: 1600px) and (min-width: 1280px) { @media all and (max-width: 1600px) and (min-width: 1280px) {
padding-left: 56px; padding-left: 56px;
background-size: 42px; background-size: 42px;
height: 50px!important;
&:before { &:before {
width: 27px; width: 27px;
@ -483,20 +488,21 @@ div {
left: 8px; left: 8px;
} }
} }
@media all and (max-width: 960px) { @media all and (max-width: 960px) {
padding-left: 42px; padding-left: 42px;
background-size: 32px; background-size: 32px;
background-position: 0 5px; background-position: 0 5px;
min-height: 58px!important;
&:before { &:before {
font-size: 7px; font-size: 7px;
width: 24px; width: 24px;
height: 42px; height: 60px !important;
line-height: 11px; line-height: 11px;
text-align: center; text-align: center;
left: 4px; left: 4px;
right: 5px; right: 5px;
} }
} }
} }