mobile fixes for markup, fixes for contacts fields on sending data to CRM

This commit is contained in:
merelendor 2023-04-18 09:01:24 +03:00
parent d725c01ad6
commit 022748d6ab
8 changed files with 5714 additions and 405 deletions

View File

@ -174,7 +174,7 @@ class Form_2_Contacts extends QuestionnaireForm
onChange={ (event) => this._handle_onCheckboxFieldChange(event.target.name, parseInt(event.target.value, 10)) }
disabled={ checking }
/>
<label htmlFor="main.mail_delivery_address_type.postal" className="unselectable" style={{ width: "100%" }}>
<label htmlFor="main.mail_delivery_address_type.postal" className="chackbox_with_margin unselectable" style={{ width: "100%" }}>
<span>По следующему адресу { parseInt(mail_delivery_address_type, 10) === 100000002 && <sup className="required_label">*</sup> }</span>
<AddressSuggests
className={ errors.indexOf("contacts.postal_address") > -1 ? "error" : "" }

View File

@ -69,6 +69,42 @@ const suggestsInnDebounce = (query) =>
const suggestsInn = debounce(suggestsInnDebounce, 200);
const signer_template = {
not_head_person: true,
lastname: "",
firstname: "",
middlename: "",
no_middle_name: false,
jobtitle: "",
signer_rule_basic: "",
signer_rule_basic_add: "",
docdate: "",
docnumber: "",
delegation_agreement: false,
telephone: "",
email: "",
};
const identity_document_template = {
doctype: "",
seria: "",
docnumber: "",
issuedate: "",
code: "",
issueby: "",
issueby_search_dadata: "",
placebirth: "",
citizenship: {
title: "",
code: "",
},
registration_address: {
name: "",
fias_id: "",
}
};
class Form_3_Signer extends QuestionnaireForm
{
constructor(props)
@ -166,6 +202,8 @@ class Form_3_Signer extends QuestionnaireForm
modal_show_personal_data: false,
status: "empty",
errors: [],
signer_from_list: true,
client_contacts: [],
};
this.ref_form = React.createRef();
@ -183,16 +221,22 @@ class Form_3_Signer extends QuestionnaireForm
signatory_person_files: nextProps.questionnaire.signatory_person_files,
signatory_corporate_files: nextProps.questionnaire.signatory_corporate_files,
status: nextProps.questionnaire.status,
client_contacts: nextProps.questionnaire.client_contacts,
};
}
componentDidMount()
{
const { main } = this.state;
const { main, signatory_person } = this.state;
if( main.inn !== null && main.inn.length === 12)
{
this._handle_onCheckboxFieldChange("head_person.evo_indefinite", true);
}
if(signatory_person.lastname !== null || signatory_person.lastname !== undefined || signatory_person.lastname !== "")
{
this.setState({ signer_from_list: false });
}
}
_handle_onCitizenshipChange = (name, value) =>
@ -320,6 +364,27 @@ class Form_3_Signer extends QuestionnaireForm
]);
}
_handle_onSignerFromListSelect = (contact) =>
{
console.log(contact);
const signer = { ...JSON.parse(JSON.stringify(signer_template)), ...contact };
if(signer.identity_document === undefined || signer.identity_document === null)
{
signer.identity_document = JSON.parse(JSON.stringify(identity_document_template));
}
this._handle_onBranchChange([
{ name: "signatory_person", value: signer },
{ name: "signatory_person_files", value: [] },
{ name: "signatory_corporate_files", value: [] },
]);
this.setState({ signer_from_list: false }, () =>
{
});
}
_handle_onNextPage = (event) =>
{
event.preventDefault();
@ -578,6 +643,8 @@ class Form_3_Signer extends QuestionnaireForm
signatory_person_files,
signatory_corporate_files,
delegation_files,
signer_from_list,
client_contacts,
} = this.state;
console.log({ errors });
@ -1044,344 +1111,390 @@ class Form_3_Signer extends QuestionnaireForm
{ signatory_person.not_head_person && (
<React.Fragment>
<p className="title">Информация о подписанте <small>(заполняется если подписант договора лизинга отличается от единоличного исполнительного органа)</small></p>
<div className="form_field">
<label>Фамилия <sup className="required_label">*</sup></label>
<SuggestsInput
className={ errors.indexOf("signatory_person.lastname") > -1 ? "error" : "" }
type="lastname"
id="signatory_person.lastname"
name="signatory_person.lastname"
value={ this._checkStrValue(signatory_person.lastname) }
placeholder="Введите фамилию"
onChange={ (value) => { this._removeError("signatory_person.lastname"); this._handle_onTextFieldChange("signatory_person.lastname", value); } }
required={ true }
disabled={ checking }
/>
</div>
<div className="form_field">
<label>Имя <sup className="required_label">*</sup></label>
<SuggestsInput
className={ errors.indexOf("signatory_person.firstname") > -1 ? "error" : "" }
type="firstname"
id="signatory_person.firstname"
name="signatory_person.firstname"
value={ this._checkStrValue(signatory_person.firstname) }
placeholder="Введите имя"
onChange={ (value) => { this._removeError("signatory_person.firstname"); this._handle_onTextFieldChange("signatory_person.firstname", value); } }
required={ true }
disabled={ checking }
/>
</div>
<div className="form_field">
<label>Отчество <small>если имеется</small></label>
<SuggestsInput
type="middlename"
id="signatory_person.middlename"
name="signatory_person.middlename"
value={ this._checkStrValue(signatory_person.middlename) }
placeholder="Введите имя"
onChange={ (value) => this._handle_onTextFieldChange("signatory_person.middlename", value) }
required={ false }
disabled={ checking }
/>
</div>
<div className="form_field">
<label>Тип документа <sup className="required_label">*</sup></label>
<Select
id="signatory_person.identity_document.doctype"
name="signatory_person.identity_document.doctype"
options={ doctypes_personal }
placeholder="Выберите тип документа"
noOptionsMessage={ ({ inputValue }) => !inputValue ? noOptionsText :"Ничего не найдено" }
isSearchable={ false }
className="autocomlete"
classNamePrefix="react-select"
value={ doctypes_personal.filter((type) => signatory_person.identity_document.doctype === type.value) }
onChange={ (element) => this._handle_onDocumentTypeChange("signatory_person", element) }
required={ true }
isDisabled={ checking }
/>
</div>
{ errors.indexOf("signatory_person.identity_document.invalid") > -1 &&
(
<FormMessage type="error" title="Ошибка" message="Указаны недействительные паспортные данные."/>
) }
<div className="formgroup">
<div className="form_field">
<label>Серия паспорта <sup className="required_label">*</sup></label>
<InputMask
className={ errors.indexOf("signatory_person.identity_document.seria") > -1 ? "error" : "" }
mask='9999'
id="signatory_person.identity_document.seria"
name="signatory_person.identity_document.seria"
value={ this._checkStrValue(signatory_person.identity_document.seria) }
placeholder="Введите серию"
onChange={ (event) => { this._removeError(event.target.name); this._handle_onTextFieldChange(event.target.name, event.target.value); } }
required={ true }
disabled={ checking }
/>
</div>
<div className="form_field">
<label>Номер паспорта <sup className="required_label">*</sup></label>
<InputMask
className={ errors.indexOf("signatory_person.identity_document.docnumber") > -1 ? "error" : "" }
mask='999999'
id="signatory_person.identity_document.docnumber"
name="signatory_person.identity_document.docnumber"
value={ this._checkStrValue(signatory_person.identity_document.docnumber) }
placeholder="Введите номер"
onChange={ (event) => { this._removeError(event.target.name); this._handle_onTextFieldChange(event.target.name, event.target.value); } }
required={ true }
disabled={ checking }
/>
<div className="form_field" style={{ marginBottom: "20px", }}>
<div className="formgroup control">
{ !checking && (
<div className="form_field checkbox">
<input type="checkbox" hidden=""
checked={ signer_from_list }
id={ `signer_from_list` }
name={ `signer_from_list` }
onChange={ (event) => { this.setState({ signer_from_list: signer_from_list ? false : true })} }
/>
<label className="unselectable" htmlFor={ `signer_from_list` }>Выбрать подписанта из списка</label>
</div>
) }
</div>
</div>
<div className="formgroup">
<div className="form_field">
<label>Дата выдачи <sup className="required_label">*</sup></label>
<CalendarDatePicker
className={ errors.indexOf("signatory_person.identity_document.issuedate") > -1 ? "error" : "" }
style={{ width: "calc(100% - 198px)" }}
placeholder="ДД.ММ.ГГГГ"
max={ moment().toDate() }
id={ "signatory_person.identity_document.issuedate" }
value={ this._checkStrValue(signatory_person.identity_document.issuedate) !== "" ? this._checkStrValue(signatory_person.identity_document.issuedate) : null }
onChange={ (date) => { this._removeError("signatory_person.identity_document.issuedate"); this._handle_onTextFieldChange("signatory_person.identity_document.issuedate", date); } }
required={ true }
disabled={ checking }
/>
{ signer_from_list ? (
<div className="feed" style={{ marginTop: "0px", }}>
<div className="feed_list">
{ client_contacts.map((contact, index) => (
<div className="form_field checkbox" key={ index }>
<input type="radio" hidden=""
id={ `contacts_${ index }` }
name={ `contacts_${ index }` }
onChange={ () => { this._handle_onSignerFromListSelect(contact) } }
disabled={ false }
/>
<label className="unselectable" htmlFor={ `contacts_${ index }` }>
<div className="feed_item user quest">
<img src="/assets/images/icons/avatar.svg" alt="" />
<div>
<p className="item_title">{ contact.lastname } { contact.firstname } { contact.middlename }</p>
<p className="item_desc">
<span>{ contact.jobtitle }</span>
</p>
</div>
</div>
</label>
</div>
)) }
</div>
</div>
) : (
<React.Fragment>
<div className="form_field">
<label>Фамилия <sup className="required_label">*</sup></label>
<SuggestsInput
className={ errors.indexOf("signatory_person.lastname") > -1 ? "error" : "" }
type="lastname"
id="signatory_person.lastname"
name="signatory_person.lastname"
value={ this._checkStrValue(signatory_person.lastname) }
placeholder="Введите фамилию"
onChange={ (value) => { this._removeError("signatory_person.lastname"); this._handle_onTextFieldChange("signatory_person.lastname", value); } }
required={ true }
disabled={ checking }
/>
</div>
<div className="form_field">
<label>Код подразделения <sup className="required_label">*</sup></label>
<DocumentIssuerSuggestsInput
className={ errors.indexOf("signatory_person.identity_document.code") > -1 ? "error" : "" }
type="issuer"
id="signatory_person.identity_document.code"
name="signatory_person.identity_document.code"
value={ this._checkStrValue(signatory_person.identity_document.code) }
placeholder="Введите код"
onChange={ (value) => { this._removeError("signatory_person.identity_document.code"); this._handle_onIssuerCodeChange("signatory_person", value); } }
maxResults={ 5 }
required={ true }
disabled={ checking }
/>
</div>
</div>
<div className="form_field">
<label>Имя <sup className="required_label">*</sup></label>
<SuggestsInput
className={ errors.indexOf("signatory_person.firstname") > -1 ? "error" : "" }
type="firstname"
id="signatory_person.firstname"
name="signatory_person.firstname"
value={ this._checkStrValue(signatory_person.firstname) }
placeholder="Введите имя"
onChange={ (value) => { this._removeError("signatory_person.firstname"); this._handle_onTextFieldChange("signatory_person.firstname", value); } }
required={ true }
disabled={ checking }
/>
</div>
<div className="form_field">
<label>Кем выдан <sup className="required_label">*</sup></label>
<DocumentIssuerSuggestsInput
className={ errors.indexOf("signatory_person.identity_document.issueby") > -1 ? "error" : "" }
type="issuer"
id="signatory_person.identity_document.issueby"
name="signatory_person.identity_document.issueby"
value={ this._checkStrValue(signatory_person.identity_document.issueby) }
placeholder="Введите наименование подразделения выдавшего документ"
onChange={ (value) => { this._removeError("signatory_person.identity_document.issueby"); this._handle_onIssuerChange("signatory_person", value); } }
required={ true }
disabled={ checking }
/>
</div>
<div className="form_field">
<label>Отчество <small>если имеется</small></label>
<SuggestsInput
type="middlename"
id="signatory_person.middlename"
name="signatory_person.middlename"
value={ this._checkStrValue(signatory_person.middlename) }
placeholder="Введите имя"
onChange={ (value) => this._handle_onTextFieldChange("signatory_person.middlename", value) }
required={ false }
disabled={ checking }
/>
</div>
<div className="form_field">
<label>Место рождения <sup className="required_label">*</sup></label>
<AddressSuggests
className={ errors.indexOf("signatory_person.identity_document.placebirth") > -1 ? "error" : "" }
id={ "signatory_person.identity_document.placebirth" }
value={ this._checkStrValue(signatory_person.identity_document.placebirth) }
placeholder="Укажите место рождения"
onChange={ (data) => { this._removeError("signatory_person.identity_document.placebirth"); this._handle_onTextFieldChange("signatory_person.identity_document.placebirth", data.name); } }
required={ true }
disabled={ checking }
/>
</div>
<div className="form_field">
<label>Тип документа <sup className="required_label">*</sup></label>
<Select
id="signatory_person.identity_document.doctype"
name="signatory_person.identity_document.doctype"
options={ doctypes_personal }
placeholder="Выберите тип документа"
noOptionsMessage={ ({ inputValue }) => !inputValue ? noOptionsText :"Ничего не найдено" }
isSearchable={ false }
className="autocomlete"
classNamePrefix="react-select"
value={ doctypes_personal.filter((type) => signatory_person.identity_document.doctype === type.value) }
onChange={ (element) => this._handle_onDocumentTypeChange("signatory_person", element) }
required={ true }
isDisabled={ checking }
/>
</div>
{ parseInt(signatory_person.identity_document.doctype, 10) !== 100000000 && (
<div className="form_field">
<label>Гражданство <sup className="required_label">*</sup></label>
<Select
className={ errors.indexOf("signatory_person.identity_document.placebirth") > -1 ? "autocomlete error" : "autocomlete" }
id="signatory_person.identity_document.citizenship"
name="signatory_person.identity_document.citizenship"
options={ citizenships }
placeholder="Выберите страну"
noOptionsMessage={ ({ inputValue }) => !inputValue ? noOptionsText :"Ничего не найдено" }
isSearchable={ true }
classNamePrefix="react-select"
value={ signatory_person_citizenship.code !== null ? signatory_person_citizenship : undefined }
onChange={ (element) => { this._removeError("signatory_person.identity_document.citizenship"); this._handle_onCitizenshipChange(`signatory_person.identity_document.citizenship`, element.value); } }
required={ true }
isDisabled={ checking }
/>
</div>
) }
{ errors.indexOf("signatory_person.identity_document.invalid") > -1 &&
(
<FormMessage type="error" title="Ошибка" message="Указаны недействительные паспортные данные."/>
) }
<div className="form_field">
<label>Адрес регистрации <sup className="required_label">*</sup></label>
<AddressSuggests
className={ errors.indexOf("signatory_person.identity_document.registration_address.name") > -1 ? "error" : "" }
value={ this._checkStrValue(signatory_person.identity_document.registration_address.name) }
fias={ this._checkStrValue(signatory_person.identity_document.registration_address.fias_id) }
onChange={ (data) => { this._removeError("signatory_person.identity_document.registration_address.name"); this._handle_onTextFieldChange("signatory_person.identity_document.registration_address", data); } }
required={ true }
disabled={ checking }
/>
</div>
<div className="form_field">
<label>Должность <sup className="required_label">*</sup></label>
<input type="text"
className={ errors.indexOf("signatory_person.jobtitle") > -1 ? "error" : "" }
id="signatory_person.jobtitle"
name="signatory_person.jobtitle"
value={ this._checkStrValue(signatory_person.jobtitle) }
placeholder="Укажите должность"
onChange={ (event) => { this._removeError("signatory_person.jobtitle"); this._handle_onTextFieldChange(event.target.name, event.target.value); } }
required={ true }
disabled={ checking }
/>
</div>
<div className="formgroup">
<div className="form_field">
<label>Телефон <sup className="required_label">*</sup></label>
<InputMask
className={ errors.indexOf("signatory_person.telephone") > -1 ? "error" : "" }
id={ "signatory_person.telephone" }
name={ "signatory_person.telephone" }
value={ this._checkStrValue(signatory_person.telephone) }
placeholder="Введите номер телефона"
onChange={ (event) => { this._removeError("signatory_person.telephone"); this._handle_onTextFieldChange(event.target.name, event.target.value); } }
required={ true }
disabled={ checking }
mask='+7 (999) 999 99 99'
/>
</div>
<div className="form_field">
<label>E-mail <sup className="required_label">*</sup></label>
<input type="email"
className={ errors.indexOf("signatory_person.email") > -1 ? "error" : "" }
id="signatory_person.email"
name="signatory_person.email"
value={ this._checkStrValue(signatory_person.email) }
placeholder="E-mail"
onChange={ (event) => { this._removeError("signatory_person.email"); this._handle_onTextFieldChange(event.target.name, event.target.value); } }
pattern="[^@\s]+@[^@\s]+\.[^@\s]+"
required={ true }
disabled={ checking }
/>
</div>
</div>
{ errors.indexOf("signatory_person_files") > -1 &&
(
<FormMessage type="error" title="Ошибка" message="Пожалуйста, приложите как минимум одно отсканированное изображение или фотографию документа, подтверждающего личность."/>
) }
<FilesList
maxFiles={ 2 }
title="Прикрепить скан паспорта подписанта"
name="signatory_person_files"
files={ signatory_person_files }
onAddFile={ (name, files) => { this._removeError("signatory_person_files"); this._handle_onAddFile(name, files); } }
onRemoveFile={ this._handle_onRemoveFile }
checking={ checking }
/>
<input type="text" id="signatory_person_files_error_check" onChange={ () => {} } value={ signatory_person_files.length > 0 ? signatory_person_files.length : "" } required={ true } style={{ opacity: 0.0, height: "0px", marginTop: "-25px", display: "flex" }}/>
<p><b>Реквизиты документа подтверждающие полномочия на подписание договора лизинга</b></p>
<div className="form_field">
<label>Право подписи на основании <sup className="required_label">*</sup></label>
<Select
id="signatory_person.signer_rule_basic"
name="signatory_person.signer_rule_basic"
options={ doctypes_corporate }
placeholder="Вид документа"
noOptionsMessage={ ({ inputValue }) => !inputValue ? noOptionsText :"Ничего не найдено" }
isSearchable={ true }
className="autocomlete"
classNamePrefix="react-select"
value={ doctypes_corporate.filter((type) => signatory_person.signer_rule_basic === type.value) }
onChange={ (element) => { this._removeError("signatory_person.signer_rule_basic"); this._handle_onTextFieldChange(`signatory_person.signer_rule_basic`, element.value); } }
required={ true }
isDisabled={ checking }
/>
</div>
{ parseInt(signatory_person.signer_rule_basic, 10) === 100000003 && (
<div className="form_field">
<label>Наименование документа <sup className="required_label">*</sup></label>
<input type="text"
className={ errors.indexOf("signatory_person.signer_rule_basic_add") > -1 ? "error" : "" }
id="signatory_person.signer_rule_basic_add"
name="signatory_person.signer_rule_basic_add"
value={ this._checkStrValue(signatory_person.signer_rule_basic_add) }
placeholder="Наименование документа"
onChange={ (event) => { this._removeError("signatory_person.signer_rule_basic_add"); this._handle_onTextFieldChange(event.target.name, event.target.value); } }
required={ true }
disabled={ checking }
/>
</div>
) }
{ (parseInt(signatory_person.signer_rule_basic, 10) === 100000000 || parseInt(signatory_person.signer_rule_basic, 10) === 100000003) && (
<>
<div className="formgroup">
<div className="form_field">
<label>Номер документа <sup className="required_label">*</sup></label>
<input type="text"
className={ errors.indexOf("signatory_person.docnumber") > -1 ? "error" : "" }
id="signatory_person.docnumber"
name="signatory_person.docnumber"
value={ this._checkStrValue(signatory_person.docnumber) }
placeholder="Номер документа"
onChange={ (event) => { this._removeError("signatory_person.docnumber"); this._handle_onTextFieldChange(event.target.name, event.target.value); } }
<label>Серия паспорта <sup className="required_label">*</sup></label>
<InputMask
className={ errors.indexOf("signatory_person.identity_document.seria") > -1 ? "error" : "" }
mask='9999'
id="signatory_person.identity_document.seria"
name="signatory_person.identity_document.seria"
value={ this._checkStrValue(signatory_person.identity_document.seria) }
placeholder="Введите серию"
onChange={ (event) => { this._removeError(event.target.name); this._handle_onTextFieldChange(event.target.name, event.target.value); } }
required={ true }
disabled={ checking }
/>
</div>
<div className="form_field">
<label>Дата документа <sup className="required_label">*</sup></label>
<CalendarDatePicker
className={ errors.indexOf("signatory_person.docdate") > -1 ? "error" : "" }
style={{ width: "calc(100% - 198px)" }}
placeholder="ДД.ММ.ГГГГ"
max={ moment().toDate() }
id={ "signatory_person.docdate" }
value={ this._checkStrValue(signatory_person.docdate) !== "" ? this._checkStrValue(signatory_person.docdate) : null }
onChange={ (date) => { this._removeError("signatory_person.docdate"); this._handle_onTextFieldChange("signatory_person.docdate", date); } }
<label>Номер паспорта <sup className="required_label">*</sup></label>
<InputMask
className={ errors.indexOf("signatory_person.identity_document.docnumber") > -1 ? "error" : "" }
mask='999999'
id="signatory_person.identity_document.docnumber"
name="signatory_person.identity_document.docnumber"
value={ this._checkStrValue(signatory_person.identity_document.docnumber) }
placeholder="Введите номер"
onChange={ (event) => { this._removeError(event.target.name); this._handle_onTextFieldChange(event.target.name, event.target.value); } }
required={ true }
disabled={ checking }
/>
</div>
</div>
{ errors.indexOf("signatory_corporate_files") > -1 &&
<div className="formgroup">
<div className="form_field">
<label>Дата выдачи <sup className="required_label">*</sup></label>
<CalendarDatePicker
className={ errors.indexOf("signatory_person.identity_document.issuedate") > -1 ? "error" : "" }
style={{ width: "calc(100% - 198px)" }}
placeholder="ДД.ММ.ГГГГ"
max={ moment().toDate() }
id={ "signatory_person.identity_document.issuedate" }
value={ this._checkStrValue(signatory_person.identity_document.issuedate) !== "" ? this._checkStrValue(signatory_person.identity_document.issuedate) : null }
onChange={ (date) => { this._removeError("signatory_person.identity_document.issuedate"); this._handle_onTextFieldChange("signatory_person.identity_document.issuedate", date); } }
required={ true }
disabled={ checking }
/>
</div>
<div className="form_field">
<label>Код подразделения <sup className="required_label">*</sup></label>
<DocumentIssuerSuggestsInput
className={ errors.indexOf("signatory_person.identity_document.code") > -1 ? "error" : "" }
type="issuer"
id="signatory_person.identity_document.code"
name="signatory_person.identity_document.code"
value={ this._checkStrValue(signatory_person.identity_document.code) }
placeholder="Введите код"
onChange={ (value) => { this._removeError("signatory_person.identity_document.code"); this._handle_onIssuerCodeChange("signatory_person", value); } }
maxResults={ 5 }
required={ true }
disabled={ checking }
/>
</div>
</div>
<div className="form_field">
<label>Кем выдан <sup className="required_label">*</sup></label>
<DocumentIssuerSuggestsInput
className={ errors.indexOf("signatory_person.identity_document.issueby") > -1 ? "error" : "" }
type="issuer"
id="signatory_person.identity_document.issueby"
name="signatory_person.identity_document.issueby"
value={ this._checkStrValue(signatory_person.identity_document.issueby) }
placeholder="Введите наименование подразделения выдавшего документ"
onChange={ (value) => { this._removeError("signatory_person.identity_document.issueby"); this._handle_onIssuerChange("signatory_person", value); } }
required={ true }
disabled={ checking }
/>
</div>
<div className="form_field">
<label>Место рождения <sup className="required_label">*</sup></label>
<AddressSuggests
className={ errors.indexOf("signatory_person.identity_document.placebirth") > -1 ? "error" : "" }
id={ "signatory_person.identity_document.placebirth" }
value={ this._checkStrValue(signatory_person.identity_document.placebirth) }
placeholder="Укажите место рождения"
onChange={ (data) => { this._removeError("signatory_person.identity_document.placebirth"); this._handle_onTextFieldChange("signatory_person.identity_document.placebirth", data.name); } }
required={ true }
disabled={ checking }
/>
</div>
{ parseInt(signatory_person.identity_document.doctype, 10) !== 100000000 && (
<div className="form_field">
<label>Гражданство <sup className="required_label">*</sup></label>
<Select
className={ errors.indexOf("signatory_person.identity_document.placebirth") > -1 ? "autocomlete error" : "autocomlete" }
id="signatory_person.identity_document.citizenship"
name="signatory_person.identity_document.citizenship"
options={ citizenships }
placeholder="Выберите страну"
noOptionsMessage={ ({ inputValue }) => !inputValue ? noOptionsText :"Ничего не найдено" }
isSearchable={ true }
classNamePrefix="react-select"
value={ signatory_person_citizenship.code !== null ? signatory_person_citizenship : undefined }
onChange={ (element) => { this._removeError("signatory_person.identity_document.citizenship"); this._handle_onCitizenshipChange(`signatory_person.identity_document.citizenship`, element.value); } }
required={ true }
isDisabled={ checking }
/>
</div>
) }
<div className="form_field">
<label>Адрес регистрации <sup className="required_label">*</sup></label>
<AddressSuggests
className={ errors.indexOf("signatory_person.identity_document.registration_address.name") > -1 ? "error" : "" }
value={ this._checkStrValue(signatory_person.identity_document.registration_address.name) }
fias={ this._checkStrValue(signatory_person.identity_document.registration_address.fias_id) }
onChange={ (data) => { this._removeError("signatory_person.identity_document.registration_address.name"); this._handle_onTextFieldChange("signatory_person.identity_document.registration_address", data); } }
required={ true }
disabled={ checking }
/>
</div>
<div className="form_field">
<label>Должность <sup className="required_label">*</sup></label>
<input type="text"
className={ errors.indexOf("signatory_person.jobtitle") > -1 ? "error" : "" }
id="signatory_person.jobtitle"
name="signatory_person.jobtitle"
value={ this._checkStrValue(signatory_person.jobtitle) }
placeholder="Укажите должность"
onChange={ (event) => { this._removeError("signatory_person.jobtitle"); this._handle_onTextFieldChange(event.target.name, event.target.value); } }
required={ true }
disabled={ checking }
/>
</div>
<div className="formgroup">
<div className="form_field">
<label>Телефон <sup className="required_label">*</sup></label>
<InputMask
className={ errors.indexOf("signatory_person.telephone") > -1 ? "error" : "" }
id={ "signatory_person.telephone" }
name={ "signatory_person.telephone" }
value={ this._checkStrValue(signatory_person.telephone) }
placeholder="Введите номер телефона"
onChange={ (event) => { this._removeError("signatory_person.telephone"); this._handle_onTextFieldChange(event.target.name, event.target.value); } }
required={ true }
disabled={ checking }
mask='+7 (999) 999 99 99'
/>
</div>
<div className="form_field">
<label>E-mail <sup className="required_label">*</sup></label>
<input type="email"
className={ errors.indexOf("signatory_person.email") > -1 ? "error" : "" }
id="signatory_person.email"
name="signatory_person.email"
value={ this._checkStrValue(signatory_person.email) }
placeholder="E-mail"
onChange={ (event) => { this._removeError("signatory_person.email"); this._handle_onTextFieldChange(event.target.name, event.target.value); } }
pattern="[^@\s]+@[^@\s]+\.[^@\s]+"
required={ true }
disabled={ checking }
/>
</div>
</div>
{ errors.indexOf("signatory_person_files") > -1 &&
(
<FormMessage type="error" title="Ошибка" message="Пожалуйста, приложите как минимум одно отсканированное изображение или фотографию документа, подтверждающего право подписи."/>
<FormMessage type="error" title="Ошибка" message="Пожалуйста, приложите как минимум одно отсканированное изображение или фотографию документа, подтверждающего личность."/>
) }
<FilesList
maxFiles={ 2 }
title="Прикрепить скан документа на право подписи"
name="signatory_corporate_files"
files={ signatory_corporate_files }
onAddFile={ (name, files) => { this._removeError("signatory_corporate_files"); this._handle_onAddFile(name, files); } }
title="Прикрепить скан паспорта подписанта"
name="signatory_person_files"
files={ signatory_person_files }
onAddFile={ (name, files) => { this._removeError("signatory_person_files"); this._handle_onAddFile(name, files); } }
onRemoveFile={ this._handle_onRemoveFile }
checking={ checking }
/>
<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_person_files_error_check" onChange={ () => {} } value={ signatory_person_files.length > 0 ? signatory_person_files.length : "" } required={ true } style={{ opacity: 0.0, height: "0px", marginTop: "-25px", display: "flex" }}/>
<p><b>Реквизиты документа подтверждающие полномочия на подписание договора лизинга</b></p>
<div className="form_field">
<label>Право подписи на основании <sup className="required_label">*</sup></label>
<Select
className={ errors.indexOf("signatory_person.signer_rule_basic") > -1 ? "autocomlete error" : "autocomlete" }
id="signatory_person.signer_rule_basic"
name="signatory_person.signer_rule_basic"
options={ doctypes_corporate }
placeholder="Вид документа"
noOptionsMessage={ ({ inputValue }) => !inputValue ? noOptionsText :"Ничего не найдено" }
isSearchable={ true }
classNamePrefix="react-select"
value={ doctypes_corporate.filter((type) => signatory_person.signer_rule_basic === type.value) }
onChange={ (element) => { this._removeError("signatory_person.signer_rule_basic"); this._handle_onTextFieldChange(`signatory_person.signer_rule_basic`, element.value); } }
required={ true }
isDisabled={ checking }
/>
</div>
{ parseInt(signatory_person.signer_rule_basic, 10) === 100000003 && (
<div className="form_field">
<label>Наименование документа <sup className="required_label">*</sup></label>
<input type="text"
className={ errors.indexOf("signatory_person.signer_rule_basic_add") > -1 ? "error" : "" }
id="signatory_person.signer_rule_basic_add"
name="signatory_person.signer_rule_basic_add"
value={ this._checkStrValue(signatory_person.signer_rule_basic_add) }
placeholder="Наименование документа"
onChange={ (event) => { this._removeError("signatory_person.signer_rule_basic_add"); this._handle_onTextFieldChange(event.target.name, event.target.value); } }
required={ true }
disabled={ checking }
/>
</div>
) }
{ (parseInt(signatory_person.signer_rule_basic, 10) === 100000000 || parseInt(signatory_person.signer_rule_basic, 10) === 100000003) && (
<>
<div className="formgroup">
<div className="form_field">
<label>Номер документа <sup className="required_label">*</sup></label>
<input type="text"
className={ errors.indexOf("signatory_person.docnumber") > -1 ? "error" : "" }
id="signatory_person.docnumber"
name="signatory_person.docnumber"
value={ this._checkStrValue(signatory_person.docnumber) }
placeholder="Номер документа"
onChange={ (event) => { this._removeError("signatory_person.docnumber"); this._handle_onTextFieldChange(event.target.name, event.target.value); } }
required={ true }
disabled={ checking }
/>
</div>
<div className="form_field">
<label>Дата документа <sup className="required_label">*</sup></label>
<CalendarDatePicker
className={ errors.indexOf("signatory_person.docdate") > -1 ? "error" : "" }
style={{ width: "calc(100% - 198px)" }}
placeholder="ДД.ММ.ГГГГ"
max={ moment().toDate() }
id={ "signatory_person.docdate" }
value={ this._checkStrValue(signatory_person.docdate) !== "" ? this._checkStrValue(signatory_person.docdate) : null }
onChange={ (date) => { this._removeError("signatory_person.docdate"); this._handle_onTextFieldChange("signatory_person.docdate", date); } }
required={ true }
disabled={ checking }
/>
</div>
</div>
{ errors.indexOf("signatory_corporate_files") > -1 &&
(
<FormMessage type="error" title="Ошибка" message="Пожалуйста, приложите как минимум одно отсканированное изображение или фотографию документа, подтверждающего право подписи."/>
) }
<FilesList
maxFiles={ 2 }
title="Прикрепить скан документа на право подписи"
name="signatory_corporate_files"
files={ signatory_corporate_files }
onAddFile={ (name, files) => { this._removeError("signatory_corporate_files"); this._handle_onAddFile(name, files); } }
onRemoveFile={ this._handle_onRemoveFile }
checking={ checking }
/>
<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" }}/>
</>
) }
</React.Fragment>
) }
</React.Fragment>
) }

View File

@ -1652,3 +1652,16 @@
width: 100%;
}
}
@media all and (max-width: 1024px) {
.chackbox_with_margin::before {
top: 0;
bottom: 0;
margin: 0px!important;
}
.chackbox_with_margin div {
margin-top: 10px!important;
}
.chackbox_with_margin input {
margin: 0px!important;
}
}

View File

@ -1922,4 +1922,21 @@
@media all and (max-width: 720px) {
width: 100%;
}
}
.chackbox_with_margin {
@media all and (max-width: 1024px) {
&::before {
top: 0;
bottom: 0;
margin: 0px!important;
}
div {
margin-top: 10px!important;
}
input {
margin: 0px!important;
}
}
}

File diff suppressed because one or more lines are too long

View File

@ -4228,6 +4228,12 @@ main .dropdown_blocks_list .dropdown_block .block_body {
display: flex !important;
align-items: center;
&.quest {
padding: 5px 16px;
img { width: 48px; height: 48px; }
}
div {
margin-left: 16px;

View File

@ -129,7 +129,20 @@ export default async function handler(req, res)
//const main = _pick(parsed.main, ["title", "inn", "kpp", "email", "telephone", "websiteurl", "financial_loan"]);
let payload = { ...parsed.main, ...{ head_person: parsed.head_person }, ...{ signatory_person: parsed.signatory_person }, };
const contacts = {};
for(let c in parsed.contacts)
{
if(parsed.contacts[c].name === null)
{
contacts[c] = null;
}
else
{
contacts[c] = parsed.contacts[c];
}
}
let payload = { ...parsed.main, ...contacts, ...{ head_person: parsed.head_person }, ...{ signatory_person: parsed.signatory_person }, };
payload.mail_delivery_address_type = parseInt(payload.mail_delivery_address_type, 10);
payload.questionnaire_sign_type = digital ? "eds" : "paper";

View File

@ -158,6 +158,29 @@ class IndexPage extends React.Component
this.props.router.push("/questionnaire");
}
_renderQuestionnaireStatus = () =>
{
const { company, contracts } = this.state;
if(company.questionnaire_status === "need_to_fill")
{
<div className="contract_table" style={{ flexDirection: "column" }}>
<h4>Анкета лизингополучателя</h4>
<p>Вам необходимо заполнить анкету лизингополучателя для актуализации данных.</p>
<div className="questionnaire status_action" style={{ margin: "0px", "padding": "0px", paddingTop: "30px", }}>
<button className="button button-blue" style={{ width: "100%", minWidth: "255px" }} onClick={ () => this.props.router.push("/questionnaire") }>Заполнить анкету</button>
</div>
</div>
}
return (
<div className="contract_table" style={{ flexDirection: "column" }}>
<h4>Анкета лизингополучателя</h4>
<p>Анкета подписана, скоро здесь появятся ваши договоры лизинга.</p>
</div>
);
}
render()
{
const { company, loading, page, pages, search, date_from, date_from_type, date_to, date_to_type, contracts, sort_number, sort_date, sort_status, all } = this.state;
@ -191,7 +214,7 @@ class IndexPage extends React.Component
</div>
<AnnouncementsList />
{ company.questionnaire_status === "need_to_fill" && (
{ contracts !== null && contracts.length > 0 && company.questionnaire_status === "need_to_fill" && (
<div className="questionnaire message notify" style={{marginLeft: "0"}}>
<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"/>
@ -203,107 +226,115 @@ class IndexPage extends React.Component
</div>
) }
<div className="contract_search">
<form onSubmit={ (event) => { event.preventDefault(); } }>
<div className="form_field">
<input type="search" value={ search } placeholder="Поиск" onChange={ (event) => {
this._handle_onChange_search(event.target.value);
} }/>
</div>
<div className="form_field">
{/*
<input type={ date_from_type } id="date_from" className="date_input" value="" placeholder="Дата договора от" onFocus={ () => this.setState({ date_from_type: "date" }) } onBlur={ () => { this.setState({ date_from_type: "text" }) } } onChange={ (date) => {
this._handle_onChange_date_from(date);
} }/>
<label htmlFor="date_from">Дата<br/>договора от</label>
*/}
<DateInput placeholder="Дата договора от" id={ "date_from" } onChange={ (date) => this.setState({ date_from: date }) }/>
</div>
<div className="form_field">
{/*<input type={ date_to_type } id="date_for" className="date_input" value="" placeholder="Дата договора по" onFocus={ () => this.setState({ date_from_type: "date" }) } onBlur={ () => { this.setState({ date_from_type: "text" }) } } onChange={ (date) => {
this._handle_onChange_date_to(date);
} }/>
<label htmlFor="date_for">Дата<br/>договора по</label>*/}
<DateInput placeholder="Дата договора по" id={ "date_to" } onChange={ (date) => this.setState({ date_to: date }) }/>
</div>
<button className="button" disabled={ search !== "" || date_from !== "" || date_to !== "" ? false : true } onClick={ this._handle_onSearch }>Поиск</button>
</form>
</div>
{ contracts !== null && contracts.length > 0 && (
<div className="contract_search">
<form onSubmit={ (event) => { event.preventDefault(); } }>
<div className="form_field">
<input type="search" value={ search } placeholder="Поиск" onChange={ (event) => {
this._handle_onChange_search(event.target.value);
} }/>
</div>
<div className="form_field">
{/*
<input type={ date_from_type } id="date_from" className="date_input" value="" placeholder="Дата договора от" onFocus={ () => this.setState({ date_from_type: "date" }) } onBlur={ () => { this.setState({ date_from_type: "text" }) } } onChange={ (date) => {
this._handle_onChange_date_from(date);
} }/>
<label htmlFor="date_from">Дата<br/>договора от</label>
*/}
<DateInput placeholder="Дата договора от" id={ "date_from" } onChange={ (date) => this.setState({ date_from: date }) }/>
</div>
<div className="form_field">
{/*<input type={ date_to_type } id="date_for" className="date_input" value="" placeholder="Дата договора по" onFocus={ () => this.setState({ date_from_type: "date" }) } onBlur={ () => { this.setState({ date_from_type: "text" }) } } onChange={ (date) => {
this._handle_onChange_date_to(date);
} }/>
<label htmlFor="date_for">Дата<br/>договора по</label>*/}
<DateInput placeholder="Дата договора по" id={ "date_to" } onChange={ (date) => this.setState({ date_to: date }) }/>
</div>
<button className="button" disabled={ search !== "" || date_from !== "" || date_to !== "" ? false : true } onClick={ this._handle_onSearch }>Поиск</button>
</form>
</div>
) }
{ loading ? (
<div className="table_row table_header" style={{ minHeight: 450, display: "flex", justifyContent: "center", alignItems: "center" }}>
<SpinnerCircular size={90} thickness={51} speed={100} color="rgba(28, 1, 169, 1)" secondaryColor="rgba(236, 239, 244, 1)" />
</div>
) : (
<div className="contract_table">
<div className="table_row table_header">
<div className={`table_cell caret ${ sort_number === "asc" ? "reverse" : "" }`} onClick={ this._handle_onChangeSort_number }>Номер договора</div>
<div className={`table_cell caret ${ sort_date === "asc" ? "reverse" : "" }`} onClick={ this._handle_onChangeSort_date }>Дата договора</div>
<div className="table_cell">Автомобиль</div>
<div className="table_cell">Гос.номер / VIN</div>
<div className={`table_cell caret ${ sort_status === "asc" ? "reverse" : "" }`} onClick={ this._handle_onChangeSort_status }>Статус</div>
<div className="table_cell">Следующий платеж</div>
<div className="table_cell">Дополнительные услуги</div>
</div>
{ contracts !== undefined && contracts !== null && (
<>
{ contracts.length > 0 ? contracts.map((contract, index) => (
<Link href={`/contract/${ contract.number }/payments`} key={ index }>
<div className="table_row" key={ index } style={{ cursor: "pointer" }}>
<div className="table_cell"><a>{ contract.number }</a></div>
<div className="table_cell">{ moment(contract.date).format("DD.MM.YYYY") }</div>
<div className="table_cell">{ contract.car?.brand?.name } { contract.car?.model?.name }</div>
<div className="table_cell">
{ contract.car?.reg_number !== null ? contract.car?.reg_number : "Без рег. номера" }
<span>{ contract.car?.vin_number }</span>
</div>
<div className="table_cell">
<p className={ contract_status[contract.status] }>{ contract.status }</p>
{ contract.debt_leasing !== undefined && contract.debt_leasing !== null && parseFloat(contract.debt_leasing) > 0 && (
<p className="contract_debt">
<span>Задолжность:</span>
{ numeral(contract.debt_leasing).format(' ., ') }&nbsp;
</p>
) }
{ contract.debt_penalty_fee !== undefined && contract.debt_penalty_fee !== null && parseFloat(contract.debt_penalty_fee) > 0 && (
<p className="contract_debt">
<span>Пени:</span>
{ numeral(contract.debt_penalty_fee).format(' ., ') }&nbsp;
</p>
) }
</div>
<div className="table_cell">
{ contract.current_payment_date !== null ? (
<>{ moment(contract.current_payment_date).format("DD.MM.YYYY") }<b className="price" style={{ whiteSpace: "nowrap" }}>{ numeral(contract.current_payment_amount).format(' ., ') }&nbsp;</b></>
) : "-" }
</div>
<div className="table_cell">
<div className="service_list">
{ contract.telematics_exists && <i title="Телематика" data-additional-service="1" onClick={ (event) => { event.stopPropagation(); event.preventDefault(); this._handle_onService(`/contract/${ contract.number }/services#telematic`) } }></i> }
{ contract.rat_exists && <i title="РАТ" data-additional-service="2" onClick={ (event) => { event.stopPropagation(); event.preventDefault(); this._handle_onService(`/contract/${ contract.number }/services#ratcard`) } }></i> }
{ contract.gibddreg_exists && <i title="Регистрация в ГИБДД" data-additional-service="3" onClick={ (event) => { event.stopPropagation(); event.preventDefault(); this._handle_onService(`/contract/${ contract.number }/services#registration`) } }></i> }
{ contract.fuelcard_exists && <i title="Топливные карты" data-additional-service="4" onClick={ (event) => { event.stopPropagation(); event.preventDefault(); this._handle_onService(`/contract/${ contract.number }/services#fuelcards`) } }></i> }
{ contract.kasko_exists && <i title="КАСКО" data-additional-service="5" onClick={ (event) => { event.stopPropagation(); event.preventDefault(); this._handle_onService(`/contract/${ contract.number }/services#insurance`) } }></i> }
{ contract.osago_exists && <i title="ОСАГО" data-additional-service="6" onClick={ (event) => { event.stopPropagation(); event.preventDefault(); this._handle_onService(`/contract/${ contract.number }/services#insurance`) } }></i> }
{ contract.nsib_exists && <i title="НСИБ" data-additional-service="7" onClick={ (event) => { event.stopPropagation(); event.preventDefault(); this._handle_onService(`/contract/${ contract.number }/services#insurance`) } }></i> }
{ contract.fingap_exists && <i title="Safe Finance" data-additional-service="8" onClick={ (event) => { event.stopPropagation(); event.preventDefault(); this._handle_onService(`/contract/${ contract.number }/services#insurance`) } }></i> }
<React.Fragment>
{ contracts === null || contracts.length === 0 ? (
this._renderQuestionnaireStatus()
) : (
<div className="contract_table">
<div className="table_row table_header">
<div className={`table_cell caret ${ sort_number === "asc" ? "reverse" : "" }`} onClick={ this._handle_onChangeSort_number }>Номер договора</div>
<div className={`table_cell caret ${ sort_date === "asc" ? "reverse" : "" }`} onClick={ this._handle_onChangeSort_date }>Дата договора</div>
<div className="table_cell">Автомобиль</div>
<div className="table_cell">Гос.номер / VIN</div>
<div className={`table_cell caret ${ sort_status === "asc" ? "reverse" : "" }`} onClick={ this._handle_onChangeSort_status }>Статус</div>
<div className="table_cell">Следующий платеж</div>
<div className="table_cell">Дополнительные услуги</div>
</div>
{ contracts !== undefined && contracts !== null && (
<>
{ contracts.length > 0 ? contracts.map((contract, index) => (
<Link href={`/contract/${ contract.number }/payments`} key={ index }>
<div className="table_row" key={ index } style={{ cursor: "pointer" }}>
<div className="table_cell"><a>{ contract.number }</a></div>
<div className="table_cell">{ moment(contract.date).format("DD.MM.YYYY") }</div>
<div className="table_cell">{ contract.car?.brand?.name } { contract.car?.model?.name }</div>
<div className="table_cell">
{ contract.car?.reg_number !== null ? contract.car?.reg_number : "Без рег. номера" }
<span>{ contract.car?.vin_number }</span>
</div>
<div className="table_cell">
<p className={ contract_status[contract.status] }>{ contract.status }</p>
{ contract.debt_leasing !== undefined && contract.debt_leasing !== null && parseFloat(contract.debt_leasing) > 0 && (
<p className="contract_debt">
<span>Задолжность:</span>
{ numeral(contract.debt_leasing).format(' ., ') }&nbsp;
</p>
) }
{ contract.debt_penalty_fee !== undefined && contract.debt_penalty_fee !== null && parseFloat(contract.debt_penalty_fee) > 0 && (
<p className="contract_debt">
<span>Пени:</span>
{ numeral(contract.debt_penalty_fee).format(' ., ') }&nbsp;
</p>
) }
</div>
<div className="table_cell">
{ contract.current_payment_date !== null ? (
<>{ moment(contract.current_payment_date).format("DD.MM.YYYY") }<b className="price" style={{ whiteSpace: "nowrap" }}>{ numeral(contract.current_payment_amount).format(' ., ') }&nbsp;</b></>
) : "-" }
</div>
<div className="table_cell">
<div className="service_list">
{ contract.telematics_exists && <i title="Телематика" data-additional-service="1" onClick={ (event) => { event.stopPropagation(); event.preventDefault(); this._handle_onService(`/contract/${ contract.number }/services#telematic`) } }></i> }
{ contract.rat_exists && <i title="РАТ" data-additional-service="2" onClick={ (event) => { event.stopPropagation(); event.preventDefault(); this._handle_onService(`/contract/${ contract.number }/services#ratcard`) } }></i> }
{ contract.gibddreg_exists && <i title="Регистрация в ГИБДД" data-additional-service="3" onClick={ (event) => { event.stopPropagation(); event.preventDefault(); this._handle_onService(`/contract/${ contract.number }/services#registration`) } }></i> }
{ contract.fuelcard_exists && <i title="Топливные карты" data-additional-service="4" onClick={ (event) => { event.stopPropagation(); event.preventDefault(); this._handle_onService(`/contract/${ contract.number }/services#fuelcards`) } }></i> }
{ contract.kasko_exists && <i title="КАСКО" data-additional-service="5" onClick={ (event) => { event.stopPropagation(); event.preventDefault(); this._handle_onService(`/contract/${ contract.number }/services#insurance`) } }></i> }
{ contract.osago_exists && <i title="ОСАГО" data-additional-service="6" onClick={ (event) => { event.stopPropagation(); event.preventDefault(); this._handle_onService(`/contract/${ contract.number }/services#insurance`) } }></i> }
{ contract.nsib_exists && <i title="НСИБ" data-additional-service="7" onClick={ (event) => { event.stopPropagation(); event.preventDefault(); this._handle_onService(`/contract/${ contract.number }/services#insurance`) } }></i> }
{ contract.fingap_exists && <i title="Safe Finance" data-additional-service="8" onClick={ (event) => { event.stopPropagation(); event.preventDefault(); this._handle_onService(`/contract/${ contract.number }/services#insurance`) } }></i> }
</div>
</div>
</div>
</Link>
)) : (
<div className="table_row">
<div className="table_cell">-</div>
<div className="table_cell">-</div>
<div className="table_cell">-</div>
<div className="table_cell">-</div>
<div className="table_cell">-</div>
<div className="table_cell">-</div>
<div className="table_cell">-</div>
</div>
</div>
</Link>
)) : (
<div className="table_row">
<div className="table_cell">-</div>
<div className="table_cell">-</div>
<div className="table_cell">-</div>
<div className="table_cell">-</div>
<div className="table_cell">-</div>
<div className="table_cell">-</div>
<div className="table_cell">-</div>
</div>
) }
</>
) }
</>
</div>
) }
</div>
</React.Fragment>
) }
{ !all && (
<Pagination page={ page } pages={ pages } onPage={ this._handle_onPage } onAll={ this._handle_onAll } all={ all } showAll={ true }/>