select priority column, project persons avatars, copy links on button, executor on task
This commit is contained in:
parent
e24a08210a
commit
836d16691a
@ -334,8 +334,10 @@ export const ModalTiсket = ({
|
||||
);
|
||||
}, [members]);
|
||||
|
||||
function copyProjectLink () {
|
||||
navigator.clipboard.writeText(`https://itguild.info/tracker/project/${projectId}`)
|
||||
function copyProjectLink() {
|
||||
navigator.clipboard.writeText(
|
||||
`https://itguild.info/tracker/project/${projectId}`
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
|
@ -210,8 +210,10 @@ export const TicketFullScreen = () => {
|
||||
dispatch(setToggleTab(index));
|
||||
};
|
||||
|
||||
function copyTicketLink () {
|
||||
navigator.clipboard.writeText(`https://itguild.info/tracker/task/${taskInfo.id}`)
|
||||
function copyTicketLink() {
|
||||
navigator.clipboard.writeText(
|
||||
`https://itguild.info/tracker/task/${taskInfo.id}`
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
|
@ -51,8 +51,11 @@ export const TrackerModal = ({
|
||||
const [workers, setWorkers] = useState([]);
|
||||
const [selectWorkersOpen, setSelectWorkersOpen] = useState(false);
|
||||
const [selectedWorker, setSelectedWorker] = useState(null);
|
||||
const [selectColumnPriority, setSelectColumnPriority] = useState('Выберите приоритет колонки')
|
||||
const [selectColumnPriorityOpen, setSelectColumnPriorityOpen] = useState(false)
|
||||
const [selectColumnPriority, setSelectColumnPriority] = useState(
|
||||
"Выберите приоритет колонки"
|
||||
);
|
||||
const [selectColumnPriorityOpen, setSelectColumnPriorityOpen] =
|
||||
useState(false);
|
||||
|
||||
function createTab() {
|
||||
if (!valueColumn) {
|
||||
@ -386,19 +389,31 @@ export const TrackerModal = ({
|
||||
/>
|
||||
</div>
|
||||
<h4>Приоритет колонки</h4>
|
||||
<div className='select-priority' onClick={() => setSelectColumnPriorityOpen(!selectColumnPriorityOpen)}>
|
||||
<div
|
||||
className="select-priority"
|
||||
onClick={() =>
|
||||
setSelectColumnPriorityOpen(!selectColumnPriorityOpen)
|
||||
}
|
||||
>
|
||||
<span>{selectColumnPriority}</span>
|
||||
<img src={arrowDown} alt='arrow' />
|
||||
{selectColumnPriorityOpen &&
|
||||
<div className='select-priority__dropDown'>
|
||||
<img src={arrowDown} alt="arrow" />
|
||||
{selectColumnPriorityOpen && (
|
||||
<div className="select-priority__dropDown">
|
||||
{projectBoard.columns.map((column, index) => {
|
||||
return <span key={column.id} onClick={() => {
|
||||
setSelectColumnPriority(index + 1)
|
||||
dispatch(setColumnPriority(index + 1))
|
||||
}}>{index + 1}</span>
|
||||
return (
|
||||
<span
|
||||
key={column.id}
|
||||
onClick={() => {
|
||||
setSelectColumnPriority(index + 1);
|
||||
dispatch(setColumnPriority(index + 1));
|
||||
}}
|
||||
>
|
||||
{index + 1}
|
||||
</span>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
}
|
||||
)}
|
||||
</div>
|
||||
{/*<div className="input-container">*/}
|
||||
{/* <input*/}
|
||||
|
@ -52,8 +52,10 @@ export const ProjectTiket = ({ project, index }) => {
|
||||
});
|
||||
}
|
||||
|
||||
function copyProjectLink () {
|
||||
navigator.clipboard.writeText(`https://itguild.info/tracker/project/${project.id}`)
|
||||
function copyProjectLink() {
|
||||
navigator.clipboard.writeText(
|
||||
`https://itguild.info/tracker/project/${project.id}`
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
|
@ -324,12 +324,26 @@ export const ProjectTracker = () => {
|
||||
<span className="countPersons">
|
||||
{projectBoard.projectUsers?.length}
|
||||
</span>
|
||||
<div className='projectPersons'>
|
||||
<div className="projectPersons">
|
||||
{projectBoard.projectUsers?.length &&
|
||||
projectBoard.projectUsers.slice(0, projectBoard.length > 3 ? 3 : projectBoard.length).map((person) => {
|
||||
return <img key={person.user_id} src={person.user?.avatar ? urlForLocal(person.user.avatar) : avatarMok} alt='avatar' />
|
||||
})
|
||||
projectBoard.projectUsers
|
||||
.slice(
|
||||
0,
|
||||
projectBoard.length > 3 ? 3 : projectBoard.length
|
||||
)
|
||||
.map((person) => {
|
||||
return (
|
||||
<img
|
||||
key={person.user_id}
|
||||
src={
|
||||
person.user?.avatar
|
||||
? urlForLocal(person.user.avatar)
|
||||
: avatarMok
|
||||
}
|
||||
alt="avatar"
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
<span
|
||||
className="addPerson"
|
||||
@ -524,15 +538,21 @@ export const ProjectTracker = () => {
|
||||
className="tasks__board__item__description"
|
||||
></p>
|
||||
<div className="tasks__board__item__executor">
|
||||
<span>{task.executor?.fio ? task.executor?.fio : 'Исполнитель не назначен'}</span>
|
||||
{task.executor?.avatar &&
|
||||
<span>
|
||||
{task.executor?.fio
|
||||
? task.executor?.fio
|
||||
: "Исполнитель не назначен"}
|
||||
</span>
|
||||
{task.executor?.avatar && (
|
||||
<img
|
||||
src={
|
||||
task.executor?.avatar ? urlForLocal(task.executor?.avatar) : avatarMok
|
||||
task.executor?.avatar
|
||||
? urlForLocal(task.executor?.avatar)
|
||||
: avatarMok
|
||||
}
|
||||
alt="avatar"
|
||||
/>
|
||||
}
|
||||
)}
|
||||
</div>
|
||||
<div className="tasks__board__item__info">
|
||||
<div className="tasks__board__item__info__more">
|
||||
|
Loading…
Reference in New Issue
Block a user