tracker tasks

This commit is contained in:
2023-08-30 17:02:32 +03:00
parent 433fc88f99
commit 5fa069d84d
13 changed files with 307 additions and 145 deletions

View File

@ -21,11 +21,23 @@
&__vector-black {
top: 460px;
right: -224px;
@media (max-width: 1200px) {
top: 370px;
}
@media (max-width: 1024px) {
top: 180px;
}
}
&__arrow {
margin-top: 360px;
z-index: 99;
@media (max-width: 1200px) {
display: none;
}
}
@media (max-width: 575.98px) {
@ -42,6 +54,10 @@
padding-top: 30px;
position: relative;
padding-bottom: 310px;
@media (max-width: 1200px) {
display: none;
}
}
&__info-box {

View File

@ -21,11 +21,23 @@
&__vector-black {
top: 460px;
right: -224px;
@media (max-width: 1200px) {
top: 370px;
}
@media (max-width: 1024px) {
top: 180px;
}
}
&__arrow {
margin-top: 360px;
cursor: pointer;
@media (max-width: 1200px) {
display: none;
}
}
@media (max-width: 575.98px) {
@ -43,6 +55,10 @@
padding-top: 30px;
position: relative;
padding-bottom: 310px;
@media (max-width: 1200px) {
display: none;
}
}
@media (max-width: 575.98px) {
@ -305,7 +321,7 @@
transform: rotate(90deg);
}
@media (max-width: 660px) {
@media (max-width: 1024px) {
margin: 15px 0;
}
}

View File

@ -3,6 +3,10 @@
font-family: "LabGrotesque", sans-serif;
background-color: #F1F1F1;
padding-top: 60px;
@media (max-width: 1375px) {
padding-top: 120px;
}
}
&__title {
@ -17,6 +21,10 @@
color: #52B709;
font-weight: 700;
}
@media (max-width: 500px) {
font-size: 35px;
}
}
&__subTitle {
@ -25,6 +33,10 @@
text-align: center;
font-size: 22px;
line-height: 32px;
@media (max-width: 500px) {
font-size: 18px;
}
}
.arrowElement {
@ -35,6 +47,10 @@
display: flex;
justify-content: center;
align-items: center;
@media (max-width: 850px) {
display: none;
}
}
.arrowDown {
@ -42,6 +58,10 @@
img {
transform: rotate(90deg);
}
@media (max-width: 500px) {
margin: 15px auto;
}
}
&__info {
@ -68,6 +88,19 @@
ul {
padding-left: 18px;
}
@media (max-width: 700px) {
width: 100%;
}
@media (max-width: 600px) {
padding: 15px;
}
}
@media (max-width: 700px) {
flex-direction: column;
row-gap: 10px;
}
}
@ -78,6 +111,12 @@
margin: 20px auto 70px;
max-width: 1000px;
@media (max-width: 700px) {
margin: 10px auto 30px;
text-align: center;
row-gap: 5px;
}
span {
color: #52B709;
font-weight: 700;
@ -94,8 +133,16 @@
font-size: 18px;
line-height: 22px;
row-gap: 20px;
@media (max-width: 700px) {
row-gap: 8px;
}
}
}
@media (max-width: 500px) {
padding-top: 30px;
}
}
&__countingBlock {
@ -108,10 +155,34 @@
row-gap: 16px;
position: relative;
@media (max-width: 1125px) {
padding-right: 45px;
}
@media (max-width: 850px) {
padding: 20px 25px;
}
@media (max-width: 780px) {
row-gap: 5px;
padding: 15px;
}
&__head {
display: flex;
justify-content: space-between;
align-items: center;
@media (max-width: 850px) {
justify-content: space-evenly;
}
@media (max-width: 750px) {
text-align: center;
img {
display: none;
}
}
}
&__bottom {
@ -135,12 +206,21 @@
span {
color: #52B709;
}
@media (max-width: 780px) {
text-align: center;
row-gap: 5px;
}
}
.countingBlock__info {
display: flex;
flex-direction: column;
row-gap: 12px;
@media (max-width: 850px) {
row-gap: 5px;
}
}
.countingBlock {
@ -162,6 +242,18 @@
position: absolute;
right: -140px;
top: -55px;
@media (max-width: 1440px) {
right: -25px;
}
@media (max-width: 1210px) {
right: 25px;
}
@media (max-width: 1125px) {
display: none;
}
}
}
}

View File

@ -621,96 +621,98 @@ export const ProjectTracker = () => {
</div>
</div>
)}
{column.tasks.map((task) => {
return (
<div
key={task.id}
className={`tasks__board__item ${
taskHover[task.id] ? "task__hover" : ""
}`}
draggable={true}
onDragStart={(e) =>
dragStartHandler(e, task, column.id)
}
onDragOver={(e) => dragOverTaskHandler(e, task)}
onDragLeave={(e) => dragLeaveTaskHandler(e)}
onDragEnd={() => dragEndTaskHandler()}
onDrop={(e) =>
dragDropTaskHandler(e, task, column)
}
onClick={(e) => openTicket(e, task)}
>
<div className='tasksContainer'>
{column.tasks.map((task) => {
return (
<div
className="tasks__board__item__title"
onClick={() => {
if (window.innerWidth < 985) {
window.location.replace(
`/tracker/task/${task.id}`
);
}
}}
key={task.id}
className={`tasks__board__item ${
taskHover[task.id] ? "task__hover" : ""
}`}
draggable={true}
onDragStart={(e) =>
dragStartHandler(e, task, column.id)
}
onDragOver={(e) => dragOverTaskHandler(e, task)}
onDragLeave={(e) => dragLeaveTaskHandler(e)}
onDragEnd={() => dragEndTaskHandler()}
onDrop={(e) =>
dragDropTaskHandler(e, task, column)
}
onClick={(e) => openTicket(e, task)}
>
<p className="task__board__item__title">
{task.title}
</p>
</div>
<p
dangerouslySetInnerHTML={{
__html: task.description,
}}
className="tasks__board__item__description"
></p>
<div className="tasks__board__item__executor">
<span>
{task.executor?.fio
? task.executor?.fio
: "Исполнитель не назначен"}
</span>
{task.executor?.avatar && (
<img
src={
task.executor?.avatar
? urlForLocal(task.executor?.avatar)
: avatarMok
<div
className="tasks__board__item__title"
onClick={() => {
if (window.innerWidth < 985) {
window.location.replace(
`/tracker/task/${task.id}`
);
}
alt="avatar"
/>
)}
</div>
<div className="tasks__board__item__deadLine">
<p>Срок исполнения:</p>
<span>
{task.dead_line
? getCorrectDate(task.dead_line)
: "Не выбран"}
</span>
</div>
<div className="tasks__board__item__info">
<div className="tasks__board__item__info__more">
<img src={commentsBoard} alt="commentsImg" />
<span>
{task.comment_count}{" "}
{caseOfNum(task.comment_count, "comments")}
</span>
}}
>
<p className="task__board__item__title">
{task.title}
</p>
</div>
<div className="tasks__board__item__info__more">
<img src={filesBoard} alt="filesImg" />
<p
dangerouslySetInnerHTML={{
__html: task.description,
}}
className="tasks__board__item__description"
></p>
<div className="tasks__board__item__executor">
<span>
{task.files ? task.files : 0}{" "}
{caseOfNum(0, "files")}
{task.executor?.fio
? task.executor?.fio
: "Исполнитель не назначен"}
</span>
{task.executor?.avatar && (
<img
src={
task.executor?.avatar
? urlForLocal(task.executor?.avatar)
: avatarMok
}
alt="avatar"
/>
)}
</div>
{task.dead_line &&
<div className="tasks__board__item__deadLine">
<p>Срок исполнения:</p>
<span>
{getCorrectDate(task.dead_line)}
</span>
</div>
}
<div className="tasks__board__item__info">
<div className="tasks__board__item__info__more">
<img src={commentsBoard} alt="commentsImg" />
<span>
{task.comment_count}{" "}
{caseOfNum(task.comment_count, "comments")}
</span>
</div>
<div className="tasks__board__item__info__more">
<img src={filesBoard} alt="filesImg" />
<span>
{task.files ? task.files : 0}{" "}
{caseOfNum(0, "files")}
</span>
</div>
</div>
<TrackerSelectColumn
columns={projectBoard.columns.filter(
(item) => item.id !== column.id
)}
currentColumn={column}
task={task}
/>
</div>
<TrackerSelectColumn
columns={projectBoard.columns.filter(
(item) => item.id !== column.id
)}
currentColumn={column}
task={task}
/>
</div>
);
})}
);
})}
</div>
</div>
);
})}

View File

@ -9,7 +9,7 @@ import {
setToggleTab,
} from "@redux/projectsTrackerSlice";
import { urlForLocal } from "@utils/helper";
import {caseOfNum, urlForLocal} from "@utils/helper";
import { apiRequest } from "@api/request";
@ -295,7 +295,11 @@ export const Tracker = () => {
<div className="archive__tasks">
<div className="archive__title">
<h3>Архив задач:</h3>
<p>{filterCompleteTasks.length} задач(а)</p>
<p>
{
`${filterCompleteTasks.length}
${caseOfNum(filterCompleteTasks.length, "tasks")}`
}</p>
<div className="archive__tasks__search">
<img src={search} alt="search" />
<input
@ -354,8 +358,9 @@ export const Tracker = () => {
<div className="archive__title">
<h3>Архив проектов:</h3>
<p>
{projects.filter((project) => project.status === 10).length}{" "}
проект(ов)
{
`${projects.filter((project) => project.status === 10).length}
${caseOfNum(projects.filter((project) => project.status === 10).length, "projects")}`}
</p>
</div>
<div className="archive__tasksWrapper">

View File

@ -801,16 +801,17 @@
0px 0px 0px 1px rgba(60, 66, 87, 0.08),
0px 1px 1px rgba(0, 0, 0, 0.06);
border-radius: 8px;
padding: 16px 14px 16px 8px;
min-width: 353px;
max-width: 353px;
padding: 12px 10px 12px 8px;
min-width: 365px;
max-width: 380px;
display: flex;
flex-direction: column;
row-gap: 16px;
row-gap: 10px;
height: fit-content;
position: relative;
transition: all 0.3s ease;
transform: scaleY(-1);
min-height: 815px;
@media (max-width: 900px) {
min-width: auto;
@ -819,19 +820,28 @@
transform: scaleX(1);
}
&::-webkit-scrollbar {
width: 3px;
border-radius: 10px;
}
.tasksContainer {
display: flex;
flex-direction: column;
row-gap: 16px;
max-height: 750px;
overflow: auto;
padding: 8px;
&::-webkit-scrollbar-thumb {
background: #cbd9f9;
border-radius: 20px;
}
&::-webkit-scrollbar {
width: 3px;
border-radius: 10px;
}
&::-webkit-scrollbar-track {
background: #c5c0c6;
border-radius: 20px;
&::-webkit-scrollbar-thumb {
background: #cbd9f9;
border-radius: 20px;
}
&::-webkit-scrollbar-track {
background: #c5c0c6;
border-radius: 20px;
}
}
&__hover {