diff --git a/actions/dealsActions.js b/actions/dealsActions.js new file mode 100644 index 0000000..e2d35d6 --- /dev/null +++ b/actions/dealsActions.js @@ -0,0 +1,49 @@ +import axios from 'axios'; +import { Cookies } from 'react-cookie'; +import Router from 'next/router'; +import moment from 'moment'; +import { nSQL } from "@nano-sql/core"; + +/* +/lk/ConsiderationOpportunity/quote + +[{ + "quote_number": "582189", + "price": 5490000, + "first_payment_perc": 30, + "first_payment_rub": 1647000, + "brand_name": "Volkswagen", + "model_name": "Touareg", + "object_count": 1, +}, { + "quote_number": "580008", + "price": 5341770, + "first_payment_perc": 30, + "first_payment_rub": 1647000, + "brand_name": "Volkswagen", + "model_name": "Touareg", + "object_count": 1, +}] +*/ + +export const getDeals = ({ dispatch }) => +{ + //console.log("ACTION", "support", "getAppeals()", `${ process.env.NEXT_PUBLIC_SELF_API_HOST }/api/support/appeals`); + return new Promise((resolve, reject) => + { + axios.post(`${ process.env.NEXT_PUBLIC_SELF_API_HOST }/api/deals/list`, {}, { + withCredentials: true, + }) + .then((response) => + { + //console.log("ACTION", "support", "getAppeals()", "response", response.data); + dispatch({ type: actionTypes.DEALS, data: {} }); + resolve(); + }) + .catch((error) => + { + console.error(error); + reject(); + }); + }); +} \ No newline at end of file diff --git a/actions/feedbackActions.js b/actions/feedbackActions.js new file mode 100644 index 0000000..d90f48f --- /dev/null +++ b/actions/feedbackActions.js @@ -0,0 +1,45 @@ +import axios from 'axios'; + +if(process.browser) +{ + FormData.prototype.appendObject = function(obj, namespace) + { + let keyName; + for (var key in obj) + { + if (obj.hasOwnProperty(key)) + { + keyName = [namespace, '[', key, ']'].join(''); + this.append(keyName, obj[key]); + } + } + }; +} + +export const sendFeedback = (feedback) => +{ + //{ name, phone, email, company, recaptcha_token } + return new Promise((resolve, reject) => + { + axios.post(`${ process.env.NEXT_PUBLIC_SELF_API_HOST }/api/feedbacks/add`, feedback, + { + withCredentials: true, + }) + .then((response) => + { + if(response.data.status === "success") + { + resolve(); + } + else + { + reject(response.data); + } + }) + .catch((error) => + { + console.error(error); + reject(); + }); + }); +} \ No newline at end of file diff --git a/actions/index.js b/actions/index.js index e581ce5..9c9b45e 100644 --- a/actions/index.js +++ b/actions/index.js @@ -12,4 +12,5 @@ export * from './eventsActions'; export * from './supportActions'; export * from './adminActions'; export * from './suggestsActions'; -export * from './questionnaireActions'; \ No newline at end of file +export * from './questionnaireActions'; +export * from './feedbackActions'; \ No newline at end of file diff --git a/components/DealsStatus/index.js b/components/DealsStatus/index.js new file mode 100644 index 0000000..9da8966 --- /dev/null +++ b/components/DealsStatus/index.js @@ -0,0 +1,539 @@ +import React from "react" +import { connect } from "react-redux" + +class SingleDeal extends React.Component +{ + constructor(props) + { + super(props); + } + + render() + { + const { close } = this.props; + + return ( +
+
+

Статус сделки

+ +
+
+
+

Сделка 1

+ +
+
+ +

Выбор КП

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
СтоимостьПервый платеж, р.Первый платеж, %МаркаМодельОбъектов лизинга
+
+ {} }/> + +
+
15 600 000 р.560 000 р.10 %AudiA81 +
+
+
+

+ КП + №1 +

+
+
+
+
+
+ {} }/> + +
+
15 600 000 р.560 000 р.10 %AudiA81 +
+
+
+

+ КП + №1 +

+
+
+
+
+
+
+
+
+

Сделка 1

+ +
+
+ +

Программа финансирования

+
+
+
+

Статусный текст о том что выбирается программа финансированияи может быть по центру иконочка часиков или слева от статусного текста иконочка часиков

+
+
+
+
+
+

Сделка 1

+ +
+
+ +

Сборка пакета документов

+
+
+
+

Вам не требуется актуализация данных анкеты Клиента

+
+
+

Требуется обновить данные в анкете

+ +
+
+

Проводится проверка анкеты Вашей организации

+
+

Устав организации

+
+ +
+
+
+
+
+

№123/2023 от 01.01.2023

+
+
+
+
+

№123/2023 от 01.01.2023

+
+
+
+

Документы, отправленные Вами принадлежат другой организации бла бла коммент от менеджера

+
+
+ +
+

Другое название документа

+
+ +
+
+
+
+
+

Сделка 1

+ +
+
+ +

Проверка документов

+
+
+
+

Статусный текст о том что выбирается программа финансированияи может быть по центру иконочка часиков или слева от статусного текста иконочка часиков

+
+
+
+
+
+

Сделка 1

+ +
+
+ +

Принятие решения по заявке

+
+
+
+

Статусный текст о том что выбирается программа финансированияи может быть по центру иконочка часиков или слева от статусного текста иконочка часиков

+
+
+
+
+
+

Сделка 1

+ +
+
+ +

Оформление лизинга

+
+
+
+

Статусный текст о том что выбирается программа финансированияи может быть по центру иконочка часиков или слева от статусного текста иконочка часиков

+
+
+
+
+
+

Сделка 1

+ +
+
+ +

Выбор типа подписания

+
+
+
+
+
+

Подготовлено 3 из 12

+
+
+
+
+

+ {} }/> + +

+
+
+
+ + +
+
+
+
+
+

К подписанию 3 из 12

+
+
+
+
+

+ №123/2023 от 01.01.2023 +

+ +
+
+

+ №123/2023 от 01.01.2023 +

+ + +
+
+
+
+
+
+

Подписано 3 из 12

+
+
+ +
+
+
+
+

Подготовлено 3 из 12

+
+
+
+
+

+ №123/2023 от 01.01.2023 +

+
+
+
+
+
+
+
+
+ ) + } +} + +class AllContractsModal extends React.Component +{ + constructor(props) + { + super(props); + } + + render() + { + const { open, close, activeContract, handleContractSelected } = this.props + + return ( +
+
+
+

Статусы сделок

+ +
+
+
+
+
+

Сделка 1

+ + +

Выбор КП

+
+
+

Сделка 1

+ + +

Программа финансирования

+
+
+

Сделка 1

+ + +

Сборка пакета документов

+
+
+

Сделка 1

+ + +

Проверка документов

+
+
+

Сделка 1

+ + +

Принятие решения по заявке

+
+
+

Сделка 1

+ + +

Оформление лизинга

+
+
+

Сделка 1

+ + +

Выбор типа подписания

+
+
+
+
+
+
+ ) + } +} + +class DealsList extends React.Component +{ + constructor(props) + { + super(props) + } + + render() + { + return ( +
+
+
+

Сделка 1

+
+
+

+ 2 этапа пройдено + + + +

+
+
+ +

Сбор пакета документов

+
+
+

+ еще 4 этапа + + + +

+
+
+ +
+
+
+
+

Сделка 1

+
+
+

{ this._handleModalToggle("current") }} > + 2 этапа пройдено + + + +

+
+
+ +

Сбор пакета документов

+
+
+

{ this._handleModalToggle("current") }} > + еще 4 этапа + + + +

+
+
+ +
+
+
+ ) + } +} + +class DealsStatus extends React.Component +{ + constructor(props) + { + super(props) + this.state = { + currentContractModalOpened: false, + allContractModalOpened: false, + currentSelected: null + } + } + + static getDerivedStateFromProps(nextProps, prevState) { + return {} + } + + componentDidMount() { } + + componentDidUpdate(prevProps, prevState) { } + + _handleModalToggle = (modal) => + { + if (modal === "current") + { + this.setState({ + currentContractModalOpened: !this.state.currentContractModalOpened + }) + } + else + { + this.setState({ + allContractModalOpened: !this.state.allContractModalOpened + }) + } + } + + _handleContractSelected = (index) => + { + this.setState({ + currentSelected: index + }) + } + + render() + { + const { currentContractModalOpened, allContractModalOpened, currentSelected } = this.state + + return ( + <> + + + { + this._handleModalToggle("current") + }} + /> + {/*} + { + this._handleModalToggle("all") + }} + activeContract={currentSelected} + handleContractSelected={this._handleContractSelected} + /> + {*/} + + ) + } +} + +function mapStateToProps(state, ownProps) +{ + return {} +} + +export default connect(mapStateToProps)(DealsStatus) diff --git a/constants/actionTypes.js b/constants/actionTypes.js index b7d22f0..f64a19f 100644 --- a/constants/actionTypes.js +++ b/constants/actionTypes.js @@ -44,4 +44,13 @@ export const SUPPORT_RESET = 'SUPPORT_RESET'; export const QUESTIONNAIRE_UPDATE = 'QUESTIONNAIRE_UPDATE'; export const QUESTIONNAIRE_RESET = 'QUESTIONNAIRE_RESET'; -export const QUESTIONNAIRE_SET_SIGN = 'QUESTIONNAIRE_SET_SIGN'; \ No newline at end of file +export const QUESTIONNAIRE_SET_SIGN = 'QUESTIONNAIRE_SET_SIGN'; + +export const DEALS_LOADED = 'DEALS_LOADED'; +export const DEALS_LIST = 'DEALS_LIST'; +export const DEAL_LOADED = 'DEAL_LOADED'; +export const DEAL_OFFERS_LIST = 'DEAL_OFFERS_LIST'; +export const DEAL_DOCUMENTS_LIST = 'DEAL_DOCUMENTS_LIST'; +export const DEAL_CONTRACTS_LIST = 'DEAL_CONTRACTS_LIST'; +export const DEALS_RESET = 'DEALS_RESET'; +export const DEAL_RESET = 'DEAL_RESET'; diff --git a/css/main/style.css b/css/main/style.css index 4c6097c..60b4423 100644 --- a/css/main/style.css +++ b/css/main/style.css @@ -3783,9 +3783,9 @@ main .dropdown_blocks_list .dropdown_block .block_body .fines_detail ul li { align-items: flex-end; height: 102px; } -@media all and (max-width: 1200px) { +@media all and (max-width: 960px) { .rate_us { - display: none; + height: 120px; } } .rate_us.opened { @@ -3868,6 +3868,13 @@ main .dropdown_blocks_list .dropdown_block .block_body .fines_detail ul li { flex-direction: column; justify-content: space-between; } +@media all and (min-width: 961px) and (max-width: 1420px) { + .rate_us .rate_body { + border-top-right-radius: 0px; + border-bottom-right-radius: 0px; + margin-right: -80px; + } +} .rate_us p { font-size: 15px; font-weight: 700; diff --git a/css/main/style.less b/css/main/style.less index d042d7b..75657f6 100644 --- a/css/main/style.less +++ b/css/main/style.less @@ -4224,8 +4224,9 @@ main .dropdown_blocks_list .dropdown_block .block_body { align-items: flex-end; height: 102px; - @media all and (max-width: 1200px) { - display: none; + @media all and (max-width: 960px) { + //display: none; + height: 120px; } &.opened { @@ -4324,6 +4325,12 @@ main .dropdown_blocks_list .dropdown_block .block_body { display: flex; flex-direction: column; justify-content: space-between; + + @media all and (min-width: 961px) and (max-width: 1420px) { + border-top-right-radius: 0px; + border-bottom-right-radius: 0px; + margin-right: -80px; + } } p { diff --git a/css/var.css b/css/var.css index 6daf39e..d9f982d 100644 --- a/css/var.css +++ b/css/var.css @@ -625,3 +625,10 @@ div { right: 5px; } } +.contracts_list_title { + font-size: 26px; + font-weight: 700; + line-height: 35px; + margin-top: 35px; + margin-bottom: 35px; +} diff --git a/css/var.less b/css/var.less index da7925b..d8d1a62 100644 --- a/css/var.less +++ b/css/var.less @@ -667,4 +667,12 @@ div { } } } +} + +.contracts_list_title { + font-size: 26px; + font-weight: 700; + line-height: 35px; + margin-top: 35px; + margin-bottom: 35px; } \ No newline at end of file diff --git a/pages/api/deals/contracts.js b/pages/api/deals/contracts.js new file mode 100644 index 0000000..810b215 --- /dev/null +++ b/pages/api/deals/contracts.js @@ -0,0 +1,4 @@ +/* +2.7.6 - Метод получения списка договоров со статусами по Лизинговой сделке в CRM +GET /lk/ConsiderationOpportunity/contract +*/ \ No newline at end of file diff --git a/pages/api/deals/documents.js b/pages/api/deals/documents.js new file mode 100644 index 0000000..2230653 --- /dev/null +++ b/pages/api/deals/documents.js @@ -0,0 +1,4 @@ +/* +2.7.4 - Метод получения списка документов для рассмотрения Лизинговой сделке в CRM +GET /lk/ConsiderationOpportunity/document +*/ \ No newline at end of file diff --git a/pages/api/deals/index.js b/pages/api/deals/index.js new file mode 100644 index 0000000..14646c0 --- /dev/null +++ b/pages/api/deals/index.js @@ -0,0 +1,71 @@ +/* +2.7.1 - Метод получения данных по лизинговым сделкам в CRM +GET /lk/ConsiderationOpportunity +*/ + +import axios from 'axios'; +import { Cookies } from 'react-cookie'; +import cookie from 'cookie'; +import moment from 'moment'; +import jwt from 'jsonwebtoken'; +import { cors } from '../../../lib/cors'; + +export default async function handler(req, res) +{ + await cors(req, res); + + if(req.headers.cookie !== undefined) + { + const cookies = cookie.parse(req.headers?.cookie ? req.headers?.cookie : ""); + + console.log("req.body"); + console.log(req.body); + + if(cookies.jwt !== undefined && cookies.jwt !== null) + { + console.log("cookies.jwt"); + console.log(cookies.jwt); + + var client_jwt_decoded = jwt.verify(cookies.jwt, process.env.JWT_SECRET_CLIENT); + var crm_jwt = jwt.sign(client_jwt_decoded, process.env.JWT_SECRET_CRM, { noTimestamp: true }); + + console.log("client_jwt_decoded", client_jwt_decoded); + console.log("crm_jwt", crm_jwt); + + const url = `${ process.env.CRM_API_HOST }/lk/ConsiderationOpportunity`; + console.log({ url }); + + try + { + await axios.get(url, { + params: { ...client_jwt_decoded, }, + headers: { + "Authorization": `Bearer ${ crm_jwt }`, + }, + withCredentials: true, + }) + .then((crm_response) => + { + console.log("API", "contract", "crm_response.data"); + //console.log("API", "contract", crm_response.data); + + res.status(200).json(crm_response.data); + }) + .catch((error) => + { + console.error(error); + res.status(500); + }); + } + catch(e) + { + console.error(e); + res.status(500); + } + } + else + { + res.status(403); + } + } +} \ No newline at end of file diff --git a/pages/api/deals/offers.js b/pages/api/deals/offers.js new file mode 100644 index 0000000..9b8a6c7 --- /dev/null +++ b/pages/api/deals/offers.js @@ -0,0 +1,4 @@ +/* +2.7.2 - Метод получения списка Предложений по Лизинговой сделке в CRM +GET /lk/ConsiderationOpportunity/quote +*/ \ No newline at end of file diff --git a/pages/api/deals/quote.js b/pages/api/deals/quote.js new file mode 100644 index 0000000..c0de65c --- /dev/null +++ b/pages/api/deals/quote.js @@ -0,0 +1,4 @@ +/* +2.7.3 - Метод согласования Предложений Клиентом по Лизинговой сделке в CRM +POST /lk/ConsiderationOpportunity/quote +*/ \ No newline at end of file diff --git a/pages/api/deals/upload.js b/pages/api/deals/upload.js new file mode 100644 index 0000000..de3a5ca --- /dev/null +++ b/pages/api/deals/upload.js @@ -0,0 +1,4 @@ +/* +2.7.5 - Метод отправки документов по Сделке на проверку +POST /lk/document +*/ \ No newline at end of file diff --git a/pages/api/feedbacks/add.js b/pages/api/feedbacks/add.js new file mode 100644 index 0000000..5c50841 --- /dev/null +++ b/pages/api/feedbacks/add.js @@ -0,0 +1,53 @@ +// Next.js API route support: https://nextjs.org/docs/api-routes/introduction +import axios from 'axios'; +import { Cookies } from 'react-cookie'; +import cookie from 'cookie'; +import moment from 'moment'; +import jwt from 'jsonwebtoken'; +import { inspect } from 'util'; + +import { cors } from '../../../lib/cors'; + +export default async function handler(req, res) +{ + await cors(req, res); + let { name, phone, rating, comment } = req.body; + + console.log("API", "feedbacks/add"); + if(req.headers.cookie !== undefined) + { + const cookies = cookie.parse(req.headers?.cookie ? req.headers?.cookie : ""); + + if(cookies.jwt !== undefined && cookies.jwt !== null) + { + let client_jwt_decoded = jwt.verify(cookies.jwt, process.env.JWT_SECRET_CLIENT); + + await axios.post(`${ process.env.NEXT_PUBLIC_API_HOST }/api/feedbacks/add/`, { + token: jwt.sign({ "acc_number": client_jwt_decoded.acc_number, "login": client_jwt_decoded.login }, process.env.JWT_SECRET_CRM, { noTimestamp: true }), + name, phone, rating, comment, + }) + .then((api_response) => + { + console.log("API", "feedbacks/add", "RESPONSE"); + console.log(inspect(api_response.data, true, null, true)); + + res.status(200).send(api_response.data); + }) + .catch((error) => + { + console.error("API", "feedbacks/add", "error"); + console.error(error); + + res.status(403).json(); + }); + } + else + { + res.status(403).json(); + } + } + else + { + res.status(403).json(); + } +} \ No newline at end of file diff --git a/pages/components/ContractStatus/index.js b/pages/components/ContractStatus/index.js deleted file mode 100644 index 153be8c..0000000 --- a/pages/components/ContractStatus/index.js +++ /dev/null @@ -1,593 +0,0 @@ -import React from "react" -import { connect } from "react-redux" - -const SingleContractModal = (props) => { - const { open, close } = props - - return ( - -
-
-

Статус сделки

- -
- -
-
-

Сделка 1

- - -
-
- -

Выбор КП

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
СтоимостьПервый платеж, р.Первый платеж, %МаркаМодельОбъектов лизинга
-
- - -
-
15 600 000 р.560 000 р.10 %AudiA81 -
-
-
-

- КП - №1 -

-
-
-
-
-
- - -
-
15 600 000 р.560 000 р.10 %AudiA81 -
-
-
-

- КП - №1 -

-
-
-
-
-
-
-
-
-

Сделка 1

- - -
-
- -

Программа финансирования

-
-
-
-

Статусный текст о том что выбирается программа финансированияи может быть по центру иконочка часиков или слева от статусного текста иконочка часиков

-
-
-
-
-
-

Сделка 1

- - -
-
- -

Сборка пакета документов

-
-
-
-

Вам не требуется актуализация данных анкеты Клиента

-
- -
-

Требуется обновить данные в анкете

- -
- -
-

Проводится проверка анкеты Вашей организации

-
- -

Устав организации

-
- -
- -
- -
-

№123/2023 от 01.01.2023

-

№123/2023 от 01.01.2023

-
-

Документы, отправленные Вами принадлежат другой организации бла бла коммент от менеджера

-
- -
- -
- -

Другое название документа

-
- -
-
-
- -
-
-

Сделка 1

- - -
-
- -

Проверка документов

-
-
-
-

Статусный текст о том что выбирается программа финансированияи может быть по центру иконочка часиков или слева от статусного текста иконочка часиков

-
-
-
-
-
-

Сделка 1

- - -
-
- -

Принятие решения по заявке

-
-
-
-

Статусный текст о том что выбирается программа финансированияи может быть по центру иконочка часиков или слева от статусного текста иконочка часиков

-
-
-
-
-
-

Сделка 1

- - -
-
- -

Оформление лизинга

-
-
-
-

Статусный текст о том что выбирается программа финансированияи может быть по центру иконочка часиков или слева от статусного текста иконочка часиков

-
-
-
-
-
-

Сделка 1

- - -
-
- -

Выбор типа подписания

-
-
-
-
-
-

Подготовлено 3 из 12

-
-
-
- < div className="row"> -

- - -

-
-
-
- - - -
-
- - -
-
-
-

К подписанию 3 из 12

-
-
-
- < div className="row flex-start"> -

- №123/2023 от 01.01.2023 -

- -
- < div className="row flex-start"> -

- №123/2023 от 01.01.2023 -

- - -
-
-
- -
-
-
-

Подписано 3 из 12

-
-
- -
-
- -
-
-
-

Подготовлено 3 из 12

-
-
-
- < div className="row"> -

- №123/2023 от 01.01.2023 -

-
-
-
- - - - - - - ) -} - -const AllContractsModal = (props) => { - const { open, close, activeContract, handleContractSelected } = props - - return ( -
-
-
-

Статусы сделок

- -
-
-
-
-
-

Сделка 1

- - - -

Выбор КП

-
-
-

Сделка 1

- - - -

Программа финансирования

-
-
-

Сделка 1

- - - -

Сборка пакета документов

-
-
-

Сделка 1

- - - -

Проверка документов

-
-
-

Сделка 1

- - - -

Принятие решения по заявке

-
-
-

Сделка 1

- - - -

Оформление лизинга

-
-
-

Сделка 1

- - - -

Выбор типа подписания

- -
-
- -
-
-
-
- ) -} - -class ContractStatus extends React.Component { - constructor(props) { - super(props) - this.state = { - currentContractModalOpened: false, - allContractModalOpened: false, - currentSelected: null - } - } - - static getDerivedStateFromProps(nextProps, prevState) { - return {} - } - - componentDidMount() { } - - componentDidUpdate(prevProps, prevState) { } - - _handleModalToggle = (modal) => { - if (modal === "current") { - this.setState({ - currentContractModalOpened: !this.state.currentContractModalOpened - }) - } else { - this.setState({ - allContractModalOpened: !this.state.allContractModalOpened - }) - } - } - - _handleContractSelected = (index) => { - this.setState({ - currentSelected: index - }) - } - - render() { - const { currentContractModalOpened, allContractModalOpened, currentSelected } = this.state - - return ( - <> -
-
-
-

Сделка 1

-
-
-

- 2 этапа пройдено - - - -

-
-
- -

Сбор пакета документов

-
-
-

- еще 4 этапа - - - -

-
-
- -
-
- -
-
-

Сделка 1

-
-
-

{ - this._handleModalToggle("current") - }} - > - 2 этапа пройдено - - - -

-
-
- -

Сбор пакета документов

-
-
-

{ - this._handleModalToggle("current") - }} - > - еще 4 этапа - - - -

-
-
- -
-
-
- - { - this._handleModalToggle("current") - }} - /> - { - this._handleModalToggle("all") - }} - activeContract={currentSelected} - handleContractSelected={this._handleContractSelected} - /> - - ) - } -} - -function mapStateToProps(state, ownProps) { - return {} -} - -export default connect(mapStateToProps)(ContractStatus) diff --git a/pages/components/Rating/index.js b/pages/components/Rating/index.js index b93900e..36531ab 100644 --- a/pages/components/Rating/index.js +++ b/pages/components/Rating/index.js @@ -3,7 +3,7 @@ import { connect } from "react-redux" import { SpinnerCircular } from "spinners-react"; import InputMask from 'react-input-mask'; -import { sendNewAppeal } from "../../../actions" +import { sendFeedback, sendNewAppeal } from "../../../actions" import { _checkStrValue } from "../../../utils"; class Rating extends React.Component @@ -17,6 +17,7 @@ class Rating extends React.Component comment: "", opened: false, hidden: false, + deleted: false, rating: 0, hovered: 0, stars: [], @@ -77,10 +78,29 @@ class Rating extends React.Component _handle_onSetPublished = () => { - this.setState({ publish: this.state.publish ? false : true }); - setTimeout(() => { - this.setState({ hidden: true }) - }, 2000); + const { name, phone, comment, rating } = this.state; + + if(!this.state.publish) + { + this.setState({ publish: this.state.publish ? false : true }); + + sendFeedback({ + name, + phone, + comment, + rating, + }) + .then(() => {}) + .catch(() => {}); + + setTimeout(() => { + this.setState({ hidden: true }) + }, 1000); + + setTimeout(() => { + this.setState({ deleted: true }) + }, 2000); + } } _removeError = (name) => @@ -135,91 +155,98 @@ class Rating extends React.Component render() { - const { opened, hidden, stars, rating, hovered, completed, publish, loading, name, phone, comment, errors } = this.state + const { opened, hidden, deleted, stars, rating, hovered, completed, publish, loading, name, phone, comment, errors } = this.state const data = ["Очень плохо", "Плохо", "Нормально", "Хорошо", "Отлично"] - return ( -