marks
This commit is contained in:
parent
5c72dae35a
commit
db0f0e1f24
@ -38,6 +38,7 @@ import TrackerTaskComment from "@components/TrackerTaskComment/TrackerTaskCommen
|
|||||||
|
|
||||||
import arrow from "assets/icons/arrows/arrowCalendar.png";
|
import arrow from "assets/icons/arrows/arrowCalendar.png";
|
||||||
import arrowStart from "assets/icons/arrows/arrowStart.png";
|
import arrowStart from "assets/icons/arrows/arrowStart.png";
|
||||||
|
import arrowDown from "assets/icons/arrows/selectArrow.png";
|
||||||
import calendarIcon from "assets/icons/calendar.svg";
|
import calendarIcon from "assets/icons/calendar.svg";
|
||||||
import close from "assets/icons/close.png";
|
import close from "assets/icons/close.png";
|
||||||
import fileDelete from "assets/icons/closeProjectPersons.svg";
|
import fileDelete from "assets/icons/closeProjectPersons.svg";
|
||||||
@ -53,7 +54,6 @@ import archive from "assets/images/archiveIcon.png";
|
|||||||
import avatarMok from "assets/images/avatarMok.png";
|
import avatarMok from "assets/images/avatarMok.png";
|
||||||
|
|
||||||
import "./ticketFullScreen.scss";
|
import "./ticketFullScreen.scss";
|
||||||
import arrowDown from "assets/icons/arrows/selectArrow.png";
|
|
||||||
|
|
||||||
registerLocale("ru", ru);
|
registerLocale("ru", ru);
|
||||||
|
|
||||||
@ -107,7 +107,7 @@ export const TicketFullScreen = () => {
|
|||||||
description: taskInfo.description,
|
description: taskInfo.description,
|
||||||
comment: "",
|
comment: "",
|
||||||
});
|
});
|
||||||
setTaskTags(taskInfo.mark)
|
setTaskTags(taskInfo.mark);
|
||||||
apiRequest(
|
apiRequest(
|
||||||
`/comment/get-by-entity?entity_type=2&entity_id=${taskInfo.id}`
|
`/comment/get-by-entity?entity_type=2&entity_id=${taskInfo.id}`
|
||||||
).then((res) => {
|
).then((res) => {
|
||||||
@ -167,10 +167,10 @@ export const TicketFullScreen = () => {
|
|||||||
let tagIds = taskTags.map((tag) => tag.id);
|
let tagIds = taskTags.map((tag) => tag.id);
|
||||||
if (projectInfo.mark) {
|
if (projectInfo.mark) {
|
||||||
setCorrectProjectTags(
|
setCorrectProjectTags(
|
||||||
projectInfo.mark.reduce((acc, cur) => {
|
projectInfo.mark.reduce((acc, cur) => {
|
||||||
if (!tagIds.includes(cur.id)) acc.push(cur);
|
if (!tagIds.includes(cur.id)) acc.push(cur);
|
||||||
return acc;
|
return acc;
|
||||||
}, [])
|
}, [])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}, [taskTags, projectInfo]);
|
}, [taskTags, projectInfo]);
|
||||||
@ -1039,57 +1039,57 @@ export const TicketFullScreen = () => {
|
|||||||
<div className="tags__selected">
|
<div className="tags__selected">
|
||||||
{taskTags.map((tag) => {
|
{taskTags.map((tag) => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="tags__selected__item"
|
className="tags__selected__item"
|
||||||
key={tag.id}
|
key={tag.id}
|
||||||
style={{ background: tag.color }}
|
style={{ background: tag.color }}
|
||||||
>
|
>
|
||||||
<p>{tag.slug}</p>
|
<p>{tag.slug}</p>
|
||||||
<img
|
<img
|
||||||
src={close}
|
src={close}
|
||||||
className="delete"
|
className="delete"
|
||||||
alt="delete"
|
alt="delete"
|
||||||
onClick={() => deleteTagFromTask(tag.id)}
|
onClick={() => deleteTagFromTask(tag.id)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
className="tags__select"
|
className="tags__select"
|
||||||
onClick={() => setSelectTagsOpen(!selectTagsOpen)}
|
onClick={() => setSelectTagsOpen(!selectTagsOpen)}
|
||||||
>
|
>
|
||||||
<span>Выберите тег</span>
|
<span>Выберите тег</span>
|
||||||
<img
|
<img
|
||||||
className={selectTagsOpen ? "open" : ""}
|
className={selectTagsOpen ? "open" : ""}
|
||||||
src={arrowDown}
|
src={arrowDown}
|
||||||
alt="arrow"
|
alt="arrow"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{selectTagsOpen && (
|
{selectTagsOpen && (
|
||||||
<div className="tags__dropDown">
|
<div className="tags__dropDown">
|
||||||
<img
|
<img
|
||||||
onClick={() => setSelectTagsOpen(false)}
|
onClick={() => setSelectTagsOpen(false)}
|
||||||
className="tags__dropDown__close"
|
className="tags__dropDown__close"
|
||||||
src={close}
|
src={close}
|
||||||
alt="close"
|
alt="close"
|
||||||
/>
|
/>
|
||||||
{correctProjectTags.map((tag) => {
|
{correctProjectTags.map((tag) => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="tagItem"
|
className="tagItem"
|
||||||
key={tag.id}
|
key={tag.id}
|
||||||
onClick={() => addTagToTask(tag.id)}
|
onClick={() => addTagToTask(tag.id)}
|
||||||
>
|
>
|
||||||
<p>{tag.slug}</p>
|
<p>{tag.slug}</p>
|
||||||
<span style={{ background: tag.color }} />
|
<span style={{ background: tag.color }} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
{!Boolean(correctProjectTags.length) && (
|
{!Boolean(correctProjectTags.length) && (
|
||||||
<p className="tags__dropDown__noItem">Нет тегов</p>
|
<p className="tags__dropDown__noItem">Нет тегов</p>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
@ -335,8 +335,8 @@ export const ProjectTracker = () => {
|
|||||||
...prevState,
|
...prevState,
|
||||||
edit: false,
|
edit: false,
|
||||||
}));
|
}));
|
||||||
setTagInfo({description: "", name: ""})
|
setTagInfo({ description: "", name: "" });
|
||||||
setColor("#aabbcc")
|
setColor("#aabbcc");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user