Merge remote-tracking branch 'origin/parthners-area-fix-modal' into parthners-area

This commit is contained in:
Николай Полтщук 2023-03-28 14:42:58 +03:00
commit c1eb60d3ab
11 changed files with 233 additions and 83 deletions

View File

@ -135,9 +135,10 @@
line-height: 32px; line-height: 32px;
color: #000000; color: #000000;
} }
span { span {
font-size: 5px; font-size: 12px;
margin-left: 41px; margin-left: 0px;
} }
} }
@ -194,6 +195,10 @@
width: 424px; width: 424px;
left: 140px; left: 140px;
@media (max-width: 1440px) {
left: 79px;
}
@media (max-width: 1024px) { @media (max-width: 1024px) {
left: 0; left: 0;
width: 100%; width: 100%;

View File

@ -30,11 +30,14 @@ export const SliderWorkers = ({title, titleInfo, subTitle}) => {
skils: "React / Vue Front end, Middle разработчик", skils: "React / Vue Front end, Middle разработчик",
}, },
]); ]);
const settings = { const settings = {
infinite: true, infinite: true,
speed: 300, speed: 1000,
slidesToShow: 3, slidesToShow: 3,
slidesToScroll: 1, slidesToScroll: 1,
autoplay: true,
autoplaySpeed: 4500,
}; };
if (window.innerWidth < 575) { if (window.innerWidth < 575) {
@ -54,9 +57,9 @@ export const SliderWorkers = ({title, titleInfo, subTitle}) => {
: "" : ""
} }
<Slider {...settings}> <Slider {...settings}>
{workers.map((worker) => { {workers.map((worker, index) => {
return ( return (
<div className="worker"> <div className="worker" key={index}>
<img src={worker.avatar}></img> <img src={worker.avatar}></img>
<div className="worker-description"> <div className="worker-description">
<p>{worker.skils}</p> <p>{worker.skils}</p>

View File

@ -9,13 +9,17 @@ export const ModalCreate = ({ active, setActive, title }) => {
const dispatch = useDispatch(); const dispatch = useDispatch();
function createName() { function createName() {
if (inputValue === "") {
return;
} else {
let newItem = { let newItem = {
name: inputValue, name: inputValue,
count: 0, count: 0,
}; };
dispatch(setProject(newItem)); dispatch(setProject(newItem));
setActive(false); setActive(false);
setInputValue("") setInputValue("");
}
} }
return ( return (

View File

@ -44,7 +44,12 @@ export const ModalTiket = ({ active, setActive }) => {
<h3 className="title-project"> <h3 className="title-project">
<img src={category} className="title-project__category"></img> <img src={category} className="title-project__category"></img>
Проект: {tiket.name} Проект: {tiket.name}
<div className="title-project__menu">
<p>Редактировать</p>
<p>Удалить</p>
</div>
</h3> </h3>
<div className="content__task"> <div className="content__task">
<h5>{tiket.code}</h5> <h5>{tiket.code}</h5>
<div className="content__description"> <div className="content__description">

View File

@ -39,6 +39,24 @@
&__category { &__category {
margin-right: 17px; margin-right: 17px;
} }
&__menu {
display: flex;
align-items: center;
margin-left: 110px;
p {
font-weight: 400;
font-size: 14px;
color: #252c32;
margin: 0 30px 0 0;
&:hover {
cursor: pointer;
text-decoration: underline;
}
}
}
} }
&__task { &__task {

View File

@ -31,6 +31,13 @@ const AuthForDevelopers = () => {
} }
}, [getToken]); }, [getToken]);
function scrollToForm() {
window.scrollTo({
top: 850,
behavior: "smooth",
});
}
return ( return (
<section className="auth-developers"> <section className="auth-developers">
<AuthHeader /> <AuthHeader />
@ -44,13 +51,13 @@ const AuthForDevelopers = () => {
/> />
<div className="container"> <div className="container">
<div className="change-mode"> <div className="change-mode">
<div className="change-mode__arrow"> <div className="change-mode__arrow" onClick={() => scrollToForm()}>
<img src={arrowBtn}></img> <img src={arrowBtn}></img>
</div> </div>
<div className="buttons"> <div className="buttons">
<Link to={"/authdev"}> <Link to={"/authdev"}>
<button className="change-mode__developersForDev"> <button className="change-mode__developersForDev">
Для разработчика Для разработчиков
</button> </button>
</Link> </Link>
<Link to={"/auth"}> <Link to={"/auth"}>

View File

@ -25,6 +25,7 @@
&__arrow { &__arrow {
margin-top: 360px; margin-top: 360px;
z-index: 99;
} }
@media (max-width: 575.98px) { @media (max-width: 575.98px) {

View File

@ -30,6 +30,13 @@ const AuthForPartners = () => {
} }
}, [getToken]); }, [getToken]);
function scrollToForm() {
window.scrollTo({
top: 850,
behavior: "smooth",
});
}
return ( return (
<section className="auth-partners"> <section className="auth-partners">
<AuthHeader /> <AuthHeader />
@ -39,13 +46,13 @@ const AuthForPartners = () => {
<img className="auth-partners__vector-black" src={vectorBlack} alt="" /> <img className="auth-partners__vector-black" src={vectorBlack} alt="" />
<div className="container"> <div className="container">
<div className="change-mode"> <div className="change-mode">
<div className="change-mode__arrow"> <div className="change-mode__arrow" onClick={() => scrollToForm()}>
<img src={arrowBtn}></img> <img src={arrowBtn}></img>
</div> </div>
<div className="buttons"> <div className="buttons">
<Link to={"/authdev"}> <Link to={"/authdev"}>
<button className="change-mode__developersForPart"> <button className="change-mode__developersForPart">
Для разработчика Для разработчиков
</button> </button>
</Link> </Link>
<Link to={"/auth"}> <Link to={"/auth"}>

View File

@ -25,6 +25,7 @@
&__arrow { &__arrow {
margin-top: 360px; margin-top: 360px;
cursor: pointer;
} }
@media (max-width: 575.98px) { @media (max-width: 575.98px) {
@ -286,6 +287,7 @@
align-items: center; align-items: center;
&__arrow { &__arrow {
cursor: pointer;
margin: 49px 0 43px 0; margin: 49px 0 43px 0;
width: 48px; width: 48px;
height: 48px; height: 48px;

View File

@ -4,6 +4,9 @@ import { ProfileHeader } from "../../components/ProfileHeader/ProfileHeader";
import {ProfileBreadcrumbs} from "../../components/ProfileBreadcrumbs/ProfileBreadcrumbs"; import {ProfileBreadcrumbs} from "../../components/ProfileBreadcrumbs/ProfileBreadcrumbs";
import { Footer } from "../../components/Footer/Footer"; import { Footer } from "../../components/Footer/Footer";
import { useDispatch, useSelector } from "react-redux";
import { getProjects } from "../../redux/projectsTrackerSlice";
import ModalTiket from "../../components/UI/ModalTiket/ModalTiket"; import ModalTiket from "../../components/UI/ModalTiket/ModalTiket";
import ModalCreate from "../../components/UI/ModalCreate/ModalCreate"; import ModalCreate from "../../components/UI/ModalCreate/ModalCreate";
@ -17,25 +20,10 @@ import filesBoard from "../../images/filesBoard.svg";
import search from "../../images/search.svg"; import search from "../../images/search.svg";
import "./tracker.scss"; import "./tracker.scss";
import { useDispatch, useSelector } from "react-redux";
import { getProjects } from "../../redux/projectsTrackerSlice";
export const Tracker = () => { export const Tracker = () => {
const [toggleTab, setToggleTab] = useState(1); const [toggleTab, setToggleTab] = useState(1);
// const [projects] = useState([
// {
// name: "Разработка трекера",
// count: 4,
// },
// {
// name: "Кинотеатр",
// count: 4,
// },
// {
// name: "Проект страхование",
// count: 4,
// },
// ]);
const [tabTaskMok, setTabTaskMok] = useState([ const [tabTaskMok, setTabTaskMok] = useState([
{ {
name: "Открытые", name: "Открытые",
@ -245,9 +233,20 @@ export const Tracker = () => {
const [filterCompleteTasks, setFilterCompleteTasks] = useState(completeTasks); const [filterCompleteTasks, setFilterCompleteTasks] = useState(completeTasks);
// Modal State
const [modalActiveTicket, setModalActiveTicket] = useState(false); const [modalActiveTicket, setModalActiveTicket] = useState(false);
const [modalCreateProject, setModalCreateProject] = useState(false); const [modalCreateProject, setModalCreateProject] = useState(false);
const [modalCreateColl, setModalCreateColl] = useState(false); const [modalCreateColl, setModalCreateColl] = useState(false);
const [modalCreateTiket, setModalCreateTiket] = useState(false);
const [valueTiket, setValueTiket] = useState("");
const [valueColl, setValueColl] = useState("");
//
const [selectedTab, setSelectedTab] = useState({
name: "",
indexTab: 0,
task: [],
});
const [startWrapperIndex, setStartWrapperIndex] = useState(null); const [startWrapperIndex, setStartWrapperIndex] = useState(null);
const [wrapperHover, setWrapperHover] = useState([ const [wrapperHover, setWrapperHover] = useState([
@ -258,7 +257,6 @@ export const Tracker = () => {
]); ]);
const projects = useSelector(getProjects); const projects = useSelector(getProjects);
const dispatch = useDispatch();
const toggleTabs = (index) => { const toggleTabs = (index) => {
setToggleTab(index); setToggleTab(index);
@ -357,8 +355,42 @@ export const Tracker = () => {
); );
} }
function createProject() { function selectedTabTask(e, wrapperIndex, name, tasks) {
setModalCreateProject(true); let tab = { name: name, indexTab: wrapperIndex, task: tasks };
setSelectedTab(tab);
setModalCreateTiket(true);
}
function createTiket() {
tabTaskMok.filter((item) => {
if (item.name == selectedTab.name) {
let newTiket = {
task: valueTiket,
description: "Сверстать часть таблицы. Сверстать часть таблицы",
comments: 0,
files: 0,
avatarCreated: avatarTest,
avatarDo: avatarTest,
id: item.tasks.length + 1,
};
item.tasks.push(newTiket);
}
});
setModalCreateTiket(false);
setValueTiket("");
}
function createTab() {
let newTab = {
name: valueColl,
open: false,
tasks: [],
};
tabTaskMok.unshift(newTab);
setValueColl("");
setModalCreateColl(false);
} }
return ( return (
@ -421,7 +453,7 @@ export const Tracker = () => {
setActive={setModalCreateProject} setActive={setModalCreateProject}
title={"Укажите название проекта:"} title={"Укажите название проекта:"}
/> />
<button onClick={createProject}> <button onClick={() => setModalCreateProject(true)}>
<span>+</span>Создать проект <span>+</span>Создать проект
</button> </button>
</div> </div>
@ -433,12 +465,32 @@ export const Tracker = () => {
} }
> >
<div className="tasks__head"> <div className="tasks__head">
<ModalCreate
active={modalCreateColl}
setActive={setModalCreateColl}
title={"Добавить колонку: "}
/>
<h4>Проект : Разработка трекера</h4> <h4>Проект : Разработка трекера</h4>
<div
className={
modalCreateColl ? "modal-project active" : "modal-project"
}
onClick={() => setModalCreateColl(false)}
>
<div
className="modal-project__content"
onClick={(e) => e.stopPropagation()}
>
<div className="title-project">
<h4>Введите название карточки</h4>
<div className="input-container">
<input
className="name-project"
value={valueColl}
onChange={(e) => setValueColl(e.target.value)}
></input>
</div>
</div>
<button className="create-project" onClick={createTab}>
Создать
</button>
</div>
</div>
<span <span
className="tasks__head__add" className="tasks__head__add"
onClick={() => setModalCreateColl(true)} onClick={() => setModalCreateColl(true)}
@ -461,11 +513,38 @@ export const Tracker = () => {
<img src={selectArrow} alt="arrow" /> <img src={selectArrow} alt="arrow" />
</div> </div>
</div> </div>
<ModalTiket <ModalTiket
active={modalActiveTicket} active={modalActiveTicket}
setActive={setModalActiveTicket} setActive={setModalActiveTicket}
/> />
<div
className={
modalCreateTiket ? "modal-project active" : "modal-project"
}
onClick={() => setModalCreateTiket(false)}
>
<div
className="modal-project__content"
onClick={(e) => e.stopPropagation()}
>
<div className="title-project">
<h4>Введите название карточки</h4>
<div className="input-container">
<input
className="name-project"
value={valueTiket}
onChange={(e) => setValueTiket(e.target.value)}
></input>
</div>
</div>
<button className="create-project" onClick={createTiket}>
Создать
</button>
</div>
</div>
<div className="tasks__container"> <div className="tasks__container">
{tabTaskMok.map((section, wrapperIndex) => { {tabTaskMok.map((section, wrapperIndex) => {
return ( return (
@ -487,7 +566,19 @@ export const Tracker = () => {
{section.name} {section.name}
</span> </span>
<div> <div>
<span className="add">+</span> <span
className="add"
onClick={(e) =>
selectedTabTask(
e,
wrapperIndex,
section.name,
section.tasks
)
}
>
+
</span>
<span className="more">...</span> <span className="more">...</span>
</div> </div>
</div> </div>
@ -510,7 +601,6 @@ export const Tracker = () => {
> >
<div className="tasks__board__item__title"> <div className="tasks__board__item__title">
<p>{task.task}</p> <p>{task.task}</p>
<span>...</span>
</div> </div>
<p className="tasks__board__item__description"> <p className="tasks__board__item__description">
{task.description} {task.description}

View File

@ -1,5 +1,5 @@
.tracker { .tracker {
background: #F1F1F1; background: #f1f1f1;
height: 100%; height: 100%;
min-height: 100vh; min-height: 100vh;
font-family: "LabGrotesque", sans-serif; font-family: "LabGrotesque", sans-serif;
@ -22,7 +22,7 @@
margin-top: 70px; margin-top: 70px;
.row { .row {
margin-right: 0px margin-right: 0px;
} }
} }
@ -66,9 +66,8 @@
width: calc(100% - 150px); width: calc(100% - 150px);
} }
&__projects { &__projects {
background: #FFFFFF; background: #ffffff;
border-radius: 0 12px 12px 12px; border-radius: 0 12px 12px 12px;
padding: 26px 24px 40px; padding: 26px 24px 40px;
flex-wrap: wrap; flex-wrap: wrap;
@ -87,7 +86,7 @@
.project { .project {
width: 48%; width: 48%;
background: #F1F1F1; background: #f1f1f1;
border-radius: 12px; border-radius: 12px;
padding: 17px 26px 16px; padding: 17px 26px 16px;
cursor: pointer; cursor: pointer;
@ -122,7 +121,7 @@
} }
p { p {
color: #6F6F6F; color: #6f6f6f;
font-weight: 500; font-weight: 500;
font-size: 12px; font-size: 12px;
line-height: 24px; line-height: 24px;
@ -136,16 +135,16 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background: #DDDDDD; background: #dddddd;
border-radius: 4px; border-radius: 4px;
font-weight: 500; font-weight: 500;
font-size: 14px; font-size: 14px;
line-height: 24px; line-height: 24px;
color: #6F6F6F; color: #6f6f6f;
} }
.add { .add {
color: #6F6F6F; color: #6f6f6f;
font-size: 17px; font-size: 17px;
margin: 0 25px 0 auto; margin: 0 25px 0 auto;
@ -155,10 +154,10 @@
} }
&:after { &:after {
content: '...'; content: "...";
position: absolute; position: absolute;
font-size: 21px; font-size: 21px;
color: #6F6F6F; color: #6f6f6f;
right: 0; right: 0;
top: -35%; top: -35%;
@ -170,7 +169,7 @@
} }
button { button {
background: #52B709; background: #52b709;
border-radius: 44px; border-radius: 44px;
max-width: 188px; max-width: 188px;
height: 50px; height: 50px;
@ -179,7 +178,7 @@
font-weight: 400; font-weight: 400;
font-size: 15px; font-size: 15px;
line-height: 32px; line-height: 32px;
color: #FFFFFF; color: #ffffff;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -194,7 +193,7 @@
&__tasks { &__tasks {
display: none; display: none;
background: #FFFFFF; background: #ffffff;
border-radius: 12px; border-radius: 12px;
padding: 13px 23px 65px; padding: 13px 23px 65px;
flex-direction: column; flex-direction: column;
@ -217,10 +216,9 @@
} }
.tasks { .tasks {
&__head { &__head {
display: flex; display: flex;
border-bottom: 1px solid #DDE2E4; border-bottom: 1px solid #dde2e4;
padding: 0 25px 15px; padding: 0 25px 15px;
align-items: center; align-items: center;
width: 1525px; width: 1525px;
@ -236,7 +234,7 @@
&__add { &__add {
width: 33px; width: 33px;
height: 33px; height: 33px;
background: #52B709; background: #52b709;
border-radius: 44px; border-radius: 44px;
color: whitesmoke; color: whitesmoke;
cursor: pointer; cursor: pointer;
@ -276,14 +274,14 @@
} }
span { span {
color: #252C32; color: #252c32;
font-weight: 500; font-weight: 500;
font-size: 12px; font-size: 12px;
line-height: 16px; line-height: 16px;
display: flex; display: flex;
width: 32px; width: 32px;
height: 32px; height: 32px;
border: 1px solid #DDE2E4; border: 1px solid #dde2e4;
border-radius: 50px; border-radius: 50px;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -298,7 +296,7 @@
margin-left: 18px; margin-left: 18px;
} }
span { span {
color: #252C32; color: #252c32;
font-weight: 400; font-weight: 400;
font-size: 14px; font-size: 14px;
line-height: 24px; line-height: 24px;
@ -314,8 +312,10 @@
} }
&__board { &__board {
background: #F5F7F9; background: #f5f7f9;
box-shadow: 0px 2px 5px rgba(60, 66, 87, 0.04), 0px 0px 0px 1px rgba(60, 66, 87, 0.08), 0px 1px 1px rgba(0, 0, 0, 0.06); box-shadow: 0px 2px 5px rgba(60, 66, 87, 0.04),
0px 0px 0px 1px rgba(60, 66, 87, 0.08),
0px 1px 1px rgba(0, 0, 0, 0.06);
border-radius: 8px; border-radius: 8px;
padding: 16px 14px 16px 8px; padding: 16px 14px 16px 8px;
width: 350px; width: 350px;
@ -326,17 +326,21 @@
position: relative; position: relative;
transition: all 0.3s ease; transition: all 0.3s ease;
&__hover { &__hover {
box-shadow: 0px 2px 10px #9cc480, 0px 0px 0px 1px rgba(60, 66, 87, 0.08), 0px 1px 1px rgba(0, 0, 0, 0.06); box-shadow: 0px 2px 10px #9cc480,
0px 0px 0px 1px rgba(60, 66, 87, 0.08),
0px 1px 1px rgba(0, 0, 0, 0.06);
} }
&__item { &__item {
width: 328px;
height: 154px;
padding: 16px; padding: 16px;
position: relative; position: relative;
box-shadow: 0px 3px 2px -2px rgba(0, 0, 0, 0.06), 0px 5px 3px -2px rgba(0, 0, 0, 0.02); box-shadow: 0px 3px 2px -2px rgba(0, 0, 0, 0.06),
0px 5px 3px -2px rgba(0, 0, 0, 0.02);
border-radius: 6px; border-radius: 6px;
background: #FFFFFF; background: #ffffff;
cursor: pointer; cursor: pointer;
&__hide { &__hide {
@ -346,8 +350,10 @@
&__title { &__title {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
position: relative;
p { p {
color: #1A1919; color: #1a1919;
font-weight: 500; font-weight: 500;
font-size: 16px; font-size: 16px;
line-height: 24px; line-height: 24px;
@ -364,13 +370,13 @@
padding-bottom: 13px; padding-bottom: 13px;
width: 24px; width: 24px;
height: 24px; height: 24px;
border: 1px solid #DDDDDD; border: 1px solid #dddddd;
} }
} }
&__description { &__description {
margin: 8px 0 15px; margin: 8px 0 15px;
color: #5C6165; color: #5c6165;
font-weight: 400; font-weight: 400;
font-size: 14px; font-size: 14px;
line-height: 140%; line-height: 140%;
@ -388,7 +394,7 @@
font-weight: 500; font-weight: 500;
font-size: 12px; font-size: 12px;
line-height: 15px; line-height: 15px;
color: #6E7C87; color: #6e7c87;
margin-left: 5px; margin-left: 5px;
} }
} }
@ -422,7 +428,7 @@
} }
.moreItems { .moreItems {
background: #8BCC60; background: #8bcc60;
} }
.lessItems { .lessItems {
@ -439,8 +445,10 @@
position: relative; position: relative;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
min-width: 300px;
span { span {
color: #6F6F6F; color: #6f6f6f;
font-weight: 500; font-weight: 500;
font-size: 16px; font-size: 16px;
line-height: 24px; line-height: 24px;
@ -448,7 +456,7 @@
} }
.add { .add {
color: #6F6F6F; color: #6f6f6f;
font-size: 19px; font-size: 19px;
} }
@ -482,7 +490,7 @@
.archive { .archive {
&__title { &__title {
padding-bottom: 8px; padding-bottom: 8px;
border-bottom: 1px solid #DDE2E4; border-bottom: 1px solid #dde2e4;
display: flex; display: flex;
align-items: center; align-items: center;
@ -503,7 +511,7 @@
&__search { &__search {
border: 2px solid; border: 2px solid;
border-color: var(--ds-border-input, #DFE1E6); border-color: var(--ds-border-input, #dfe1e6);
margin-left: auto; margin-left: auto;
padding: 5px; padding: 5px;
display: flex; display: flex;
@ -535,7 +543,7 @@
&::-webkit-scrollbar { &::-webkit-scrollbar {
width: 4px; width: 4px;
background: 0 0; background: 0 0;
box-shadow: 0 0 14px rgba(0,0,0,.04); box-shadow: 0 0 14px rgba(0, 0, 0, 0.04);
border-radius: 20px; border-radius: 20px;
} }