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