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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +