diff --git a/src/api/request.js b/src/api/request.js
index 2e90024d..aefaf36f 100644
--- a/src/api/request.js
+++ b/src/api/request.js
@@ -19,7 +19,7 @@ export const apiRequest = (
"Access-Control-Allow-Origin": "*",
"Content-Type": "application/json",
},
- } = {},
+ } = {}
) => {
const fullHeaders = { ...headers, ...getToken() };
let urWithParams = urlHasParams(url);
@@ -41,7 +41,7 @@ export const apiRequest = (
// dispatch(auth(false));
}
return resolve(response);
- }),
+ })
)
.then((response) => new Promise((resolve) => resolve(response.data)));
};
diff --git a/src/components/AuthBox/AuthBox.jsx b/src/components/AuthBox/AuthBox.jsx
index e1c4f31b..855d8cc8 100644
--- a/src/components/AuthBox/AuthBox.jsx
+++ b/src/components/AuthBox/AuthBox.jsx
@@ -63,7 +63,7 @@ export const AuthBox = ({ title }) => {
localStorage.setItem("role_status", res.status);
localStorage.setItem(
"access_token_expired_at",
- res.access_token_expired_at,
+ res.access_token_expired_at
);
dispatch(auth(true));
dispatch(setUserInfo(res));
diff --git a/src/components/Calendar/CalendarComponent.jsx b/src/components/Calendar/CalendarComponent.jsx
index 59c58674..18943d90 100644
--- a/src/components/Calendar/CalendarComponent.jsx
+++ b/src/components/Calendar/CalendarComponent.jsx
@@ -89,7 +89,7 @@ const CalendarComponent = ({ onSelect }) => {
{currentMonthAndDay(day)}
- )),
+ ))
)}
diff --git a/src/components/Calendar/calendarHelper.js b/src/components/Calendar/calendarHelper.js
index e0b8af47..3ee0de81 100644
--- a/src/components/Calendar/calendarHelper.js
+++ b/src/components/Calendar/calendarHelper.js
@@ -17,7 +17,7 @@ export function calendarHelper(value) {
calendar.push(
Array(1)
.fill(0)
- .map(() => day.add(1, "day").clone()),
+ .map(() => day.add(1, "day").clone())
);
}
@@ -45,7 +45,7 @@ export function getReports(value) {
export function getCreatedDate(day) {
if (day) {
return `${new Date(day).getFullYear()}-${correctDay(
- new Date(day).getMonth() + 1,
+ new Date(day).getMonth() + 1
)}-${correctDay(new Date(day).getDate())}`;
} else {
const date = new Date();
diff --git a/src/components/Candidate/Candidate.jsx b/src/components/Candidate/Candidate.jsx
index dd0adbf8..b7a4126c 100644
--- a/src/components/Candidate/Candidate.jsx
+++ b/src/components/Candidate/Candidate.jsx
@@ -48,7 +48,7 @@ const Candidate = () => {
useEffect(() => {
apiRequest(`/user/me`, {}).then((el) =>
- dispatch(currentCandidate(el.userCard)),
+ dispatch(currentCandidate(el.userCard))
);
}, [dispatch]);
diff --git a/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx b/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx
index bf4b7029..d4286bcd 100644
--- a/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx
+++ b/src/components/Modal/Tracker/ModalTicket/ModalTicket.jsx
@@ -70,7 +70,7 @@ export const ModalTiсket = ({
const [deadLine, setDeadLine] = useState(task.dead_line);
const [datePickerOpen, setDatePickerOpen] = useState(false);
const [startDate, setStartDate] = useState(
- task.dead_line ? new Date(task.dead_line) : new Date(),
+ task.dead_line ? new Date(task.dead_line) : new Date()
);
const [dropListOpen, setDropListOpen] = useState(false);
const [dropListMembersOpen, setDropListMembersOpen] = useState(false);
@@ -190,7 +190,7 @@ export const ModalTiсket = ({
function commentDelete(comment) {
setComments((prevValue) =>
- prevValue.filter((item) => item.id !== comment.id),
+ prevValue.filter((item) => item.id !== comment.id)
);
if (comment.subComments.length) {
// promiseAll
@@ -221,7 +221,7 @@ export const ModalTiсket = ({
deleteSubComment.forEach((comment, index) => {
if (comment.id === subComment.parent_id) {
deleteSubComment[index].subComments = comment.subComments.filter(
- (item) => item.id !== subComment.id,
+ (item) => item.id !== subComment.id
);
}
});
@@ -328,7 +328,7 @@ export const ModalTiсket = ({
useEffect(() => {
initListeners();
apiRequest(
- `/comment/get-by-entity?entity_type=2&entity_id=${task.id}`,
+ `/comment/get-by-entity?entity_type=2&entity_id=${task.id}`
).then((res) => {
const comments = res.reduce((acc, cur) => {
if (!cur.parent_id) {
@@ -362,7 +362,7 @@ export const ModalTiсket = ({
setTimerInfo(time);
}
});
- },
+ }
);
apiRequest(`/file/get-by-entity?entity_type=2&entity_id=${task.id}`).then(
@@ -370,15 +370,15 @@ export const ModalTiсket = ({
if (Array.isArray(res)) {
setTaskFiles(res);
}
- },
+ }
);
if (
localStorage.getItem("role_status") !== "18" &&
Boolean(
!correctProjectUsers.find(
- (item) => item.user_id === profileInfo.id_user,
- ),
+ (item) => item.user_id === profileInfo.id_user
+ )
)
) {
setCorrectProjectUsers((prevState) => [
@@ -400,7 +400,7 @@ export const ModalTiсket = ({
projectMarks.reduce((acc, cur) => {
if (!tagIds.includes(cur.id)) acc.push(cur);
return acc;
- }, []),
+ }, [])
);
}, [taskTags]);
@@ -440,7 +440,7 @@ export const ModalTiсket = ({
function deleteFile(file) {
setTaskFiles((prevValue) =>
- prevValue.filter((item) => item.id !== file.id),
+ prevValue.filter((item) => item.id !== file.id)
);
}
@@ -448,7 +448,7 @@ export const ModalTiсket = ({
setTimerId(
setInterval(() => {
run();
- }, 1000),
+ }, 1000)
);
}
@@ -485,13 +485,13 @@ export const ModalTiсket = ({
projectUsers.reduce((acc, cur) => {
if (!ids.includes(cur.user_id)) acc.push(cur);
return acc;
- }, []),
+ }, [])
);
}, [members]);
function copyTicketLink() {
navigator.clipboard.writeText(
- `https://itguild.info/tracker/task/${task.id}`,
+ `https://itguild.info/tracker/task/${task.id}`
);
showNotification({
show: true,
@@ -558,7 +558,7 @@ export const ModalTiсket = ({
(div) =>
div.classList &&
(div.classList.contains("button-add-worker") ||
- div.classList.contains("dropdownList")),
+ div.classList.contains("dropdownList"))
)
) {
setDropListOpen(false);
@@ -571,7 +571,7 @@ export const ModalTiсket = ({
(div) =>
div.classList &&
(div.classList.contains("deadLine") ||
- div.classList.contains("react-datepicker-popper")),
+ div.classList.contains("react-datepicker-popper"))
)
) {
setDatePickerOpen(false);
@@ -583,7 +583,7 @@ export const ModalTiсket = ({
(div) =>
div.classList &&
(div.classList.contains("tags") ||
- div.classList.contains("tags__dropDown")),
+ div.classList.contains("tags__dropDown"))
)
) {
setSelectTagsOpen(false);
diff --git a/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx b/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx
index be29b703..e948f1f9 100644
--- a/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx
+++ b/src/components/Modal/Tracker/TicketFullScreen/TicketFullScreen.jsx
@@ -128,7 +128,7 @@ export const TicketFullScreen = () => {
setDeadLine(taskInfo.dead_line);
setTaskPriority(taskInfo.execution_priority);
setStartDate(
- taskInfo.dead_line ? new Date(taskInfo.dead_line) : new Date(),
+ taskInfo.dead_line ? new Date(taskInfo.dead_line) : new Date()
);
setInputsValue({
title: taskInfo.title,
@@ -137,7 +137,7 @@ export const TicketFullScreen = () => {
});
setTaskTags(taskInfo.mark);
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) => {
const comments = res.reduce((acc, cur) => {
if (!cur.parent_id) {
@@ -152,14 +152,14 @@ export const TicketFullScreen = () => {
setComments(comments);
});
apiRequest(
- `/file/get-by-entity?entity_type=2&entity_id=${taskInfo.id}`,
+ `/file/get-by-entity?entity_type=2&entity_id=${taskInfo.id}`
).then((res) => {
if (Array.isArray(res)) {
setTaskFiles(res);
}
});
apiRequest(
- `/timer/get-by-entity?entity_type=2&entity_id=${taskInfo.id}`,
+ `/timer/get-by-entity?entity_type=2&entity_id=${taskInfo.id}`
).then((res) => {
let timerSeconds = 0;
res.length &&
@@ -181,13 +181,13 @@ export const TicketFullScreen = () => {
});
});
apiRequest(
- `/project/get-project?project_id=${taskInfo.project_id}&expand=columns,mark`,
+ `/project/get-project?project_id=${taskInfo.project_id}&expand=columns,mark`
).then((res) => {
setProjectInfo(res);
setCorrectProjectUsers(res.projectUsers);
});
setLoader(boardLoader);
- },
+ }
);
}, []);
@@ -198,7 +198,7 @@ export const TicketFullScreen = () => {
projectInfo.mark.reduce((acc, cur) => {
if (!tagIds.includes(cur.id)) acc.push(cur);
return acc;
- }, []),
+ }, [])
);
}
}, [taskTags, projectInfo]);
@@ -306,7 +306,7 @@ export const TicketFullScreen = () => {
function commentDelete(comment) {
setComments((prevValue) =>
- prevValue.filter((item) => item.id !== comment.id),
+ prevValue.filter((item) => item.id !== comment.id)
);
if (comment.subComments.length) {
comment.subComments.forEach((subComment) => {
@@ -336,7 +336,7 @@ export const TicketFullScreen = () => {
deleteSubComment.forEach((comment, index) => {
if (comment.id === subComment.parent_id) {
deleteSubComment[index].subComments = comment.subComments.filter(
- (item) => item.id !== subComment.id,
+ (item) => item.id !== subComment.id
);
}
});
@@ -349,7 +349,7 @@ export const TicketFullScreen = () => {
function copyTicketLink() {
navigator.clipboard.writeText(
- `https://itguild.info/tracker/task/${taskInfo.id}`,
+ `https://itguild.info/tracker/task/${taskInfo.id}`
);
}
@@ -357,7 +357,7 @@ export const TicketFullScreen = () => {
setTimerId(
setInterval(() => {
run();
- }, 1000),
+ }, 1000)
);
}
@@ -368,7 +368,7 @@ export const TicketFullScreen = () => {
projectInfo.projectUsers.reduce((acc, cur) => {
if (!ids.includes(cur.user_id)) acc.push(cur);
return acc;
- }, []),
+ }, [])
);
}
}, [taskInfo.taskUsers, projectInfo]);
@@ -444,7 +444,7 @@ export const TicketFullScreen = () => {
setTaskInfo((prevState) => ({
...prevState,
taskUsers: taskInfo.taskUsers.filter(
- (item) => item.user_id !== person.user_id,
+ (item) => item.user_id !== person.user_id
),
}));
});
@@ -538,7 +538,7 @@ export const TicketFullScreen = () => {
function deleteFile(file) {
setTaskFiles((prevValue) =>
- prevValue.filter((item) => item.id !== file.id),
+ prevValue.filter((item) => item.id !== file.id)
);
}
@@ -586,7 +586,7 @@ export const TicketFullScreen = () => {
(div) =>
div.classList &&
(div.classList.contains("button-add-worker") ||
- div.classList.contains("dropdownList")),
+ div.classList.contains("dropdownList"))
)
) {
setDropListOpen(false);
@@ -599,7 +599,7 @@ export const TicketFullScreen = () => {
(div) =>
div.classList &&
(div.classList.contains("deadLine") ||
- div.classList.contains("react-datepicker-popper")),
+ div.classList.contains("react-datepicker-popper"))
)
) {
setDatePickerOpen(false);
@@ -611,7 +611,7 @@ export const TicketFullScreen = () => {
(div) =>
div.classList &&
(div.classList.contains("tags") ||
- div.classList.contains("tags__dropDown")),
+ div.classList.contains("tags__dropDown"))
)
) {
setSelectTagsOpen(false);
@@ -623,7 +623,7 @@ export const TicketFullScreen = () => {
(div) =>
div.classList &&
(div.classList.contains("addPerson") ||
- div.classList.contains("persons__list")),
+ div.classList.contains("persons__list"))
)
) {
setPersonListOpen(false);
diff --git a/src/components/Modal/Tracker/TrackerModal/TrackerModal.jsx b/src/components/Modal/Tracker/TrackerModal/TrackerModal.jsx
index 560f2054..eb6675ac 100644
--- a/src/components/Modal/Tracker/TrackerModal/TrackerModal.jsx
+++ b/src/components/Modal/Tracker/TrackerModal/TrackerModal.jsx
@@ -71,10 +71,10 @@ export const TrackerModal = ({
const [selectWorkersOpen, setSelectWorkersOpen] = useState(false);
const [selectedWorker, setSelectedWorker] = useState(null);
const [selectColumnPriority, setSelectColumnPriority] = useState(
- "Выберите приоритет колонки",
+ "Выберите приоритет колонки"
);
const [selectedExecutorTask, setSelectedExecutorTask] = useState(
- "Выберите исполнителя задачи",
+ "Выберите исполнителя задачи"
);
const [selectExecutorTaskOpen, setSelectExecutorTaskOpen] = useState(false);
const [correctProjectUsers, setCorrectProjectUsers] = useState([]);
@@ -316,7 +316,7 @@ export const TrackerModal = ({
persons.reduce((acc, cur) => {
if (!ids.includes(cur.user_id)) acc.push(cur);
return acc;
- }, []),
+ }, [])
);
})
: "";
@@ -324,7 +324,7 @@ export const TrackerModal = ({
localStorage.getItem("role_status") !== "18" &&
projectUsers &&
Boolean(
- !projectUsers.find((item) => item.user_id === profileInfo.id_user),
+ !projectUsers.find((item) => item.user_id === profileInfo.id_user)
)
) {
setCorrectProjectUsers([
@@ -350,7 +350,7 @@ export const TrackerModal = ({
projectMarks.reduce((acc, cur) => {
if (!tagIds.includes(cur.id)) acc.push(cur);
return acc;
- }, []),
+ }, [])
);
}
}, [taskTags, projectMarks]);
@@ -368,7 +368,7 @@ export const TrackerModal = ({
(div) =>
div.classList &&
(div.classList.contains("tags__selected__name") ||
- div.classList.contains("tags__dropDown")),
+ div.classList.contains("tags__dropDown"))
)
) {
setSelectTagsOpen(false);
@@ -380,7 +380,7 @@ export const TrackerModal = ({
(div) =>
div.classList &&
(div.classList.contains("select__executor") ||
- div.classList.contains("select__executor__dropDown")),
+ div.classList.contains("select__executor__dropDown"))
)
) {
setSelectExecutorTaskOpen(false);
@@ -555,8 +555,8 @@ export const TrackerModal = ({
onClick={() =>
setTaskTags((prevState) =>
prevState.filter(
- (prevTag) => prevTag.id !== tag.id,
- ),
+ (prevTag) => prevTag.id !== tag.id
+ )
)
}
/>
diff --git a/src/components/Navigation/Navigation.jsx b/src/components/Navigation/Navigation.jsx
index 4d0ec579..0239ec47 100644
--- a/src/components/Navigation/Navigation.jsx
+++ b/src/components/Navigation/Navigation.jsx
@@ -15,7 +15,7 @@ export const Navigation = () => {
const profileInfo = useSelector(getProfileInfo);
const [user] = useState(
- localStorage.getItem("role_status") === "18" ? "partner" : "developer",
+ localStorage.getItem("role_status") === "18" ? "partner" : "developer"
);
const [navInfo] = useState({
@@ -79,9 +79,9 @@ export const Navigation = () => {
apiRequest(`/user/me`).then((profileInfo) =>
dispatch(
setProfileInfo(
- profileInfo.userCard ? profileInfo.userCard : profileInfo,
- ),
- ),
+ profileInfo.userCard ? profileInfo.userCard : profileInfo
+ )
+ )
);
}, [dispatch]);
diff --git a/src/components/ProfileCalendar/ProfileCalendar.jsx b/src/components/ProfileCalendar/ProfileCalendar.jsx
index 21fb6e62..4a7078f9 100644
--- a/src/components/ProfileCalendar/ProfileCalendar.jsx
+++ b/src/components/ProfileCalendar/ProfileCalendar.jsx
@@ -64,8 +64,8 @@ export const ProfileCalendar = () => {
}
apiRequest(
`/reports/reports-by-date?${requestDates}&user_card_id=${localStorage.getItem(
- "cardId",
- )}`,
+ "cardId"
+ )}`
).then((reports) => {
let spendTime = 0;
for (const report of reports) {
diff --git a/src/components/ProfileCalendar/ProfileCalendarComponent.jsx b/src/components/ProfileCalendar/ProfileCalendarComponent.jsx
index 5ca45e6e..f79c3c7b 100644
--- a/src/components/ProfileCalendar/ProfileCalendarComponent.jsx
+++ b/src/components/ProfileCalendar/ProfileCalendarComponent.jsx
@@ -86,7 +86,7 @@ export const ProfileCalendarComponent = React.memo(
for (const date of reports) {
if (
`${new Date(day).getFullYear()}-${correctDay(
- new Date(day).getMonth() + 1,
+ new Date(day).getMonth() + 1
)}-${correctDay(new Date(day).getDate())}` === date.created_at
) {
return `before`;
@@ -101,7 +101,7 @@ export const ProfileCalendarComponent = React.memo(
for (const date of reports) {
if (
`${new Date(day).getFullYear()}-${correctDay(
- new Date(day).getMonth() + 1,
+ new Date(day).getMonth() + 1
)}-${correctDay(new Date(day).getDate())}` === date.created_at
) {
return "#";
@@ -122,15 +122,15 @@ export const ProfileCalendarComponent = React.memo(
const requestDates =
startDate < endDay
? `fromDate=${getCorrectYYMMDD(
- startDate._d,
+ startDate._d
)}&toDate=${getCorrectYYMMDD(endDay._d)}`
: `fromDate=${getCorrectYYMMDD(endDay._d)}&toDate=${getCorrectYYMMDD(
- startDate._d,
+ startDate._d
)}`;
apiRequest(
`/reports/reports-by-date?${requestDates}&user_card_id=${localStorage.getItem(
- "cardId",
- )}`,
+ "cardId"
+ )}`
).then((reports) => {
let spendTime = 0;
for (const report of reports) {
@@ -298,7 +298,7 @@ export const ProfileCalendarComponent = React.memo(
{currentMonthAndDay(day)}
- )),
+ ))
)}
@@ -316,15 +316,15 @@ export const ProfileCalendarComponent = React.memo(
? `${getCorrectDate(startDate)} - ${getCorrectDate(endDate)}`
: `${getCorrectDate(endDate)} - ${getCorrectDate(startDate)}`
: activePeriod
- ? "Выберите диапазон на календаре"
- : "Выбрать диапазон"}
+ ? "Выберите диапазон на календаре"
+ : "Выбрать диапазон"}
{totalRangeHours
? `${totalRangeHours} ${hourOfNum(totalRangeHours)}`
: endDate
- ? "0 часов"
- : ""}
+ ? "0 часов"
+ : ""}
{endDate && (