This commit is contained in:
merelendor 2023-09-19 11:39:02 +03:00
commit 6a6078e9c4
9 changed files with 340 additions and 17 deletions

View File

@ -0,0 +1,21 @@
import React from "react";
export default class DigitalDocumentAutomationBanner extends React.Component
{
constructor(props)
{
super(props);
this.state = {};
}
render()
{
return (
<div>
<p>Наш оператор Диадок. Идентификатор участника ЭДО (GUID) 2BM-9724016636-772401001-202007300714591533849».</p>
<div>Что такое ЭДО?</div>
<div>Получить приглашение в ЭДО</div>
</div>
)
}
}

View File

@ -1387,6 +1387,9 @@
line-height: 20px;
}
}
.questionnaire .autocomlete_with_indicators .react-select__control .react-select__indicators {
display: block !important;
}
.questionnaire .files_list {
padding-bottom: 30px;
}

View File

@ -1554,25 +1554,28 @@
max-width: 800px;
}
.autocomlete {
.autocomlete
{
* {
outline: none;
box-shadow: none !important;
}
.react-select__control {
.react-select__control
{
border-radius: 0;
border: 1px solid rgba(0,16,61,0.12);
height: 40px;
min-height: 40px;
&.react-select__control--menu-is-open {
&.react-select__control--menu-is-open
{
border-color: var(--blue);
}
.react-select__value-container {
.react-select__value-container
{
padding:0 12px;
height: 100%;
background: #fff;
@ -1581,13 +1584,15 @@
//background-color: #EDEFF5;
}
.react-select__input-container {
.react-select__input-container
{
margin: 0;
padding: 0;
}
}
.react-select__indicators {
.react-select__indicators
{
display: none;
}
}
@ -1622,13 +1627,24 @@
color: var(--blue);
}
@media all and (max-width: 960px) {
font-size: 13px;
line-height: 20px;
}
}
}
}
@media all and (max-width: 960px) {
font-size: 13px;
line-height: 20px;
}
}
}
}
.autocomlete_with_indicators
{
.react-select__control
{
.react-select__indicators
{
display: block !important;
}
}
}
.files_list {
padding-bottom: 30px;

View File

@ -6077,3 +6077,40 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block .block_body .fines_
flex-direction: row;
grid-gap: 10px 10px;
}
.edo_banner .title {
display: flex;
gap: 0px 10px;
}
.edo_banner .info {
cursor: pointer;
margin-left: 80px;
}
.edo_banner .info:after {
content: "";
display: inline-block;
margin-left: 5px;
width: 10px;
height: 10px;
background-size: contain;
background-image: url("data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0.25' y='2.25' width='6.5' height='7.5' rx='0.75' fill='white' stroke='%230C0C0C' stroke-width='0.5'/%3E%3Crect x='3.25' y='0.25' width='6.5' height='7.5' rx='0.75' fill='white' stroke='%230C0C0C' stroke-width='0.5'/%3E%3C/svg%3E");
}
.edo_banner .buttons {
display: flex;
gap: 0px 20px;
margin-left: 80px;
}
.edo_banner .buttons a {
margin-top: 10px;
}
@media all and (max-width: 1279px) {
.edo_banner .info {
margin-left: 0px;
}
.edo_banner .buttons {
flex-direction: column;
margin-left: 0px;
}
}
.edo_detail p {
margin: 0px;
}

View File

@ -6989,3 +6989,54 @@ main .dropdown_blocks_list.zero-margin.gibdd .dropdown_block {
grid-gap: 10px 10px;
}
}
.edo_banner {
.title {
display: flex;
gap: 0px 10px;
}
.info {
cursor: pointer;
margin-left: 80px;
&:after {
content: "";
display: inline-block;
width: 10px;
height: 10px;
margin-left: 5px;
width: 10px;
height: 10px;
background-size: contain;
background-image: url("data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0.25' y='2.25' width='6.5' height='7.5' rx='0.75' fill='white' stroke='%230C0C0C' stroke-width='0.5'/%3E%3Crect x='3.25' y='0.25' width='6.5' height='7.5' rx='0.75' fill='white' stroke='%230C0C0C' stroke-width='0.5'/%3E%3C/svg%3E");
}
}
.buttons {
display: flex;
gap: 0px 20px;
margin-left: 80px;
a {
margin-top: 10px;
}
}
@media all and (max-width: 1279px) {
.info {
margin-left: 0px;
}
.buttons {
flex-direction: column;
margin-left: 0px;
}
}
}
.edo_detail {
p {
margin: 0px;
}
}

View File

@ -94,6 +94,18 @@ class AnnouncementsList extends React.Component
<div className="feed">
<div className="feed_list">
<Slider { ...settings }>
<div className="feed_item edo_banner">
<p className="item_title">Электронный документооборот</p>
<p className="item_desc title">
<img src="/assets/images/icons/icon_edo_gray.svg" alt="" width={ 80 } height={ 40 }/>
Подключите систему электронного документооборота (ЭДО) для ускорения обмена документами.
</p>
<p className="item_desc info">Наш оператор Диадок. Идентификатор участника ЭДО (GUID): <br/>2BM-9724016636-772401001-202007300714591533849</p>
<div className="buttons">
<a href={ "/" } className="item_link">Что такое ЭДО?</a>
<a href={ "/settings/digital" } className="item_link">Получить приглашение в ЭДО</a>
</div>
</div>
{ announcements !== undefined && announcements !== null && announcements.map(( announcement, index ) => (
<div className="feed_item" key={ index }>
<p className="item_title">{ announcement.title }</p>

View File

@ -2,9 +2,10 @@ import React from "react";
import Link from "next/link";
const menu = [
{id: 1, type: "phone", name: "Номер телефона", link: "/settings/phone"},
{id: 2, type: "password", name: "Пароль", link: "/settings/password"},
{id: 3, type: "admin", name: "Настройки доступа", link: "/settings/admin"},
{ id: 0, type: "digital", name: "ЭДО", link: "/settings/digital" },
{ id: 1, type: "phone", name: "Номер телефона", link: "/settings/phone" },
{ id: 2, type: "password", name: "Пароль", link: "/settings/password" },
{ id: 3, type: "admin", name: "Настройки доступа", link: "/settings/admin" },
]
export default class InnerMenu extends React.Component
@ -50,6 +51,7 @@ export default class InnerMenu extends React.Component
_getActiveLink = (route) =>
{
if (route.indexOf("/digital") > -1) return "ЭДО";
if (route.indexOf("/phone") > -1) return "Номер телефона";
if (route.indexOf("/password") > -1) return "Пароль";
if (route.indexOf("/admin") > -1) return "Настройки доступа";

172
pages/settings/digital.js Normal file
View File

@ -0,0 +1,172 @@
import React from "react";
import Head from 'next/head';
import Image from 'next/image';
import Link from "next/link";
import cookie from 'cookie';
import { connect } from "react-redux";
import numeral from "numeral";
import pluralize from 'pluralize-ru';
import { SpinnerCircular } from 'spinners-react';
import Select from 'react-select';
import NoSSR from "@mpth/react-no-ssr";
import { withRouter } from 'next/router';
import { reduxWrapper } from '../../store';
import InnerMenu from "./components/InnerMenu";
import Header from '../components/Header';
import Footer from '../components/Footer';
import Pagination from '../components/Pagination';
import Company from "../components/Company";
import { sendPhoneChangeNumber, sendPhoneChangeNumberSmsCode, setUserPhone } from '../../actions';
import AccountLayout from "../components/Layout/Account";
class IndexPage extends React.Component
{
constructor(props)
{
super(props);
this.state = {
loading: false,
operator: undefined,
oparators: [
{ "value": "1", "label": "Диадок" },
{ "value": "2", "label": "Такском" },
{ "value": "3", "label": "Тензор" },
{ "value": "4", "label": "Калуга Астрал" },
{ "value": "5", "label": "КОРУС Консалтинг" },
{ "value": "6", "label": "АйтиКом" },
]
};
}
static getDerivedStateFromProps(nextProps, prevState)
{
return {
observer: nextProps.observer,
user: nextProps.user,
};
}
componentDidMount()
{
}
_handle_onFormSubmit = (event) =>
{
event.preventDefault();
}
_handle_onOperatorChange = (operator) =>
{
this.setState({ operator });
}
render()
{
const { user, oparators, operator, loading, } = this.state;
return (
<React.Fragment>
<Head>
<title>ЛК Эволюция автолизинга</title>
<meta
name="description"
content="ЛК Эволюция автолизинга"
/>
</Head>
<Header { ...this.props }/>
<AccountLayout>
<div className="title_wrapper">
<div className="left">
<h1 className="section_title">Электронный документооборот</h1>
</div>
<Company { ...this.props }/>
</div>
<NoSSR>
<div className="aside_container about">
<InnerMenu { ...this.props } user={ user }/>
<article className="questionnaire edo_detail">
<p>Выберите своего оператора. Мы отправим вашей организации приглашение.</p>
<p><br/></p>
<form ref={ this.ref_form } onSubmit={ this._handle_onFormSubmit } onKeyDown={(e) => {if (e.key === 'Enter') e.preventDefault() }}>
<div className="form_field">
<label>Оператор ЭДО <sup className="required_label">*</sup></label>
<Select
id="edo_oparators_list"
name="edo_oparators_list"
options={ oparators }
placeholder="Выберите оператора"
noOptionsMessage={ ({ inputValue }) => !inputValue ? "" :"Ничего не найдено" }
isSearchable={ true }
className="autocomlete autocomlete_with_indicators"
classNamePrefix="react-select"
value={ operator !== undefined ? operator : undefined }
onChange={ (element) => { this._handle_onOperatorChange(element) } }
required={ true }
/>
</div>
<div className="form_field" style={{ display: "flex", justifyContent: "flex-end" }}>
<button type="submit" className="button button-blue" disabled={ operator === undefined ? true : false }>
{ loading ? (
<SpinnerCircular size={24} thickness={100} speed={100} color="rgba(255, 255, 255, 1)" secondaryColor="rgba(255, 255, 255, 0.5)" style={{ marginTop: "4px" }}/>
) : "Отправить приглашение" }
</button>
</div>
</form>
</article>
</div>
</NoSSR>
</AccountLayout>
<Footer/>
</React.Fragment>
)
}
}
function mapStateToProps(state, ownProps)
{
return {
observer: state.auth.observer,
user: state.user,
}
}
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(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 };
}
);
export default withRouter(connect(mapStateToProps)(IndexPage));

View File

@ -0,0 +1,9 @@
<svg width="55" height="30" viewBox="0 0 55 30" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M34.5081 24.1935H6.20788V24.1934C6.20776 24.1934 6.20764 24.1934 6.20752 24.1934C2.7792 24.1934 0 21.4411 0 18.0459C0 14.6507 2.7792 11.8984 6.20752 11.8984C6.41014 11.8984 6.61049 11.908 6.80814 11.9268L6.80808 11.8984C6.80808 8.50319 9.58728 5.75087 13.0156 5.75087C13.3514 5.75087 13.6811 5.77728 14.0025 5.82813C15.0748 2.45009 18.262 0 22.027 0C25.3486 0 28.2204 1.90698 29.5871 4.67573C29.9585 4.6005 30.343 4.561 30.7368 4.561C33.8887 4.561 36.4437 7.09136 36.4437 10.2127C36.4437 10.5339 36.4167 10.8487 36.3647 11.1552C39.1837 11.9417 41.25 14.507 41.25 17.5503C41.25 21.1861 38.3008 24.1396 34.6423 24.1928V24.1935H34.5757C34.5644 24.1935 34.5532 24.1935 34.5419 24.1935C34.5306 24.1935 34.5193 24.1935 34.5081 24.1935Z" fill="#EDEFF5"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M34.521 21.6468L34.5419 21.6469L34.5628 21.6468L34.5757 21.6468L34.579 21.6468L34.6046 21.6464C36.8598 21.6136 38.6785 19.7921 38.6785 17.5503C38.6785 15.6773 37.4071 14.0919 35.6674 13.6065L33.4467 12.9869L33.8287 10.7336C33.8571 10.5658 33.8722 10.392 33.8722 10.2127C33.8722 8.49786 32.4684 7.10768 30.7368 7.10768C30.5171 7.10768 30.3052 7.12968 30.1025 7.17075L28.1514 7.56598L27.2768 5.79417C26.325 3.86593 24.3291 2.54668 22.027 2.54668C19.4171 2.54668 17.2008 4.24442 16.4556 6.59188L15.7897 8.68984L13.5968 8.34293C13.4091 8.31322 13.2151 8.29755 13.0156 8.29755C11.0084 8.29755 9.38103 9.9083 9.37963 11.8958C9.37963 11.8966 9.37963 11.8975 9.37963 11.8984L9.38622 14.7303L6.56237 14.4618C6.44629 14.4508 6.32795 14.4451 6.20752 14.4451C4.19943 14.4451 2.57155 16.0572 2.57155 18.0459C2.57155 20.0346 4.19943 21.6467 6.20753 21.6467H8.77943L34.521 21.6468ZM6.92814 10.6891C7.49538 7.873 10.0052 5.75087 13.0156 5.75087C13.3514 5.75087 13.6811 5.77728 14.0025 5.82813C15.0748 2.45009 18.262 0 22.027 0C25.3486 0 28.2204 1.90698 29.5871 4.67573C29.9585 4.6005 30.343 4.561 30.7368 4.561C33.8887 4.561 36.4437 7.09136 36.4437 10.2127C36.4437 10.5339 36.4167 10.8487 36.3647 11.1552C39.1837 11.9417 41.25 14.507 41.25 17.5503C41.25 21.1861 38.3008 24.1396 34.6423 24.1928L34.5757 24.1935L34.5419 24.1935L34.5081 24.1935H6.20788C2.77956 24.1935 0 21.4411 0 18.0459C0 14.8612 2.44538 12.242 5.57807 11.9296C5.73775 11.9137 5.89921 11.9038 6.06222 11.9001C6.11052 11.899 6.15895 11.8984 6.20752 11.8984C6.24631 11.8984 6.28503 11.8988 6.32365 11.8995C6.48676 11.9024 6.64834 11.9116 6.80814 11.9268L6.80808 11.8984C6.80808 11.4844 6.84939 11.0801 6.92814 10.6891Z" fill="black"/>
<path d="M13.75 9.67737H55V29.9999H13.75V9.67737Z" fill="white"/>
<path d="M13.75 9.67737H55V29.9999H13.75V9.67737Z" fill="#EDEFF5"/>
<path d="M22.4485 19.7139V17.8936H27.3022V19.7139H22.4485ZM23.7391 13.5483C24.4779 13.5483 25.1559 13.6805 25.7732 13.9447C26.3904 14.1991 26.9282 14.5661 27.3864 15.0457C27.8447 15.5252 28.2 16.088 28.4526 16.7339C28.7051 17.3798 28.8313 18.0893 28.8313 18.8625C28.8313 19.6356 28.7051 20.3451 28.4526 20.991C28.2 21.6369 27.8447 22.1997 27.3864 22.6792C26.9282 23.1588 26.3904 23.5306 25.7732 23.7949C25.1559 24.0493 24.4779 24.1766 23.7391 24.1766C22.8693 24.1766 22.0837 24.02 21.3823 23.7068C20.6903 23.3936 20.1104 22.9386 19.6428 22.3416L21.0877 20.9323C21.4338 21.3433 21.8172 21.6516 22.238 21.8571C22.6589 22.0529 23.1218 22.1507 23.6268 22.1507C24.0477 22.1507 24.4358 22.0724 24.7912 21.9159C25.1559 21.7495 25.4645 21.5244 25.7171 21.2406C25.9789 20.947 26.1753 20.5996 26.3062 20.1983C26.4465 19.7971 26.5167 19.3518 26.5167 18.8625C26.5167 18.3731 26.4465 17.9278 26.3062 17.5266C26.1753 17.1253 25.9789 16.7828 25.7171 16.499C25.4645 16.2054 25.1559 15.9803 24.7912 15.8237C24.4358 15.6573 24.0477 15.5742 23.6268 15.5742C23.1218 15.5742 22.6589 15.6769 22.238 15.8824C21.8172 16.0782 21.4338 16.3816 21.0877 16.7926L19.6428 15.3833C20.1104 14.7863 20.6903 14.3313 21.3823 14.0181C22.0837 13.7049 22.8693 13.5483 23.7391 13.5483Z" fill="black"/>
<path d="M36.8462 22.9435V15.6622H33.4794L33.4373 17.1596C33.4092 17.7957 33.3672 18.3976 33.311 18.9652C33.2643 19.5328 33.1895 20.0515 33.0866 20.5213C32.9837 20.9812 32.8481 21.3727 32.6798 21.6957C32.5208 22.0186 32.3197 22.2486 32.0766 22.3856L29.6497 22.0627C29.9863 22.0724 30.2622 21.9501 30.4773 21.6957C30.7018 21.4412 30.8795 21.084 31.0104 20.624C31.1413 20.1543 31.2349 19.6062 31.291 18.9799C31.3564 18.3535 31.4032 17.6734 31.4313 16.9394L31.5435 13.7245H39.0907V22.9435H36.8462ZM29.327 26.129L29.341 22.0627H40.4654V26.129H38.3612V24.0004H31.4313V26.129H29.327Z" fill="black"/>
<path d="M46.6947 24.1766C45.9185 24.1766 45.1984 24.0444 44.5344 23.7802C43.8797 23.516 43.3093 23.1441 42.823 22.6645C42.346 22.185 41.9719 21.6223 41.7007 20.9764C41.4388 20.3304 41.3079 19.6258 41.3079 18.8625C41.3079 18.0991 41.4388 17.3945 41.7007 16.7486C41.9719 16.1026 42.3507 15.5399 42.837 15.0604C43.3233 14.5808 43.8938 14.2089 44.5484 13.9447C45.2031 13.6805 45.9138 13.5483 46.6807 13.5483C47.457 13.5483 48.1677 13.6805 48.813 13.9447C49.4677 14.2089 50.0335 14.5808 50.5104 15.0604C50.9967 15.5399 51.3755 16.1026 51.6467 16.7486C51.9179 17.3847 52.0535 18.0893 52.0535 18.8625C52.0535 19.6258 51.9179 20.3353 51.6467 20.991C51.3755 21.6369 50.9967 22.1997 50.5104 22.6792C50.0335 23.149 49.4677 23.516 48.813 23.7802C48.1677 24.0444 47.4616 24.1766 46.6947 24.1766ZM46.6807 22.1507C47.1203 22.1507 47.5224 22.0724 47.8871 21.9159C48.2612 21.7593 48.5886 21.5342 48.8691 21.2406C49.1497 20.947 49.3648 20.5996 49.5144 20.1983C49.6734 19.7971 49.7529 19.3518 49.7529 18.8625C49.7529 18.3731 49.6734 17.9278 49.5144 17.5266C49.3648 17.1253 49.1497 16.7779 48.8691 16.4843C48.5979 16.1907 48.2753 15.9656 47.9012 15.809C47.5271 15.6525 47.1203 15.5742 46.6807 15.5742C46.2412 15.5742 45.8344 15.6525 45.4603 15.809C45.0955 15.9656 44.7729 16.1907 44.4923 16.4843C44.2118 16.7779 43.992 17.1253 43.833 17.5266C43.6834 17.9278 43.6085 18.3731 43.6085 18.8625C43.6085 19.342 43.6834 19.7873 43.833 20.1983C43.992 20.5996 44.2071 20.947 44.4783 21.2406C44.7589 21.5342 45.0862 21.7593 45.4603 21.9159C45.8344 22.0724 46.2412 22.1507 46.6807 22.1507Z" fill="black"/>
</svg>

After

Width:  |  Height:  |  Size: 6.1 KiB