- {tag.title}
-
-
- {tag.slug}
-
-
-
-
{
- setTags((prevState) => ({
- ...prevState,
- edit: true
- }));
- setTagInfo({
- description: tag.title,
- name: tag.slug,
- editMarkId: tag.id
- });
- setColor(tag.color);
- }}
- />
-
deleteTag(tag.id)}
- className="delete"
- src={close}
- alt="delete"
- />
+
+
+ {tag.slug}
+
+
+ {tag.title}
+
+
+
{
+ setTags((prevState) => ({
+ ...prevState,
+ edit: true
+ }));
+ setTagInfo({
+ description: tag.title,
+ name: tag.slug,
+ editMarkId: tag.id
+ });
+ setColor(tag.color);
+ }}
+ />
+
deleteTag(tag.id)}
+ className="delete"
+ src={close}
+ alt="delete"
+ />
+
);
})}
@@ -707,23 +709,6 @@ export const ProjectTracker = () => {
)}
{(tags.add || tags.edit) && (
-
{
- setTags((prevState) => ({
- ...prevState,
- add: false,
- edit: false
- }));
- setTagInfo({
- description: "",
- name: ""
- });
- setColor("#aabbcc");
- }}
- />
{
>
{tags.add ? "Добавить" : "Изменить"}
- {tags.add && (
+ {(tags.add || tags.edit) && (
diff --git a/src/pages/Tracker/Tracker.jsx b/src/pages/Tracker/Tracker.jsx
index d564ae22..b1d3c484 100644
--- a/src/pages/Tracker/Tracker.jsx
+++ b/src/pages/Tracker/Tracker.jsx
@@ -76,8 +76,12 @@ export const Tracker = () => {
`/task/get-user-tasks?user_id=${localStorage.getItem("id")}&expand=timers`
)
.then((el) => {
- const allTasks = el?.length ? el.filter((item) => item.status !== 0) : [];
- const completedTasks = el?.length ? el.filter((item) => item.status === 0) : [];
+ const allTasks = el?.length
+ ? el.filter((item) => item.status !== 0)
+ : [];
+ const completedTasks = el?.length
+ ? el.filter((item) => item.status === 0)
+ : [];
setAllTasks(allTasks);
setFilteredAllTasks(allTasks);
setAllCompletedTasks(completedTasks);
diff --git a/src/pages/Tracker/tracker.scss b/src/pages/Tracker/tracker.scss
index 4c408792..d2550873 100644
--- a/src/pages/Tracker/tracker.scss
+++ b/src/pages/Tracker/tracker.scss
@@ -555,13 +555,13 @@
}
&__list {
position: absolute;
- border-radius: 2px;
+ border-radius: 8px;
background: #d9d9d9;
z-index: 8;
// padding: 0 8px 10px;
top: 30px;
- width: 265px;
+ width: 216px;
display: flex;
flex-direction: column;
@@ -586,6 +586,7 @@
align-items: center;
flex-direction: row;
justify-content: space-between;
+ column-gap: 5px;
padding: 0px 8px;
border-radius: 8px;
height: 40px;
@@ -602,6 +603,29 @@
text-overflow: ellipsis;
}
+ &__color {
+ width: 22.25px;
+ height: 23.217px;
+ border-radius: 8px;
+ }
+
+ &__images {
+ display: flex;
+ flex-direction: column-reverse;
+ row-gap: 3px;
+
+ img {
+ height: 14px;
+ width: 14px;
+ cursor: pointer;
+ }
+
+ .delete {
+ width: 16px;
+ height: 16px;
+ }
+ }
+
&__info {
display: flex;
align-items: center;
@@ -611,27 +635,6 @@
font-size: 12px;
font-weight: 600;
}
-
- &__color {
- width: 22.25px;
- height: 23.217px;
- border-radius: 8px;
- }
-
- &__images {
- display: flex;
- flex-direction: column-reverse;
- row-gap: 6px;
-
- img {
- cursor: pointer;
- }
-
- .delete {
- width: 14px;
- height: 14px;
- }
- }
}
}
}
@@ -641,11 +644,12 @@
align-items: center;
column-gap: 15px;
border-radius: 8px;
- background: #252c32;
- color: white;
- height: 42px;
+ background: white;
+ color: #252c32;
+ height: 40px;
cursor: pointer;
justify-content: center;
+ margin: 8px 8px 0px;
p {
font-size: 15px;