tracker fixes

This commit is contained in:
Николай Полтщук 2023-07-07 00:46:58 +03:00
parent 7f0dc9612b
commit c3ef01ee35
6 changed files with 34 additions and 21 deletions

View File

@ -463,8 +463,7 @@ export const ModalTiсket = ({
</div> </div>
<div className="workers"> <div className="workers">
<div className="workers_box task__info"> <div className="workers_box task__info">
<span className="exit" onClick={() => setActive(false)}> <span className="exit" onClick={() => setActive(false)}></span>
</span>
<p className="workers__creator">Создатель : {task.user?.fio}</p> <p className="workers__creator">Создатель : {task.user?.fio}</p>
{executor ? ( {executor ? (

View File

@ -24,7 +24,6 @@ import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadc
import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader";
import TrackerTaskComment from "@components/TrackerTaskComment/TrackerTaskComment"; import TrackerTaskComment from "@components/TrackerTaskComment/TrackerTaskComment";
import archive from "assets/images/archiveIcon.png";
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 close from "assets/icons/close.png"; import close from "assets/icons/close.png";
@ -36,6 +35,7 @@ import send from "assets/icons/send.svg";
import project from "assets/icons/trackerProject.svg"; import project from "assets/icons/trackerProject.svg";
import tasks from "assets/icons/trackerTasks.svg"; import tasks from "assets/icons/trackerTasks.svg";
import watch from "assets/icons/watch.svg"; import watch from "assets/icons/watch.svg";
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";

View File

@ -272,7 +272,7 @@ export const TrackerModal = ({
> >
{modalType === "addWorker" && ( {modalType === "addWorker" && (
<> <>
<div className='select__person'> <div className="select__person">
<div className="title-project selectPerson"> <div className="title-project selectPerson">
<h4>Добавьте участника</h4> <h4>Добавьте участника</h4>
{/*<div className="input-container">*/} {/*<div className="input-container">*/}
@ -282,12 +282,16 @@ export const TrackerModal = ({
{/* onChange={(e) => setEmailWorker(e.target.value)}*/} {/* onChange={(e) => setEmailWorker(e.target.value)}*/}
{/* />*/} {/* />*/}
{/*</div>*/} {/*</div>*/}
<p className='selectPerson__info'>Выберите пользователя в проекте или добавьте по e- mail</p> <p className="selectPerson__info">
<div className='invite__blocks'> Выберите пользователя в проекте или добавьте по e- mail
<div className='addPersonBlock'> </p>
<div className="invite__blocks">
<div className="addPersonBlock">
<div <div
className={ className={
selectWorkersOpen ? "select__worker open" : "select__worker" selectWorkersOpen
? "select__worker open"
: "select__worker"
} }
onClick={() => setSelectWorkersOpen(!selectWorkersOpen)} onClick={() => setSelectWorkersOpen(!selectWorkersOpen)}
> >
@ -326,14 +330,21 @@ export const TrackerModal = ({
</div> </div>
)} )}
</div> </div>
<BaseButton styles={"button-add addPersonBtn"} onClick={addUserToProject}> <BaseButton
styles={"button-add addPersonBtn"}
onClick={addUserToProject}
>
Добавить Добавить
</BaseButton> </BaseButton>
</div> </div>
<span>или</span> <span>или</span>
<div className='invitePersonBlock'> <div className="invitePersonBlock">
<div className='input-container invitePersonBlock__input'> <div className="input-container invitePersonBlock__input">
<input className="name-project" placeholder='email' type="email" /> <input
className="name-project"
placeholder="email"
type="email"
/>
</div> </div>
<BaseButton styles={"button-add invitePersonBlock__btn"}> <BaseButton styles={"button-add invitePersonBlock__btn"}>
Отправить приглашение Отправить приглашение
@ -372,7 +383,7 @@ export const TrackerModal = ({
"blockQuote", "blockQuote",
], ],
removePlugins: ["BlockQuote"], removePlugins: ["BlockQuote"],
placeholder: "Описание задачи" placeholder: "Описание задачи",
}} }}
onChange={(event, editor) => { onChange={(event, editor) => {
const data = editor.getData(); const data = editor.getData();

View File

@ -34,7 +34,6 @@ import { Navigation } from "@components/Navigation/Navigation";
import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs"; import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";
import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader";
import archive from "assets/images/archiveIcon.png";
import arrow from "assets/icons/arrows/arrowCalendar.png"; import arrow from "assets/icons/arrows/arrowCalendar.png";
import arrowDown from "assets/icons/arrows/selectArrow.png"; import arrowDown from "assets/icons/arrows/selectArrow.png";
import close from "assets/icons/close.png"; import close from "assets/icons/close.png";
@ -46,6 +45,7 @@ import trackerNoTasks from "assets/icons/trackerNoTasks.svg";
import project from "assets/icons/trackerProject.svg"; import project from "assets/icons/trackerProject.svg";
import tasks from "assets/icons/trackerTasks.svg"; import tasks from "assets/icons/trackerTasks.svg";
import accept from "assets/images/accept.png"; import accept from "assets/images/accept.png";
import archive from "assets/images/archiveIcon.png";
import avatarMok from "assets/images/avatarMok.png"; import avatarMok from "assets/images/avatarMok.png";
export const ProjectTracker = () => { export const ProjectTracker = () => {
@ -390,7 +390,10 @@ export const ProjectTracker = () => {
/> />
<div className="persons__list__count"> <div className="persons__list__count">
<span>{projectBoard.projectUsers?.length}</span> <span>{projectBoard.projectUsers?.length}</span>
{caseOfNum(projectBoard.projectUsers?.length, "persons")} {caseOfNum(
projectBoard.projectUsers?.length,
"persons"
)}
</div> </div>
<div className="persons__list__info"> <div className="persons__list__info">
<span>В проекте - </span> <span>В проекте - </span>

View File

@ -23,10 +23,10 @@ import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadc
import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader";
import ProjectTiket from "@components/ProjectTiket/ProjectTiket"; import ProjectTiket from "@components/ProjectTiket/ProjectTiket";
import archive from "assets/images/archiveIcon.png";
import search from "assets/icons/serchIcon.png"; import search from "assets/icons/serchIcon.png";
import project from "assets/icons/trackerProject.svg"; import project from "assets/icons/trackerProject.svg";
import tasks from "assets/icons/trackerTasks.svg"; import tasks from "assets/icons/trackerTasks.svg";
import archive from "assets/images/archiveIcon.png";
import avatarMok from "assets/images/avatarMok.png"; import avatarMok from "assets/images/avatarMok.png";
import noProjects from "assets/images/noProjects.png"; import noProjects from "assets/images/noProjects.png";

View File

@ -65,7 +65,7 @@ export function getCorrectRequestDate(date) {
export function caseOfNum(number, type) { export function caseOfNum(number, type) {
const comments = ["коментарий", "комментария", " коментариев"]; const comments = ["коментарий", "комментария", " коментариев"];
const files = ["файл", "файла", "файлов"]; const files = ["файл", "файла", "файлов"];
const persons = ["участник", "участника", "участников"] const persons = ["участник", "участника", "участников"];
const cases = [2, 0, 1, 1, 1, 2]; const cases = [2, 0, 1, 1, 1, 2];
if (type === "comments") { if (type === "comments") {
return comments[ return comments[
@ -84,9 +84,9 @@ export function caseOfNum(number, type) {
if (type === "persons") { if (type === "persons") {
return persons[ return persons[
number % 100 > 4 && number % 100 < 20 number % 100 > 4 && number % 100 < 20
? 2 ? 2
: cases[number % 10 < 5 ? number % 10 : 5] : cases[number % 10 < 5 ? number % 10 : 5]
]; ];
} }
} }