From 06ac3c38c8e49eda91981842ea832ca3592d8784 Mon Sep 17 00:00:00 2001 From: merelendor Date: Wed, 13 Sep 2023 10:54:32 +0300 Subject: [PATCH 01/49] deals pre-initial --- actions/dealsActions.js | 172 ++++- components/DealsStatus/DealsList.js | 46 +- components/DealsStatus/DealsListDeal.js | 55 +- components/DealsStatus/SingleDeal.js | 894 +++++++++++++++------- components/DealsStatus/index.js | 34 +- components/FileDropzone/index.js | 55 ++ components/FileDropzoneDeals/index.js | 56 ++ css/main/style.css | 386 ++++++++-- css/main/style.less | 957 +++++++++++++++--------- css/var.css | 3 + css/var.less | 28 +- pages/api/deals/contracts.js | 15 +- pages/api/deals/documents.js | 15 +- pages/api/deals/index.js | 2 +- pages/api/deals/offers.js | 15 +- pages/index.js | 562 +++++++------- pages/support/request.js | 54 +- public/assets/images/status/1_off.svg | 59 ++ public/assets/images/status/1_on.svg | 59 ++ public/assets/images/status/2_off.svg | 91 +++ public/assets/images/status/2_on.svg | 91 +++ public/assets/images/status/3_off.svg | 111 +++ public/assets/images/status/3_on.svg | 111 +++ public/assets/images/status/4_off.svg | 31 + public/assets/images/status/4_on.svg | 31 + public/assets/images/status/5_off.svg | 25 + public/assets/images/status/5_on.svg | 25 + public/assets/images/status/6_off.svg | 12 + public/assets/images/status/6_on.svg | 12 + public/assets/images/status/7_off.svg | 26 + public/assets/images/status/7_on.svg | 26 + reducers/dealsReducer.js | 19 +- reducers/initialState.js | 4 +- 33 files changed, 2989 insertions(+), 1093 deletions(-) create mode 100644 components/FileDropzone/index.js create mode 100644 components/FileDropzoneDeals/index.js create mode 100644 public/assets/images/status/1_off.svg create mode 100644 public/assets/images/status/1_on.svg create mode 100644 public/assets/images/status/2_off.svg create mode 100644 public/assets/images/status/2_on.svg create mode 100644 public/assets/images/status/3_off.svg create mode 100644 public/assets/images/status/3_on.svg create mode 100644 public/assets/images/status/4_off.svg create mode 100644 public/assets/images/status/4_on.svg create mode 100644 public/assets/images/status/5_off.svg create mode 100644 public/assets/images/status/5_on.svg create mode 100644 public/assets/images/status/6_off.svg create mode 100644 public/assets/images/status/6_on.svg create mode 100644 public/assets/images/status/7_off.svg create mode 100644 public/assets/images/status/7_on.svg diff --git a/actions/dealsActions.js b/actions/dealsActions.js index 702199b..9f3e26b 100644 --- a/actions/dealsActions.js +++ b/actions/dealsActions.js @@ -43,61 +43,175 @@ opp_number- номер Лизинговой сделки statuscode_id - номер этапа statuscode_name - имя этапа comment - сопроводительный текст для данного этапа, который надо выводить - */ export const getDeals = ({ dispatch }) => { - console.log("ACTION", "deals", "getDeals()", `${ process.env.NEXT_PUBLIC_SELF_API_HOST }/api/deals`); + const url = `${ process.env.NEXT_PUBLIC_SELF_API_HOST }/api/deals`; + + console.log("ACTION", "deals", "getDeals()", { url }); + return new Promise((resolve, reject) => { - console.log("??????????????????????? WTF"); - - axios.post(`${ process.env.NEXT_PUBLIC_SELF_API_HOST }/api/deals`, {}, { + axios.post(url, {}, { withCredentials: true, }) .then((response) => { - console.log("!!!!!!!!!!!!!!!!!!!!!!!!! GOOOOOOD"); console.log("ACTION", "deals", "getDeals()", "response", response.data); dispatch({ type: actionTypes.DEALS_LIST, data: { - list: [{ - "opp_number": "780", - "statuscode_id": 107, - "statuscode_name": " ", - "comment": null, - }, { - "opp_number": "37197", - "statuscode_id": 101, - "statuscode_name": " ", - "comment": null, - }] + list: response.data } }); + resolve(); }) .catch((error) => { - console.log("!!!!!!!!!!!!!!!!!!!!!!!!! ERROR", { action: actionTypes.DEALS_LIST }); + console.error("ACTION", "deals", "getDeals()", "ERROR"); + console.error(error); + dispatch({ type: actionTypes.DEALS_LIST, data: { - list: [{ - "opp_number": "780", - "statuscode_id": 107, - "statuscode_name": " ", - "comment": null, - }, { - "opp_number": "37197", - "statuscode_id": 101, - "statuscode_name": " ", - "comment": null, - }] + list: [] } }); + + reject(); + }); + }); +} + +export const getDealOffers = ({ dispatch, deal_id }) => +{ + const url = `${ process.env.NEXT_PUBLIC_SELF_API_HOST }/api/deals/offers`; + + console.log("ACTION", "deals", "getDealOffers()", { url }); + console.log("ACTION", "deals", "getDealOffers()", { deal_id }); + + return new Promise((resolve, reject) => + { + axios.post(url, { deal_id }, { + withCredentials: true, + }) + .then((response) => + { + console.log("ACTION", "deals", "getDealOffers()", "response", response.data); + + dispatch({ + type: actionTypes.DEAL_OFFERS_LIST, + data: { + deal_id, + list: response.data + } + }); + + resolve(); + }) + .catch((error) => + { + console.error("ACTION", "deals", "getDealOffers()", "ERROR"); console.error(error); + + dispatch({ + type: actionTypes.DEAL_OFFERS_LIST, + data: { + deal_id, + list: [] + } + }); + + reject(); + }); + }); +} + +export const getDealDocuments = ({ dispatch, deal_id }) => +{ + const url = `${ process.env.NEXT_PUBLIC_SELF_API_HOST }/api/deals/documents`; + + console.log("ACTION", "deals", "getDealDocuments()", { url }); + console.log("ACTION", "deals", "getDealDocuments()", { deal_id, }); + + return new Promise((resolve, reject) => + { + axios.post(url, { deal_id }, { + withCredentials: true, + }) + .then((response) => + { + console.log("ACTION", "deals", "getDealDocuments()", "response", response.data); + + dispatch({ + type: actionTypes.DEAL_DOCUMENTS_LIST, + data: { + deal_id, + list: response.data + } + }); + + resolve(); + }) + .catch((error) => + { + console.error("ACTION", "deals", "getDealDocuments()", "ERROR"); + console.error(error); + + dispatch({ + type: actionTypes.DEAL_DOCUMENTS_LIST, + data: { + deal_id, + list: [] + } + }); + + reject(); + }); + }); +} + +export const getDealContracts = ({ dispatch, deal_id }) => +{ + const url = `${ process.env.NEXT_PUBLIC_SELF_API_HOST }/api/deals/contracts`; + + console.log("ACTION", "deals", "getDealContracts()", { url }); + console.log("ACTION", "deals", "getDealContracts()", { deal_id, }); + + return new Promise((resolve, reject) => + { + axios.post(url, { deal_id }, { + withCredentials: true, + }) + .then((response) => + { + console.log("ACTION", "deals", "getDealContracts()", "response", response.data); + + dispatch({ + type: actionTypes.DEAL_CONTRACTS_LIST, + data: { + deal_id, + list: response.data + } + }); + + resolve(); + }) + .catch((error) => + { + console.error("ACTION", "deals", "getDealContracts()", "ERROR"); + console.error(error); + + dispatch({ + type: actionTypes.DEAL_CONTRACTS_LIST, + data: { + deal_id, + list: [] + } + }); + reject(); }); }); diff --git a/components/DealsStatus/DealsList.js b/components/DealsStatus/DealsList.js index 58f9c87..24cdd40 100644 --- a/components/DealsStatus/DealsList.js +++ b/components/DealsStatus/DealsList.js @@ -7,25 +7,57 @@ export default class DealsList extends React.Component constructor(props) { super(props); + this.list_ref = React.createRef(); + this.items_ref = []; + } + + _handle_onSelectDeal = (deal_id, index) => + { + const { onSelectDeal } = this.props; + onSelectDeal(deal_id); + + setTimeout(() => + { + const element = this.list_ref.current.children[index]; + const y = (element.getBoundingClientRect().top + window.scrollY - 90); + window.scrollTo({top: y, behavior: 'smooth'}); + }, 50); + } + + _handle_onCloseDeal = () => + { + const { onCloseDeal } = this.props; + onCloseDeal(); + + setTimeout(() => + { + const element = this.list_ref.current; + const y = (element.getBoundingClientRect().top + window.scrollY - 160); + window.scrollTo({top: y, behavior: 'smooth'}); + }, 50); } render() { - const { deals, dealSelected } = this.props; + const { status, deals, questionnaire_status, dealSelected, onCloseDeal } = this.props; console.log({ deals }); return ( -
+
{ deals.list !== undefined && deals.list !== null && deals.list.map((deal, index) => { - if(index === dealSelected) + if(dealSelected === deal.opp_number) { return ( { - this._handleModalToggle("current") - }} + index={ index } + ref={ ref => this.items_ref[index] = ref } + status={ status } + dealSelected={ dealSelected } + deals={ deals } + questionnaire_status={ questionnaire_status } + onCloseDeal={ this._handle_onCloseDeal } />) } else @@ -34,7 +66,9 @@ export default class DealsList extends React.Component this.items_ref[index] = ref } { ...deal } + onSelectDeal={ this._handle_onSelectDeal } /> ) } diff --git a/components/DealsStatus/DealsListDeal.js b/components/DealsStatus/DealsListDeal.js index 2c5dfe2..ac88d81 100644 --- a/components/DealsStatus/DealsListDeal.js +++ b/components/DealsStatus/DealsListDeal.js @@ -1,12 +1,43 @@ import React from "react"; import pluralize from 'pluralize-ru'; -const statuses = [ - { - title: "Сбор пакета документов", +const statuses = { + "0": { + index: undefined, + title: "Выбор КП", icon: "/assets/images/status/1.svg", - } -]; + }, + "101": { + index: 1, + title: "Выбор программы финансирования", + icon: "/assets/images/status/2.svg", + }, + "102": { + index: 2, + title: "Сбор пакета документов", + icon: "/assets/images/status/3.svg", + }, + "3": { + index: 3, + title: "Проверка документов", + icon: "/assets/images/status/4.svg", + }, + "1": { + index: 4, + title: "Принятие решения по заявке", + icon: "/assets/images/status/5.svg", + }, + "107": { + index: 5, + title: "Оформление лизинга", + icon: "/assets/images/status/6.svg", + }, + "2": { + index: 6, + title: "Выбор типа подписания", + icon: "/assets/images/status/7.svg", + }, +}; export default class DealsListDeal extends React.Component { @@ -15,9 +46,11 @@ export default class DealsListDeal extends React.Component super(props) } + //getDealOffers + render() { - const { index, comment, opp_number, statuscode_id, statuscode_name } = this.props; + const { onSelectDeal, index, comment, opp_number, statuscode_id, statuscode_name } = this.props; const step = statuscode_id - 100; console.log("deal list item", { props: this.props }); @@ -29,7 +62,7 @@ export default class DealsListDeal extends React.Component

- { step === 0 ? "Не начата" : `${ step } ${ pluralize(step, 'этапа', 'этап', 'этапа', 'этапов') } ${ pluralize(step, 'пройдено', 'пройден', 'пройдено', 'пройдено') }` } + { statuses[ statuscode_id ] === undefined ? "Не начата" : `${ statuses[ statuscode_id ].index } ${ pluralize(step, 'этапа', 'этап', 'этапа', 'этапов') } ${ pluralize(statuses[ statuscode_id ].index, 'пройдено', 'пройден', 'пройдено', 'пройдено') }` } {/*} @@ -38,12 +71,12 @@ export default class DealsListDeal extends React.Component

- -

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

+ +

{ statuscode_name }

- +
+ ) : ( + <> + { questionnaire_status !== "up_to_date" ? ( +
+

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

+
+ ) : ( +
+

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

+
+ ) } + + ) } +
+ + { documents === undefined ? ( + <> + ) : ( + <> + { documents.map((document, index) => ( +
+
+

{ document.name }:

+
+
+ { this._handle_onAddFile(document.doc_id, file) } } + onDeleteFile={ (file) => this._handle_onDeleteFile(document.doc_id, file) } + /> +
+
+ )) } + + )} + {/*} +
+
+
+
+

№123/2023 от 01.01.2023

+
+
+
+
+

№123/2023 от 01.01.2023

+
+
+
+

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

+
+ {*/} + + + + ) + } +} + +class StatusDocumentsCheck extends Step +{ + constructor(props) + { + super(props); + this.state = { + open: false, + }; + this.status = 4; + } + + render() + { + const { index, status } = this.props; + const { open } = this.state; + + return ( +
this.status ? "done" : "" }`}> +

Сделка { index + 1 }

+ +
+ { this._renderHeader("Проверка документов") } +
+
+

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

+
+
+
+
+ ) + } +} + +class StatusDecisionMaking extends Step +{ + constructor(props) + { + super(props); + this.state = { + open: false, + }; + this.status = 5; + } + + render() + { + const { index, status } = this.props; + const { open } = this.state; + + return ( +
this.status ? "done" : "" }`}> +

Сделка { index + 1 }

+ +
+ { this._renderHeader("Принятие решения по заявке") } +
+
+

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

+
+
+
+
+ ) + } +} + +class StatusLeasingRegistration extends Step +{ + constructor(props) + { + super(props); + this.state = { + open: false, + }; + this.status = 6; + } + + render() + { + const { index, status } = this.props; + const { open } = this.state; + + return ( +
this.status ? "done" : "" }`}> +

Сделка { index + 1 }

+ +
+ { this._renderHeader("Оформление лизинга") } +
+
+

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

+
+
+
+
+ ) + } +} + +class SigningTypeSelection extends Step +{ + constructor(props) + { + super(props); + this.state = { + open: false, + }; + this.status = 7; + this.types = [ + { + title: "Подготовлено", + key: "prepared_contracts", + }, + /* + { + title: "К подписанию", + key: "signing_plan_contracts", + }, + { + title: "Выдано", + key: "issued_contracts", + }, + { + title: "Подписано", + key: "signing_fact_contracts", + }, + { + title: "Анулировано", + key: "annulled_contracts", + }, + */ + ]; + } + + _render_preparedContracts = () => + { + const contracts = this.props.contracts['prepared_contracts']; + console.log({ contracts }); + + return ( +
+
+ { contracts.map((contract, index) => ( +
+
+ {} }/> + +
+ { moment(contract.date).format('MM.DD.YYYY') } + { contract.brand_name } + { contract.model_name } +
+
+
+ )) } +
+
+ + +
+
+ ) + } + + _render_signingPlanContracts = () => + { + const { contracts } = this.props; + + return ( +
+
+
+

+ №123/2023 от 01.01.2023 +

+ +
+
+

+ №123/2023 от 01.01.2023 +

+ + +
+
+
+ ) + } + + _render_issuedContracts = () => + { + const { contracts } = this.props; + + return ( +
+
+
+

+ Скачать №129/2023 от 01.01.2023 - Ожидание оплаты +

+
+
+
+ ) + } + + _render_signingFactContracts = () => + { + const { contracts } = this.props; + + return ( +
+
+
+

+ №123/2023 от 01.01.2023 +

+
+
+
+ ) + } + + _render_annuledContracts = () => + { + const { contracts } = this.props; + + return ( +
+
+
+

+ №123/2023 от 01.01.2023 +

+
+
+
+ ) + } + + _render_contracts = (type) => + { + const { contracts } = this.props; + + if(contracts !== undefined) + { + switch (type) + { + case "prepared_contracts": + { + return this._render_preparedContracts(); + } + + case "signing_plan_contracts": + { + return this._render_signingPlanContracts(); + } + + case "issued_contracts": + { + return this._render_issuedContracts(); + } + + case "signing_fact_contracts": + { + return this._render_signingFactContracts(); + } + + case "annulled_contracts": + { + return this._render_annuledContracts(); + } + } + } + else + { + return null; + } + } + + render() + { + const { index, status } = this.props; + const { open } = this.state; + + return ( +
this.status ? "done" : "" }`}> +

Сделка { index + 1 }

+ +
+ { this._renderHeader("Выбор типа подписания") } +
+ { this.types.map((type, index) => ( +
+
+

{ type.title }

+
+
+ { this._render_contracts(type.key) } +
+
+ )) } +
+
+
+ ) + } +} export default class SingleDeal extends React.Component { @@ -9,9 +602,14 @@ export default class SingleDeal extends React.Component render() { - const { close } = this.props; + const { index, status, deals, dealSelected, onCloseDeal } = this.props; + console.log({ "deals": deals }); - return ( + const offers = deals.details[ dealSelected ] !== undefined ? deals.details[ dealSelected ].offers : undefined; + const documents = deals.details[ dealSelected ] !== undefined ? deals.details[ dealSelected ].documents : undefined; + const contracts = deals.details[ dealSelected ] !== undefined ? deals.details[ dealSelected ].contracts : undefined; + + return (
{/*}
@@ -20,287 +618,17 @@ export default class SingleDeal extends React.Component
{*/}
-
-

Сделка 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 -

-
-
-
-
-
-
+ + + + + + + +
+
+ Свернуть +
) diff --git a/components/DealsStatus/index.js b/components/DealsStatus/index.js index 5eae91a..55f1771 100644 --- a/components/DealsStatus/index.js +++ b/components/DealsStatus/index.js @@ -2,7 +2,7 @@ import React from "react" import { connect } from "react-redux" import DealsList from "./DealsList"; import SingleDeal from "./SingleDeal"; -import { getDeals } from "../../actions"; +import { getDeals, getDealOffers, getDealDocuments, getDealContracts } from "../../actions"; class AllContractsModal extends React.Component { @@ -82,10 +82,11 @@ class DealsStatus extends React.Component { super(props) this.state = { + status: 2, currentContractModalOpened: false, allContractModalOpened: false, currentSelected: null, - dealSelected: false, + dealSelected: undefined, deals: undefined, } } @@ -129,16 +130,41 @@ class DealsStatus extends React.Component }) } + _handle_onSelectDeal = (deal_id) => + { + const { dispatch } = this.props; + + console.log("_handle_onSelectDeal", { deal_id }); + this.setState({ dealSelected: deal_id }); + + getDealOffers({ dispatch, deal_id, }); + getDealDocuments({ dispatch, deal_id, }); + getDealContracts({ dispatch, deal_id, }); + } + + _handle_onCloseDeal = () => + { + this.setState({ dealSelected: undefined }); + } + render() { - const { currentContractModalOpened, allContractModalOpened, currentSelected, dealSelected, deals } = this.state + const { currentContractModalOpened, allContractModalOpened, currentSelected, dealSelected, deals, status } = this.state + const { questionnaire_status } = this.props; return ( <>

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

- + {/*} + { files.length > 0 && ( +
+
+

Приложенные файлы ({ files.length }/{ LIMIT_FILES })

+ { files.map((file, index) => ( +

{ file.size > LIMIT && (Ошибка, превышен допустимый размер файла в 10 мб.) } { file.name } - { parseFloat(file.size / 1000000).toFixed(file.size < 100000 ? 3 : 2) } мб. onDeleteFile(file.name) }>[ удалить ]

+ )) } +
+
+ ) } +
+
+

Вы можете приложить до 10 файлов, максимальный размер одного файла: 10 мегабайт.

+
+
+ { files.length < LIMIT_FILES && ( + onAddFile(acceptedFiles) } maxFiles={ LIMIT_FILES }> + { ({getRootProps, getInputProps}) => ( +
+
+
+

+ Перенесите файлы на экран для быстрой загрузки или выберите файл с компьютера +

+ +
+ +
+ ) } +
+ ) } + + ) + } +} \ No newline at end of file diff --git a/components/FileDropzoneDeals/index.js b/components/FileDropzoneDeals/index.js new file mode 100644 index 0000000..b9d5845 --- /dev/null +++ b/components/FileDropzoneDeals/index.js @@ -0,0 +1,56 @@ +import Dropzone from 'react-dropzone'; +import FileDropzone from "../FileDropzone"; +import moment from "moment"; + +const LIMIT = 10000000; +const LIMIT_FILES = 10; + +export default class FileDropzoneDeals extends FileDropzone +{ + render() + { + const { files, onAddFile, onDeleteFile, } = this.props; + + return ( + <> + { files.length > 0 && ( +
+ { files.map((file, index) => ( +
+
+
+
+
+ PDF +
+
+ { file.name } + { moment().format("DD.MM.YYYY") } +
+
+ )) } + {/*} +

{ file.size > LIMIT && (Ошибка, превышен допустимый размер файла в 10 мб.) } { file.name } - { parseFloat(file.size / 1000000).toFixed(file.size < 100000 ? 3 : 2) } мб. onDeleteFile(file.name) }>[ удалить ]

+ {*/} +
+ ) } + { files.length < LIMIT_FILES && ( + onAddFile(acceptedFiles) } maxFiles={ LIMIT_FILES }> + { ({getRootProps, getInputProps}) => ( +
+
+
+

+ Перенесите файлы на экран для быстрой загрузки или выберите файл с компьютера +

+ +
+ +
+ ) } +
+ ) } + + ) + } +} \ No newline at end of file diff --git a/css/main/style.css b/css/main/style.css index f9c5962..de9fbc8 100644 --- a/css/main/style.css +++ b/css/main/style.css @@ -5299,7 +5299,7 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block .block_body .fines_ display: block !important; } .contractStatus_list { - margin: 20px 0; + margin: 50px 0; } .contractStatus_list .list_item { display: flex; @@ -5437,7 +5437,7 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block .block_body .fines_ align-items: unset; justify-content: flex-start; gap: 0 30px; - padding: 2px 0; + padding: 0px 0; } .contractStatus_modal .single_status > div:last-child .status_body .wrap { padding-bottom: 0; @@ -5453,48 +5453,68 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block .block_body .fines_ font-weight: 700; white-space: nowrap; padding: 15px 0; - height: 80px; display: flex; align-items: center; box-sizing: border-box; } .contractStatus_modal .single_status > div i { display: block; - width: 50px; - height: 50px; + width: 40px; + height: 40px; } .contractStatus_modal .single_status > div i.status_1 { - background: url("/assets/images/status/1.svg") no-repeat center; + background: url("/assets/images/status/1_on.svg") no-repeat center; +} +.contractStatus_modal .single_status > div i.status_1.inactive { + background: url("/assets/images/status/1_off.svg") no-repeat center; } .contractStatus_modal .single_status > div i.status_2 { - background: url("/assets/images/status/2.svg") no-repeat center; + background: url("/assets/images/status/2_on.svg") no-repeat center; +} +.contractStatus_modal .single_status > div i.status_2.inactive { + background: url("/assets/images/status/2_off.svg") no-repeat center; } .contractStatus_modal .single_status > div i.status_3 { - background: url("/assets/images/status/3.svg") no-repeat center; + background: url("/assets/images/status/3_on.svg") no-repeat center; +} +.contractStatus_modal .single_status > div i.status_3.inactive { + background: url("/assets/images/status/3_off.svg") no-repeat center; } .contractStatus_modal .single_status > div i.status_4 { - background: url("/assets/images/status/4.svg") no-repeat center; + background: url("/assets/images/status/4_on.svg") no-repeat center; +} +.contractStatus_modal .single_status > div i.status_4.inactive { + background: url("/assets/images/status/4_off.svg") no-repeat center; } .contractStatus_modal .single_status > div i.status_5 { - background: url("/assets/images/status/5.svg") no-repeat center; + background: url("/assets/images/status/5_on.svg") no-repeat center; +} +.contractStatus_modal .single_status > div i.status_5.inactive { + background: url("/assets/images/status/5_off.svg") no-repeat center; } .contractStatus_modal .single_status > div i.status_6 { - background: url("/assets/images/status/6.svg") no-repeat center; + background: url("/assets/images/status/6_on.svg") no-repeat center; +} +.contractStatus_modal .single_status > div i.status_6.inactive { + background: url("/assets/images/status/6_off.svg") no-repeat center; } .contractStatus_modal .single_status > div i.status_7 { - background: url("/assets/images/status/7.svg") no-repeat center; + background: url("/assets/images/status/7_on.svg") no-repeat center; +} +.contractStatus_modal .single_status > div i.status_7.inactive { + background: url("/assets/images/status/7_off.svg") no-repeat center; } .contractStatus_modal .single_status > div > span { display: block; width: 20px; min-width: 20px; margin: 0; - background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.92871 3.50024L4.92871 8.50002L2.42871 6.00024' stroke='white' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); + background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='10' cy='10' r='10' fill='%23EDEFF5'/%3E%3Cpath d='M9.9986 14.2857C12.3655 14.2857 14.2843 12.3669 14.2843 10C14.2843 7.63307 12.3655 5.71429 9.9986 5.71429C7.63167 5.71429 5.71289 7.63307 5.71289 10C5.71289 12.3669 7.63167 14.2857 9.9986 14.2857Z' stroke='%238E94A7' stroke-miterlimit='10'/%3E%3Cpath d='M10 7.5V10H12.5' stroke='%238E94A7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); background-repeat: no-repeat; background-position: top center; position: relative; - z-index: 1; - top: 30px; + z-index: 2; + top: 15px; } .contractStatus_modal .single_status > div > span:before { content: ""; @@ -5502,7 +5522,7 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block .block_body .fines_ position: absolute; width: 0px; height: auto; - border: 1px dashed #5FB158; + border: 1px dashed #EDEFF5; top: 20px; bottom: -20px; left: 0; @@ -5516,7 +5536,7 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block .block_body .fines_ height: 0; border-left: 3px solid transparent; border-right: 3px solid transparent; - border-top: 5px solid #5FB158; + border-top: 5px solid #EDEFF5; position: absolute; top: -5px; left: 0; @@ -5527,6 +5547,18 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block .block_body .fines_ display: none; } .contractStatus_modal .single_status > div:last-child span:before { + content: ""; + display: block; + position: absolute; + width: 0px; + height: auto; + border: 1px dashed #EDEFF5; + top: 20px; + bottom: -20px; + left: 0; + right: 0; + margin: auto; + z-index: -1; bottom: 0; } .contractStatus_modal .single_status > div:not(:first-child) > p:first-child { @@ -5535,6 +5567,55 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block .block_body .fines_ .contractStatus_modal .single_status > div:not(.current) img { filter: grayscale(1); } +.contractStatus_modal .single_status > div.current { + /* + &~div { + > span { + //background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.00056 10.2858C8.36749 10.2858 10.2863 8.367 10.2863 6.00007C10.2863 3.63313 8.36749 1.71436 6.00056 1.71436C3.63362 1.71436 1.71484 3.63313 1.71484 6.00007C1.71484 8.367 3.63362 10.2858 6.00056 10.2858Z' stroke='%238E94A7' stroke-miterlimit='10'/%3E%3Cpath d='M6 3.5V6H8.5' stroke='%238E94A7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); + background-repeat: no-repeat; + background-position: top center; + + &:before { + border-color: #2F80ED; + } + + &:after { + border-top-color: #2F80ED; + } + } + + i { + //&.status_1 { + // background: url("/assets/images/status/1_inactive.svg") no-repeat center; + //} + + //&.status_2 { + // background: url("/assets/images/status/2_inactive.svg") no-repeat center; + //} + + //&.status_3 { + // background: url("/assets/images/status/3_inactive.svg") no-repeat center; + //} + + //&.status_4 { + // background: url("/assets/images/status/4_inactive.svg") no-repeat center; + //} + + //&.status_5 { + // background: url("/assets/images/status/5_inactive.svg") no-repeat center; + //} + + //&.status_6 { + // background: url("/assets/images/status/6_inactive.svg") no-repeat center; + //} + + //&.status_7 { + // background: url("/assets/images/status/7_inactive.svg") no-repeat center; + //} + } + } + */ +} .contractStatus_modal .single_status > div.current > span { background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='10' cy='10' r='10' fill='%232F80ED'/%3E%3Cpath d='M9.99888 13.9286C12.1686 13.9286 13.9275 12.1697 13.9275 9.99998C13.9275 7.83029 12.1686 6.07141 9.99888 6.07141C7.82919 6.07141 6.07031 7.83029 6.07031 9.99998C6.07031 12.1697 7.82919 13.9286 9.99888 13.9286Z' stroke='white' stroke-miterlimit='10'/%3E%3Cpath d='M10 10L11.7678 8.23224' stroke='white' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M8.92773 4.64282H11.0706' stroke='white' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); background-repeat: no-repeat; @@ -5543,51 +5624,35 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block .block_body .fines_ .contractStatus_modal .single_status > div.current > span:before { border-color: #2F80ED; } -.contractStatus_modal .single_status > div.current ~ div > span { - background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='10' cy='10' r='10' fill='%23EDEFF5'/%3E%3Cpath d='M9.9986 14.2857C12.3655 14.2857 14.2843 12.3669 14.2843 10C14.2843 7.63307 12.3655 5.71429 9.9986 5.71429C7.63167 5.71429 5.71289 7.63307 5.71289 10C5.71289 12.3669 7.63167 14.2857 9.9986 14.2857Z' stroke='%238E94A7' stroke-miterlimit='10'/%3E%3Cpath d='M10 7.5V10H12.5' stroke='%238E94A7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); - background-repeat: no-repeat; - background-position: top center; -} -.contractStatus_modal .single_status > div.current ~ div > span:before { - border-color: var(--inactive, #EDEFF5); -} -.contractStatus_modal .single_status > div.current ~ div > span:after { - border-top-color: var(--inactive, #EDEFF5); -} -.contractStatus_modal .single_status > div.current ~ div i { - /* - &.status_1 { - background: url("/assets/images/status/1_inactive.svg") no-repeat center; - } - - &.status_2 { - background: url("/assets/images/status/2_inactive.svg") no-repeat center; - } - - &.status_3 { - background: url("/assets/images/status/3_inactive.svg") no-repeat center; - } - - &.status_4 { - background: url("/assets/images/status/4_inactive.svg") no-repeat center; - } - - &.status_5 { - background: url("/assets/images/status/5_inactive.svg") no-repeat center; - } - - &.status_6 { - background: url("/assets/images/status/6_inactive.svg") no-repeat center; - } - - &.status_7 { - background: url("/assets/images/status/7_inactive.svg") no-repeat center; - } - */ +.contractStatus_modal .single_status > div.current > span:after { + border-top-color: #2F80ED; } .contractStatus_modal .single_status > div.current + div span:after { border-top-color: #2F80ED; } +.contractStatus_modal .single_status > div.done { + /* + &~div { + > span { + &:before { + border-color: #5FB158; + } + } + } + */ +} +.contractStatus_modal .single_status > div.done > span { + background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='10' cy='10' r='10' fill='%235FB158'/%3E%3Cpath d='M13.9277 7.5L8.92773 12.4998L6.42773 10' stroke='white' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); +} +.contractStatus_modal .single_status > div.done > span:before { + border-color: #5FB158; +} +.contractStatus_modal .single_status > div.done > span:after { + border-top-color: #5FB158; +} +.contractStatus_modal .single_status > div.done + div span:after { + border-top-color: #5FB158; +} .contractStatus_modal .single_status > div .toggle_status { margin: auto; gap: 0 8px; @@ -5607,16 +5672,72 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block .block_body .fines_ align-items: center; justify-content: flex-start; gap: 0 30px; - padding: 15px 0; + padding: 0px 0; + position: relative; + cursor: pointer; +} +.contractStatus_modal .single_status > div .status_body .status_header .background { + background-color: #edeff5; + position: absolute; + left: -65px; + top: 0px; + width: calc(100% + 65px); + height: 50px; + z-index: 1; +} +.contractStatus_modal .single_status > div .status_body .status_header i { + z-index: 2; +} +.contractStatus_modal .single_status > div .status_body .status_header p { + z-index: 2; +} +.contractStatus_modal .single_status > div .status_body .status_header .button_arrow { + width: 50px; + height: 50px; + display: flex; + justify-content: center; + align-items: center; + z-index: 2; + margin-left: -30px; +} +.contractStatus_modal .single_status > div .status_body .status_header .button_arrow .icon { + width: 18px; + height: 18px; +} +.contractStatus_modal .single_status > div .status_body .status_header .button_arrow .down { + background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.625 6.75L9 12.375L3.375 6.75' stroke='%238E94A7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); +} +.contractStatus_modal .single_status > div .status_body .status_header .button_arrow .up { + background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.375 11.25L9 5.625L14.625 11.25' stroke='%238E94A7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); } .contractStatus_modal .single_status > div .status_body .header { visibility: visible !important; } .contractStatus_modal .single_status > div .status_body .wrap { - margin-top: 10px; - padding-bottom: 40px; + margin-top: 25px; + padding-bottom: 25px; border-bottom: 1px solid var(--inactive, #EDEFF5); } +.contractStatus_modal .single_status > div .status_body .wrap.form { + display: flex; + flex-direction: column; +} +.contractStatus_modal .single_status > div .status_body .wrap.form .block { + display: flex; + flex-direction: row; +} +.contractStatus_modal .single_status > div .status_body .wrap.form .block .left { + width: 20%; +} +.contractStatus_modal .single_status > div .status_body .wrap.form .block .left p { + line-height: 14px; + margin: 15px 0px 15px 0px; +} +.contractStatus_modal .single_status > div .status_body .wrap.form .block .right { + width: 80%; + padding-left: 30px; + padding-bottom: 30px; +} .contractStatus_modal .single_status > div .status_body .wrap input[type="checkbox"] + label { width: 16px; padding: 0; @@ -5628,9 +5749,20 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block .block_body .fines_ .contractStatus_modal .single_status > div .status_body .wrap p { font-weight: 400; } -.contractStatus_modal .single_status > div .status_body .wrap .single_text { - max-width: 565px; - margin: auto; +.contractStatus_modal .single_status > div .status_body .wrap .single_text p { + display: flex; + color: #8E94A7; + margin-right: 20%; +} +.contractStatus_modal .single_status > div .status_body .wrap .single_text p:before { + content: ""; + display: block; + width: 40px; + min-height: 40px; + height: 40px; + min-width: 40px; + margin-right: 20px; + background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='40' height='40' rx='8' fill='%232F80ED' fill-opacity='0.1'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M20 29C24.9706 29 29 24.9706 29 20C29 15.0294 24.9706 11 20 11C15.0294 11 11 15.0294 11 20C11 24.9706 15.0294 29 20 29ZM21 14.5C21 13.9477 20.5523 13.5 20 13.5C19.4477 13.5 19 13.9477 19 14.5V19.75C19 20.4404 19.5596 21 20.25 21H23.5C24.0523 21 24.5 20.5523 24.5 20C24.5 19.4477 24.0523 19 23.5 19H21V14.5Z' fill='%232F80ED'/%3E%3C/svg%3E"); } .contractStatus_modal .single_status > div .status_body .wrap table { font-size: 12px; @@ -5639,19 +5771,12 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block .block_body .fines_ } .contractStatus_modal .single_status > div .status_body .wrap table td, .contractStatus_modal .single_status > div .status_body .wrap table th { - border: 1px solid rgba(0, 0, 0, 0.17); + border: solid 1px #EDEFF5; + border-collapse: collapse; padding: 13px; text-align: left; vertical-align: middle; } -.contractStatus_modal .single_status > div .status_body .wrap table td:not(:last-child), -.contractStatus_modal .single_status > div .status_body .wrap table th:not(:last-child) { - border-right: 0; -} -.contractStatus_modal .single_status > div .status_body .wrap table td:not(:first-child), -.contractStatus_modal .single_status > div .status_body .wrap table th:not(:first-child) { - border-left: 0; -} .contractStatus_modal .single_status > div .status_body .wrap table td:nth-child(3), .contractStatus_modal .single_status > div .status_body .wrap table td:nth-child(4) { white-space: nowrap; @@ -5673,6 +5798,7 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block .block_body .fines_ display: flex; align-items: center; padding: 10px; + padding-left: 0px; } .contractStatus_modal .single_status > div .status_body .wrap .message:before { content: ""; @@ -5778,6 +5904,26 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block .block_body .fines_ background-image: url("data:image/svg+xml,%3Csvg width='36' height='36' viewBox='0 0 36 36' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M28.1241 31.5H7.87305C7.57468 31.5 7.28853 31.3815 7.07755 31.1705C6.86657 30.9595 6.74805 30.6734 6.74805 30.375V5.625C6.74805 5.32663 6.86657 5.04048 7.07755 4.82951C7.28853 4.61853 7.57468 4.5 7.87305 4.5H21.3741L29.2491 12.375V30.375C29.2491 30.5227 29.22 30.669 29.1635 30.8055C29.107 30.942 29.0241 31.066 28.9196 31.1705C28.8152 31.275 28.6912 31.3578 28.5547 31.4144C28.4182 31.4709 28.2719 31.5 28.1241 31.5Z' stroke='%231C01A9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M21.375 4.5V12.375H29.2511' stroke='%231C01A9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M14.625 21.375H21.375' stroke='%231C01A9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M18 18V24.75' stroke='%231C01A9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); background-repeat: no-repeat; } +.contractStatus_modal .bottom_button_close { + display: flex; + flex-direction: row; + justify-content: flex-start; + align-items: center; + padding: 18px 54px 18px 54px; + margin-left: 82px; + width: fit-content; + gap: 12px; + cursor: pointer; +} +.contractStatus_modal .bottom_button_close span { + font-weight: 600; + color: #1C01A9; +} +.contractStatus_modal .bottom_button_close .icon { + width: 16px; + height: 16px; + background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 10L8 5L13 10' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); +} .all_contracts_modal .contractStatus_list .list_item .step { width: 50%; gap: 0 16px; @@ -5816,3 +5962,97 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block .block_body .fines_ .all_contracts_modal .contractStatus_list .list_item div:last-child p { color: var(--blue); } +.horizontal_dropzone_wrapper { + margin: 0px; + padding: 30px; + height: 100px; +} +.horizontal_dropzone_wrapper .horizontal_dropzone_inner { + display: flex; + width: 100%; + max-width: 80%; + gap: 20px; +} +.horizontal_dropzone_wrapper .horizontal_dropzone_inner p { + text-align: left; + margin: 0px; +} +.horizontal_dropzone_wrapper .horizontal_dropzone_inner label { + white-space: nowrap; +} +.horizontal_dropzone_files { + display: flex; + flex-direction: column; + grid-gap: 10px 0px; + margin-bottom: 30px; +} +.horizontal_dropzone_files .file { + display: flex; + flex-direction: row; + width: 40%; +} +.horizontal_dropzone_files .file .delete { + margin-left: 0px; + padding-right: 16px; + padding-top: 10px; + cursor: pointer; +} +.horizontal_dropzone_files .file .delete .icon { + width: 16px; + height: 16px; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14Z' fill='%23ED0A34' stroke='%23ED0A34' stroke-miterlimit='10'/%3E%3Cpath d='M10 6L6 10' stroke='white' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M10 10L6 6' stroke='white' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); +} +.horizontal_dropzone_files .file .doc_icon { + display: flex; + align-items: center; + justify-content: center; + width: 56px; + height: 56px; + min-width: 56px; + min-height: 56px; + position: relative; + background: url(/assets/images/icons/icon-file.svg) no-repeat left center; + background-size: contain; + padding: 0; + zoom: 0.65; +} +.horizontal_dropzone_files .file .doc_icon .extension { + font-weight: 600; + font-size: 12px; + color: #fff; +} +.horizontal_dropzone_files .file .title { + display: flex; + flex-direction: column; +} +.horizontal_dropzone_files .file .title span:nth-child(odd) { + font-weight: 600; + margin-left: 16px; +} +.horizontal_dropzone_files .file .title span:nth-child(even) { + font-weight: 300; + margin-left: 16px; +} +.horizontal_dropzone_files .file .description { + display: block; + font-weight: 400; + margin-top: 2px; + color: #8e94a7; +} +.deals_contracts { + display: flex; + flex-direction: column; +} +.deals_contracts label { + height: 16px !important; + min-height: 16px !important; +} +.deals_contracts label::before { + margin-top: 18px; +} +.deals_contracts .info { + margin-left: 72px; + display: flex; + flex-direction: row; + grid-gap: 10px 10px; +} diff --git a/css/main/style.less b/css/main/style.less index f5ace29..2d9a298 100644 --- a/css/main/style.less +++ b/css/main/style.less @@ -1834,8 +1834,6 @@ main { border-top: 1px solid #EDEFF5; } - - .block_header { padding: 15px 0; height: 70px; @@ -6163,7 +6161,7 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block { align-items: unset; justify-content: flex-start; gap: 0 30px; - padding: 2px 0; + padding: 0px 0; &:last-child { .status_body .wrap { @@ -6183,7 +6181,7 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block { font-weight: 700; white-space: nowrap; padding: 15px 0; - height: 80px; +// height: 80px; display: flex; align-items: center; box-sizing: border-box; @@ -6192,53 +6190,75 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block { i { display: block; - width: 50px; - height: 50px; + width: 40px; + height: 40px; &.status_1 { - background: url("/assets/images/status/1.svg") no-repeat center; + background: url("/assets/images/status/1_on.svg") no-repeat center; + &.inactive { + background: url("/assets/images/status/1_off.svg") no-repeat center; + } } &.status_2 { - background: url("/assets/images/status/2.svg") no-repeat center; - } + background: url("/assets/images/status/2_on.svg") no-repeat center; + &.inactive { + background: url("/assets/images/status/2_off.svg") no-repeat center; + } + } &.status_3 { - background: url("/assets/images/status/3.svg") no-repeat center; - } + background: url("/assets/images/status/3_on.svg") no-repeat center; + &.inactive { + background: url("/assets/images/status/3_off.svg") no-repeat center; + } + } &.status_4 { - background: url("/assets/images/status/4.svg") no-repeat center; - } + background: url("/assets/images/status/4_on.svg") no-repeat center; + &.inactive { + background: url("/assets/images/status/4_off.svg") no-repeat center; + } + } &.status_5 { - background: url("/assets/images/status/5.svg") no-repeat center; - } + background: url("/assets/images/status/5_on.svg") no-repeat center; + &.inactive { + background: url("/assets/images/status/5_off.svg") no-repeat center; + } + } &.status_6 { - background: url("/assets/images/status/6.svg") no-repeat center; - } + background: url("/assets/images/status/6_on.svg") no-repeat center; + &.inactive { + background: url("/assets/images/status/6_off.svg") no-repeat center; + } + } &.status_7 { - background: url("/assets/images/status/7.svg") no-repeat center; - } + background: url("/assets/images/status/7_on.svg") no-repeat center; + &.inactive { + background: url("/assets/images/status/7_off.svg") no-repeat center; + } + } } - >span { - display: block; - width: 20px; - min-width: 20px; - //height: 20px; - margin: 0; - //border-radius: 100%; - //background-color: #5FB158; - background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.92871 3.50024L4.92871 8.50002L2.42871 6.00024' stroke='white' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); - background-repeat: no-repeat; - background-position: top center; + > span { + display: block; + width: 20px; + min-width: 20px; + //height: 20px; + margin: 0; + //border-radius: 100%; + //background-color: #5FB158; + //background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.92871 3.50024L4.92871 8.50002L2.42871 6.00024' stroke='white' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); + background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='10' cy='10' r='10' fill='%23EDEFF5'/%3E%3Cpath d='M9.9986 14.2857C12.3655 14.2857 14.2843 12.3669 14.2843 10C14.2843 7.63307 12.3655 5.71429 9.9986 5.71429C7.63167 5.71429 5.71289 7.63307 5.71289 10C5.71289 12.3669 7.63167 14.2857 9.9986 14.2857Z' stroke='%238E94A7' stroke-miterlimit='10'/%3E%3Cpath d='M10 7.5V10H12.5' stroke='%238E94A7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); + background-repeat: no-repeat; + background-position: top center; position: relative; - z-index: 1; - top: 30px; + z-index: 2; + top: 15px; &:before { content: ""; @@ -6246,7 +6266,7 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block { position: absolute; width: 0px; height: auto; - border: 1px dashed #5FB158; + border: 1px dashed #EDEFF5; top: 20px; bottom: -20px; left: 0; @@ -6261,13 +6281,12 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block { height: 0; border-left: 3px solid transparent; border-right: 3px solid transparent; - border-top: 5px solid #5FB158; + border-top: 5px solid #EDEFF5; position: absolute; top: -5px; left: 0; right: 0; margin: auto; - } } @@ -6275,18 +6294,32 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block { span { &:after { + display: none; } } } - &:last-child { - span { - &:before { - bottom: 0; - } - } - } + &:last-child { + span { + &:before { + content: ""; + display: block; + position: absolute; + width: 0px; + height: auto; + border: 1px dashed #EDEFF5; + top: 20px; + bottom: -20px; + left: 0; + right: 0; + margin: auto; + z-index: -1; + + bottom: 0; + } + } + } &:not(:last-child) { //border-bottom: 1px solid var(--inactive, #EDEFF5); @@ -6305,77 +6338,111 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block { } } - &.current { - > span { - //background-color: #2F80ED; - //background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.00084 9.92868C8.17053 9.92868 9.92941 8.1698 9.92941 6.00011C9.92941 3.83041 8.17053 2.07153 6.00084 2.07153C3.83115 2.07153 2.07227 3.83041 2.07227 6.00011C2.07227 8.1698 3.83115 9.92868 6.00084 9.92868Z' stroke='white' stroke-miterlimit='10'/%3E%3Cpath d='M6 6.00007L7.76777 4.2323' stroke='white' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M4.92871 0.642944H7.07157' stroke='white' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); - background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='10' cy='10' r='10' fill='%232F80ED'/%3E%3Cpath d='M9.99888 13.9286C12.1686 13.9286 13.9275 12.1697 13.9275 9.99998C13.9275 7.83029 12.1686 6.07141 9.99888 6.07141C7.82919 6.07141 6.07031 7.83029 6.07031 9.99998C6.07031 12.1697 7.82919 13.9286 9.99888 13.9286Z' stroke='white' stroke-miterlimit='10'/%3E%3Cpath d='M10 10L11.7678 8.23224' stroke='white' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M8.92773 4.64282H11.0706' stroke='white' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); - background-repeat: no-repeat; - background-position: top center; + &.current { + > span { + //background-color: #2F80ED; + //background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.00084 9.92868C8.17053 9.92868 9.92941 8.1698 9.92941 6.00011C9.92941 3.83041 8.17053 2.07153 6.00084 2.07153C3.83115 2.07153 2.07227 3.83041 2.07227 6.00011C2.07227 8.1698 3.83115 9.92868 6.00084 9.92868Z' stroke='white' stroke-miterlimit='10'/%3E%3Cpath d='M6 6.00007L7.76777 4.2323' stroke='white' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M4.92871 0.642944H7.07157' stroke='white' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); + background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='10' cy='10' r='10' fill='%232F80ED'/%3E%3Cpath d='M9.99888 13.9286C12.1686 13.9286 13.9275 12.1697 13.9275 9.99998C13.9275 7.83029 12.1686 6.07141 9.99888 6.07141C7.82919 6.07141 6.07031 7.83029 6.07031 9.99998C6.07031 12.1697 7.82919 13.9286 9.99888 13.9286Z' stroke='white' stroke-miterlimit='10'/%3E%3Cpath d='M10 10L11.7678 8.23224' stroke='white' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M8.92773 4.64282H11.0706' stroke='white' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); + background-repeat: no-repeat; + background-position: top center; - &:before { - border-color: #2F80ED; + &:before { + border-color: #2F80ED; + } + + &:after { + border-top-color: #2F80ED; + } + } + + /* + &~div { + > span { + //background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.00056 10.2858C8.36749 10.2858 10.2863 8.367 10.2863 6.00007C10.2863 3.63313 8.36749 1.71436 6.00056 1.71436C3.63362 1.71436 1.71484 3.63313 1.71484 6.00007C1.71484 8.367 3.63362 10.2858 6.00056 10.2858Z' stroke='%238E94A7' stroke-miterlimit='10'/%3E%3Cpath d='M6 3.5V6H8.5' stroke='%238E94A7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); + background-repeat: no-repeat; + background-position: top center; + + &:before { + border-color: #2F80ED; + } + + &:after { + border-top-color: #2F80ED; + } + } + + i { + //&.status_1 { + // background: url("/assets/images/status/1_inactive.svg") no-repeat center; + //} + + //&.status_2 { + // background: url("/assets/images/status/2_inactive.svg") no-repeat center; + //} + + //&.status_3 { + // background: url("/assets/images/status/3_inactive.svg") no-repeat center; + //} + + //&.status_4 { + // background: url("/assets/images/status/4_inactive.svg") no-repeat center; + //} + + //&.status_5 { + // background: url("/assets/images/status/5_inactive.svg") no-repeat center; + //} + + //&.status_6 { + // background: url("/assets/images/status/6_inactive.svg") no-repeat center; + //} + + //&.status_7 { + // background: url("/assets/images/status/7_inactive.svg") no-repeat center; + //} + } + } + */ + + &+div { + span { + &:after { + border-top-color: #2F80ED; + } + } + } + } + + &.done { + > span { + background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='10' cy='10' r='10' fill='%235FB158'/%3E%3Cpath d='M13.9277 7.5L8.92773 12.4998L6.42773 10' stroke='white' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); + + &:before { + border-color: #5FB158; + } + + &:after { + border-top-color: #5FB158; + } + } + + /* + &~div { + > span { + &:before { + border-color: #5FB158; + } } } + */ - &~div { - > span { - //background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.00056 10.2858C8.36749 10.2858 10.2863 8.367 10.2863 6.00007C10.2863 3.63313 8.36749 1.71436 6.00056 1.71436C3.63362 1.71436 1.71484 3.63313 1.71484 6.00007C1.71484 8.367 3.63362 10.2858 6.00056 10.2858Z' stroke='%238E94A7' stroke-miterlimit='10'/%3E%3Cpath d='M6 3.5V6H8.5' stroke='%238E94A7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); - background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='10' cy='10' r='10' fill='%23EDEFF5'/%3E%3Cpath d='M9.9986 14.2857C12.3655 14.2857 14.2843 12.3669 14.2843 10C14.2843 7.63307 12.3655 5.71429 9.9986 5.71429C7.63167 5.71429 5.71289 7.63307 5.71289 10C5.71289 12.3669 7.63167 14.2857 9.9986 14.2857Z' stroke='%238E94A7' stroke-miterlimit='10'/%3E%3Cpath d='M10 7.5V10H12.5' stroke='%238E94A7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); - background-repeat: no-repeat; - background-position: top center; - //background-color: var(--inactive, #EDEFF5); - - &:before { - border-color: var(--inactive, #EDEFF5); - } - - &:after { - border-top-color: var(--inactive, #EDEFF5); - } - } - - i { - /* - &.status_1 { - background: url("/assets/images/status/1_inactive.svg") no-repeat center; - } - - &.status_2 { - background: url("/assets/images/status/2_inactive.svg") no-repeat center; - } - - &.status_3 { - background: url("/assets/images/status/3_inactive.svg") no-repeat center; - } - - &.status_4 { - background: url("/assets/images/status/4_inactive.svg") no-repeat center; - } - - &.status_5 { - background: url("/assets/images/status/5_inactive.svg") no-repeat center; - } - - &.status_6 { - background: url("/assets/images/status/6_inactive.svg") no-repeat center; - } - - &.status_7 { - background: url("/assets/images/status/7_inactive.svg") no-repeat center; - } - */ - } - } - - &+div { - span { - &:after { - border-top-color: #2F80ED; - } - } - } - } + &+div { + span { + &:after { + border-top-color: #5FB158; + } + } + } + } .toggle_status { margin: auto; @@ -6398,284 +6465,502 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block { align-items: center; justify-content: flex-start; gap: 0 30px; - padding: 15px 0; - } + padding: 0px 0; + position: relative; + cursor: pointer; + + .background { + background-color: rgb(237, 239, 245); + position: absolute; + left: -65px; + top: 0px; + width: calc(100% + 65px); + height: 50px; + z-index: 1; + } + + i { + z-index: 2; + } + + p { + z-index: 2; + } + + .button_arrow { + width: 50px; + height: 50px; + display: flex; + justify-content: center; + align-items: center; + z-index: 2; + margin-left: -30px; + + .icon { + width: 18px; + height: 18px; + } + + .down { + background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.625 6.75L9 12.375L3.375 6.75' stroke='%238E94A7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); + } + + .up { + background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.375 11.25L9 5.625L14.625 11.25' stroke='%238E94A7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); + } + } + } .header { visibility: visible !important; } - .wrap { - margin-top: 10px; - padding-bottom: 40px; - border-bottom: 1px solid var(--inactive, #EDEFF5); + .wrap { + margin-top: 25px; + padding-bottom: 25px; + border-bottom: 1px solid var(--inactive, #EDEFF5); - input[type="checkbox"]+label { - width: 16px; - padding: 0; - height: 16px; + &.form { + display: flex; + flex-direction: column; - &:before { - margin-right: 0; - } - } + .block { + display: flex; + flex-direction: row; - p { - font-weight: 400; + .left { + width: 20%; - } + p { + line-height: 14px; + margin: 15px 0px 15px 0px; + } + } - .single_text { - max-width: 565px; - margin: auto; - } + .right { + width: 80%; + padding-left: 30px; + padding-bottom: 30px; + } + } + } - table { - font-size: 12px; - line-height: 120%; - border-collapse: collapse; + input[type="checkbox"]+label { + width: 16px; + padding: 0; + height: 16px; - td, - th { - border: 1px solid rgba(0, 0, 0, 17%); - padding: 13px; - text-align: left; - vertical-align: middle; + &:before { + margin-right: 0; + } + } - &:not(:last-child) { - border-right: 0; - } + p { + font-weight: 400; + } - &:not(:first-child) { - border-left: 0; - } + .single_text { + //max-width: 565px; + //margin: auto; - } + p { + display: flex; + color: #8E94A7; + margin-right: 20%; - td { + &:before { + content: ""; + display: block; + width: 40px; + min-height: 40px; + height: 40px; + min-width: 40px; + margin-right: 20px; - &:nth-child(3), - &:nth-child(4) { - white-space: nowrap; - } - } + background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='40' height='40' rx='8' fill='%232F80ED' fill-opacity='0.1'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M20 29C24.9706 29 29 24.9706 29 20C29 15.0294 24.9706 11 20 11C15.0294 11 11 15.0294 11 20C11 24.9706 15.0294 29 20 29ZM21 14.5C21 13.9477 20.5523 13.5 20 13.5C19.4477 13.5 19 13.9477 19 14.5V19.75C19 20.4404 19.5596 21 20.25 21H23.5C24.0523 21 24.5 20.5523 24.5 20C24.5 19.4477 24.0523 19 23.5 19H21V14.5Z' fill='%232F80ED'/%3E%3C/svg%3E"); + } + } + } - .row { - margin-bottom: 0; - } + table { + font-size: 12px; + line-height: 120%; + border-collapse: collapse; - .i-pdf { - background-size: auto 28px; - padding-left: 35px; - margin-right: 0; - min-height: 28px; - font-weight: 700; + td, + th { + //border: 1px solid rgba(0, 0, 0, 17%); + border: solid 1px #EDEFF5; + border-collapse: collapse; + padding: 13px; + text-align: left; + vertical-align: middle; - span { - font-weight: 400; - } - } - } + &:not(:last-child) { + // border-right: 0; + } - .message { - display: flex; - align-items: center; - padding: 10px; + &:not(:first-child) { + // border-left: 0; + } + } - &:before { - content: ""; - display: block; - width: 24px; - min-height: 24px; - height: 24px; - min-width: 24px; - margin-right: 8px; - } + td { + &:nth-child(3), + &:nth-child(4) { + white-space: nowrap; + } + } - &.ok::before { - background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z' stroke='%235FB158' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M16.125 9.75L10.625 15L7.875 12.375' stroke='%235FB158' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); - background-repeat: no-repeat; - background-position: center; - } + .row { + margin-bottom: 0; + } - &.alert::before { - background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 9V13.5' stroke='%23ED0A34' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M10.7015 3.74857L2.45374 17.9978C2.32177 18.2258 2.25217 18.4846 2.25195 18.748C2.25174 19.0115 2.32091 19.2703 2.4525 19.4986C2.5841 19.7268 2.77348 19.9163 3.0016 20.0481C3.22971 20.1799 3.48851 20.2493 3.75196 20.2493H20.2475C20.5109 20.2493 20.7697 20.1799 20.9979 20.0481C21.226 19.9163 21.4154 19.7268 21.547 19.4986C21.6786 19.2703 21.7477 19.0115 21.7475 18.748C21.7473 18.4846 21.6777 18.2258 21.5457 17.9978L13.2979 3.74857C13.1662 3.52093 12.9769 3.33193 12.749 3.20055C12.5212 3.06916 12.2628 3 11.9997 3C11.7367 3 11.4783 3.06916 11.2504 3.20055C11.0226 3.33193 10.8333 3.52093 10.7015 3.74857V3.74857Z' stroke='%23ED0A34' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12 18C12.6213 18 13.125 17.4963 13.125 16.875C13.125 16.2537 12.6213 15.75 12 15.75C11.3787 15.75 10.875 16.2537 10.875 16.875C10.875 17.4963 11.3787 18 12 18Z' fill='%23ED0A34'/%3E%3C/svg%3E%0A"); - background-repeat: no-repeat; - background-position: center; - } + .i-pdf { + background-size: auto 28px; + padding-left: 35px; + margin-right: 0; + min-height: 28px; + font-weight: 700; - &.wait:before { - background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z' stroke='%238E94A7' stroke-width='2' stroke-miterlimit='10'/%3E%3Cpath d='M12 6.75V12H17.25' stroke='%238E94A7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); - background-repeat: no-repeat; - background-position: center; - } + span { + font-weight: 400; + } + } + } - .button { - margin-left: 30px; - } + .message { + display: flex; + align-items: center; + padding: 10px; + padding-left: 0px; - &.documents { - display: flex; - justify-content: space-between; - gap: 0 28px; - padding: 0; + &:before { + content: ""; + display: block; + width: 24px; + min-height: 24px; + height: 24px; + min-width: 24px; + margin-right: 8px; + } - &::before { - display: none; - } + &.ok::before { + background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z' stroke='%235FB158' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M16.125 9.75L10.625 15L7.875 12.375' stroke='%235FB158' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); + background-repeat: no-repeat; + background-position: center; + } - .doc_list { - width: 350px; - min-width: 350px; - border: 1px solid #8A8A8A; - background: rgba(118, 118, 118, 0.10); - padding: 15px 25px; + &.alert::before { + background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 9V13.5' stroke='%23ED0A34' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M10.7015 3.74857L2.45374 17.9978C2.32177 18.2258 2.25217 18.4846 2.25195 18.748C2.25174 19.0115 2.32091 19.2703 2.4525 19.4986C2.5841 19.7268 2.77348 19.9163 3.0016 20.0481C3.22971 20.1799 3.48851 20.2493 3.75196 20.2493H20.2475C20.5109 20.2493 20.7697 20.1799 20.9979 20.0481C21.226 19.9163 21.4154 19.7268 21.547 19.4986C21.6786 19.2703 21.7477 19.0115 21.7475 18.748C21.7473 18.4846 21.6777 18.2258 21.5457 17.9978L13.2979 3.74857C13.1662 3.52093 12.9769 3.33193 12.749 3.20055C12.5212 3.06916 12.2628 3 11.9997 3C11.7367 3 11.4783 3.06916 11.2504 3.20055C11.0226 3.33193 10.8333 3.52093 10.7015 3.74857V3.74857Z' stroke='%23ED0A34' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12 18C12.6213 18 13.125 17.4963 13.125 16.875C13.125 16.2537 12.6213 15.75 12 15.75C11.3787 15.75 10.875 16.2537 10.875 16.875C10.875 17.4963 11.3787 18 12 18Z' fill='%23ED0A34'/%3E%3C/svg%3E%0A"); + background-repeat: no-repeat; + background-position: center; + } - p { - max-width: 100%; - margin-right: 0; - } + &.wait:before { + background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z' stroke='%238E94A7' stroke-width='2' stroke-miterlimit='10'/%3E%3Cpath d='M12 6.75V12H17.25' stroke='%238E94A7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); + background-repeat: no-repeat; + background-position: center; + } - .row:last-child { - margin-bottom: 0; + .button { + margin-left: 30px; + } - p { - margin-bottom: 0; - } - } + &.documents { + display: flex; + justify-content: space-between; + gap: 0 28px; + padding: 0; + &::before { + display: none; + } - } + .doc_list { + width: 350px; + min-width: 350px; + border: 1px solid #8A8A8A; + background: rgba(118, 118, 118, 0.10); + padding: 15px 25px; - .doc_list + p { - background: rgba(131, 3, 84, 0.10); - padding: 15px 25px; - } - } - } + p { + max-width: 100%; + margin-right: 0; + } - .block-column { - margin-bottom: 60px; - } + .row:last-child { + margin-bottom: 0; - .dosc_list { - a { - text-decoration: none; - } - } + p { + margin-bottom: 0; + } + } + } - .acts_list-checkbox { - label { - width: auto !important; - min-height: 32px; - padding-left: 50px; + .doc_list + p { + background: rgba(131, 3, 84, 0.10); + padding: 15px 25px; + } + } + } - &::before { - margin-right: 56px !important; - } - } - } + .block-column { + margin-bottom: 60px; + } - .block_footer_btn { - display: flex; - justify-content: flex-end; - gap: 0 20px; - } + .dosc_list { + a { + text-decoration: none; + } + } - .flex-start { - justify-content: flex-start; - } + .acts_list-checkbox { + label { + width: auto !important; + min-height: 32px; + padding-left: 50px; - .block-column { - &:last-child { - margin-bottom: 0; - } - } + &::before { + margin-right: 56px !important; + } + } + } - .attach_file { - label { - height: 52px; - border: 1px dashed var(--brand-blue, #1C01A9); - background: rgba(28, 1, 169, 0.10); - width: 350px; - margin: 25px 0; - color: var(--brand-blue, #1C01A9); - text-align: center; - display: flex; - align-items: center; - justify-content: center; - gap: 0 11px; + .block_footer_btn { + display: flex; + justify-content: flex-end; + gap: 0 20px; + } - &:before { - content: ""; - display: block; - width: 36px; - height: 36px; - min-width: 36px; - background-image: url("data:image/svg+xml,%3Csvg width='36' height='36' viewBox='0 0 36 36' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M28.1241 31.5H7.87305C7.57468 31.5 7.28853 31.3815 7.07755 31.1705C6.86657 30.9595 6.74805 30.6734 6.74805 30.375V5.625C6.74805 5.32663 6.86657 5.04048 7.07755 4.82951C7.28853 4.61853 7.57468 4.5 7.87305 4.5H21.3741L29.2491 12.375V30.375C29.2491 30.5227 29.22 30.669 29.1635 30.8055C29.107 30.942 29.0241 31.066 28.9196 31.1705C28.8152 31.275 28.6912 31.3578 28.5547 31.4144C28.4182 31.4709 28.2719 31.5 28.1241 31.5Z' stroke='%231C01A9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M21.375 4.5V12.375H29.2511' stroke='%231C01A9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M14.625 21.375H21.375' stroke='%231C01A9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M18 18V24.75' stroke='%231C01A9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); - background-repeat: no-repeat; - } - } - } - } - } - } - } + .flex-start { + justify-content: flex-start; + } + + .block-column { + &:last-child { + margin-bottom: 0; + } + } + + .attach_file { + label { + height: 52px; + border: 1px dashed var(--brand-blue, #1C01A9); + background: rgba(28, 1, 169, 0.10); + width: 350px; + margin: 25px 0; + color: var(--brand-blue, #1C01A9); + text-align: center; + display: flex; + align-items: center; + justify-content: center; + gap: 0 11px; + + &:before { + content: ""; + display: block; + width: 36px; + height: 36px; + min-width: 36px; + background-image: url("data:image/svg+xml,%3Csvg width='36' height='36' viewBox='0 0 36 36' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M28.1241 31.5H7.87305C7.57468 31.5 7.28853 31.3815 7.07755 31.1705C6.86657 30.9595 6.74805 30.6734 6.74805 30.375V5.625C6.74805 5.32663 6.86657 5.04048 7.07755 4.82951C7.28853 4.61853 7.57468 4.5 7.87305 4.5H21.3741L29.2491 12.375V30.375C29.2491 30.5227 29.22 30.669 29.1635 30.8055C29.107 30.942 29.0241 31.066 28.9196 31.1705C28.8152 31.275 28.6912 31.3578 28.5547 31.4144C28.4182 31.4709 28.2719 31.5 28.1241 31.5Z' stroke='%231C01A9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M21.375 4.5V12.375H29.2511' stroke='%231C01A9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M14.625 21.375H21.375' stroke='%231C01A9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M18 18V24.75' stroke='%231C01A9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); + background-repeat: no-repeat; + } + } + } + } + } + } + } + + .bottom_button_close { + display: flex; + flex-direction: row; + justify-content: flex-start; + align-items: center; + padding: 18px 54px 18px 54px; + margin-left: 82px; + width: fit-content; + gap: 12px; + cursor: pointer; + + span { + font-weight: 600; + color: #1C01A9; + } + + .icon { + width: 16px; + height: 16px; + background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 10L8 5L13 10' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); + } + } } .all_contracts_modal { - .contractStatus_list { - .list_item { - .step { - width: 50%; - gap: 0 16px; + .contractStatus_list { + .list_item { + .step { + width: 50%; + gap: 0 16px; - p { - font-weight: 400; - color: var(--text_not_active); - } + p { + font-weight: 400; + color: var(--text_not_active); + } - &:before { - content: ""; - display: block; - position: absolute; - right: 0; - top: 0; - bottom: 0; - margin: auto; - width: 0; - height: 0; - border-top: 6px solid transparent; - border-left: 8px solid #d1d4db; - border-bottom: 6px solid transparent; - background: #fff; - } + &:before { + content: ""; + display: block; + position: absolute; + right: 0; + top: 0; + bottom: 0; + margin: auto; + width: 0; + height: 0; + border-top: 6px solid transparent; + border-left: 8px solid #d1d4db; + border-bottom: 6px solid transparent; + background: #fff; + } - &:after { - content: ""; - display: block; - width: 100%; - height: 18px; - background: url("/assets/images/status/line.jpg") repeat-x left center; - background-size: auto 13px; - margin-left: 0; - } + &:after { + content: ""; + display: block; + width: 100%; + height: 18px; + background: url("/assets/images/status/line.jpg") repeat-x left center; + background-size: auto 13px; + margin-left: 0; + } - &.active { - p { - color: #18191F; - } - } - } + &.active { + p { + color: #18191F; + } + } + } - div { - &:last-child { - p { - color: var(--blue); - } - } - } - } - } + div { + &:last-child { + p { + color: var(--blue); + } + } + } + } + } +} + +.horizontal_dropzone_wrapper { + margin: 0px; + padding: 30px; + height: 100px; + + .horizontal_dropzone_inner { + display: flex; + width: 100%; + max-width: 80%; + gap: 20px; + + p { + text-align: left; + margin: 0px; + } + + label { + white-space: nowrap; + } + } +} + +.horizontal_dropzone_files { + display: flex; + flex-direction: column; + grid-gap: 10px 0px; + margin-bottom: 30px; + + .file { + display: flex; + flex-direction: row; + width: 40%; + + .delete { + margin-left: 0px; + padding-right: 16px; + padding-top: 10px; + cursor: pointer; + + .icon { + width: 16px; + height: 16px; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14Z' fill='%23ED0A34' stroke='%23ED0A34' stroke-miterlimit='10'/%3E%3Cpath d='M10 6L6 10' stroke='white' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M10 10L6 6' stroke='white' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); + } + } + + .doc_icon { + display: flex; + align-items: center; + justify-content: center; + width: 56px; + height: 56px; + min-width: 56px; + min-height: 56px; + position: relative; + background: url(/assets/images/icons/icon-file.svg) no-repeat left center; + background-size: contain; + padding: 0; + zoom: 0.65; + + .extension { + font-weight: 600; + font-size: 12px; + color: #fff; + } + } + + .title { + display: flex; + flex-direction: column; + + span:nth-child(odd) { + font-weight: 600; + margin-left: 16px; + } + span:nth-child(even) { + font-weight: 300; + margin-left: 16px; + } + } + + .description { + display: block; + font-weight: 400; + margin-top: 2px; + color: #8e94a7; + } + } +} + +.deals_contracts { + display: flex; + flex-direction: column; + + label { + height: 16px !important; + min-height: 16px !important; + + &::before { + margin-top: 18px; + } + } + + .info { + margin-left: 72px; + display: flex; + flex-direction: row; + grid-gap: 10px 10px; + } } \ No newline at end of file diff --git a/css/var.css b/css/var.css index 14f353c..55985c2 100644 --- a/css/var.css +++ b/css/var.css @@ -507,6 +507,9 @@ div { background-position: 0 5px; } } +.i-doc.blue { + background-image: url("data:image/svg+xml,%3Csvg width='26' height='28' viewBox='0 0 26 28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 3.5C2 1.84315 3.34315 0.5 5 0.5H18.3701L20.7774 4L23.1848 7.06354V24.5C23.1848 26.1569 21.8417 27.5 20.1848 27.5H5C3.34314 27.5 2 26.1569 2 24.5V3.5Z' fill='%231C01A9'/%3E%3Cpath opacity='0.4' d='M23.1858 11.5V7L19.334 6.5L23.1858 11.5Z' fill='%230C0C0C'/%3E%3Cline y1='-0.5' x2='11.5553' y2='-0.5' transform='matrix(1 -9.89866e-05 0.000132759 1 6.81445 7.50098)' stroke='%23F0F0F0'/%3E%3Cline y1='-0.5' x2='11.5553' y2='-0.5' transform='matrix(1 -9.89866e-05 0.000132759 1 6.81445 12.501)' stroke='%23F0F0F0'/%3E%3Cline y1='-0.5' x2='11.5553' y2='-0.5' transform='matrix(1 -9.89866e-05 0.000132759 1 6.81445 17.501)' stroke='%23F0F0F0'/%3E%3Cline y1='-0.5' x2='11.5553' y2='-0.5' transform='matrix(1 -9.89866e-05 0.000132759 1 6.81445 22.501)' stroke='%23F0F0F0'/%3E%3Cpath d='M23.1858 7H19.3711C18.8188 7 18.3711 6.55228 18.3711 6V3.5V0.5L23.1858 7Z' fill='%232F80ED'/%3E%3C/svg%3E"); +} .success { color: var(--green); } diff --git a/css/var.less b/css/var.less index cb5ef5f..b16f0e9 100644 --- a/css/var.less +++ b/css/var.less @@ -524,20 +524,24 @@ div { } .i-doc { - padding-left: 80px; - background: url("/assets/images/icons/icon-doc.svg") no-repeat left center; - background-size: 56px; + padding-left: 80px; + background: url("/assets/images/icons/icon-doc.svg") no-repeat left center; + background-size: 56px; - @media all and (max-width: 1600px) and (min-width: 1280px) { - padding-left: 56px; - background-size: 42px; - } + @media all and (max-width: 1600px) and (min-width: 1280px) { + padding-left: 56px; + background-size: 42px; + } - @media all and (max-width: 960px) { - padding-left: 55px; - background-size: 32px; - background-position: 0 5px; - } + @media all and (max-width: 960px) { + padding-left: 55px; + background-size: 32px; + background-position: 0 5px; + } + + &.blue { + background-image: url("data:image/svg+xml,%3Csvg width='26' height='28' viewBox='0 0 26 28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 3.5C2 1.84315 3.34315 0.5 5 0.5H18.3701L20.7774 4L23.1848 7.06354V24.5C23.1848 26.1569 21.8417 27.5 20.1848 27.5H5C3.34314 27.5 2 26.1569 2 24.5V3.5Z' fill='%231C01A9'/%3E%3Cpath opacity='0.4' d='M23.1858 11.5V7L19.334 6.5L23.1858 11.5Z' fill='%230C0C0C'/%3E%3Cline y1='-0.5' x2='11.5553' y2='-0.5' transform='matrix(1 -9.89866e-05 0.000132759 1 6.81445 7.50098)' stroke='%23F0F0F0'/%3E%3Cline y1='-0.5' x2='11.5553' y2='-0.5' transform='matrix(1 -9.89866e-05 0.000132759 1 6.81445 12.501)' stroke='%23F0F0F0'/%3E%3Cline y1='-0.5' x2='11.5553' y2='-0.5' transform='matrix(1 -9.89866e-05 0.000132759 1 6.81445 17.501)' stroke='%23F0F0F0'/%3E%3Cline y1='-0.5' x2='11.5553' y2='-0.5' transform='matrix(1 -9.89866e-05 0.000132759 1 6.81445 22.501)' stroke='%23F0F0F0'/%3E%3Cpath d='M23.1858 7H19.3711C18.8188 7 18.3711 6.55228 18.3711 6V3.5V0.5L23.1858 7Z' fill='%232F80ED'/%3E%3C/svg%3E"); + } } .success { diff --git a/pages/api/deals/contracts.js b/pages/api/deals/contracts.js index 810b215..8aae8fd 100644 --- a/pages/api/deals/contracts.js +++ b/pages/api/deals/contracts.js @@ -1,4 +1,17 @@ /* 2.7.6 - Метод получения списка договоров со статусами по Лизинговой сделке в CRM GET /lk/ConsiderationOpportunity/contract -*/ \ No newline at end of file +*/ + +import CRMRequestGet from '../../../lib/CRMRequestGet'; + +export default async function handler(req, res) +{ + console.log("API", "DEALS", "contracts"); + console.log(req.body); + console.log("-".repeat(50)); + + const { deal_id } = req.body; + + await CRMRequestGet(req, res, `${ process.env.CRM_API_HOST }/lk/ConsiderationOpportunity/contract`, { ...{ opp_number: deal_id } }); +} \ No newline at end of file diff --git a/pages/api/deals/documents.js b/pages/api/deals/documents.js index 2230653..2963777 100644 --- a/pages/api/deals/documents.js +++ b/pages/api/deals/documents.js @@ -1,4 +1,17 @@ /* 2.7.4 - Метод получения списка документов для рассмотрения Лизинговой сделке в CRM GET /lk/ConsiderationOpportunity/document -*/ \ No newline at end of file +*/ + +import CRMRequestGet from '../../../lib/CRMRequestGet'; + +export default async function handler(req, res) +{ + console.log("API", "DEALS", "documents"); + console.log(req.body); + console.log("-".repeat(50)); + + const { deal_id } = req.body; + + await CRMRequestGet(req, res, `${ process.env.CRM_API_HOST }/lk/ConsiderationOpportunity/document`, { ...{ opp_number: deal_id } }); +} \ No newline at end of file diff --git a/pages/api/deals/index.js b/pages/api/deals/index.js index 0761e01..7594011 100644 --- a/pages/api/deals/index.js +++ b/pages/api/deals/index.js @@ -35,7 +35,7 @@ export default async function handler(req, res) console.log("client_jwt_decoded", client_jwt_decoded); console.log("crm_jwt", crm_jwt); - const url = `${ process.env.CRM_API_HOST }/lk/ConsiderationOpportunity`; + const url = `${ process.env.CRM_API_HOST }/lk/ConsiderationOpportunity/`; console.log({ url }); try diff --git a/pages/api/deals/offers.js b/pages/api/deals/offers.js index 9b8a6c7..2b40970 100644 --- a/pages/api/deals/offers.js +++ b/pages/api/deals/offers.js @@ -1,4 +1,17 @@ /* 2.7.2 - Метод получения списка Предложений по Лизинговой сделке в CRM GET /lk/ConsiderationOpportunity/quote -*/ \ No newline at end of file +*/ + +import CRMRequestGet from '../../../lib/CRMRequestGet'; + +export default async function handler(req, res) +{ + console.log("API", "DEALS", "offers"); + console.log(req.body); + console.log("-".repeat(50)); + + const { deal_id } = req.body; + + await CRMRequestGet(req, res, `${ process.env.CRM_API_HOST }/lk/ConsiderationOpportunity/quote`, { ...{ opp_number: deal_id } }); +} \ No newline at end of file diff --git a/pages/index.js b/pages/index.js index 3d9ab9f..65abb1f 100644 --- a/pages/index.js +++ b/pages/index.js @@ -277,269 +277,267 @@ class IndexPage extends React.Component console.log("contracts", contracts) console.log("company", company) - return ( - - - ЛК Эволюция автолизинга - - -
- -
-
-

Личный кабинет

-
-
- -
-
- - - { contracts !== null && contracts.length > 0 && company.questionnaire_status === "need_to_fill" && ( -
- - - -

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

- -
- )} - - {/*} - - {*/} - - { contracts !== null && contracts.length > 0 && ( - <> -
-

Список договоров

+ return ( + + + ЛК Эволюция автолизинга + + +
+ +
+
+

Личный кабинет

-
-
{ - event.preventDefault() - }} - > -
- { - this._handle_onChange_search(event.target.value) - }} - /> -
-
- {/* - this.setState({ date_from_type: "date" }) } onBlur={ () => { this.setState({ date_from_type: "text" }) } } onChange={ (date) => { - this._handle_onChange_date_from(date); - } }/> - - */} - this.setState({ date_from: date })} - /> -
-
- {/* this.setState({ date_from_type: "date" }) } onBlur={ () => { this.setState({ date_from_type: "text" }) } } onChange={ (date) => { - this._handle_onChange_date_to(date); - } }/> - */} - this.setState({ date_to: date })} - /> -
-
+
+ + + + { contracts !== null && contracts.length > 0 && company.questionnaire_status === "need_to_fill" && ( +
+ + + +

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

+ +
+ ) } + + {/*}{*/} + + {/*}{*/} + + { contracts !== null && contracts.length > 0 && ( + <> +
+

Список договоров

+
+
+ { + event.preventDefault() + }} > - Поиск - - -
- - )} - { loading ? ( -
- -
- ) : ( - - {contracts === null || contracts.length === 0 ? ( - this._renderQuestionnaireStatus() - ) : ( -
-
-
Номер договора
-
Дата договора
-
Автомобиль
-
Гос.номер / VIN
-
Статус
-
Следующий платеж
-
Дополнительные услуги
-
- { contracts !== undefined && contracts !== null && ( - <> - {contracts.length > 0 ? ( contracts.map((contract, index) => ( - -
- -
{ moment(contract.date).format("DD.MM.YYYY") }
-
- { contract.car?.brand?.name } { contract.car?.model?.name } -
-
- { contract.car?.reg_number !== null ? contract.car?.reg_number : "Без рег. номера" } - { contract.car?.vin_number } -
-
-

{contract.status}

- { contract.debt_leasing !== undefined && contract.debt_leasing !== null && parseFloat(contract.debt_leasing) > 0 && ( -

- Задолжность: - {numeral(contract.debt_leasing).format(" ., ")} ₽ -

- ) } - { contract.debt_penalty_fee !== undefined && contract.debt_penalty_fee !== null && parseFloat(contract.debt_penalty_fee) > 0 && ( -

- Пени: - {numeral(contract.debt_penalty_fee).format(" ., ")} ₽ -

- ) } -
-
- { contract.current_payment_date !== null ? ( - <> - {moment(contract.current_payment_date).format("DD.MM.YYYY")} - - {numeral(contract.current_payment_amount).format(" ., ")} ₽ - - - ) : ( "-" ) } -
-
-
- { contract.telematics_exists && ( - { - event.stopPropagation() - event.preventDefault() - this._handle_onService(`/contract/${contract.number}/services#telematic`) - }} - /> - ) } - { contract.rat_exists && ( - { - event.stopPropagation() - event.preventDefault() - this._handle_onService(`/contract/${contract.number}/services#ratcard`) - }} - /> - ) } - { contract.gibddreg_exists && ( - { - event.stopPropagation() - event.preventDefault() - this._handle_onService(`/contract/${contract.number}/services#registration`) - }} - /> - ) } - { contract.fuelcard_exists && ( - { - event.stopPropagation() - event.preventDefault() - this._handle_onService(`/contract/${contract.number}/services#fuelcards`) - }} - /> - ) } - {contract.kasko_exists && ( - { - event.stopPropagation() - event.preventDefault() - this._handle_onService(`/contract/${contract.number}/services#insurance`) - }} - /> - ) } - { contract.osago_exists && ( - { - event.stopPropagation() - event.preventDefault() - this._handle_onService(`/contract/${contract.number}/services#insurance`) - }} - /> - ) } - { contract.nsib_exists && ( - { - event.stopPropagation() - event.preventDefault() - this._handle_onService(`/contract/${contract.number}/services#insurance`) - }} - /> - ) } - { contract.fingap_exists && ( - { - event.stopPropagation() - event.preventDefault() - this._handle_onService(`/contract/${contract.number}/services#insurance`) - }} - /> - ) } -
-
+
+ { + this._handle_onChange_search(event.target.value) + }} + />
- - )) +
+ {/* + this.setState({ date_from_type: "date" }) } onBlur={ () => { this.setState({ date_from_type: "text" }) } } onChange={ (date) => { + this._handle_onChange_date_from(date); + } }/> + + */} + this.setState({ date_from: date })} + /> +
+
+ {/* this.setState({ date_from_type: "date" }) } onBlur={ () => { this.setState({ date_from_type: "text" }) } } onChange={ (date) => { + this._handle_onChange_date_to(date); + } }/> + */} + this.setState({ date_to: date })} + /> +
+ + +
+ + ) } + { loading ? ( +
+ +
+ ) : ( + + { contracts === null || contracts.length === 0 ? ( + this._renderQuestionnaireStatus() ) : ( -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
Номер договора
+
Дата договора
+
Автомобиль
+
Гос.номер / VIN
+
Статус
+
Следующий платеж
+
Дополнительные услуги
+
+ { contracts !== undefined && contracts !== null && ( + <> + {contracts.length > 0 ? ( contracts.map((contract, index) => ( + +
+ +
{ moment(contract.date).format("DD.MM.YYYY") }
+
+ { contract.car?.brand?.name } { contract.car?.model?.name } +
+
+ { contract.car?.reg_number !== null ? contract.car?.reg_number : "Без рег. номера" } + { contract.car?.vin_number } +
+
+

{contract.status}

+ { contract.debt_leasing !== undefined && contract.debt_leasing !== null && parseFloat(contract.debt_leasing) > 0 && ( +

+ Задолжность: + {numeral(contract.debt_leasing).format(" ., ")} ₽ +

+ ) } + { contract.debt_penalty_fee !== undefined && contract.debt_penalty_fee !== null && parseFloat(contract.debt_penalty_fee) > 0 && ( +

+ Пени: + {numeral(contract.debt_penalty_fee).format(" ., ")} ₽ +

+ ) } +
+
+ { contract.current_payment_date !== null ? ( + <> + {moment(contract.current_payment_date).format("DD.MM.YYYY")} + + {numeral(contract.current_payment_amount).format(" ., ")} ₽ + + + ) : ( "-" ) } +
+
+
+ { contract.telematics_exists && ( + { + event.stopPropagation() + event.preventDefault() + this._handle_onService(`/contract/${contract.number}/services#telematic`) + }} + /> + ) } + { contract.rat_exists && ( + { + event.stopPropagation() + event.preventDefault() + this._handle_onService(`/contract/${contract.number}/services#ratcard`) + }} + /> + ) } + { contract.gibddreg_exists && ( + { + event.stopPropagation() + event.preventDefault() + this._handle_onService(`/contract/${contract.number}/services#registration`) + }} + /> + ) } + { contract.fuelcard_exists && ( + { + event.stopPropagation() + event.preventDefault() + this._handle_onService(`/contract/${contract.number}/services#fuelcards`) + }} + /> + ) } + {contract.kasko_exists && ( + { + event.stopPropagation() + event.preventDefault() + this._handle_onService(`/contract/${contract.number}/services#insurance`) + }} + /> + ) } + { contract.osago_exists && ( + { + event.stopPropagation() + event.preventDefault() + this._handle_onService(`/contract/${contract.number}/services#insurance`) + }} + /> + ) } + { contract.nsib_exists && ( + { + event.stopPropagation() + event.preventDefault() + this._handle_onService(`/contract/${contract.number}/services#insurance`) + }} + /> + ) } + { contract.fingap_exists && ( + { + event.stopPropagation() + event.preventDefault() + this._handle_onService(`/contract/${contract.number}/services#insurance`) + }} + /> + ) } +
+
+
+ + )) + ) : ( +
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+ )} + + )}
)} - - )} -
- )} -
- )} - {!all && ( - - )} + + ) } + { !all && ( + + ) }
@@ -557,29 +555,37 @@ function mapStateToProps(state, ownProps) } } -export const getServerSideProps = reduxWrapper.getServerSideProps((store) => async ({ req, res, query }) => { - let props = {} +export const getServerSideProps = reduxWrapper.getServerSideProps((store) => async ({ req, res, query }) => +{ + let props = {} - if (req.headers.cookie !== undefined) { - const cookies = cookie.parse(req.headers?.cookie ? req.headers?.cookie : "") + if (req.headers.cookie !== undefined) + { + const cookies = cookie.parse(req.headers?.cookie ? req.headers?.cookie : "") - if (cookies.jwt === undefined || cookies.jwt === null) { - res.statusCode = 302 - res.setHeader("Location", `/login`) - } else { - //const tokenValid = await checkToken(cookies.jwt); - const tokenValid = true - if (!tokenValid) { - res.statusCode = 302 - res.setHeader("Location", `/login`) - } - } - } else { - res.statusCode = 302 - res.setHeader("Location", `/login`) - } + if (cookies.jwt === undefined || cookies.jwt === null) + { + res.statusCode = 302 + res.setHeader("Location", `/login`) + } + else + { + //const tokenValid = await checkToken(cookies.jwt); + const tokenValid = true + if (!tokenValid) + { + res.statusCode = 302 + res.setHeader("Location", `/login`) + } + } + } + else + { + res.statusCode = 302 + res.setHeader("Location", `/login`) + } - return { props: props } + return { props: props } }) -export default withRouter(connect(mapStateToProps)(IndexPage)) +export default withRouter(connect(mapStateToProps)(IndexPage)) \ No newline at end of file diff --git a/pages/support/request.js b/pages/support/request.js index 64b316a..5f8b683 100644 --- a/pages/support/request.js +++ b/pages/support/request.js @@ -17,6 +17,7 @@ import InnerMenu from "./components/InnerMenu"; import SuccessMessage from "./components/SuccessMessage"; import AccountLayout from "../components/Layout/Account"; import TemplateFile from "./components/TemplateFile"; +import FileDropzone from "../../components/FileDropzone"; import { getSupportThemes, @@ -26,59 +27,6 @@ import { sendAppealAttachments } from "../../actions"; -const LIMIT = 10000000; -const LIMIT_FILES = 10; - -class FileDropzone extends React.Component -{ - constructor(props) - { - super(props); - this.state = {}; - } - - render() - { - const { files, onAddFile, onDeleteFile } = this.props; - - return ( - <> - { files.length > 0 && ( -
-
-

Приложенные файлы ({ files.length }/{ LIMIT_FILES })

- { files.map((file, index) => ( -

{ file.size > LIMIT && (Ошибка, превышен допустимый размер файла в 10 мб.) } { file.name } - { parseFloat(file.size / 1000000).toFixed(file.size < 100000 ? 3 : 2) } мб. onDeleteFile(file.name) }>[ удалить ]

- )) } -
-
- ) } -
-
-

Вы можете приложить до 10 файлов, максимальный размер одного файла: 10 мегабайт.

-
-
- { files.length < LIMIT_FILES && ( - onAddFile(acceptedFiles) } maxFiles={ LIMIT_FILES }> - { ({getRootProps, getInputProps}) => ( -
-
-
-

- Перенесите файлы на экран для быстрой загрузки или выберите файл с компьютера -

- -
- -
- ) } -
- ) } - - ) - } -} - class SupportRequestPage extends React.Component { constructor(props) { diff --git a/public/assets/images/status/1_off.svg b/public/assets/images/status/1_off.svg new file mode 100644 index 0000000..d34c1f7 --- /dev/null +++ b/public/assets/images/status/1_off.svg @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/images/status/1_on.svg b/public/assets/images/status/1_on.svg new file mode 100644 index 0000000..234fd2a --- /dev/null +++ b/public/assets/images/status/1_on.svg @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/images/status/2_off.svg b/public/assets/images/status/2_off.svg new file mode 100644 index 0000000..2766ee9 --- /dev/null +++ b/public/assets/images/status/2_off.svg @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/images/status/2_on.svg b/public/assets/images/status/2_on.svg new file mode 100644 index 0000000..584ef58 --- /dev/null +++ b/public/assets/images/status/2_on.svg @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/images/status/3_off.svg b/public/assets/images/status/3_off.svg new file mode 100644 index 0000000..caaceaa --- /dev/null +++ b/public/assets/images/status/3_off.svg @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/images/status/3_on.svg b/public/assets/images/status/3_on.svg new file mode 100644 index 0000000..2ef30d6 --- /dev/null +++ b/public/assets/images/status/3_on.svg @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/images/status/4_off.svg b/public/assets/images/status/4_off.svg new file mode 100644 index 0000000..43f8874 --- /dev/null +++ b/public/assets/images/status/4_off.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/images/status/4_on.svg b/public/assets/images/status/4_on.svg new file mode 100644 index 0000000..1d50238 --- /dev/null +++ b/public/assets/images/status/4_on.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/images/status/5_off.svg b/public/assets/images/status/5_off.svg new file mode 100644 index 0000000..e99366a --- /dev/null +++ b/public/assets/images/status/5_off.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/images/status/5_on.svg b/public/assets/images/status/5_on.svg new file mode 100644 index 0000000..8313336 --- /dev/null +++ b/public/assets/images/status/5_on.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/images/status/6_off.svg b/public/assets/images/status/6_off.svg new file mode 100644 index 0000000..af4f1bc --- /dev/null +++ b/public/assets/images/status/6_off.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/public/assets/images/status/6_on.svg b/public/assets/images/status/6_on.svg new file mode 100644 index 0000000..886799b --- /dev/null +++ b/public/assets/images/status/6_on.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/public/assets/images/status/7_off.svg b/public/assets/images/status/7_off.svg new file mode 100644 index 0000000..4b34bd5 --- /dev/null +++ b/public/assets/images/status/7_off.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/images/status/7_on.svg b/public/assets/images/status/7_on.svg new file mode 100644 index 0000000..ac415b0 --- /dev/null +++ b/public/assets/images/status/7_on.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/reducers/dealsReducer.js b/reducers/dealsReducer.js index 5c8ab7c..e03a337 100644 --- a/reducers/dealsReducer.js +++ b/reducers/dealsReducer.js @@ -39,25 +39,38 @@ const dealsReducer = (state = initialState.deals, action) => case actionTypes.DEAL_OFFERS_LIST: { + console.log("ACTION", actionTypes.DEAL_OFFERS_LIST, { action }); + + const details = state.details; + details[action.data.deal_id] = { ...details[action.data.deal_id], ...{ offers: action.data.list } }; + return { ...state, - deal: { ...state.deal, ...{ offers: action.data.offers, } }, + details: details, }; } case actionTypes.DEAL_DOCUMENTS_LIST: { + console.log("ACTION", actionTypes.DEAL_DOCUMENTS_LIST, { action }); + + const details = state.details; + details[action.data.deal_id] = { ...details[action.data.deal_id], ...{ documents: action.data.list } }; + return { ...state, - deal: { ...state.deal, ...{ documents: action.data.documents, } }, + details: details, }; } case actionTypes.DEAL_CONTRACTS_LIST: { + const details = state.details; + details[action.data.deal_id] = { ...details[action.data.deal_id], ...{ contracts: action.data.list } }; + return { ...state, - deal: { ...state.deal, ...{ contracts: action.data.contracts, } }, + details: details, }; } diff --git a/reducers/initialState.js b/reducers/initialState.js index d9035ad..ae24348 100644 --- a/reducers/initialState.js +++ b/reducers/initialState.js @@ -236,7 +236,8 @@ export const defaultState = { { loaded: false, list: null, - deal: { + details: {}, + /*{ loaded: false, offers: { list: null, @@ -249,6 +250,7 @@ export const defaultState = { list: null, }, }, + */ }, }; From 630e2b3b2aeee4bae394f9b713acf8b8bf6c08bc Mon Sep 17 00:00:00 2001 From: merelendor Date: Fri, 15 Sep 2023 13:56:13 +0300 Subject: [PATCH 02/49] deals update --- actions/dealsActions.js | 89 ++++--- components/DealsStatus/DealsList.js | 4 +- components/DealsStatus/DealsListDeal.js | 44 ++-- components/DealsStatus/SingleDeal.js | 248 +++++++++++++----- components/DealsStatus/index.js | 19 ++ components/FileDropzoneDeals/index.js | 2 +- css/components/style.css | 5 +- css/components/style.less | 5 +- css/main/style.css | 80 +++--- css/main/style.less | 79 ++++-- pages/api/deals/accept.js | 16 ++ pages/api/deals/quote.js | 4 - .../images/status/icon_deal_status_100.svg | 59 +++++ .../status/icon_deal_status_100_inactive.svg | 59 +++++ .../images/status/icon_deal_status_101.svg | 91 +++++++ .../status/icon_deal_status_101_inactive.svg | 91 +++++++ .../images/status/icon_deal_status_102.svg | 111 ++++++++ .../status/icon_deal_status_102_inactive.svg | 111 ++++++++ .../images/status/icon_deal_status_103.svg | 31 +++ .../status/icon_deal_status_103_inactive.svg | 31 +++ .../images/status/icon_deal_status_104.svg | 25 ++ .../status/icon_deal_status_104_inactive.svg | 25 ++ .../images/status/icon_deal_status_105.svg | 111 ++++++++ .../status/icon_deal_status_105_inactive.svg | 111 ++++++++ .../images/status/icon_deal_status_106.svg | 12 + .../status/icon_deal_status_106_inactive.svg | 12 + .../images/status/icon_deal_status_107.svg | 26 ++ .../status/icon_deal_status_107_inactive.svg | 26 ++ 28 files changed, 1333 insertions(+), 194 deletions(-) create mode 100644 pages/api/deals/accept.js delete mode 100644 pages/api/deals/quote.js create mode 100644 public/assets/images/status/icon_deal_status_100.svg create mode 100644 public/assets/images/status/icon_deal_status_100_inactive.svg create mode 100644 public/assets/images/status/icon_deal_status_101.svg create mode 100644 public/assets/images/status/icon_deal_status_101_inactive.svg create mode 100644 public/assets/images/status/icon_deal_status_102.svg create mode 100644 public/assets/images/status/icon_deal_status_102_inactive.svg create mode 100644 public/assets/images/status/icon_deal_status_103.svg create mode 100644 public/assets/images/status/icon_deal_status_103_inactive.svg create mode 100644 public/assets/images/status/icon_deal_status_104.svg create mode 100644 public/assets/images/status/icon_deal_status_104_inactive.svg create mode 100644 public/assets/images/status/icon_deal_status_105.svg create mode 100644 public/assets/images/status/icon_deal_status_105_inactive.svg create mode 100644 public/assets/images/status/icon_deal_status_106.svg create mode 100644 public/assets/images/status/icon_deal_status_106_inactive.svg create mode 100644 public/assets/images/status/icon_deal_status_107.svg create mode 100644 public/assets/images/status/icon_deal_status_107_inactive.svg diff --git a/actions/dealsActions.js b/actions/dealsActions.js index 9f3e26b..456fd3c 100644 --- a/actions/dealsActions.js +++ b/actions/dealsActions.js @@ -3,49 +3,12 @@ import { Cookies } from 'react-cookie'; import Router from 'next/router'; import moment from 'moment'; import { nSQL } from "@nano-sql/core"; +import { eachSeries } from 'async'; import * as actionTypes from '../constants/actionTypes'; import * as currentState from '../reducers/initialState'; -/*DEALS_LIST -/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, -}] - -[{ - "opp_number": "780", - "statuscode_id": 107, - "statuscode_name": " ", - "comment": null, -}, { - "opp_number": "37197", - "statuscode_id": 101, - "statuscode_name": " ", - "comment": null, -}] -opp_number- номер Лизинговой сделки -statuscode_id - номер этапа -statuscode_name - имя этапа -comment - сопроводительный текст для данного этапа, который надо выводить -*/ - -export const getDeals = ({ dispatch }) => +export const getDeals = ({ dispatch, update = false }) => { const url = `${ process.env.NEXT_PUBLIC_SELF_API_HOST }/api/deals`; @@ -59,6 +22,20 @@ export const getDeals = ({ dispatch }) => .then((response) => { console.log("ACTION", "deals", "getDeals()", "response", response.data); + + /* + if(update) + { + for(let i in response.data) + { + if(response.data[i].opp_number == "20325") + { + response.data[i].statuscode_id = 101; + } + } + } + */ + dispatch({ type: actionTypes.DEALS_LIST, data: { @@ -129,6 +106,40 @@ export const getDealOffers = ({ dispatch, deal_id }) => }); } +export const acceptDealOffers = ({ deal_id, offers }) => +{ + const url = `${ process.env.NEXT_PUBLIC_SELF_API_HOST }/api/deals/accept`; + + console.log("ACTION", "deals", "acceptDealOffers()", { url }); + console.log("ACTION", "deals", "acceptDealOffers()", { deal_id, }); + + return new Promise((resolve, reject) => + { + eachSeries(offers, (offer_id, callback) => + { + axios.post(url, { deal_id, offer_id }, { + withCredentials: true, + }) + .then((response) => + { + console.log("ACTION", "deals", "acceptDealOffers()", "response", response.data); + + callback(); + }) + .catch((error) => + { + console.error("ACTION", "deals", "acceptDealOffers()", "ERROR"); + console.error(error); + + callback(); + }); + }, () => + { + resolve(); + }); + }); +} + export const getDealDocuments = ({ dispatch, deal_id }) => { const url = `${ process.env.NEXT_PUBLIC_SELF_API_HOST }/api/deals/documents`; diff --git a/components/DealsStatus/DealsList.js b/components/DealsStatus/DealsList.js index 24cdd40..7af8901 100644 --- a/components/DealsStatus/DealsList.js +++ b/components/DealsStatus/DealsList.js @@ -39,7 +39,7 @@ export default class DealsList extends React.Component render() { - const { status, deals, questionnaire_status, dealSelected, onCloseDeal } = this.props; + const { status, deals, questionnaire_status, dealSelected, onCloseDeal, onDealsUpdate } = this.props; console.log({ deals }); @@ -58,6 +58,8 @@ export default class DealsList extends React.Component deals={ deals } questionnaire_status={ questionnaire_status } onCloseDeal={ this._handle_onCloseDeal } + onDealsUpdate={ onDealsUpdate } + { ...deal } />) } else diff --git a/components/DealsStatus/DealsListDeal.js b/components/DealsStatus/DealsListDeal.js index ac88d81..c5209ff 100644 --- a/components/DealsStatus/DealsListDeal.js +++ b/components/DealsStatus/DealsListDeal.js @@ -2,40 +2,45 @@ import React from "react"; import pluralize from 'pluralize-ru'; const statuses = { - "0": { + "100": { index: undefined, title: "Выбор КП", - icon: "/assets/images/status/1.svg", + icon: "/assets/images/status/icon_deal_status_100.svg", }, "101": { index: 1, title: "Выбор программы финансирования", - icon: "/assets/images/status/2.svg", + icon: "/assets/images/status/icon_deal_status_101.svg", }, "102": { index: 2, title: "Сбор пакета документов", - icon: "/assets/images/status/3.svg", + icon: "/assets/images/status/icon_deal_status_102.svg", }, - "3": { + "103": { index: 3, title: "Проверка документов", - icon: "/assets/images/status/4.svg", + icon: "/assets/images/status/icon_deal_status_103.svg", }, - "1": { + "104": { index: 4, - title: "Принятие решения по заявке", - icon: "/assets/images/status/5.svg", + title: "Принятие решения по сделке", + icon: "/assets/images/status/icon_deal_status_104.svg", + }, + "105": { + index: 5, + title: "Требуется изменение параметров", + icon: "/assets/images/status/icon_deal_status_105.svg", + }, + "106": { + index: 5, + title: "Принято положительное решение", + icon: "/assets/images/status/icon_deal_status_106.svg", }, "107": { - index: 5, - title: "Оформление лизинга", - icon: "/assets/images/status/6.svg", - }, - "2": { index: 6, - title: "Выбор типа подписания", - icon: "/assets/images/status/7.svg", + title: "Оформление лизинга", + icon: "/assets/images/status/icon_deal_status_107.svg", }, }; @@ -62,7 +67,7 @@ export default class DealsListDeal extends React.Component

- { statuses[ statuscode_id ] === undefined ? "Не начата" : `${ statuses[ statuscode_id ].index } ${ pluralize(step, 'этапа', 'этап', 'этапа', 'этапов') } ${ pluralize(statuses[ statuscode_id ].index, 'пройдено', 'пройден', 'пройдено', 'пройдено') }` } + { statuses[ statuscode_id ].index === undefined ? "Не начата" : `${ statuses[ statuscode_id ].index } ${ pluralize(step, 'этапа', 'этап', 'этапа', 'этапов') } ${ pluralize(statuses[ statuscode_id ].index, 'пройдено', 'пройден', 'пройдено', 'пройдено') }` } {/*} @@ -72,11 +77,12 @@ export default class DealsListDeal extends React.Component

-

{ statuscode_name }

+ {/*}

{ statuscode_name }

{*/} +

{ statuses[ statuscode_id ].title }

+
+ ) + } + + return null; } render() { - const { index, status, offers } = this.props; - const { open } = this.state; + const { index, statuscode_id, offers } = this.props; + const { checked, open, loading } = this.state; return ( -
this.status ? "done" : "" }`}> +
-1 ? "current" : statuscode_id > this.status[ 0 ] ? "done" : "" }`}>

Сделка { index + 1 }

- { this._renderHeader("Выбор КП") } + { this._renderHeader("Выбор КП ") }
- { offers === undefined ? ( + { offers === undefined || loading ? (
@@ -87,8 +171,8 @@ class Offers extends Step
- {} }/> - + -1 } onChange={ () => { this._handle_onCheckOffer(offer.quote_number) } }/> +
{ offer_index + 1 } @@ -134,23 +218,23 @@ class FinancialProgram extends Step this.state = { open: false, }; - this.status = 2; + this.status = [ 101 ]; } render() { - const { index, status } = this.props; + const { index, statuscode_id } = this.props; const { open } = this.state; return ( -
this.status ? "done" : "" }`}> +
-1 ? "current" : statuscode_id > this.status[ 0 ] ? "done" : "" }`}>

Сделка { index + 1 }

{ this._renderHeader("Программа финансирования") }
-

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

+

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

@@ -168,12 +252,27 @@ class DocumentsForm extends Step open: false, files: {}, }; - this.status = 3; + this.status = [ 102 ]; + } + + _renderHeaderButtons = () => + { + const { open, files } = this.state; + + if(open && Object.keys(files).length > 0) + { + return ( +
+ +
+ ) + } + + return null; } _handle_onAddFile = (file_id, files) => { - console.log("_handle_onAddFile", { file_id, files }); const existed_files = this.state.files; const document_files = existed_files[ file_id ] === undefined ? [] : existed_files[ file_id ]; @@ -198,18 +297,38 @@ class DocumentsForm extends Step _handle_onDeleteFile = (file_id, file) => { + const files = { ...this.state.files }; + const list = []; + for(let i in files[file_id]) + { + if(files[file_id][i].name !== file.name) + { + list.push(files[file_id][i]); + } + } + + if(list.length > 0) + { + files[file_id] = list; + } + else + { + delete files[file_id]; + } + + this.setState({ files }); } render() { - const { index, status, documents, questionnaire_status } = this.props; + const { index, statuscode_id, documents, questionnaire_status } = this.props; const { open, files } = this.state; - console.log({ documents }); + console.log("DocumentsForm", { documents }); return ( -
this.status ? "done" : "" }`}> +
-1 ? "current" : statuscode_id > this.status[ 0 ] ? "done" : "" }`}>

Сделка { index + 1 }

@@ -292,23 +411,23 @@ class StatusDocumentsCheck extends Step this.state = { open: false, }; - this.status = 4; + this.status = [ 103 ]; } render() { - const { index, status } = this.props; + const { index, statuscode_id } = this.props; const { open } = this.state; return ( -
this.status ? "done" : "" }`}> +
-1 ? "current" : statuscode_id > this.status[ 0 ] ? "done" : "" }`}>

Сделка { index + 1 }

{ this._renderHeader("Проверка документов") }
-

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

+

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

@@ -325,23 +444,23 @@ class StatusDecisionMaking extends Step this.state = { open: false, }; - this.status = 5; + this.status = [ 104, 105, ]; } render() { - const { index, status } = this.props; + const { index, statuscode_id } = this.props; const { open } = this.state; return ( -
this.status ? "done" : "" }`}> +
-1 ? "current" : (statuscode_id > this.status[0] && statuscode_id > this.status[1]) ? "done" : "" }`}>

Сделка { index + 1 }

- { this._renderHeader("Принятие решения по заявке") } + { this._renderHeader("Принятие решения по сделке") }
-

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

+

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

@@ -358,23 +477,23 @@ class StatusLeasingRegistration extends Step this.state = { open: false, }; - this.status = 6; + this.status = [ 106 ]; } render() { - const { index, status } = this.props; + const { index, statuscode_id } = this.props; const { open } = this.state; return ( -
this.status ? "done" : "" }`}> +
-1 ? "current" : statuscode_id > this.status[ 0 ] ? "done" : "" }`}>

Сделка { index + 1 }

- { this._renderHeader("Оформление лизинга") } + { this._renderHeader("Принято положительное решение") }
-

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

+

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

@@ -391,13 +510,12 @@ class SigningTypeSelection extends Step this.state = { open: false, }; - this.status = 7; + this.status = [ 107 ]; this.types = [ { title: "Подготовлено", key: "prepared_contracts", }, - /* { title: "К подписанию", key: "signing_plan_contracts", @@ -414,14 +532,13 @@ class SigningTypeSelection extends Step title: "Анулировано", key: "annulled_contracts", }, - */ ]; } _render_preparedContracts = () => { const contracts = this.props.contracts['prepared_contracts']; - console.log({ contracts }); + console.log("_render_preparedContracts", { contracts }); return (
@@ -450,32 +567,29 @@ class SigningTypeSelection extends Step _render_signingPlanContracts = () => { - const { contracts } = this.props; + const contracts = this.props.contracts['prepared_contracts']; + console.log("_render_signingPlanContracts", { contracts }); return ( -
-
-
-

- №123/2023 от 01.01.2023 -

- +
+ { contracts.map((contract, index) => ( +
+
+
+
+ { contract.name } + { moment().format("DD.MM.YYYY") } +
-
-

- №123/2023 от 01.01.2023 -

- - -
-
+ )) }
) } _render_issuedContracts = () => { - const { contracts } = this.props; + const contracts = this.props.contracts['issued_contracts']; + console.log("_render_issuedContracts", { contracts }); return (
@@ -492,7 +606,8 @@ class SigningTypeSelection extends Step _render_signingFactContracts = () => { - const { contracts } = this.props; + const contracts = this.props.contracts['signing_fact_contracts']; + console.log("_render_signingFactContracts", { contracts }); return (
@@ -509,7 +624,8 @@ class SigningTypeSelection extends Step _render_annuledContracts = () => { - const { contracts } = this.props; + const contracts = this.props.contracts['annulled_contracts']; + console.log("_render_annuledContracts", { contracts }); return (
@@ -566,15 +682,15 @@ class SigningTypeSelection extends Step render() { - const { index, status } = this.props; + const { index, statuscode_id } = this.props; const { open } = this.state; return ( -
this.status ? "done" : "" }`}> +
-1 ? "current" : statuscode_id > this.status[ 0 ] ? "done" : "" }`}>

Сделка { index + 1 }

- { this._renderHeader("Выбор типа подписания") } + { this._renderHeader("Оформление лизинга") }
{ this.types.map((type, index) => (
@@ -602,7 +718,7 @@ export default class SingleDeal extends React.Component render() { - const { index, status, deals, dealSelected, onCloseDeal } = this.props; + const { index, status, deals, dealSelected, onCloseDeal, } = this.props; console.log({ "deals": deals }); const offers = deals.details[ dealSelected ] !== undefined ? deals.details[ dealSelected ].offers : undefined; diff --git a/components/DealsStatus/index.js b/components/DealsStatus/index.js index 55f1771..671dbd6 100644 --- a/components/DealsStatus/index.js +++ b/components/DealsStatus/index.js @@ -107,6 +107,24 @@ class DealsStatus extends React.Component componentDidUpdate(prevProps, prevState) { } + _onDealsUpdate = () => + { + return new Promise((resolve) => + { + const { dispatch } = this.props; + + getDeals({ dispatch, update: true }) + .then(() => + { + resolve(); + }) + .catch(() => + { + resolve(); + }); + }); + } + _handleModalToggle = (modal) => { if (modal === "current") @@ -164,6 +182,7 @@ class DealsStatus extends React.Component dealSelected={ dealSelected } onSelectDeal={ this._handle_onSelectDeal } onCloseDeal={ this._handle_onCloseDeal } + onDealsUpdate={ this._onDealsUpdate } /> {/*} { files.map((file, index) => (
-
+
onDeleteFile(file) }>
diff --git a/css/components/style.css b/css/components/style.css index ae81485..041e635 100644 --- a/css/components/style.css +++ b/css/components/style.css @@ -158,10 +158,11 @@ input[type="checkbox"] + label:before { position: absolute; left: 0; top: 2px; + border-radius: 0px; } input[type="checkbox"]:checked + label:before { - background: url("/assets/images/icons/checkbox_white.svg") no-repeat center var(--primary); - border-color: var(--primary); + background: url("/assets/images/icons/checkbox_white.svg") no-repeat center var(--blue); + border-color: var(--blue); } input[type="checkbox"]:disabled + label { cursor: default; diff --git a/css/components/style.less b/css/components/style.less index 05866f2..e1872f5 100644 --- a/css/components/style.less +++ b/css/components/style.less @@ -187,13 +187,14 @@ input[type="checkbox"] { position: absolute; left: 0; top: 2px; + border-radius: 0px; } } &:checked + label { &:before { - background: url("/assets/images/icons/checkbox_white.svg") no-repeat center var(--primary); - border-color: var(--primary); + background: url("/assets/images/icons/checkbox_white.svg") no-repeat center var(--blue); + border-color: var(--blue); } } &:disabled + label { diff --git a/css/main/style.css b/css/main/style.css index de9fbc8..94b3daf 100644 --- a/css/main/style.css +++ b/css/main/style.css @@ -5384,7 +5384,9 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block .block_body .fines_ background-size: auto 13px; } .contractStatus_list .list_item div:nth-child(4) { - width: 150px; + width: 130px; + min-width: 130px; + justify-content: flex-end; cursor: pointer; } .contractStatus_list .list_item div:nth-child(4) button { @@ -5454,7 +5456,7 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block .block_body .fines_ white-space: nowrap; padding: 15px 0; display: flex; - align-items: center; + align-items: flex-start; box-sizing: border-box; } .contractStatus_modal .single_status > div i { @@ -5462,47 +5464,53 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block .block_body .fines_ width: 40px; height: 40px; } -.contractStatus_modal .single_status > div i.status_1 { - background: url("/assets/images/status/1_on.svg") no-repeat center; +.contractStatus_modal .single_status > div i.status_100 { + background: url("/assets/images/status/icon_deal_status_100.svg") no-repeat center; } -.contractStatus_modal .single_status > div i.status_1.inactive { - background: url("/assets/images/status/1_off.svg") no-repeat center; +.contractStatus_modal .single_status > div i.status_100.inactive { + background: url("/assets/images/status/icon_deal_status_100_inactive.svg") no-repeat center; } -.contractStatus_modal .single_status > div i.status_2 { - background: url("/assets/images/status/2_on.svg") no-repeat center; +.contractStatus_modal .single_status > div i.status_101 { + background: url("/assets/images/status/icon_deal_status_101.svg") no-repeat center; } -.contractStatus_modal .single_status > div i.status_2.inactive { - background: url("/assets/images/status/2_off.svg") no-repeat center; +.contractStatus_modal .single_status > div i.status_101.inactive { + background: url("/assets/images/status/icon_deal_status_101_inactive.svg") no-repeat center; } -.contractStatus_modal .single_status > div i.status_3 { - background: url("/assets/images/status/3_on.svg") no-repeat center; +.contractStatus_modal .single_status > div i.status_102 { + background: url("/assets/images/status/icon_deal_status_102.svg") no-repeat center; } -.contractStatus_modal .single_status > div i.status_3.inactive { - background: url("/assets/images/status/3_off.svg") no-repeat center; +.contractStatus_modal .single_status > div i.status_102.inactive { + background: url("/assets/images/status/icon_deal_status_102_inactive.svg") no-repeat center; } -.contractStatus_modal .single_status > div i.status_4 { - background: url("/assets/images/status/4_on.svg") no-repeat center; +.contractStatus_modal .single_status > div i.status_103 { + background: url("/assets/images/status/icon_deal_status_103.svg") no-repeat center; } -.contractStatus_modal .single_status > div i.status_4.inactive { - background: url("/assets/images/status/4_off.svg") no-repeat center; +.contractStatus_modal .single_status > div i.status_103.inactive { + background: url("/assets/images/status/icon_deal_status_103_inactive.svg") no-repeat center; } -.contractStatus_modal .single_status > div i.status_5 { - background: url("/assets/images/status/5_on.svg") no-repeat center; +.contractStatus_modal .single_status > div i.status_104 { + background: url("/assets/images/status/icon_deal_status_104.svg") no-repeat center; } -.contractStatus_modal .single_status > div i.status_5.inactive { - background: url("/assets/images/status/5_off.svg") no-repeat center; +.contractStatus_modal .single_status > div i.status_104.inactive { + background: url("/assets/images/status/icon_deal_status_104_inactive.svg") no-repeat center; } -.contractStatus_modal .single_status > div i.status_6 { - background: url("/assets/images/status/6_on.svg") no-repeat center; +.contractStatus_modal .single_status > div i.status_105 { + background: url("/assets/images/status/icon_deal_status_105.svg") no-repeat center; } -.contractStatus_modal .single_status > div i.status_6.inactive { - background: url("/assets/images/status/6_off.svg") no-repeat center; +.contractStatus_modal .single_status > div i.status_105.inactive { + background: url("/assets/images/status/icon_deal_status_105_inactive.svg") no-repeat center; } -.contractStatus_modal .single_status > div i.status_7 { - background: url("/assets/images/status/7_on.svg") no-repeat center; +.contractStatus_modal .single_status > div i.status_106 { + background: url("/assets/images/status/icon_deal_status_106.svg") no-repeat center; } -.contractStatus_modal .single_status > div i.status_7.inactive { - background: url("/assets/images/status/7_off.svg") no-repeat center; +.contractStatus_modal .single_status > div i.status_106.inactive { + background: url("/assets/images/status/icon_deal_status_106_inactive.svg") no-repeat center; +} +.contractStatus_modal .single_status > div i.status_107 { + background: url("/assets/images/status/icon_deal_status_107.svg") no-repeat center; +} +.contractStatus_modal .single_status > div i.status_107.inactive { + background: url("/assets/images/status/icon_deal_status_107_inactive.svg") no-repeat center; } .contractStatus_modal .single_status > div > span { display: block; @@ -5687,12 +5695,22 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block .block_body .fines_ } .contractStatus_modal .single_status > div .status_body .status_header i { z-index: 2; + white-space: nowrap; + min-width: 40px; } .contractStatus_modal .single_status > div .status_body .status_header p { z-index: 2; + white-space: nowrap; +} +.contractStatus_modal .single_status > div .status_body .status_header .buttons { + z-index: 2; + width: 100%; + display: flex; + justify-content: flex-end; + padding-right: 4px; } .contractStatus_modal .single_status > div .status_body .status_header .button_arrow { - width: 50px; + min-width: 50px; height: 50px; display: flex; justify-content: center; diff --git a/css/main/style.less b/css/main/style.less index 2d9a298..e6e296d 100644 --- a/css/main/style.less +++ b/css/main/style.less @@ -6094,7 +6094,10 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block { } &:nth-child(4) { - width: 150px; + width: 130px; + min-width: 130px; + justify-content: flex-end; + cursor: pointer; button { @@ -6183,7 +6186,7 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block { padding: 15px 0; // height: 80px; display: flex; - align-items: center; + align-items: flex-start; box-sizing: border-box; } } @@ -6193,55 +6196,62 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block { width: 40px; height: 40px; - &.status_1 { - background: url("/assets/images/status/1_on.svg") no-repeat center; + &.status_100 { + background: url("/assets/images/status/icon_deal_status_100.svg") no-repeat center; &.inactive { - background: url("/assets/images/status/1_off.svg") no-repeat center; - } - } - - &.status_2 { - background: url("/assets/images/status/2_on.svg") no-repeat center; - &.inactive { - background: url("/assets/images/status/2_off.svg") no-repeat center; + background: url("/assets/images/status/icon_deal_status_100_inactive.svg") no-repeat center; } } - &.status_3 { - background: url("/assets/images/status/3_on.svg") no-repeat center; + &.status_101 { + background: url("/assets/images/status/icon_deal_status_101.svg") no-repeat center; &.inactive { - background: url("/assets/images/status/3_off.svg") no-repeat center; + background: url("/assets/images/status/icon_deal_status_101_inactive.svg") no-repeat center; } } - &.status_4 { - background: url("/assets/images/status/4_on.svg") no-repeat center; + &.status_102 { + background: url("/assets/images/status/icon_deal_status_102.svg") no-repeat center; &.inactive { - background: url("/assets/images/status/4_off.svg") no-repeat center; + background: url("/assets/images/status/icon_deal_status_102_inactive.svg") no-repeat center; } } - &.status_5 { - background: url("/assets/images/status/5_on.svg") no-repeat center; + &.status_103 { + background: url("/assets/images/status/icon_deal_status_103.svg") no-repeat center; &.inactive { - background: url("/assets/images/status/5_off.svg") no-repeat center; + background: url("/assets/images/status/icon_deal_status_103_inactive.svg") no-repeat center; } } - &.status_6 { - background: url("/assets/images/status/6_on.svg") no-repeat center; + &.status_104 { + background: url("/assets/images/status/icon_deal_status_104.svg") no-repeat center; &.inactive { - background: url("/assets/images/status/6_off.svg") no-repeat center; + background: url("/assets/images/status/icon_deal_status_104_inactive.svg") no-repeat center; } } - &.status_7 { - background: url("/assets/images/status/7_on.svg") no-repeat center; + &.status_105 { + background: url("/assets/images/status/icon_deal_status_105.svg") no-repeat center; &.inactive { - background: url("/assets/images/status/7_off.svg") no-repeat center; + background: url("/assets/images/status/icon_deal_status_105_inactive.svg") no-repeat center; } } - } + + &.status_106 { + background: url("/assets/images/status/icon_deal_status_106.svg") no-repeat center; + &.inactive { + background: url("/assets/images/status/icon_deal_status_106_inactive.svg") no-repeat center; + } + } + + &.status_107 { + background: url("/assets/images/status/icon_deal_status_107.svg") no-repeat center; + &.inactive { + background: url("/assets/images/status/icon_deal_status_107_inactive.svg") no-repeat center; + } + } + } > span { display: block; @@ -6481,14 +6491,25 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block { i { z-index: 2; + white-space: nowrap; + min-width: 40px; } p { z-index: 2; + white-space: nowrap; + } + + .buttons { + z-index: 2; + width: 100%; + display: flex; + justify-content: flex-end; + padding-right: 4px; } .button_arrow { - width: 50px; + min-width: 50px; height: 50px; display: flex; justify-content: center; diff --git a/pages/api/deals/accept.js b/pages/api/deals/accept.js new file mode 100644 index 0000000..c8088c4 --- /dev/null +++ b/pages/api/deals/accept.js @@ -0,0 +1,16 @@ +/* +2.7.3 - Метод согласования Предложений Клиентом по Лизинговой сделке в CRM +POST /lk/ConsiderationOpportunity/quote +*/ +import CRMRequestPost from '../../../lib/CRMRequestPost'; + +export default async function handler(req, res) +{ + console.log("API", "DEALS", "quote"); + console.log(req.body); + console.log("-".repeat(50)); + + const { deal_id, offer_id } = req.body; + + await CRMRequestPost(req, res, `${ process.env.CRM_API_HOST }/lk/ConsiderationOpportunity/quote/`, { ...{ opp_number: deal_id, quote_number: offer_id, agreed: true } }); +} \ No newline at end of file diff --git a/pages/api/deals/quote.js b/pages/api/deals/quote.js deleted file mode 100644 index c0de65c..0000000 --- a/pages/api/deals/quote.js +++ /dev/null @@ -1,4 +0,0 @@ -/* -2.7.3 - Метод согласования Предложений Клиентом по Лизинговой сделке в CRM -POST /lk/ConsiderationOpportunity/quote -*/ \ No newline at end of file diff --git a/public/assets/images/status/icon_deal_status_100.svg b/public/assets/images/status/icon_deal_status_100.svg new file mode 100644 index 0000000..c23de65 --- /dev/null +++ b/public/assets/images/status/icon_deal_status_100.svg @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/images/status/icon_deal_status_100_inactive.svg b/public/assets/images/status/icon_deal_status_100_inactive.svg new file mode 100644 index 0000000..6ee7cfb --- /dev/null +++ b/public/assets/images/status/icon_deal_status_100_inactive.svg @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/images/status/icon_deal_status_101.svg b/public/assets/images/status/icon_deal_status_101.svg new file mode 100644 index 0000000..12ac8ec --- /dev/null +++ b/public/assets/images/status/icon_deal_status_101.svg @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/images/status/icon_deal_status_101_inactive.svg b/public/assets/images/status/icon_deal_status_101_inactive.svg new file mode 100644 index 0000000..4dfbc3e --- /dev/null +++ b/public/assets/images/status/icon_deal_status_101_inactive.svg @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/images/status/icon_deal_status_102.svg b/public/assets/images/status/icon_deal_status_102.svg new file mode 100644 index 0000000..410806c --- /dev/null +++ b/public/assets/images/status/icon_deal_status_102.svg @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/images/status/icon_deal_status_102_inactive.svg b/public/assets/images/status/icon_deal_status_102_inactive.svg new file mode 100644 index 0000000..9d66a0d --- /dev/null +++ b/public/assets/images/status/icon_deal_status_102_inactive.svg @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/images/status/icon_deal_status_103.svg b/public/assets/images/status/icon_deal_status_103.svg new file mode 100644 index 0000000..8da833f --- /dev/null +++ b/public/assets/images/status/icon_deal_status_103.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/images/status/icon_deal_status_103_inactive.svg b/public/assets/images/status/icon_deal_status_103_inactive.svg new file mode 100644 index 0000000..4c28755 --- /dev/null +++ b/public/assets/images/status/icon_deal_status_103_inactive.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/images/status/icon_deal_status_104.svg b/public/assets/images/status/icon_deal_status_104.svg new file mode 100644 index 0000000..debe796 --- /dev/null +++ b/public/assets/images/status/icon_deal_status_104.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/images/status/icon_deal_status_104_inactive.svg b/public/assets/images/status/icon_deal_status_104_inactive.svg new file mode 100644 index 0000000..7995e21 --- /dev/null +++ b/public/assets/images/status/icon_deal_status_104_inactive.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/images/status/icon_deal_status_105.svg b/public/assets/images/status/icon_deal_status_105.svg new file mode 100644 index 0000000..410806c --- /dev/null +++ b/public/assets/images/status/icon_deal_status_105.svg @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/images/status/icon_deal_status_105_inactive.svg b/public/assets/images/status/icon_deal_status_105_inactive.svg new file mode 100644 index 0000000..9d66a0d --- /dev/null +++ b/public/assets/images/status/icon_deal_status_105_inactive.svg @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/images/status/icon_deal_status_106.svg b/public/assets/images/status/icon_deal_status_106.svg new file mode 100644 index 0000000..99467b6 --- /dev/null +++ b/public/assets/images/status/icon_deal_status_106.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/public/assets/images/status/icon_deal_status_106_inactive.svg b/public/assets/images/status/icon_deal_status_106_inactive.svg new file mode 100644 index 0000000..6455017 --- /dev/null +++ b/public/assets/images/status/icon_deal_status_106_inactive.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/public/assets/images/status/icon_deal_status_107.svg b/public/assets/images/status/icon_deal_status_107.svg new file mode 100644 index 0000000..d692149 --- /dev/null +++ b/public/assets/images/status/icon_deal_status_107.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/assets/images/status/icon_deal_status_107_inactive.svg b/public/assets/images/status/icon_deal_status_107_inactive.svg new file mode 100644 index 0000000..7ca7d13 --- /dev/null +++ b/public/assets/images/status/icon_deal_status_107_inactive.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + From e58ca85f7cebb486f6a9189273d4b85c220a3390 Mon Sep 17 00:00:00 2001 From: merelendor Date: Mon, 18 Sep 2023 09:27:49 +0300 Subject: [PATCH 03/49] logs for documents, logs for account events --- actions/dealsActions.js | 36 ++-- actions/fileActions.js | 8 + actions/logsActions.js | 40 ++++ components/DealsStatus/DealsListDeal.js | 2 +- components/DealsStatus/SingleDeal.js | 37 ++-- components/LogFileDownload/index.js | 22 +++ css/main/style.css | 3 + css/main/style.less | 4 + lib/CRMRequestPost/index.js | 20 +- pages/_document.js | 22 +++ pages/api/deals/accept.js | 7 +- pages/api/logs/track.js | 10 + pages/components/DownloadFileById/index.js | 9 +- .../DownloadFinesPdfButton/index.js | 15 +- pages/components/DownloadPdfButton/index.js | 15 +- .../DownloadPrintFormPdfButton/index.js | 4 +- pages/contract/agreement.js | 23 ++- pages/contract/documents.js | 18 +- pages/contract/fines.js | 26 +-- pages/contract/services.js | 175 +++++++----------- pages/support/appeals.js | 20 +- pages/support/components/RequestFile/index.js | 8 +- 22 files changed, 334 insertions(+), 190 deletions(-) create mode 100644 actions/logsActions.js create mode 100644 components/LogFileDownload/index.js create mode 100644 pages/api/logs/track.js diff --git a/actions/dealsActions.js b/actions/dealsActions.js index 456fd3c..a1c3731 100644 --- a/actions/dealsActions.js +++ b/actions/dealsActions.js @@ -100,7 +100,7 @@ export const getDealOffers = ({ dispatch, deal_id }) => list: [] } }); - + reject(); }); }); @@ -111,32 +111,26 @@ export const acceptDealOffers = ({ deal_id, offers }) => const url = `${ process.env.NEXT_PUBLIC_SELF_API_HOST }/api/deals/accept`; console.log("ACTION", "deals", "acceptDealOffers()", { url }); - console.log("ACTION", "deals", "acceptDealOffers()", { deal_id, }); + console.log("ACTION", "deals", "acceptDealOffers()", { deal_id, offers, }); return new Promise((resolve, reject) => { - eachSeries(offers, (offer_id, callback) => + axios.post(url, { deal_id, offers }, { + withCredentials: true, + }) + .then((response) => { - axios.post(url, { deal_id, offer_id }, { - withCredentials: true, - }) - .then((response) => - { - console.log("ACTION", "deals", "acceptDealOffers()", "response", response.data); + console.log("ACTION", "deals", "acceptDealOffers()", "response", response.data); - callback(); - }) - .catch((error) => - { - console.error("ACTION", "deals", "acceptDealOffers()", "ERROR"); - console.error(error); - - callback(); - }); - }, () => - { resolve(); - }); + }) + .catch((error) => + { + console.error("ACTION", "deals", "acceptDealOffers()", "ERROR"); + console.error(error); + + reject(); + }); }); } diff --git a/actions/fileActions.js b/actions/fileActions.js index c6554e3..b2c2c62 100644 --- a/actions/fileActions.js +++ b/actions/fileActions.js @@ -5,6 +5,7 @@ import moment from 'moment'; import fileDownload from 'js-file-download'; import * as actionTypes from '../constants/actionTypes'; +import { logDocumentAccess } from './logsActions'; if(process.browser) { @@ -166,6 +167,13 @@ export const getReconciliationFile = ({ contract, date_from, date_to, filename } .then((response) => { fileDownload(response.data, filename); + logDocumentAccess({ + contract_number: contract, + document_type: "act_bu", + document_period_from: date_from, + document_period_to: date_to, + }); + resolve(); }) .catch((error) => diff --git a/actions/logsActions.js b/actions/logsActions.js new file mode 100644 index 0000000..6a320e5 --- /dev/null +++ b/actions/logsActions.js @@ -0,0 +1,40 @@ +import axios from 'axios'; +import { Cookies } from 'react-cookie'; +import Router from 'next/router'; +import moment from 'moment'; +import { nSQL } from "@nano-sql/core"; +import { eachSeries } from 'async'; + +import * as actionTypes from '../constants/actionTypes'; +import * as currentState from '../reducers/initialState'; + +export const logDocumentAccess = ({ payload }) => +{ + const url = `${ process.env.NEXT_PUBLIC_SELF_API_HOST }/api/logs/track`; + + console.log("ACTION", "deals", "logDocumentAccess()", { url }); + console.log("ACTION", "deals", "logDocumentAccess()", { payload }); + + return new Promise((resolve, reject) => + { + payload.lk_user_id = global.store.getState().user; + payload.acc_number = global.store.getState().company.active; + + axios.post(url, payload, { + withCredentials: true, + }) + .then((response) => + { + console.log("ACTION", "deals", "logDocumentAccess()", "response", response.data); + + resolve(); + }) + .catch((error) => + { + console.error("ACTION", "deals", "logDocumentAccess()", "ERROR"); + console.error(error); + + reject(); + }); + }); +} \ No newline at end of file diff --git a/components/DealsStatus/DealsListDeal.js b/components/DealsStatus/DealsListDeal.js index c5209ff..fab3c68 100644 --- a/components/DealsStatus/DealsListDeal.js +++ b/components/DealsStatus/DealsListDeal.js @@ -63,7 +63,7 @@ export default class DealsListDeal extends React.Component return (
-

Сделка { index + 1 }

+

№ { opp_number }

diff --git a/components/DealsStatus/SingleDeal.js b/components/DealsStatus/SingleDeal.js index 2575e37..06434f8 100644 --- a/components/DealsStatus/SingleDeal.js +++ b/components/DealsStatus/SingleDeal.js @@ -100,8 +100,17 @@ class Offers extends Step { const { checked } = this.state; const { dealSelected, onDealsUpdate } = this.props; + const offers = []; - acceptDealOffers({ deal_id: dealSelected, offers: checked }) + for(let i in checked) + { + offers.push({ + quote_numbers: checked[i], + agreed: true, + }); + } + + acceptDealOffers({ deal_id: dealSelected, offers }) .then(() => { onDealsUpdate() @@ -135,12 +144,12 @@ class Offers extends Step render() { - const { index, statuscode_id, offers } = this.props; + const { index, statuscode_id, dealSelected, offers } = this.props; const { checked, open, loading } = this.state; return (

-1 ? "current" : statuscode_id > this.status[ 0 ] ? "done" : "" }`}> -

Сделка { index + 1 }

+

№ { dealSelected }

{ this._renderHeader("Выбор КП ") } @@ -223,12 +232,12 @@ class FinancialProgram extends Step render() { - const { index, statuscode_id } = this.props; + const { index, statuscode_id, dealSelected } = this.props; const { open } = this.state; return (
-1 ? "current" : statuscode_id > this.status[ 0 ] ? "done" : "" }`}> -

Сделка { index + 1 }

+

№ { dealSelected }

{ this._renderHeader("Программа финансирования") } @@ -322,14 +331,14 @@ class DocumentsForm extends Step render() { - const { index, statuscode_id, documents, questionnaire_status } = this.props; + const { index, statuscode_id, dealSelected, documents, questionnaire_status } = this.props; const { open, files } = this.state; console.log("DocumentsForm", { documents }); return (
-1 ? "current" : statuscode_id > this.status[ 0 ] ? "done" : "" }`}> -

Сделка { index + 1 }

+

№ { dealSelected }

{ this._renderHeader("Сборка пакета документов") } @@ -416,12 +425,12 @@ class StatusDocumentsCheck extends Step render() { - const { index, statuscode_id } = this.props; + const { index, statuscode_id, dealSelected } = this.props; const { open } = this.state; return (
-1 ? "current" : statuscode_id > this.status[ 0 ] ? "done" : "" }`}> -

Сделка { index + 1 }

+

№ { dealSelected }

{ this._renderHeader("Проверка документов") } @@ -449,7 +458,7 @@ class StatusDecisionMaking extends Step render() { - const { index, statuscode_id } = this.props; + const { index, statuscode_id, dealSelected } = this.props; const { open } = this.state; return ( @@ -482,12 +491,12 @@ class StatusLeasingRegistration extends Step render() { - const { index, statuscode_id } = this.props; + const { index, statuscode_id, dealSelected } = this.props; const { open } = this.state; return (
-1 ? "current" : statuscode_id > this.status[ 0 ] ? "done" : "" }`}> -

Сделка { index + 1 }

+

№ { dealSelected }

{ this._renderHeader("Принято положительное решение") } @@ -682,12 +691,12 @@ class SigningTypeSelection extends Step render() { - const { index, statuscode_id } = this.props; + const { index, statuscode_id, dealSelected } = this.props; const { open } = this.state; return (
-1 ? "current" : statuscode_id > this.status[ 0 ] ? "done" : "" }`}> -

Сделка { index + 1 }

+

№ { dealSelected }

{ this._renderHeader("Оформление лизинга") } diff --git a/components/LogFileDownload/index.js b/components/LogFileDownload/index.js new file mode 100644 index 0000000..83f2a8f --- /dev/null +++ b/components/LogFileDownload/index.js @@ -0,0 +1,22 @@ +import React from "react"; +import { logDocumentAccess } from "../../actions/logsActions"; + +export default class LogFileDownload extends React.Component +{ + _log = () => + { + const{ log } = this.props; + + if(log !== undefined) + { + const { log } = this.props; + + console.log("LOG", "LogFileDownload", { props: this.props }); + console.log("LOG", "LogFileDownload", { log }); + + logDocumentAccess(log) + .then(() => {}) + .catch(() => {}); + } + } +} \ No newline at end of file diff --git a/css/main/style.css b/css/main/style.css index 94b3daf..23942ff 100644 --- a/css/main/style.css +++ b/css/main/style.css @@ -5393,6 +5393,9 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block .block_body .fines_ white-space: nowrap; gap: 0 8px; } +.contractStatus_list .list_item :first-child { + min-width: 60px; +} .contractStatus_list .list_item:not(:last-child) { margin-bottom: 5px; } diff --git a/css/main/style.less b/css/main/style.less index e6e296d..4da128b 100644 --- a/css/main/style.less +++ b/css/main/style.less @@ -6107,6 +6107,10 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block { } } + :first-child { + min-width: 60px; + } + &:not(:last-child) { margin-bottom: 5px; diff --git a/lib/CRMRequestPost/index.js b/lib/CRMRequestPost/index.js index 3e1e78f..e50782a 100644 --- a/lib/CRMRequestPost/index.js +++ b/lib/CRMRequestPost/index.js @@ -7,7 +7,7 @@ import jwt from 'jsonwebtoken'; import { cors } from '../cors'; import { inspect } from 'util'; -export default async function CRMRequestPost(req, res, path, params) +export default async function CRMRequestPost(req, res, path, params, array = false) { await cors(req, res); @@ -16,28 +16,28 @@ export default async function CRMRequestPost(req, res, path, params) const cookies = cookie.parse(req.headers?.cookie ? req.headers?.cookie : ""); //console.log("-".repeat(50)); - //console.log("CRMRequestPost", "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({ acc_number: client_jwt_decoded.acc_number }, process.env.JWT_SECRET_CRM, { noTimestamp: true }); - const payload = { ...{ acc_number: client_jwt_decoded.acc_number }, ...params }; + let payload; + if(array) + { + payload = params; + } + else + { + payload = { ...{ acc_number: client_jwt_decoded.acc_number }, ...params }; + } //console.log("path", path); - //console.log("payload", payload); - - try { await axios.post(path, payload, diff --git a/pages/_document.js b/pages/_document.js index c114ad1..3d4903a 100644 --- a/pages/_document.js +++ b/pages/_document.js @@ -41,6 +41,28 @@ class Doc extends Document
+ +