import React from "react"; import Head from 'next/head'; import Image from 'next/image'; import Link from "next/link"; import cookie from 'cookie'; import numeral from "numeral"; import pluralize from 'pluralize-ru'; import Select from 'react-select' import { SpinnerCircular } from 'spinners-react'; import { connect } from "react-redux"; import { withRouter } from 'next/router'; import QuestionnaireForm from "../QuestionnaireForm"; import { reduxWrapper } from '../../../../store'; import AddressSuggests from "../../AddressSuggests"; class Form_2_Contacts extends QuestionnaireForm { constructor(props) { super(props); this.state = { contacts: { address_type: "legal", loading: false, fact_address: { title: "", fias_id: "", }, legal_address: { title: "", fias_id: "", }, postal_address: { title: "", fias_id: "", }, }, value: { title: "", fias_id: "", } }; } static getDerivedStateFromProps(nextProps, prevState) { return { contacts: nextProps.questionnaire.contacts, }; } componentDidMount() { } _handle_onFormSubmit = (event) => { event.preventDefault(); console.log("Form_2_Contacts", "_handle_onFormSubmit"); this._handle_onCheckboxFieldChange("step", 3); setTimeout(() => { this.props.onNextStep("signer"); }, 10); } _checkDisabled = () => { const { contacts } = this.state; const check = ["fact_address", "legal_address", "postal_address"]; if(contacts.address_type === "fact") { if(contacts.fact_address.title === "") { return true; } } if(contacts.address_type === "postal") { if(contacts.postal_address.title === "") { return true; } } return false; } render() { const { company, checking } = this.props; const { contacts, loading } = this.state; const { address_type, legal_address, fact_address, postal_address, } = contacts; return (

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

this._handle_onTextFieldChange("contacts.fact_address", data) } required={ address_type === "fact" ? true : false } disabled={ checking } />

для юр.диц - заполняется, если отличается от указанного в ЕГРЮЛ; для ИП - заполняется всегда

Прошу оригиналы счетов-фактур и актов отказанных услуг по заключенному договору лизинга направлять:

{ company.inn.length < 11 && (
this._handle_onCheckboxFieldChange(event.target.name, event.target.value) } disabled={ checking } />
) }
this._handle_onCheckboxFieldChange(event.target.name, event.target.value) } disabled={ checking } />
this._handle_onCheckboxFieldChange(event.target.name, event.target.value) } disabled={ checking } />
{ !checking && (
) }
) } } function mapStateToProps(state, ownProps) { return { questionnaire: state.questionnaire, } } export const getServerSideProps = reduxWrapper.getServerSideProps(store => async ({ req, res, query }) => { } ); export default connect(mapStateToProps)(Form_2_Contacts);