218 lines
7.6 KiB
JavaScript
218 lines
7.6 KiB
JavaScript
import React from "react";
|
||
import Head from "next/head";
|
||
import Image from "next/image";
|
||
import { connect } from "react-redux";
|
||
import { withRouter } from "next/router";
|
||
import moment from "moment";
|
||
import { SpinnerCircular } from "spinners-react";
|
||
|
||
import { reduxWrapper } from "../../store";
|
||
|
||
import Header from "../components/Header";
|
||
import Footer from "../components/Footer";
|
||
import Company from "../components/Company";
|
||
import InnerMenu from "./components/InnerMenu";
|
||
|
||
import {
|
||
getContractInfo,
|
||
getContractAgreement,
|
||
getContractRules,
|
||
getFile,
|
||
} from "../../actions";
|
||
|
||
class ContractPage extends React.Component
|
||
{
|
||
constructor(props)
|
||
{
|
||
super(props);
|
||
this.state = {
|
||
date: null,
|
||
car: null,
|
||
contract_date: null,
|
||
agreement: null,
|
||
rules: null,
|
||
loading: false,
|
||
};
|
||
}
|
||
|
||
static getDerivedStateFromProps(nextProps, prevState)
|
||
{
|
||
return {
|
||
date: nextProps.date,
|
||
car: nextProps.car,
|
||
contract_date: nextProps.contract_date,
|
||
agreement: nextProps.agreement,
|
||
rules: nextProps.rules,
|
||
};
|
||
}
|
||
|
||
componentDidMount() {}
|
||
|
||
render()
|
||
{
|
||
const { loading, date, car, contract_date, agreement, rules } = this.state;
|
||
const { number } = this.props;
|
||
|
||
return (
|
||
<React.Fragment>
|
||
<Head>
|
||
<title>ЛК Эволюция автолизинга</title>
|
||
<meta name="description" content="ЛК Эволюция автолизинга" />
|
||
</Head>
|
||
<Header { ...this.props } />
|
||
<main>
|
||
<section>
|
||
<div className="clear"></div>
|
||
<div className="container">
|
||
<div className="title_wrapper">
|
||
<div className="left" style={{ flexDirection: "column" }}>
|
||
<h1 className="section_title">Мои обращения</h1>
|
||
</div>
|
||
<Company />
|
||
</div>
|
||
<div className="aside_container about">
|
||
<InnerMenu number={number} {...this.props} />
|
||
<article>
|
||
<div className="appeal_list">
|
||
<div className="appeal_item">
|
||
<div className="item_header">
|
||
<p>
|
||
Номер обращения: <b>123 от 13.04.2022</b>
|
||
</p>
|
||
<p>
|
||
Отвественный ОРК: <b>Иванов И.И.</b>
|
||
</p>
|
||
<p>
|
||
Договор: <b>№2021_1655, №2021_1655</b>
|
||
</p>
|
||
<div className="status">Активное</div>
|
||
</div>
|
||
<div className="item_body">
|
||
<div className="item_text">
|
||
<p>
|
||
<b>Тема запроса</b>
|
||
</p>
|
||
<p>
|
||
Текстовый контент Текстовый контент Текстовый
|
||
контент Текстовый контент Текстовый контент
|
||
Текстовый контент Текстовый контент Текстовый
|
||
контент Текстовый контент Текстовый контент
|
||
Текстовый контент Текстовый контент Текстовый
|
||
контент Текстовый контент Текстовый контент
|
||
Текстовый контент Текстовый контент Текстовый
|
||
контент Текстовый контент
|
||
</p>
|
||
</div>
|
||
<div className="item_text">
|
||
<p>
|
||
<b>Текст ответа ОРК</b>
|
||
</p>
|
||
<p>
|
||
Текстовый контент Текстовый контент Текстовый
|
||
контент Текстовый контент Текстовый контент
|
||
Текстовый контент Текстовый контент Текстовый
|
||
контент Текстовый контент Текстовый контент
|
||
Текстовый контент Текстовый контент Текстовый
|
||
контент Текстовый контент Текстовый контент
|
||
Текстовый контент Текстовый контент Текстовый
|
||
контент Текстовый контент
|
||
</p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div className="appeal_item">
|
||
<div className="item_header">
|
||
<p>
|
||
Номер обращения: <b>123 от 13.04.2022</b>
|
||
</p>
|
||
<p>
|
||
Отвественный ОРК: <b>Иванов И.И.</b>
|
||
</p>
|
||
<p>
|
||
Договор: <b>№2021_1655, №2021_1655</b>
|
||
</p>
|
||
</div>
|
||
<div className="item_body">
|
||
<div className="item_text">
|
||
<p>
|
||
<b>Тема запроса</b>
|
||
</p>
|
||
<p>
|
||
Текстовый контент Текстовый контент Текстовый
|
||
контент Текстовый контент Текстовый контент
|
||
Текстовый контент Текстовый контент Текстовый
|
||
контент Текстовый контент Текстовый контент
|
||
Текстовый контент Текстовый контент Текстовый
|
||
контент Текстовый контент Текстовый контент
|
||
Текстовый контент Текстовый контент Текстовый
|
||
контент Текстовый контент
|
||
</p>
|
||
</div>
|
||
<div className="item_text">
|
||
<p>
|
||
<b>Текст ответа ОРК</b>
|
||
</p>
|
||
<p>
|
||
Текстовый контент Текстовый контент Текстовый
|
||
контент Текстовый контент Текстовый контент
|
||
Текстовый контент Текстовый контент Текстовый
|
||
контент Текстовый контент Текстовый контент
|
||
Текстовый контент Текстовый контент Текстовый
|
||
контент Текстовый контент Текстовый контент
|
||
Текстовый контент Текстовый контент Текстовый
|
||
контент Текстовый контент
|
||
</p>
|
||
<div className="dosc_list medium-icon">
|
||
<div className="row">
|
||
<p className="doc_name i-pdf extension">
|
||
№2021_1655 от 20.04.2021
|
||
<span>2021_1655 от 20.04.2021</span>
|
||
</p>
|
||
</div>
|
||
<div className="row">
|
||
<p className="doc_name i-pdf extension">
|
||
№2021_1655 от 20.04.2021
|
||
<span>2021_1655 от 20.04.2021</span>
|
||
</p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</article>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</main>
|
||
<Footer />
|
||
</React.Fragment>
|
||
);
|
||
}
|
||
}
|
||
|
||
function mapStateToProps(state, ownProps)
|
||
{
|
||
return {
|
||
contract_date: state.contract.date,
|
||
date: state.contract.date,
|
||
car: state.contract.car,
|
||
agreement: state.contract.agreement,
|
||
rules: state.contract.rules,
|
||
};
|
||
}
|
||
|
||
export const getServerSideProps = reduxWrapper.getServerSideProps(
|
||
(store) =>
|
||
async ({ req, res, query }) => {
|
||
return {
|
||
props: {
|
||
//number: query.number,
|
||
number: null,
|
||
},
|
||
};
|
||
}
|
||
);
|
||
|
||
export default withRouter(connect(mapStateToProps)(ContractPage));
|