card redesign

This commit is contained in:
Victor Batischev 2024-02-09 22:40:54 +03:00
parent a196b174e2
commit 56caee4453
2 changed files with 60 additions and 44 deletions

View File

@ -909,20 +909,6 @@ export const ProjectTracker = () => {
}} }}
className="tasks__board__item__description" className="tasks__board__item__description"
></p> ></p>
<div className="tasks__board__item__executor">
<img
src={
task.executor?.avatar
? urlForLocal(task.executor?.avatar)
: avatarMok
}
alt="avatar"
/>
<span>
{task.executor?.fio ||
"Исполнитель не назначен"}
</span>
</div>
{Boolean(task.mark.length) && ( {Boolean(task.mark.length) && (
<div className="tasks__board__item__tags"> <div className="tasks__board__item__tags">
{task.mark.map((tag) => { {task.mark.map((tag) => {
@ -938,38 +924,57 @@ export const ProjectTracker = () => {
})} })}
</div> </div>
)} )}
{typeof task.execution_priority === <div className="tasks__board__item__container">
"number" && ( {typeof task.execution_priority ===
<div className="tasks__board__item__priority"> "number" && (
<p>Приоритет:</p> <div className="tasks__board__item__priority">
<span <p></p>
className={ <span
priorityClass[task.execution_priority] className={
} priorityClass[task.execution_priority]
> }
{priority[task.execution_priority]} >
</span> {priority[task.execution_priority]}
</div> </span>
)} </div>
{task.dead_line && ( )}
<div className="tasks__board__item__dead-line"> {task.dead_line && (
<img src={calendarIcon} alt="calendar" /> <div className="tasks__board__item__dead-line">
<span> <p></p>
{getCorrectDate(task.dead_line)} <span>
</span> {getCorrectDate(task.dead_line)}
</div> </span>
)} </div>
)}
</div>
<div className="tasks__board__item__info"> <div className="tasks__board__item__info">
<div className="tasks__board__item__info__more"> <div className="tasks__board__item__executor">
<img <img
src={commentsBoard} src={
alt="commentsImg" task.executor?.avatar
? urlForLocal(task.executor?.avatar)
: avatarMok
}
alt="avatar"
/> />
<span>{task.comment_count}</span> <span>
{task.executor?.fio ||
"Исполнитель не назначен"}
</span>
</div> </div>
<div className="tasks__board__item__info__more"> <div className="tasks__board__item__info__tags">
<img src={filesBoard} alt="filesImg" /> <div className="tasks__board__item__info__more">
<span>{task.file_count}</span> <img
src={commentsBoard}
alt="commentsImg"
/>
<span>{task.comment_count}</span>
</div>
<div className="tasks__board__item__info__more">
<img src={filesBoard} alt="filesImg" />
<span>{task.file_count}</span>
</div>
</div> </div>
</div> </div>
<TrackerSelectColumn <TrackerSelectColumn

View File

@ -806,7 +806,7 @@
&__item { &__item {
width: 328px; width: 328px;
padding: 6px 10px; padding: 6px 10px 8px 10px;
position: relative; position: relative;
box-shadow: 0px 3px 2px -2px rgba(0, 0, 0, 0.06), box-shadow: 0px 3px 2px -2px rgba(0, 0, 0, 0.06),
0px 5px 3px -2px rgba(0, 0, 0, 0.02); 0px 5px 3px -2px rgba(0, 0, 0, 0.02);
@ -845,7 +845,7 @@
color: #1a1919; color: #1a1919;
font-weight: 500; font-weight: 500;
font-size: 16px; font-size: 16px;
line-height: 24px; line-height: 20px;
margin-bottom: 0; margin-bottom: 0;
max-height: 100px; max-height: 100px;
overflow: hidden; overflow: hidden;
@ -881,13 +881,24 @@
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} }
&__container {
display: flex;
justify-content: space-between;
}
&__info { &__info {
display: flex; display: flex;
column-gap: 10px; column-gap: 10px;
align-items: center; align-items: center;
justify-content: space-between;
pointer-events: none; pointer-events: none;
margin-top: 5px; margin-top: 5px;
&__tags {
display: flex;
column-gap: 5px;
}
&__more { &__more {
cursor: pointer; cursor: pointer;
display: flex; display: flex;