Compare commits

..

No commits in common. "5d03502e5c48a3283f44d7a61a8116d67b0bdbfc" and "05f966b87717bd9334f8d0095cc23c84bf0e24b8" have entirely different histories.

70 changed files with 536 additions and 537 deletions

View File

@ -3,7 +3,6 @@
"semi": true, "semi": true,
"printWidth": 80, "printWidth": 80,
"useTabs": false, "useTabs": false,
"trailingComma" : "none",
"importOrder": [ "importOrder": [
"^@react/(.*)$", "^@react/(.*)$",
"^@redux/(.*)$", "^@redux/(.*)$",

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
"postcss-preset-env": { "postcss-preset-env": {
browsers: "last 2 versions" browsers: "last 2 versions",
} },
}; };

View File

@ -1,5 +1,5 @@
import axios from "axios"; import axios from "axios";
export default axios.create({ export default axios.create({
baseURL: process.env.REACT_APP_API_URL baseURL: process.env.REACT_APP_API_URL,
}); });

View File

@ -6,7 +6,7 @@ const instance = axios.create({
baseURL: process.env.REACT_APP_API_URL, baseURL: process.env.REACT_APP_API_URL,
validateStatus(status) { validateStatus(status) {
return status; return status;
} },
}); });
export const apiRequest = ( export const apiRequest = (
@ -17,8 +17,8 @@ export const apiRequest = (
data, data,
headers = { headers = {
"Access-Control-Allow-Origin": "*", "Access-Control-Allow-Origin": "*",
"Content-Type": "application/json" "Content-Type": "application/json",
} },
} = {} } = {}
) => { ) => {
const fullHeaders = { ...headers, ...getToken() }; const fullHeaders = { ...headers, ...getToken() };
@ -30,7 +30,7 @@ export const apiRequest = (
method, method,
params, params,
data, data,
headers: { ...fullHeaders } headers: { ...fullHeaders },
}) })
.then( .then(
(response) => (response) =>

View File

@ -12,7 +12,7 @@ const ArchiveTasksItem = ({ task, index }) => {
<p <p
className="date" className="date"
dangerouslySetInnerHTML={{ dangerouslySetInnerHTML={{
__html: task.description __html: task.description,
}} }}
/> />
</td> </td>

View File

@ -51,7 +51,7 @@ export const AuthBox = ({ title }) => {
dispatch(loading(true)); dispatch(loading(true));
apiRequest("/user/login", { apiRequest("/user/login", {
method: "POST", method: "POST",
data: formData data: formData,
}).then((res) => { }).then((res) => {
if (!res.access_token) { if (!res.access_token) {
setError("Введены некорректные данные для входа"); setError("Введены некорректные данные для входа");

View File

@ -86,7 +86,7 @@ export function getCorrectDate(day) {
"сентября", "сентября",
"октября", "октября",
"ноября", "ноября",
"декабря" "декабря",
]; ];
return `${new Date(day).getDate()} ${ return `${new Date(day).getDate()} ${
months[new Date(day).getMonth()] months[new Date(day).getMonth()]

View File

@ -4,7 +4,7 @@ import { Link, Navigate, useNavigate, useParams } from "react-router-dom";
import { import {
currentCandidate, currentCandidate,
selectCurrentCandidate selectCurrentCandidate,
} from "@redux/outstaffingSlice"; } from "@redux/outstaffingSlice";
import { LEVELS, SKILLS } from "@utils/constants"; import { LEVELS, SKILLS } from "@utils/constants";
@ -58,7 +58,7 @@ const Candidate = () => {
const styles = { const styles = {
classes: "", classes: "",
header: "", header: "",
img: "" img: "",
}; };
switch (Number(position_id)) { switch (Number(position_id)) {
@ -100,14 +100,14 @@ const Candidate = () => {
{ name: "Главная", link: "/profile" }, { name: "Главная", link: "/profile" },
{ {
name: "Каталог свободных специалистов", name: "Каталог свободных специалистов",
link: "/profile/catalog" link: "/profile/catalog",
}, },
{ {
name: `${currentCandidateObj.specification} ${ name: `${currentCandidateObj.specification} ${
SKILLS[currentCandidateObj.position_id] SKILLS[currentCandidateObj.position_id]
}, ${LEVELS[currentCandidateObj.level]}`, }, ${LEVELS[currentCandidateObj.level]}`,
link: `/candidate/${currentCandidateObj.id}` link: `/candidate/${currentCandidateObj.id}`,
} },
]} ]}
/> />

View File

@ -34,7 +34,7 @@ const CandidateSidebar = ({ candidate, setActiveSnippet, activeSnippet }) => {
let levelAspt = { let levelAspt = {
spec: candidate.specification, spec: candidate.specification,
skils: SKILLS[candidate.position_id], skils: SKILLS[candidate.position_id],
level: LEVELS[candidate.level] level: LEVELS[candidate.level],
}; };
return ( return (

View File

@ -15,8 +15,8 @@ const FileTracker = ({ file, setDeletedTask, taskId }) => {
file_id: file.id, file_id: file.id,
entity_type: 2, entity_type: 2,
entity_id: taskId, entity_id: taskId,
status: 0 status: 0,
} },
}).then(() => { }).then(() => {
setDeletedTask(file); setDeletedTask(file);
}); });

View File

@ -22,7 +22,7 @@ const Form = () => {
const [data, setData] = useState({ const [data, setData] = useState({
email: "", email: "",
phone: "", phone: "",
comment: "" comment: "",
}); });
const [isFetching, setIsFetching] = useState(false); const [isFetching, setIsFetching] = useState(false);
@ -40,7 +40,7 @@ const Form = () => {
: () => { : () => {
setStatus(null); setStatus(null);
navigate(`/candidate/${urlParams.id}`); navigate(`/candidate/${urlParams.id}`);
} },
}); });
}; };
@ -55,7 +55,7 @@ const Form = () => {
setData((prev) => ({ setData((prev) => ({
...prev, ...prev,
[id]: value [id]: value,
})); }));
}; };
@ -73,8 +73,8 @@ const Form = () => {
method: "POST", method: "POST",
params: { params: {
profile_id: urlParams.id, profile_id: urlParams.id,
...data ...data,
} },
}).then((res) => { }).then((res) => {
setStatus(res); setStatus(res);
setIsFetching(false); setIsFetching(false);

View File

@ -23,7 +23,7 @@ export const FreeDevelopers = () => {
<ProfileBreadcrumbs <ProfileBreadcrumbs
links={[ links={[
{ name: "Главная", link: "/auth" }, { name: "Главная", link: "/auth" },
{ name: "Свободные разработчики", link: "/worker" } { name: "Свободные разработчики", link: "/worker" },
]} ]}
/> />

View File

@ -18,13 +18,13 @@ export const ModalRegistration = ({ active, setActive }) => {
const [inputsValue, setInputsValue] = useState({ const [inputsValue, setInputsValue] = useState({
userName: "", userName: "",
email: "", email: "",
password: "" password: "",
}); });
const [inputsError, setInputsError] = useState({ const [inputsError, setInputsError] = useState({
name: false, name: false,
email: false, email: false,
password: false password: false,
}); });
const [loader, setLoader] = useState(false); const [loader, setLoader] = useState(false);
@ -68,22 +68,22 @@ export const ModalRegistration = ({ active, setActive }) => {
data: { data: {
username: inputsValue.userName, username: inputsValue.userName,
email: inputsValue.email, email: inputsValue.email,
password: inputsValue.password password: inputsValue.password,
} },
}).then((data) => { }).then((data) => {
setLoader(false); setLoader(false);
if (!data) { if (!data) {
showNotification({ showNotification({
show: true, show: true,
text: "Аккаунт с таким логином или email уже существует", text: "Аккаунт с таким логином или email уже существует",
type: "error" type: "error",
}); });
} else { } else {
closeModal(); closeModal();
showNotification({ showNotification({
show: true, show: true,
text: "Аккаунт успешно создан", text: "Аккаунт успешно создан",
type: "success" type: "success",
}); });
} }
}); });
@ -93,12 +93,12 @@ export const ModalRegistration = ({ active, setActive }) => {
setInputsValue({ setInputsValue({
userName: "", userName: "",
email: "", email: "",
password: "" password: "",
}); });
setInputsError({ setInputsError({
name: false, name: false,
email: false, email: false,
password: false password: false,
}); });
setActive(false); setActive(false);
}; };
@ -122,11 +122,11 @@ export const ModalRegistration = ({ active, setActive }) => {
setInputsError({ setInputsError({
name: false, name: false,
email: false, email: false,
password: false password: false,
}); });
setInputsValue((prevValue) => ({ setInputsValue((prevValue) => ({
...prevValue, ...prevValue,
userName: e.target.value userName: e.target.value,
})); }));
}} }}
value={inputsValue.userName} value={inputsValue.userName}
@ -143,11 +143,11 @@ export const ModalRegistration = ({ active, setActive }) => {
setInputsError({ setInputsError({
name: false, name: false,
email: false, email: false,
password: false password: false,
}); });
setInputsValue((prevValue) => ({ setInputsValue((prevValue) => ({
...prevValue, ...prevValue,
email: e.target.value email: e.target.value,
})); }));
}} }}
value={inputsValue.email} value={inputsValue.email}
@ -167,11 +167,11 @@ export const ModalRegistration = ({ active, setActive }) => {
setInputsError({ setInputsError({
name: false, name: false,
email: false, email: false,
password: false password: false,
}); });
setInputsValue((prevValue) => ({ setInputsValue((prevValue) => ({
...prevValue, ...prevValue,
password: e.target.value password: e.target.value,
})); }));
}} }}
value={inputsValue.password} value={inputsValue.password}
@ -188,11 +188,11 @@ export const ModalRegistration = ({ active, setActive }) => {
setInputsError({ setInputsError({
name: false, name: false,
email: false, email: false,
password: false password: false,
}); });
setInputsValue((prevValue) => ({ setInputsValue((prevValue) => ({
...prevValue, ...prevValue,
password: e.target.value password: e.target.value,
})); }));
}} }}
value={inputsValue.password} value={inputsValue.password}

View File

@ -17,13 +17,13 @@ export const ModalResetPassword = ({ active, setActive }) => {
const [inputsValue, setInputsValue] = useState({ const [inputsValue, setInputsValue] = useState({
email: "", email: "",
token: "", token: "",
password: "" password: "",
}); });
const [inputsError, setInputsError] = useState({ const [inputsError, setInputsError] = useState({
email: false, email: false,
password: false, password: false,
token: false token: false,
}); });
const validateEmail = (email) => { const validateEmail = (email) => {
@ -40,7 +40,7 @@ export const ModalResetPassword = ({ active, setActive }) => {
setInputsValue({ setInputsValue({
email: "", email: "",
token: "", token: "",
password: "" password: "",
}); });
}; };
@ -51,22 +51,22 @@ export const ModalResetPassword = ({ active, setActive }) => {
return showNotification({ return showNotification({
show: true, show: true,
text: "Введите корректный e-mail", text: "Введите корректный e-mail",
type: "error" type: "error",
}); });
} }
setLoader(true); setLoader(true);
apiRequest("/register/request-password-reset", { apiRequest("/register/request-password-reset", {
method: "POST", method: "POST",
data: { data: {
email: inputsValue.email email: inputsValue.email,
} },
}).then((data) => { }).then((data) => {
setLoader(false); setLoader(false);
if (data) { if (data) {
showNotification({ showNotification({
show: true, show: true,
text: "Письмо отправлено Вам на почту", text: "Письмо отправлено Вам на почту",
type: "success" type: "success",
}); });
setStep(true); setStep(true);
} }
@ -77,12 +77,12 @@ export const ModalResetPassword = ({ active, setActive }) => {
setInputsError((prevValue) => ({ setInputsError((prevValue) => ({
...prevValue, ...prevValue,
password: true, password: true,
token: true token: true,
})); }));
return showNotification({ return showNotification({
show: true, show: true,
text: "Введите данные", text: "Введите данные",
type: "error" type: "error",
}); });
} }
if (inputsValue.password.length < 6) { if (inputsValue.password.length < 6) {
@ -94,15 +94,15 @@ export const ModalResetPassword = ({ active, setActive }) => {
method: "POST", method: "POST",
data: { data: {
token: inputsValue.token, token: inputsValue.token,
password: inputsValue.password password: inputsValue.password,
} },
}).then((data) => { }).then((data) => {
setLoader(false); setLoader(false);
if (data.code === 0) { if (data.code === 0) {
showNotification({ showNotification({
show: true, show: true,
text: "Введите корректные данные", text: "Введите корректные данные",
type: "error" type: "error",
}); });
} else { } else {
setActive(false); setActive(false);
@ -110,7 +110,7 @@ export const ModalResetPassword = ({ active, setActive }) => {
showNotification({ showNotification({
show: true, show: true,
text: "Пароль изменён", text: "Пароль изменён",
type: "success" type: "success",
}); });
} }
}); });
@ -133,12 +133,12 @@ export const ModalResetPassword = ({ active, setActive }) => {
onChange={(e) => { onChange={(e) => {
setInputsValue((prevValue) => ({ setInputsValue((prevValue) => ({
...prevValue, ...prevValue,
email: e.target.value email: e.target.value,
})); }));
setInputsError({ setInputsError({
email: false, email: false,
password: false, password: false,
token: false token: false,
}); });
}} }}
placeholder="E-mail" placeholder="E-mail"
@ -173,11 +173,11 @@ export const ModalResetPassword = ({ active, setActive }) => {
setInputsError({ setInputsError({
email: false, email: false,
password: false, password: false,
token: false token: false,
}); });
setInputsValue((prevValue) => ({ setInputsValue((prevValue) => ({
...prevValue, ...prevValue,
token: e.target.value token: e.target.value,
})); }));
}} }}
value={inputsValue.token} value={inputsValue.token}
@ -193,12 +193,12 @@ export const ModalResetPassword = ({ active, setActive }) => {
onChange={(e) => { onChange={(e) => {
setInputsValue((prevValue) => ({ setInputsValue((prevValue) => ({
...prevValue, ...prevValue,
password: e.target.value password: e.target.value,
})); }));
setInputsError({ setInputsError({
email: false, email: false,
password: false, password: false,
token: false token: false,
}); });
}} }}
placeholder="password" placeholder="password"

View File

@ -15,7 +15,7 @@ import {
caseOfNum, caseOfNum,
getCorrectRequestDate, getCorrectRequestDate,
getToken, getToken,
urlForLocal urlForLocal,
} from "@utils/helper"; } from "@utils/helper";
import { apiRequest } from "@api/request"; import { apiRequest } from "@api/request";
@ -56,7 +56,7 @@ export const ModalTiсket = ({
projectName, projectName,
projectUsers, projectUsers,
projectOwnerId, projectOwnerId,
projectMarks projectMarks,
}) => { }) => {
const dispatch = useDispatch(); const dispatch = useDispatch();
const [addSubtask, setAddSubtask] = useState(false); const [addSubtask, setAddSubtask] = useState(false);
@ -64,7 +64,7 @@ export const ModalTiсket = ({
const [inputsValue, setInputsValue] = useState({ const [inputsValue, setInputsValue] = useState({
title: task.title, title: task.title,
description: task.description, description: task.description,
comment: "" comment: "",
}); });
const [comments, setComments] = useState([]); const [comments, setComments] = useState([]);
const [deadLine, setDeadLine] = useState(task.dead_line); const [deadLine, setDeadLine] = useState(task.dead_line);
@ -85,7 +85,7 @@ export const ModalTiсket = ({
const [currentTimerCount, setCurrentTimerCount] = useState({ const [currentTimerCount, setCurrentTimerCount] = useState({
hours: 0, hours: 0,
minute: 0, minute: 0,
seconds: 0 seconds: 0,
}); });
const [timerId, setTimerId] = useState(null); const [timerId, setTimerId] = useState(null);
const [taskFiles, setTaskFiles] = useState([]); const [taskFiles, setTaskFiles] = useState([]);
@ -104,15 +104,15 @@ export const ModalTiсket = ({
method: "PUT", method: "PUT",
data: { data: {
task_id: task.id, task_id: task.id,
status: 0 status: 0,
} },
}).then(() => { }).then(() => {
setActive(false); setActive(false);
dispatch(setProjectBoardFetch(projectId)); dispatch(setProjectBoardFetch(projectId));
showNotification({ showNotification({
show: true, show: true,
text: "Задача успешно была перемещена в архив", text: "Задача успешно была перемещена в архив",
type: "archive" type: "archive",
}); });
}); });
} }
@ -120,22 +120,22 @@ export const ModalTiсket = ({
const priority = { const priority = {
2: "Высокий", 2: "Высокий",
1: "Средний", 1: "Средний",
0: "Низкий" 0: "Низкий",
}; };
const priorityTypes = [ const priorityTypes = [
{ {
name: "Высокий", name: "Высокий",
key: 2 key: 2,
}, },
{ {
name: "Средний", name: "Средний",
key: 1 key: 1,
}, },
{ {
name: "Низкий", name: "Низкий",
key: 0 key: 0,
} },
]; ];
function archiveTask() { function archiveTask() {
@ -147,7 +147,7 @@ export const ModalTiсket = ({
return showNotification({ return showNotification({
show: true, show: true,
text: "Заполните поля", text: "Заполните поля",
type: "error" type: "error",
}); });
} }
apiRequest("/task/update-task", { apiRequest("/task/update-task", {
@ -155,15 +155,15 @@ export const ModalTiсket = ({
data: { data: {
task_id: task.id, task_id: task.id,
title: inputsValue.title, title: inputsValue.title,
description: inputsValue.description description: inputsValue.description,
} },
}).then((res) => { }).then((res) => {
setEditOpen(!editOpen); setEditOpen(!editOpen);
dispatch(setProjectBoardFetch(projectId)); dispatch(setProjectBoardFetch(projectId));
showNotification({ showNotification({
show: true, show: true,
text: "Изменения сохранены", text: "Изменения сохранены",
type: "success" type: "success",
}); });
}); });
} }
@ -176,8 +176,8 @@ export const ModalTiсket = ({
data: { data: {
text: inputsValue.comment, text: inputsValue.comment,
entity_type: 2, entity_type: 2,
entity_id: task.id entity_id: task.id,
} },
}).then((res) => { }).then((res) => {
let newComment = res; let newComment = res;
setCommentSendDisable(false); setCommentSendDisable(false);
@ -199,8 +199,8 @@ export const ModalTiсket = ({
method: "PUT", method: "PUT",
data: { data: {
comment_id: subComment.id, comment_id: subComment.id,
status: 0 status: 0,
} },
}).then(() => {}); }).then(() => {});
}); });
} }
@ -234,8 +234,8 @@ export const ModalTiсket = ({
data: { data: {
entity_type: 2, entity_type: 2,
entity_id: task.id, entity_id: task.id,
created_at: getCorrectRequestDate(new Date()) created_at: getCorrectRequestDate(new Date()),
} },
}).then((res) => { }).then((res) => {
setTimerStart(true); setTimerStart(true);
setTimerInfo(res); setTimerInfo(res);
@ -248,8 +248,8 @@ export const ModalTiсket = ({
method: "PUT", method: "PUT",
data: { data: {
timer_id: timerInfo.id, timer_id: timerInfo.id,
stopped_at: getCorrectRequestDate(new Date()) stopped_at: getCorrectRequestDate(new Date()),
} },
}).then(() => { }).then(() => {
setTimerStart(false); setTimerStart(false);
clearInterval(timerId); clearInterval(timerId);
@ -261,8 +261,8 @@ export const ModalTiсket = ({
method: "PUT", method: "PUT",
data: { data: {
task_id: task.id, task_id: task.id,
executor_id: person.user_id executor_id: person.user_id,
} },
}).then((res) => { }).then((res) => {
setExecutorId(person.user_id); setExecutorId(person.user_id);
setDropListOpen(false); setDropListOpen(false);
@ -276,8 +276,8 @@ export const ModalTiсket = ({
method: "PUT", method: "PUT",
data: { data: {
task_id: task.id, task_id: task.id,
executor_id: 0 executor_id: 0,
} },
}).then(() => { }).then(() => {
setExecutorId(null); setExecutorId(null);
setExecutor(null); setExecutor(null);
@ -291,8 +291,8 @@ export const ModalTiсket = ({
method: "PUT", method: "PUT",
data: { data: {
task_id: task.id, task_id: task.id,
execution_priority: key execution_priority: key,
} },
}).then(() => { }).then(() => {
dispatch(setProjectBoardFetch(projectId)); dispatch(setProjectBoardFetch(projectId));
}); });
@ -303,8 +303,8 @@ export const ModalTiсket = ({
method: "POST", method: "POST",
data: { data: {
task_id: task.id, task_id: task.id,
user_id: person.user_id user_id: person.user_id,
} },
}).then((res) => { }).then((res) => {
setDropListMembersOpen(false); setDropListMembersOpen(false);
setMembers((prevValue) => [...prevValue, res]); setMembers((prevValue) => [...prevValue, res]);
@ -317,8 +317,8 @@ export const ModalTiсket = ({
method: "DELETE", method: "DELETE",
data: { data: {
task_id: task.id, task_id: task.id,
user_id: person.user_id user_id: person.user_id,
} },
}).then(() => { }).then(() => {
setMembers(members.filter((item) => item.user_id !== person.user_id)); setMembers(members.filter((item) => item.user_id !== person.user_id));
dispatch(setProjectBoardFetch(projectId)); dispatch(setProjectBoardFetch(projectId));
@ -351,7 +351,7 @@ export const ModalTiсket = ({
setCurrentTimerCount({ setCurrentTimerCount({
hours: Math.floor(timerSeconds / 60 / 60), hours: Math.floor(timerSeconds / 60 / 60),
minute: Math.floor((timerSeconds / 60) % 60), minute: Math.floor((timerSeconds / 60) % 60),
seconds: timerSeconds % 60 seconds: timerSeconds % 60,
}); });
updateTimerHours = Math.floor(timerSeconds / 60 / 60); updateTimerHours = Math.floor(timerSeconds / 60 / 60);
updateTimerMinute = Math.floor((timerSeconds / 60) % 60); updateTimerMinute = Math.floor((timerSeconds / 60) % 60);
@ -386,10 +386,10 @@ export const ModalTiсket = ({
{ {
user: { user: {
avatar: profileInfo.photo, avatar: profileInfo.photo,
fio: profileInfo.fio fio: profileInfo.fio,
}, },
user_id: profileInfo.id_user user_id: profileInfo.id_user,
} },
]); ]);
} }
}, []); }, []);
@ -410,7 +410,7 @@ export const ModalTiсket = ({
const res = await fetch("https://itguild.info/api/file/upload", { const res = await fetch("https://itguild.info/api/file/upload", {
method: "POST", method: "POST",
body: formData, body: formData,
headers: { ...getToken() } headers: { ...getToken() },
}); });
const data = await res.json(); const data = await res.json();
@ -430,8 +430,8 @@ export const ModalTiсket = ({
file_id: id, file_id: id,
entity_type: 2, entity_type: 2,
entity_id: task.id, entity_id: task.id,
status: 1 status: 1,
} },
}).then((res) => { }).then((res) => {
setTaskFiles((prevValue) => [...prevValue, res]); setTaskFiles((prevValue) => [...prevValue, res]);
// setUploadedFile(null); // setUploadedFile(null);
@ -470,7 +470,7 @@ export const ModalTiсket = ({
return setCurrentTimerCount({ return setCurrentTimerCount({
hours: updateTimerHours, hours: updateTimerHours,
minute: updateTimerMinute, minute: updateTimerMinute,
seconds: updateTimerSec seconds: updateTimerSec,
}); });
} }
@ -496,7 +496,7 @@ export const ModalTiсket = ({
showNotification({ showNotification({
show: true, show: true,
text: "Ссылка скопирована в буфер обмена", text: "Ссылка скопирована в буфер обмена",
type: "copy" type: "copy",
}); });
} }
@ -505,8 +505,8 @@ export const ModalTiсket = ({
method: "PUT", method: "PUT",
data: { data: {
task_id: task.id, task_id: task.id,
dead_line: getCorrectRequestDate(date) dead_line: getCorrectRequestDate(date),
} },
}).then(() => { }).then(() => {
dispatch(setProjectBoardFetch(projectId)); dispatch(setProjectBoardFetch(projectId));
}); });
@ -518,8 +518,8 @@ export const ModalTiсket = ({
data: { data: {
mark_id: tagId, mark_id: tagId,
entity_type: 2, entity_type: 2,
entity_id: task.id entity_id: task.id,
} },
}).then((data) => { }).then((data) => {
setSelectTagsOpen(false); setSelectTagsOpen(false);
setTaskTags((prevValue) => [...prevValue, data.mark]); setTaskTags((prevValue) => [...prevValue, data.mark]);
@ -533,8 +533,8 @@ export const ModalTiсket = ({
data: { data: {
mark_id: tagId, mark_id: tagId,
entity_type: 2, entity_type: 2,
entity_id: task.id entity_id: task.id,
} },
}).then(() => { }).then(() => {
setTaskTags((prevValue) => prevValue.filter((tag) => tag.id !== tagId)); setTaskTags((prevValue) => prevValue.filter((tag) => tag.id !== tagId));
dispatch(setProjectBoardFetch(projectId)); dispatch(setProjectBoardFetch(projectId));
@ -617,7 +617,7 @@ export const ModalTiсket = ({
onChange={(e) => { onChange={(e) => {
setInputsValue((prevValue) => ({ setInputsValue((prevValue) => ({
...prevValue, ...prevValue,
title: e.target.value title: e.target.value,
})); }));
}} }}
/> />
@ -640,14 +640,14 @@ export const ModalTiсket = ({
"ImageToolbar", "ImageToolbar",
"ImageUpload", "ImageUpload",
"MediaEmbed", "MediaEmbed",
"BlockQuote" "BlockQuote",
] ],
}} }}
onChange={(event, editor) => { onChange={(event, editor) => {
const data = editor.getData(); const data = editor.getData();
setInputsValue((prevValue) => ({ setInputsValue((prevValue) => ({
...prevValue, ...prevValue,
description: data description: data,
})); }));
}} }}
/> />
@ -729,7 +729,7 @@ export const ModalTiсket = ({
onChange={(e) => { onChange={(e) => {
setInputsValue((prevValue) => ({ setInputsValue((prevValue) => ({
...prevValue, ...prevValue,
comment: e.target.value comment: e.target.value,
})); }));
}} }}
/> />

View File

@ -12,7 +12,7 @@ import {
getBoarderLoader, getBoarderLoader,
modalToggle, modalToggle,
setProjectBoardFetch, setProjectBoardFetch,
setToggleTab setToggleTab,
} from "@redux/projectsTrackerSlice"; } from "@redux/projectsTrackerSlice";
import { import {
@ -20,7 +20,7 @@ import {
caseOfNum, caseOfNum,
getCorrectRequestDate, getCorrectRequestDate,
getToken, getToken,
urlForLocal urlForLocal,
} from "@utils/helper"; } from "@utils/helper";
import { apiRequest } from "@api/request"; import { apiRequest } from "@api/request";
@ -77,7 +77,7 @@ export const TicketFullScreen = () => {
const [currentTimerCount, setCurrentTimerCount] = useState({ const [currentTimerCount, setCurrentTimerCount] = useState({
hours: 0, hours: 0,
minute: 0, minute: 0,
seconds: 0 seconds: 0,
}); });
const profileInfo = useSelector(getProfileInfo); const profileInfo = useSelector(getProfileInfo);
const [timerId, setTimerId] = useState(null); const [timerId, setTimerId] = useState(null);
@ -102,22 +102,22 @@ export const TicketFullScreen = () => {
const priority = { const priority = {
2: "Высокий", 2: "Высокий",
1: "Средний", 1: "Средний",
0: "Низкий" 0: "Низкий",
}; };
const priorityTypes = [ const priorityTypes = [
{ {
name: "Высокий", name: "Высокий",
key: 2 key: 2,
}, },
{ {
name: "Средний", name: "Средний",
key: 1 key: 1,
}, },
{ {
name: "Низкий", name: "Низкий",
key: 0 key: 0,
} },
]; ];
useEffect(() => { useEffect(() => {
@ -133,7 +133,7 @@ export const TicketFullScreen = () => {
setInputsValue({ setInputsValue({
title: taskInfo.title, title: taskInfo.title,
description: taskInfo.description, description: taskInfo.description,
comment: "" comment: "",
}); });
setTaskTags(taskInfo.mark); setTaskTags(taskInfo.mark);
apiRequest( apiRequest(
@ -168,7 +168,7 @@ export const TicketFullScreen = () => {
setCurrentTimerCount({ setCurrentTimerCount({
hours: Math.floor(timerSeconds / 60 / 60), hours: Math.floor(timerSeconds / 60 / 60),
minute: Math.floor((timerSeconds / 60) % 60), minute: Math.floor((timerSeconds / 60) % 60),
seconds: timerSeconds % 60 seconds: timerSeconds % 60,
}); });
updateTimerHours = Math.floor(timerSeconds / 60 / 60); updateTimerHours = Math.floor(timerSeconds / 60 / 60);
updateTimerMinute = Math.floor((timerSeconds / 60) % 60); updateTimerMinute = Math.floor((timerSeconds / 60) % 60);
@ -208,8 +208,8 @@ export const TicketFullScreen = () => {
method: "PUT", method: "PUT",
data: { data: {
task_id: ticketId.id, task_id: ticketId.id,
status: 0 status: 0,
} },
}).then(() => { }).then(() => {
navigate(`/tracker/project/${taskInfo.project_id}`); navigate(`/tracker/project/${taskInfo.project_id}`);
}); });
@ -224,7 +224,7 @@ export const TicketFullScreen = () => {
return showNotification({ return showNotification({
show: true, show: true,
text: "Заполните поля", text: "Заполните поля",
type: "error" type: "error",
}); });
} }
apiRequest("/task/update-task", { apiRequest("/task/update-task", {
@ -232,13 +232,13 @@ export const TicketFullScreen = () => {
data: { data: {
task_id: taskInfo.id, task_id: taskInfo.id,
title: inputsValue.title, title: inputsValue.title,
description: inputsValue.description description: inputsValue.description,
} },
}).then(() => { }).then(() => {
showNotification({ showNotification({
show: true, show: true,
text: "Изменения сохранены", text: "Изменения сохранены",
type: "success" type: "success",
}); });
setEditOpen(!editOpen); setEditOpen(!editOpen);
}); });
@ -252,8 +252,8 @@ export const TicketFullScreen = () => {
data: { data: {
text: inputsValue.comment, text: inputsValue.comment,
entity_type: 2, entity_type: 2,
entity_id: taskInfo.id entity_id: taskInfo.id,
} },
}).then((res) => { }).then((res) => {
let newComment = res; let newComment = res;
setCommentSendDisable(false); setCommentSendDisable(false);
@ -270,8 +270,8 @@ export const TicketFullScreen = () => {
data: { data: {
entity_type: 2, entity_type: 2,
entity_id: taskInfo.id, entity_id: taskInfo.id,
created_at: getCorrectRequestDate(new Date()) created_at: getCorrectRequestDate(new Date()),
} },
}).then((res) => { }).then((res) => {
setTimerStart(true); setTimerStart(true);
setTimerInfo(res); setTimerInfo(res);
@ -284,8 +284,8 @@ export const TicketFullScreen = () => {
method: "PUT", method: "PUT",
data: { data: {
timer_id: timerInfo.id, timer_id: timerInfo.id,
stopped_at: getCorrectRequestDate(new Date()) stopped_at: getCorrectRequestDate(new Date()),
} },
}).then(() => { }).then(() => {
setTimerStart(false); setTimerStart(false);
clearInterval(timerId); clearInterval(timerId);
@ -297,8 +297,8 @@ export const TicketFullScreen = () => {
method: "DELETE", method: "DELETE",
data: { data: {
project_id: projectInfo.id, project_id: projectInfo.id,
user_id: userId user_id: userId,
} },
}).then(() => { }).then(() => {
dispatch(deletePersonOnProject(userId)); dispatch(deletePersonOnProject(userId));
}); });
@ -314,8 +314,8 @@ export const TicketFullScreen = () => {
method: "PUT", method: "PUT",
data: { data: {
comment_id: subComment.id, comment_id: subComment.id,
status: 0 status: 0,
} },
}).then(() => {}); }).then(() => {});
}); });
} }
@ -391,7 +391,7 @@ export const TicketFullScreen = () => {
return setCurrentTimerCount({ return setCurrentTimerCount({
hours: updateTimerHours, hours: updateTimerHours,
minute: updateTimerMinute, minute: updateTimerMinute,
seconds: updateTimerSec seconds: updateTimerSec,
}); });
} }
@ -405,13 +405,13 @@ export const TicketFullScreen = () => {
method: "PUT", method: "PUT",
data: { data: {
task_id: taskInfo.id, task_id: taskInfo.id,
executor_id: 0 executor_id: 0,
} },
}).then(() => { }).then(() => {
setTaskInfo((prevState) => ({ setTaskInfo((prevState) => ({
...prevState, ...prevState,
executor_id: null, executor_id: null,
executor: null executor: null,
})); }));
}); });
} }
@ -421,14 +421,14 @@ export const TicketFullScreen = () => {
method: "PUT", method: "PUT",
data: { data: {
task_id: taskInfo.id, task_id: taskInfo.id,
executor_id: person.user_id executor_id: person.user_id,
} },
}).then((res) => { }).then((res) => {
setDropListOpen(false); setDropListOpen(false);
setTaskInfo((prevState) => ({ setTaskInfo((prevState) => ({
...prevState, ...prevState,
executor_id: res.executor_id, executor_id: res.executor_id,
executor: res.executor executor: res.executor,
})); }));
}); });
} }
@ -438,14 +438,14 @@ export const TicketFullScreen = () => {
method: "DELETE", method: "DELETE",
data: { data: {
task_id: taskInfo.id, task_id: taskInfo.id,
user_id: person.user_id user_id: person.user_id,
} },
}).then(() => { }).then(() => {
setTaskInfo((prevState) => ({ setTaskInfo((prevState) => ({
...prevState, ...prevState,
taskUsers: taskInfo.taskUsers.filter( taskUsers: taskInfo.taskUsers.filter(
(item) => item.user_id !== person.user_id (item) => item.user_id !== person.user_id
) ),
})); }));
}); });
} }
@ -455,13 +455,13 @@ export const TicketFullScreen = () => {
method: "POST", method: "POST",
data: { data: {
task_id: taskInfo.id, task_id: taskInfo.id,
user_id: person.user_id user_id: person.user_id,
} },
}).then((res) => { }).then((res) => {
setDropListMembersOpen(false); setDropListMembersOpen(false);
setTaskInfo((prevValue) => ({ setTaskInfo((prevValue) => ({
...prevValue, ...prevValue,
taskUsers: [...prevValue.taskUsers, res] taskUsers: [...prevValue.taskUsers, res],
})); }));
}); });
} }
@ -471,8 +471,8 @@ export const TicketFullScreen = () => {
method: "PUT", method: "PUT",
data: { data: {
task_id: taskInfo.id, task_id: taskInfo.id,
dead_line: getCorrectRequestDate(date) dead_line: getCorrectRequestDate(date),
} },
}).then(() => {}); }).then(() => {});
} }
@ -482,7 +482,7 @@ export const TicketFullScreen = () => {
const res = await fetch("https://itguild.info/api/file/upload", { const res = await fetch("https://itguild.info/api/file/upload", {
method: "POST", method: "POST",
body: formData, body: formData,
headers: { ...getToken() } headers: { ...getToken() },
}); });
const data = await res.json(); const data = await res.json();
@ -497,8 +497,8 @@ export const TicketFullScreen = () => {
file_id: uploadedFile[0].id, file_id: uploadedFile[0].id,
entity_type: 2, entity_type: 2,
entity_id: taskInfo.id, entity_id: taskInfo.id,
status: 1 status: 1,
} },
}).then((res) => { }).then((res) => {
setTaskFiles((prevValue) => [...prevValue, res]); setTaskFiles((prevValue) => [...prevValue, res]);
setUploadedFile(null); setUploadedFile(null);
@ -515,8 +515,8 @@ export const TicketFullScreen = () => {
method: "PUT", method: "PUT",
data: { data: {
task_id: taskInfo.id, task_id: taskInfo.id,
execution_priority: key execution_priority: key,
} },
}).then(() => {}); }).then(() => {});
} }
@ -552,8 +552,8 @@ export const TicketFullScreen = () => {
data: { data: {
mark_id: tagId, mark_id: tagId,
entity_type: 2, entity_type: 2,
entity_id: taskInfo.id entity_id: taskInfo.id,
} },
}).then(() => { }).then(() => {
setTaskTags((prevValue) => prevValue.filter((tag) => tag.id !== tagId)); setTaskTags((prevValue) => prevValue.filter((tag) => tag.id !== tagId));
}); });
@ -565,8 +565,8 @@ export const TicketFullScreen = () => {
data: { data: {
mark_id: tagId, mark_id: tagId,
entity_type: 2, entity_type: 2,
entity_id: taskInfo.id entity_id: taskInfo.id,
} },
}).then((data) => { }).then((data) => {
setSelectTagsOpen(false); setSelectTagsOpen(false);
setTaskTags((prevValue) => [...prevValue, data.mark]); setTaskTags((prevValue) => [...prevValue, data.mark]);
@ -639,7 +639,7 @@ export const TicketFullScreen = () => {
<ProfileBreadcrumbs <ProfileBreadcrumbs
links={[ links={[
{ name: "Главная", link: "/profile" }, { name: "Главная", link: "/profile" },
{ name: "Трекер", link: "/profile/tracker" } { name: "Трекер", link: "/profile/tracker" },
]} ]}
/> />
<h2 className="tracker__title">Управление проектами с трекером</h2> <h2 className="tracker__title">Управление проектами с трекером</h2>
@ -794,7 +794,7 @@ export const TicketFullScreen = () => {
onChange={(e) => { onChange={(e) => {
setInputsValue((prevValue) => ({ setInputsValue((prevValue) => ({
...prevValue, ...prevValue,
title: e.target.value title: e.target.value,
})); }));
}} }}
/> />
@ -819,14 +819,14 @@ export const TicketFullScreen = () => {
"ImageToolbar", "ImageToolbar",
"ImageUpload", "ImageUpload",
"MediaEmbed", "MediaEmbed",
"BlockQuote" "BlockQuote",
] ],
}} }}
onChange={(event, editor) => { onChange={(event, editor) => {
const data = editor.getData(); const data = editor.getData();
setInputsValue((prevValue) => ({ setInputsValue((prevValue) => ({
...prevValue, ...prevValue,
description: data description: data,
})); }));
}} }}
/> />
@ -834,7 +834,7 @@ export const TicketFullScreen = () => {
<p <p
className="fullDescription fullScreenDescription" className="fullDescription fullScreenDescription"
dangerouslySetInnerHTML={{ dangerouslySetInnerHTML={{
__html: inputsValue.description __html: inputsValue.description,
}} }}
/> />
)} )}
@ -917,7 +917,7 @@ export const TicketFullScreen = () => {
onChange={(e) => { onChange={(e) => {
setInputsValue((prevValue) => ({ setInputsValue((prevValue) => ({
...prevValue, ...prevValue,
comment: e.target.value comment: e.target.value,
})); }));
}} }}
/> />

View File

@ -19,7 +19,7 @@ import {
setColumnName, setColumnName,
setColumnPriority, setColumnPriority,
setProject, setProject,
setProjectBoardFetch setProjectBoardFetch,
} from "@redux/projectsTrackerSlice"; } from "@redux/projectsTrackerSlice";
import { getCorrectRequestDate, urlForLocal } from "@utils/helper"; import { getCorrectRequestDate, urlForLocal } from "@utils/helper";
@ -52,7 +52,7 @@ export const TrackerModal = ({
projectId, projectId,
priorityTask, priorityTask,
projectUsers, projectUsers,
projectMarks projectMarks,
}) => { }) => {
const dispatch = useDispatch(); const dispatch = useDispatch();
const projectBoard = useSelector(getProjectBoard); const projectBoard = useSelector(getProjectBoard);
@ -93,16 +93,16 @@ export const TrackerModal = ({
const priority = [ const priority = [
{ {
name: "Высокий", name: "Высокий",
key: 2 key: 2,
}, },
{ {
name: "Средний", name: "Средний",
key: 1 key: 1,
}, },
{ {
name: "Низкий", name: "Низкий",
key: 0 key: 0,
} },
]; ];
function createTab() { function createTab() {
@ -118,8 +118,8 @@ export const TrackerModal = ({
priority: projectBoard.columns.length priority: projectBoard.columns.length
? projectBoard.columns.at(-1).priority + 1 ? projectBoard.columns.at(-1).priority + 1
: 1, : 1,
title: valueColumn title: valueColumn,
} },
}).then(() => { }).then(() => {
dispatch(setProjectBoardFetch(projectBoard.id)); dispatch(setProjectBoardFetch(projectBoard.id));
}); });
@ -132,7 +132,7 @@ export const TrackerModal = ({
showNotification({ showNotification({
show: true, show: true,
text: "Введите название и описание", text: "Введите название и описание",
type: "error" type: "error",
}); });
return; return;
} }
@ -148,14 +148,14 @@ export const TrackerModal = ({
column_id: selectedTab, column_id: selectedTab,
execution_priority: selectedPriority ? selectedPriority.key : "", execution_priority: selectedPriority ? selectedPriority.key : "",
priority: priorityTask, priority: priorityTask,
dead_line: deadLineDate ? getCorrectRequestDate(deadLineDate) : "" dead_line: deadLineDate ? getCorrectRequestDate(deadLineDate) : "",
} },
}).then((res) => { }).then((res) => {
if (res.status === 500) { if (res.status === 500) {
showNotification({ showNotification({
show: true, show: true,
text: "Задача с таким именем уже существует", text: "Задача с таким именем уже существует",
type: "error" type: "error",
}); });
} else { } else {
for (let i = 0; i < taskTags.length; i++) { for (let i = 0; i < taskTags.length; i++) {
@ -164,8 +164,8 @@ export const TrackerModal = ({
data: { data: {
mark_id: taskTags[i].id, mark_id: taskTags[i].id,
entity_type: 2, entity_type: 2,
entity_id: res.id entity_id: res.id,
} },
}).then(() => { }).then(() => {
setTaskTags([]); setTaskTags([]);
}); });
@ -175,8 +175,8 @@ export const TrackerModal = ({
method: "PUT", method: "PUT",
data: { data: {
task_id: res.id, task_id: res.id,
executor_id: selectedExecutorTask.user_id executor_id: selectedExecutorTask.user_id,
} },
}).then(() => { }).then(() => {
dispatch(setProjectBoardFetch(projectBoard.id)); dispatch(setProjectBoardFetch(projectBoard.id));
setActive(false); setActive(false);
@ -195,7 +195,7 @@ export const TrackerModal = ({
showNotification({ showNotification({
show: true, show: true,
text: "Задача создана", text: "Задача создана",
type: "success" type: "success",
}); });
} }
}); });
@ -206,8 +206,8 @@ export const TrackerModal = ({
method: "PUT", method: "PUT",
data: { data: {
project_id: projectId, project_id: projectId,
name: projectName name: projectName,
} },
}).then(() => { }).then(() => {
setActive(false); setActive(false);
dispatch(editProjectName({ id: projectId, name: projectName })); dispatch(editProjectName({ id: projectId, name: projectName }));
@ -220,20 +220,20 @@ export const TrackerModal = ({
const priorityColumns = [ const priorityColumns = [
{ {
column_id: column.id, column_id: column.id,
priority: Number(columnPriority) priority: Number(columnPriority),
} },
]; ];
for (let i = column.priority; i < columnPriority; i++) { for (let i = column.priority; i < columnPriority; i++) {
const currentColumn = { const currentColumn = {
column_id: projectBoard.columns[i].id, column_id: projectBoard.columns[i].id,
priority: i priority: i,
}; };
priorityColumns.push(currentColumn); priorityColumns.push(currentColumn);
} }
for (let i = column.priority; i > columnPriority; i--) { for (let i = column.priority; i > columnPriority; i--) {
const currentColumn = { const currentColumn = {
column_id: projectBoard.columns[i - 2].id, column_id: projectBoard.columns[i - 2].id,
priority: i priority: i,
}; };
priorityColumns.push(currentColumn); priorityColumns.push(currentColumn);
} }
@ -241,8 +241,8 @@ export const TrackerModal = ({
method: "POST", method: "POST",
data: { data: {
project_id: projectBoard.id, project_id: projectBoard.id,
data: JSON.stringify(priorityColumns) data: JSON.stringify(priorityColumns),
} },
}).then(() => { }).then(() => {
dispatch(setProjectBoardFetch(projectBoard.id)); dispatch(setProjectBoardFetch(projectBoard.id));
}); });
@ -256,8 +256,8 @@ export const TrackerModal = ({
method: "PUT", method: "PUT",
data: { data: {
column_id: columnId, column_id: columnId,
title: columnName title: columnName,
} },
}).then(() => { }).then(() => {
setActive(false); setActive(false);
dispatch(editColumnName({ id: columnId, title: columnName })); dispatch(editColumnName({ id: columnId, title: columnName }));
@ -273,8 +273,8 @@ export const TrackerModal = ({
data: { data: {
user_id: localStorage.getItem("id"), user_id: localStorage.getItem("id"),
name: nameProject, name: nameProject,
status: 19 status: 19,
} },
}).then((res) => { }).then((res) => {
if (!Array.isArray(res.name)) { if (!Array.isArray(res.name)) {
const result = { ...res, columns: [] }; const result = { ...res, columns: [] };
@ -285,7 +285,7 @@ export const TrackerModal = ({
showNotification({ showNotification({
show: true, show: true,
text: "Проект с таким именем уже существует", text: "Проект с таким именем уже существует",
type: "error" type: "error",
}); });
} }
}); });
@ -297,8 +297,8 @@ export const TrackerModal = ({
method: "POST", method: "POST",
data: { data: {
user_id: selectedWorker.user_id, user_id: selectedWorker.user_id,
project_id: projectBoard.id project_id: projectBoard.id,
} },
}).then((el) => { }).then((el) => {
dispatch(addPersonToProject(el)); dispatch(addPersonToProject(el));
setActive(false); setActive(false);
@ -332,10 +332,10 @@ export const TrackerModal = ({
{ {
user: { user: {
avatar: profileInfo.photo, avatar: profileInfo.photo,
fio: profileInfo.fio fio: profileInfo.fio,
}, },
user_id: profileInfo.id_user user_id: profileInfo.id_user,
} },
]); ]);
} else { } else {
setCorrectProjectUsers(projectUsers); setCorrectProjectUsers(projectUsers);
@ -525,10 +525,10 @@ export const TrackerModal = ({
"italic", "italic",
"link", "link",
"bulletedList", "bulletedList",
"numberedList" "numberedList",
], ],
removePlugins: ["BlockQuote"], removePlugins: ["BlockQuote"],
placeholder: "Описание задачи" placeholder: "Описание задачи",
}} }}
onChange={(event, editor) => { onChange={(event, editor) => {
const data = editor.getData(); const data = editor.getData();

View File

@ -22,55 +22,55 @@ export const Navigation = () => {
developer: [ developer: [
{ {
path: "/summary", path: "/summary",
name: "Резюме" name: "Резюме",
}, },
{ {
path: "/calendar", path: "/calendar",
name: "Отчеты" name: "Отчеты",
}, },
{ {
path: "/tracker", path: "/tracker",
name: "Трекер" name: "Трекер",
}, },
{ {
path: "/payouts", path: "/payouts",
name: "Выплаты" name: "Выплаты",
}, },
{ {
path: "/quiz", path: "/quiz",
name: "Тесты" name: "Тесты",
}, },
{ {
path: "/settings", path: "/settings",
name: "Настройки" name: "Настройки",
} },
], ],
partner: [ partner: [
{ {
path: "/catalog", path: "/catalog",
name: "Каталог" name: "Каталог",
}, },
{ {
path: "/requests", path: "/requests",
name: "Запросы" name: "Запросы",
}, },
{ {
path: "/categories", path: "/categories",
name: "Персонал" name: "Персонал",
}, },
{ {
path: "/tracker", path: "/tracker",
name: "Трекер" name: "Трекер",
}, },
{ {
path: "/treaties", path: "/treaties",
name: "Договора" name: "Договора",
}, },
{ {
path: "/settings", path: "/settings",
name: "Настройки" name: "Настройки",
} },
] ],
}); });
useEffect(() => { useEffect(() => {

View File

@ -15,7 +15,7 @@ const images = {
archive: archive, archive: archive,
error: error, error: error,
copy: copy, copy: copy,
success: success success: success,
}; };
export const Notification = () => { export const Notification = () => {

View File

@ -4,7 +4,7 @@ import { useDispatch, useSelector } from "react-redux";
import { import {
getPositionId, getPositionId,
selectTags, selectTags,
setPositionId setPositionId,
} from "@redux/outstaffingSlice"; } from "@redux/outstaffingSlice";
import OutstaffingBlock from "@components/OutstaffingBlock/OutstaffingBlock"; import OutstaffingBlock from "@components/OutstaffingBlock/OutstaffingBlock";
@ -34,7 +34,7 @@ const Outstaffing = () => {
const onSelectPosition = createSelectPositionHandler({ const onSelectPosition = createSelectPositionHandler({
positionId, positionId,
setPositionId, setPositionId,
dispatch dispatch,
}); });
return ( return (
<> <>

View File

@ -13,13 +13,13 @@ const handlePositionClick = ({
positionId, positionId,
isSelected, isSelected,
onSelect, onSelect,
apiRequest apiRequest,
}) => { }) => {
if (isSelected) { if (isSelected) {
apiRequest("/profile", { apiRequest("/profile", {
params: { params: {
limit: 1000 limit: 1000,
} },
}).then((profileArr) => { }).then((profileArr) => {
dispatch(profiles(profileArr)); dispatch(profiles(profileArr));
dispatch(selectedItems([])); dispatch(selectedItems([]));
@ -29,8 +29,8 @@ const handlePositionClick = ({
apiRequest("/profile", { apiRequest("/profile", {
params: { params: {
limit: "1000", limit: "1000",
position_id: positionId position_id: positionId,
} },
}).then((res) => { }).then((res) => {
dispatch(profiles(res)); dispatch(profiles(res));
dispatch(selectedItems([])); dispatch(selectedItems([]));
@ -46,7 +46,7 @@ const OutstaffingBlock = ({
header, header,
positionId, positionId,
isSelected, isSelected,
onSelect onSelect,
}) => { }) => {
const dispatch = useDispatch(); const dispatch = useDispatch();
@ -87,7 +87,7 @@ const OutstaffingBlock = ({
positionId, positionId,
isSelected, isSelected,
onSelect, onSelect,
apiRequest apiRequest,
}) })
} }
> >

View File

@ -8,7 +8,7 @@ import { getProfileInfo } from "@redux/outstaffingSlice";
import { import {
getRequestDates, getRequestDates,
setReportDate, setReportDate,
setRequestDate setRequestDate,
} from "@redux/reportSlice"; } from "@redux/reportSlice";
import { urlForLocal } from "@utils/helper"; import { urlForLocal } from "@utils/helper";
@ -89,7 +89,7 @@ export const ProfileCalendar = () => {
<ProfileBreadcrumbs <ProfileBreadcrumbs
links={[ links={[
{ name: "Главная", link: "/profile" }, { name: "Главная", link: "/profile" },
{ name: "Отчеты", link: "/profile/calendar" } { name: "Отчеты", link: "/profile/calendar" },
]} ]}
/> />
<h2 className="summary__title">Ваши отчеты</h2> <h2 className="summary__title">Ваши отчеты</h2>

View File

@ -7,7 +7,7 @@ import { Link } from "react-router-dom";
import { import {
setReportDate, setReportDate,
setRequestDate, setRequestDate,
setSendRequest setSendRequest,
} from "@redux/reportSlice"; } from "@redux/reportSlice";
import { getCorrectYYMMDD } from "@utils/helper"; import { getCorrectYYMMDD } from "@utils/helper";
@ -20,7 +20,7 @@ import {
currentMonthAndDay, currentMonthAndDay,
getCorrectDate, getCorrectDate,
getReports, getReports,
hourOfNum hourOfNum,
} from "@components/Calendar/calendarHelper"; } from "@components/Calendar/calendarHelper";
import BaseButton from "@components/Common/BaseButton/BaseButton"; import BaseButton from "@components/Common/BaseButton/BaseButton";
import ShortReport from "@components/ShortReport/ShortReport"; import ShortReport from "@components/ShortReport/ShortReport";
@ -40,7 +40,7 @@ export const ProfileCalendarComponent = React.memo(
startRangeDays, startRangeDays,
toggleRangeDays, toggleRangeDays,
startDate, startDate,
setStartDateRange setStartDateRange,
}) => { }) => {
const dispatch = useDispatch(); const dispatch = useDispatch();
@ -58,7 +58,7 @@ export const ProfileCalendarComponent = React.memo(
calendarHelper(value).map((array) => { calendarHelper(value).map((array) => {
setSelectedRangeDays((prevState) => ({ setSelectedRangeDays((prevState) => ({
...prevState, ...prevState,
[array[0]]: false [array[0]]: false,
})); }));
}); });
if (endDate) { if (endDate) {
@ -196,7 +196,7 @@ export const ProfileCalendarComponent = React.memo(
calendarHelper(value).map((array) => { calendarHelper(value).map((array) => {
setSelectedRangeDays((prevState) => ({ setSelectedRangeDays((prevState) => ({
...prevState, ...prevState,
[array[0]]: false [array[0]]: false,
})); }));
}); });
} }
@ -316,15 +316,15 @@ export const ProfileCalendarComponent = React.memo(
? `${getCorrectDate(startDate)} - ${getCorrectDate(endDate)}` ? `${getCorrectDate(startDate)} - ${getCorrectDate(endDate)}`
: `${getCorrectDate(endDate)} - ${getCorrectDate(startDate)}` : `${getCorrectDate(endDate)} - ${getCorrectDate(startDate)}`
: activePeriod : activePeriod
? "Выберите диапазон на календаре" ? "Выберите диапазон на календаре"
: "Выбрать диапазон"} : "Выбрать диапазон"}
</span> </span>
<span> <span>
{totalRangeHours {totalRangeHours
? `${totalRangeHours} ${hourOfNum(totalRangeHours)}` ? `${totalRangeHours} ${hourOfNum(totalRangeHours)}`
: endDate : endDate
? "0 часов" ? "0 часов"
: ""} : ""}
</span> </span>
{endDate && ( {endDate && (
<BaseButton <BaseButton

View File

@ -58,14 +58,14 @@ export const ProjectTiket = ({ project, index }) => {
method: "PUT", method: "PUT",
data: { data: {
project_id: project.id, project_id: project.id,
status: 10 status: 10,
} },
}).then(() => { }).then(() => {
dispatch(deleteProject(project)); dispatch(deleteProject(project));
showNotification({ showNotification({
show: true, show: true,
text: "Проект успешно была перемещена в архив", text: "Проект успешно была перемещена в архив",
type: "archive" type: "archive",
}); });
}); });
} }

View File

@ -23,7 +23,7 @@ import remove from "assets/icons/remove.svg";
import { import {
getCorrectDate, getCorrectDate,
getCreatedDate, getCreatedDate,
hourOfNum hourOfNum,
} from "../Calendar/calendarHelper"; } from "../Calendar/calendarHelper";
import "./reportForm.scss"; import "./reportForm.scss";
@ -48,7 +48,7 @@ const ReportForm = () => {
const [datePickerOpen, setDatePickerOpen] = useState(false); const [datePickerOpen, setDatePickerOpen] = useState(false);
const [inputs, setInputs] = useState([ const [inputs, setInputs] = useState([
{ task: "", hours_spent: "", minutes_spent: 0 } { task: "", hours_spent: "", minutes_spent: 0 },
]); ]);
const [troublesInputValue, setTroublesInputValue] = useState(""); const [troublesInputValue, setTroublesInputValue] = useState("");
const [scheduledInputValue, setScheduledInputValue] = useState(""); const [scheduledInputValue, setScheduledInputValue] = useState("");
@ -56,7 +56,7 @@ const ReportForm = () => {
const addInput = () => { const addInput = () => {
setInputs((prev) => [ setInputs((prev) => [
...prev, ...prev,
{ task: "", hours_spent: "", minutes_spent: 0 } { task: "", hours_spent: "", minutes_spent: 0 },
]); ]);
}; };
@ -101,8 +101,8 @@ const ReportForm = () => {
difficulties: troublesInputValue, difficulties: troublesInputValue,
tomorrow: scheduledInputValue, tomorrow: scheduledInputValue,
created_at: getCreatedDate(startDate), created_at: getCreatedDate(startDate),
status: 1 status: 1,
} },
}).then(() => { }).then(() => {
setReportSuccess("Отчет отправлен"); setReportSuccess("Отчет отправлен");
setTimeout(() => { setTimeout(() => {
@ -126,7 +126,7 @@ const ReportForm = () => {
links={[ links={[
{ name: "Главная", link: "/profile" }, { name: "Главная", link: "/profile" },
{ name: "Отчеты", link: "/profile/calendar" }, { name: "Отчеты", link: "/profile/calendar" },
{ name: "Добавить отчет", link: "/report" } { name: "Добавить отчет", link: "/report" },
]} ]}
/> />
<h2 className="summary__title"> <h2 className="summary__title">
@ -207,7 +207,7 @@ const ReportForm = () => {
return index === inputIndex return index === inputIndex
? { ? {
...input, ...input,
task: e.target.value task: e.target.value,
} }
: input; : input;
}) })
@ -233,7 +233,7 @@ const ReportForm = () => {
return index === inputIndex return index === inputIndex
? { ? {
...input, ...input,
hours_spent: Number(e.target.value) hours_spent: Number(e.target.value),
} }
: input; : input;
}) })

View File

@ -7,7 +7,7 @@ import {
selectItems, selectItems,
selectTags, selectTags,
selectedItems, selectedItems,
setPositionId setPositionId,
} from "@redux/outstaffingSlice"; } from "@redux/outstaffingSlice";
import { apiRequest } from "@api/request"; import { apiRequest } from "@api/request";
@ -31,7 +31,7 @@ const TagSelect = () => {
const params = filterItemsId ? { skill: filterItemsId } : ""; const params = filterItemsId ? { skill: filterItemsId } : "";
apiRequest("/profile", { apiRequest("/profile", {
params: { ...params, limit: 1000 } params: { ...params, limit: 1000 },
}).then((res) => { }).then((res) => {
dispatch(profiles(res)); dispatch(profiles(res));
setSearchLoading(false); setSearchLoading(false);
@ -58,7 +58,7 @@ const TagSelect = () => {
return { return {
id: item.id, id: item.id,
value: item.value, value: item.value,
label: item.value label: item.value,
}; };
}) })
} }

View File

@ -5,7 +5,7 @@ import { Link } from "react-router-dom";
import { import {
getReportDate, getReportDate,
getSendRequest, getSendRequest,
setSendRequest setSendRequest,
} from "@redux/reportSlice"; } from "@redux/reportSlice";
import { apiRequest } from "@api/request"; import { apiRequest } from "@api/request";
@ -13,7 +13,7 @@ import { apiRequest } from "@api/request";
import { import {
getCorrectDate, getCorrectDate,
getCreatedDate, getCreatedDate,
hourOfNum hourOfNum,
} from "@components/Calendar/calendarHelper"; } from "@components/Calendar/calendarHelper";
import { Loader } from "@components/Common/Loader/Loader"; import { Loader } from "@components/Common/Loader/Loader";
@ -56,7 +56,7 @@ export const ShortReport = () => {
const taskInfo = { const taskInfo = {
hours: task.hours_spent, hours: task.hours_spent,
task: task.task, task: task.task,
id: task.id id: task.id,
}; };
if (task.hours_spent) { if (task.hours_spent) {
spendTime += Number(task.hours_spent); spendTime += Number(task.hours_spent);

View File

@ -18,24 +18,24 @@ export const SliderWorkers = ({ title, titleInfo, subTitle }) => {
const [workers] = useState([ const [workers] = useState([
{ {
avatar: mockWorker, avatar: mockWorker,
skils: "React / Vue Front end, Middle разработчик" skils: "React / Vue Front end, Middle разработчик",
}, },
{ {
avatar: avatarMockFirst, avatar: avatarMockFirst,
skils: "Vue / React Front end, Senior разработчик" skils: "Vue / React Front end, Senior разработчик",
}, },
{ {
avatar: avatarMockSecond, avatar: avatarMockSecond,
skils: "NodeJs Fullstack, Middle разработчик" skils: "NodeJs Fullstack, Middle разработчик",
}, },
{ {
avatar: avatarMockThird, avatar: avatarMockThird,
skils: "React / Vue Front end, Middle разработчик" skils: "React / Vue Front end, Middle разработчик",
}, },
{ {
avatar: avatarMockFourth, avatar: avatarMockFourth,
skils: "React / PHP Fullstack, Middle разработчик" skils: "React / PHP Fullstack, Middle разработчик",
} },
]); ]);
const settings = { const settings = {
@ -44,7 +44,7 @@ export const SliderWorkers = ({ title, titleInfo, subTitle }) => {
slidesToShow: 3, slidesToShow: 3,
slidesToScroll: 1, slidesToScroll: 1,
autoplay: true, autoplay: true,
autoplaySpeed: 4500 autoplaySpeed: 4500,
}; };
if (window.innerWidth < 575) { if (window.innerWidth < 575) {

View File

@ -6,7 +6,7 @@ const StarRating = ({
countStars = 1, countStars = 1,
countActiveStars = 1, countActiveStars = 1,
color = "#52B709", color = "#52B709",
size = 61 size = 61,
}) => { }) => {
const [shadedStars, setShadedStars] = useState([]); const [shadedStars, setShadedStars] = useState([]);
const [noShadedStars, setNoShadedStars] = useState([]); const [noShadedStars, setNoShadedStars] = useState([]);
@ -22,16 +22,16 @@ const StarRating = ({
}, []); }, []);
const ratingStyle = { const ratingStyle = {
"--size": size + "px" "--size": size + "px",
}; };
const activeStyle = { const activeStyle = {
"--width": percent + "%", "--width": percent + "%",
"--color": color, "--color": color,
"--content": shadedStars.join("") "--content": shadedStars.join(""),
}; };
const bodyStyle = { const bodyStyle = {
"--content": noShadedStars.join(""), "--content": noShadedStars.join(""),
"--color": color "--color": color,
}; };
return ( return (

View File

@ -27,7 +27,7 @@ export const TrackerSelectColumn = ({ columns, task, currentColumn }) => {
dispatch( dispatch(
moveProjectTask({ moveProjectTask({
startWrapperIndex: { index: currentColumn.id, task }, startWrapperIndex: { index: currentColumn.id, task },
columnId: column.id columnId: column.id,
}) })
); );
}} }}

View File

@ -19,7 +19,7 @@ export const TrackerTaskComment = ({
comment, comment,
commentDelete, commentDelete,
addSubComment, addSubComment,
subCommentDelete subCommentDelete,
}) => { }) => {
const [commentsEditOpen, setCommentsEditOpen] = useState(false); const [commentsEditOpen, setCommentsEditOpen] = useState(false);
const [commentsEditText, setCommentsEditText] = useState(comment.text); const [commentsEditText, setCommentsEditText] = useState(comment.text);
@ -32,8 +32,8 @@ export const TrackerTaskComment = ({
method: "PUT", method: "PUT",
data: { data: {
comment_id: comment.id, comment_id: comment.id,
text: commentsEditText text: commentsEditText,
} },
}).then(() => {}); }).then(() => {});
} }
@ -42,8 +42,8 @@ export const TrackerTaskComment = ({
method: "PUT", method: "PUT",
data: { data: {
comment_id: comment.id, comment_id: comment.id,
status: 0 status: 0,
} },
}).then(() => { }).then(() => {
if (comment.parent_id) { if (comment.parent_id) {
subCommentDelete(comment); subCommentDelete(comment);
@ -62,8 +62,8 @@ export const TrackerTaskComment = ({
text: subCommentsCreateText, text: subCommentsCreateText,
entity_type: 2, entity_type: 2,
entity_id: taskId, entity_id: taskId,
parent_id: comment.id parent_id: comment.id,
} },
}).then((res) => { }).then((res) => {
let newSubComment = res; let newSubComment = res;
newSubComment.created_at = new Date(); newSubComment.created_at = new Date();
@ -80,7 +80,7 @@ export const TrackerTaskComment = ({
: "", : "",
"comments__list__item", "comments__list__item",
commentsEditOpen ? "comment__edit--open" : "", commentsEditOpen ? "comment__edit--open" : "",
comment.parent_id ? "comments__list__item__subComment" : "" comment.parent_id ? "comments__list__item__subComment" : "",
].join(" ")} ].join(" ")}
> >
<div className="comments__list__item__info"> <div className="comments__list__item__info">
@ -131,8 +131,8 @@ export const TrackerTaskComment = ({
"ImageToolbar", "ImageToolbar",
"ImageUpload", "ImageUpload",
"MediaEmbed", "MediaEmbed",
"BlockQuote" "BlockQuote",
] ],
}} }}
onChange={(event, editor) => { onChange={(event, editor) => {
const data = editor.getData(); const data = editor.getData();

View File

@ -16,7 +16,7 @@ export const Instruction = () => {
useEffect(() => { useEffect(() => {
apiRequest("/user-questionnaire/get-question-number", { apiRequest("/user-questionnaire/get-question-number", {
params: { user_questionnaire_uuid: test.uuid } params: { user_questionnaire_uuid: test.uuid },
}).then((res) => setCountQuestions(res.question_number)); }).then((res) => setCountQuestions(res.question_number));
}, []); }, []);

View File

@ -28,7 +28,7 @@ export const QuizPassingInformation = ({ setStartTest, uuid, timer }) => {
showNotification({ showNotification({
show: true, show: true,
text: res?.message || "", text: res?.message || "",
type: "error" type: "error",
}); });
return; return;
} }
@ -54,7 +54,7 @@ export const QuizPassingInformation = ({ setStartTest, uuid, timer }) => {
const completeTest = () => const completeTest = () =>
apiRequest("/user-questionnaire/questionnaire-completed", { apiRequest("/user-questionnaire/questionnaire-completed", {
method: "POST" method: "POST",
}); });
const finishQuiz = async () => { const finishQuiz = async () => {

View File

@ -29,7 +29,7 @@ export const TaskQuiz = ({ timer }) => {
const { userResponses, handleChange } = useHandlerFieldTest({ const { userResponses, handleChange } = useHandlerFieldTest({
questions, questions,
indexQuestion: index indexQuestion: index,
}); });
const nextQuestion = async (e) => { const nextQuestion = async (e) => {
@ -50,13 +50,13 @@ export const TaskQuiz = ({ timer }) => {
data: { data: {
user_id: userId, user_id: userId,
user_questionnaire_uuid: uuid, user_questionnaire_uuid: uuid,
userResponses: JSON.stringify(userResponses) userResponses: JSON.stringify(userResponses),
} },
}).then(() => { }).then(() => {
showNotification({ showNotification({
show: true, show: true,
text: "Тест успешно пройден", text: "Тест успешно пройден",
type: "success" type: "success",
}); });
navigate("/quiz"); navigate("/quiz");
// if (String(res?.status)[0] !== "2") { // if (String(res?.status)[0] !== "2") {

View File

@ -2,7 +2,7 @@ import React, { Component } from "react";
class ErrorBoundary extends Component { class ErrorBoundary extends Component {
state = { state = {
error: null error: null,
}; };
static getDerivedStateFromError(error) { static getDerivedStateFromError(error) {

View File

@ -10,8 +10,8 @@ export const useHandlerFieldTest = ({ questions, indexQuestion }) => {
{ {
question_id: questions[indexQuestion].id, question_id: questions[indexQuestion].id,
response_body: e.target.value, response_body: e.target.value,
answer_id: e.target.id ? e.target.id : questions[indexQuestion].id answer_id: e.target.id ? e.target.id : questions[indexQuestion].id,
} },
]); ]);
}; };

View File

@ -22,18 +22,18 @@ export const Article = () => {
{ {
image: cardImg1, image: cardImg1,
title: "Аутстаффинг джунов: почему это выгодно", title: "Аутстаффинг джунов: почему это выгодно",
data: "1 марта, 2023" data: "1 марта, 2023",
}, },
{ {
image: cardImg2, image: cardImg2,
title: "Аутстаффинг джунов: почему это выгодно", title: "Аутстаффинг джунов: почему это выгодно",
data: "1 марта, 2023" data: "1 марта, 2023",
}, },
{ {
image: cardImg3, image: cardImg3,
title: "Аутстаффинг джунов: почему это выгодно", title: "Аутстаффинг джунов: почему это выгодно",
data: "1 марта, 2023" data: "1 марта, 2023",
} },
]); ]);
return ( return (
@ -48,8 +48,8 @@ export const Article = () => {
{ name: "Блог", link: "/blog" }, { name: "Блог", link: "/blog" },
{ {
name: "Аутстаффинг джунов: почему это выгодно", name: "Аутстаффинг джунов: почему это выгодно",
link: "/blog" link: "/blog",
} },
]} ]}
/> />
</div> </div>

View File

@ -44,7 +44,7 @@ export const AuthForCandidate = () => {
description: description:
"Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript", "Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript",
available: true, available: true,
img: BackEndImg img: BackEndImg,
}, },
{ {
title: "Frontend разработчики", title: "Frontend разработчики",
@ -52,14 +52,14 @@ export const AuthForCandidate = () => {
description: description:
"Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript", "Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript",
available: true, available: true,
img: FrontendImg img: FrontendImg,
}, },
{ {
title: "Архитектура проектов", title: "Архитектура проектов",
link: "/registration-candidate", link: "/registration-candidate",
description: "Потоки данных ER ERP CRM CQRS UML BPMN", description: "Потоки данных ER ERP CRM CQRS UML BPMN",
available: true, available: true,
img: ArchitectureImg img: ArchitectureImg,
}, },
{ {
title: "Дизайн проектов", title: "Дизайн проектов",
@ -67,35 +67,35 @@ export const AuthForCandidate = () => {
description: description:
"Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript", "Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript",
available: true, available: true,
img: DesignImg img: DesignImg,
}, },
{ {
title: "Тестирование проектов", title: "Тестирование проектов",
link: "/registration-candidate", link: "/registration-candidate",
description: "SQL Postman TestRail Kibana Ручное тестирование", description: "SQL Postman TestRail Kibana Ручное тестирование",
available: false, available: false,
img: TestImg img: TestImg,
}, },
{ {
title: "Администрирование проектов", title: "Администрирование проектов",
link: "/registration-candidate", link: "/registration-candidate",
description: "DevOps ELK Kubernetes Docker Bash Apache Oracle Git", description: "DevOps ELK Kubernetes Docker Bash Apache Oracle Git",
available: false, available: false,
img: AdminImg img: AdminImg,
}, },
{ {
title: "Управление проектом", title: "Управление проектом",
link: "/registration-candidate", link: "/registration-candidate",
description: "Scrum Kanban Agile Miro CustDev", description: "Scrum Kanban Agile Miro CustDev",
available: false, available: false,
img: ManageImg img: ManageImg,
}, },
{ {
title: "Копирайтинг проектов", title: "Копирайтинг проектов",
link: "/registration-candidate", link: "/registration-candidate",
description: "Теги Заголовок H1 Дескриптор Абзац Сценарий", description: "Теги Заголовок H1 Дескриптор Абзац Сценарий",
available: false, available: false,
img: CopyImg img: CopyImg,
}, },
{ {
title: "Реклама и SMM", title: "Реклама и SMM",
@ -103,8 +103,8 @@ export const AuthForCandidate = () => {
description: description:
"Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript", "Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript",
available: false, available: false,
img: SmmImg img: SmmImg,
} },
]); ]);
useEffect(() => { useEffect(() => {

View File

@ -21,33 +21,33 @@ export const Blog = () => {
{ {
image: cardImg1, image: cardImg1,
title: "Аутстаффинг джунов: почему это выгодно", title: "Аутстаффинг джунов: почему это выгодно",
data: "1 марта, 2023" data: "1 марта, 2023",
}, },
{ {
image: cardImg2, image: cardImg2,
title: "Аутстаффинг джунов: почему это выгодно", title: "Аутстаффинг джунов: почему это выгодно",
data: "1 марта, 2023" data: "1 марта, 2023",
}, },
{ {
image: cardImg3, image: cardImg3,
title: "Аутстаффинг джунов: почему это выгодно", title: "Аутстаффинг джунов: почему это выгодно",
data: "1 марта, 2023" data: "1 марта, 2023",
}, },
{ {
image: cardImg4, image: cardImg4,
title: "Аутстаффинг джунов: почему это выгодно", title: "Аутстаффинг джунов: почему это выгодно",
data: "1 марта, 2023" data: "1 марта, 2023",
}, },
{ {
image: cardImg5, image: cardImg5,
title: "Аутстаффинг джунов: почему это выгодно", title: "Аутстаффинг джунов: почему это выгодно",
data: "1 марта, 2023" data: "1 марта, 2023",
}, },
{ {
image: cardImg6, image: cardImg6,
title: "Аутстаффинг джунов: почему это выгодно", title: "Аутстаффинг джунов: почему это выгодно",
data: "1 марта, 2023" data: "1 марта, 2023",
} },
]); ]);
return ( return (
@ -60,7 +60,7 @@ export const Blog = () => {
<ProfileBreadcrumbs <ProfileBreadcrumbs
links={[ links={[
{ name: "Главная", link: "/auth" }, { name: "Главная", link: "/auth" },
{ name: "Блог", link: "/blog" } { name: "Блог", link: "/blog" },
]} ]}
/> />
</div> </div>

View File

@ -5,7 +5,7 @@ import { Navigate, useNavigate, useParams } from "react-router-dom";
import { import {
currentCandidate, currentCandidate,
selectCurrentCandidate selectCurrentCandidate,
} from "@redux/outstaffingSlice"; } from "@redux/outstaffingSlice";
import { LEVELS, SKILLS } from "@utils/constants"; import { LEVELS, SKILLS } from "@utils/constants";
@ -39,7 +39,7 @@ const FormPage = () => {
useEffect(() => { useEffect(() => {
if (!candidate.id) { if (!candidate.id) {
apiRequest("/profile", { apiRequest("/profile", {
params: Number(params.id) params: Number(params.id),
}).then((el) => dispatch(currentCandidate(el))); }).then((el) => dispatch(currentCandidate(el)));
} }
}, []); }, []);

View File

@ -17,7 +17,7 @@ export const FrequentlyAskedQuestion = () => {
id: params.id, id: params.id,
title: "Это фриланс-платформа?", title: "Это фриланс-платформа?",
answer: answer:
"Нет, мы работаем только с юридическими лицами и индивидуальными предпринимателями и тщательно проверяем своих партнеров. Партнерами являются агентства, которые специализируются на оказании услуг в формате аутстафф-модели и обладают глубокой экспертизой в разработке и внедрении IT-проектов." "Нет, мы работаем только с юридическими лицами и индивидуальными предпринимателями и тщательно проверяем своих партнеров. Партнерами являются агентства, которые специализируются на оказании услуг в формате аутстафф-модели и обладают глубокой экспертизой в разработке и внедрении IT-проектов.",
}); });
useEffect(() => { useEffect(() => {
@ -34,12 +34,12 @@ export const FrequentlyAskedQuestion = () => {
{ name: "Главная", link: "/auth" }, { name: "Главная", link: "/auth" },
{ {
name: "FAQ (часто задаваемые вопросы)", name: "FAQ (часто задаваемые вопросы)",
link: "/frequently-asked-questions" link: "/frequently-asked-questions",
}, },
{ {
name: question.title, name: question.title,
link: `/frequently-asked-question/${params.id}` link: `/frequently-asked-question/${params.id}`,
} },
]} ]}
/> />
<div className="frequently-asked-question__title">{question.title}</div> <div className="frequently-asked-question__title">{question.title}</div>

View File

@ -17,55 +17,55 @@ export const FrequentlyAskedQuestions = () => {
questions: [ questions: [
{ {
id: 1, id: 1,
title: "Это фриланс-платформа?" title: "Это фриланс-платформа?",
}, },
{ {
id: 2, id: 2,
title: title:
"Чем вы отличаетесь от традиционного процесса выбора исполнителя?" "Чем вы отличаетесь от традиционного процесса выбора исполнителя?",
}, },
{ {
id: 3, id: 3,
title: "Это фриланс-платформа?" title: "Это фриланс-платформа?",
}, },
{ {
id: 4, id: 4,
title: title:
"Чем вы отличаетесь от традиционного процесса выбора исполнителя?" "Чем вы отличаетесь от традиционного процесса выбора исполнителя?",
} },
] ],
}, },
{ {
title: "Поиск специалиста", title: "Поиск специалиста",
questions: [ questions: [
{ {
id: 11, id: 11,
title: "Это фриланс-платформа?" title: "Это фриланс-платформа?",
}, },
{ {
id: 22, id: 22,
title: title:
"Чем вы отличаетесь от традиционного процесса выбора исполнителя?" "Чем вы отличаетесь от традиционного процесса выбора исполнителя?",
}, },
{ {
id: 33, id: 33,
title: "Это фриланс-платформа?" title: "Это фриланс-платформа?",
}, },
{ {
id: 44, id: 44,
title: title:
"Чем вы отличаетесь от традиционного процесса выбора исполнителя?" "Чем вы отличаетесь от традиционного процесса выбора исполнителя?",
} },
] ],
}, },
{ {
title: "Бронирование специалиста", title: "Бронирование специалиста",
questions: [ questions: [
{ {
id: 11, id: 11,
title: "Это фриланс-платформа?" title: "Это фриланс-платформа?",
} },
] ],
}, },
{ {
title: "Работа с выбранным специалистом", title: "Работа с выбранным специалистом",
@ -73,10 +73,10 @@ export const FrequentlyAskedQuestions = () => {
{ {
id: 11, id: 11,
title: title:
"Чем вы отличаетесь от традиционного процесса выбора исполнителя?" "Чем вы отличаетесь от традиционного процесса выбора исполнителя?",
} },
] ],
} },
]; ];
return ( return (
@ -90,8 +90,8 @@ export const FrequentlyAskedQuestions = () => {
{ name: "Главная", link: "/auth" }, { name: "Главная", link: "/auth" },
{ {
name: "FAQ (часто задаваемые вопросы)", name: "FAQ (часто задаваемые вопросы)",
link: "/frequently-asked-questions" link: "/frequently-asked-questions",
} },
]} ]}
/> />
<div className="frequently-asked-questions__about"> <div className="frequently-asked-questions__about">

View File

@ -26,7 +26,7 @@ const Home = () => {
useEffect(() => { useEffect(() => {
setIsLoadingMore(true); setIsLoadingMore(true);
apiRequest("/profile", { apiRequest("/profile", {
params: { limit: 1000 } params: { limit: 1000 },
}).then((profileArr) => { }).then((profileArr) => {
dispatch(profiles(profileArr)); dispatch(profiles(profileArr));
setIsLoadingMore(false); setIsLoadingMore(false);
@ -63,7 +63,7 @@ const Home = () => {
links={[ links={[
{ name: "Главная", link: "/profile" }, { name: "Главная", link: "/profile" },
{ name: "Запросы и открытые позиции", link: "/profile/requests" }, { name: "Запросы и открытые позиции", link: "/profile/requests" },
{ name: "Каталог", link: "/profile/catalog" } { name: "Каталог", link: "/profile/catalog" },
]} ]}
/> />
<h2 className="catalog__title">Каталог специалистов</h2> <h2 className="catalog__title">Каталог специалистов</h2>

View File

@ -73,12 +73,12 @@ export const PartnerAddRequest = () => {
) { ) {
setInputs({ setInputs({
title: partnerRequestInfo.title, title: partnerRequestInfo.title,
description: partnerRequestInfo.descr description: partnerRequestInfo.descr,
}); });
setSelectedSpecialization(partnerRequestInfo.position); setSelectedSpecialization(partnerRequestInfo.position);
setSelectedLevel({ setSelectedLevel({
name: partnerRequestInfo.level, name: partnerRequestInfo.level,
id: partnerRequestInfo.knowledge_level_id id: partnerRequestInfo.knowledge_level_id,
}); });
setSelectedCount(partnerRequestInfo.specialist_count); setSelectedCount(partnerRequestInfo.specialist_count);
setSelectedSkills(partnerRequestInfo.skills); setSelectedSkills(partnerRequestInfo.skills);
@ -115,8 +115,8 @@ export const PartnerAddRequest = () => {
descr: inputs.description, descr: inputs.description,
skill_ids: selectedSkills.map((skill) => { skill_ids: selectedSkills.map((skill) => {
return skill.id; return skill.id;
}) }),
} },
}).then(() => { }).then(() => {
navigate("/profile/requests"); navigate("/profile/requests");
}); });
@ -133,8 +133,8 @@ export const PartnerAddRequest = () => {
descr: inputs.description, descr: inputs.description,
skill_ids: selectedSkills.map((skill) => { skill_ids: selectedSkills.map((skill) => {
return skill.id; return skill.id;
}) }),
} },
}).then(() => { }).then(() => {
navigate("/profile/requests"); navigate("/profile/requests");
}); });
@ -154,8 +154,8 @@ export const PartnerAddRequest = () => {
name: `${ name: `${
editRequest ? "Редактирование заявки" : "Создание новой заявки" editRequest ? "Редактирование заявки" : "Создание новой заявки"
}`, }`,
link: "/profile/add-request" link: "/profile/add-request",
} },
]} ]}
/> />
<h2 className="partnerAddRequest__title"> <h2 className="partnerAddRequest__title">
@ -175,7 +175,7 @@ export const PartnerAddRequest = () => {
onChange={(e) => onChange={(e) =>
setInputs((prevValue) => ({ setInputs((prevValue) => ({
...prevValue, ...prevValue,
title: e.target.value title: e.target.value,
})) }))
} }
type="text" type="text"
@ -242,7 +242,7 @@ export const PartnerAddRequest = () => {
setSkills((prevArray) => [...prevArray, skill]); setSkills((prevArray) => [...prevArray, skill]);
setFilteredSkills((prevArray) => [ setFilteredSkills((prevArray) => [
...prevArray, ...prevArray,
skill skill,
]); ]);
setSelectedSkills( setSelectedSkills(
selectedSkills.filter((skill, indexSkill) => { selectedSkills.filter((skill, indexSkill) => {
@ -277,7 +277,7 @@ export const PartnerAddRequest = () => {
onClick={() => { onClick={() => {
setSelectedSkills((prevArray) => [ setSelectedSkills((prevArray) => [
...prevArray, ...prevArray,
skill skill,
]); ]);
setFilteredSkills( setFilteredSkills(
filteredSkills.filter((skill, skillIndex) => { filteredSkills.filter((skill, skillIndex) => {
@ -343,7 +343,7 @@ export const PartnerAddRequest = () => {
onChange={(e) => onChange={(e) =>
setInputs((prevValue) => ({ setInputs((prevValue) => ({
...prevValue, ...prevValue,
description: e.target.value description: e.target.value,
})) }))
} }
/> />

View File

@ -6,7 +6,7 @@ import {
getPartnerRequestId, getPartnerRequestId,
getPartnerRequests, getPartnerRequests,
setPartnerRequestId, setPartnerRequestId,
setPartnerRequestInfo setPartnerRequestInfo,
} from "@redux/outstaffingSlice"; } from "@redux/outstaffingSlice";
import { urlForLocal } from "@utils/helper"; import { urlForLocal } from "@utils/helper";
@ -57,8 +57,8 @@ export const PartnerBid = () => {
data: { data: {
user_id: localStorage.getItem("id"), user_id: localStorage.getItem("id"),
request_id: requestId, request_id: requestId,
status: 0 status: 0,
} },
}).then(() => { }).then(() => {
navigate("/profile/requests"); navigate("/profile/requests");
}); });
@ -71,7 +71,7 @@ export const PartnerBid = () => {
1: "Junior", 1: "Junior",
2: "Middle", 2: "Middle",
3: "Middle+", 3: "Middle+",
4: "Senior" 4: "Senior",
}); });
return ( return (
<div className="partnerBid"> <div className="partnerBid">
@ -107,7 +107,7 @@ export const PartnerBid = () => {
links={[ links={[
{ name: "Главная", link: "/profile" }, { name: "Главная", link: "/profile" },
{ name: "Запросы и открытые позиции", link: "/profile/requests" }, { name: "Запросы и открытые позиции", link: "/profile/requests" },
{ name: "Просмотр заявки - PHP разработчик", link: "/profile/bid" } { name: "Просмотр заявки - PHP разработчик", link: "/profile/bid" },
]} ]}
/> />
<h2 className="partnerBid__title">Страница заявки </h2> <h2 className="partnerBid__title">Страница заявки </h2>

View File

@ -33,8 +33,8 @@ export const PartnerEmployees = () => {
{ name: "Данные моего персонала", link: "/profile/categories" }, { name: "Данные моего персонала", link: "/profile/categories" },
{ {
name: "Backend разработчики", name: "Backend разработчики",
link: "/profile/categories/employees" link: "/profile/categories/employees",
} },
]} ]}
/> />
<h2 className="partnerEmployees__title">Backend разработчики</h2> <h2 className="partnerEmployees__title">Backend разработчики</h2>

View File

@ -4,7 +4,7 @@ import { Link, Navigate } from "react-router-dom";
import { import {
setPartnerRequestId, setPartnerRequestId,
setPartnerRequests setPartnerRequests,
} from "@redux/outstaffingSlice"; } from "@redux/outstaffingSlice";
import { apiRequest } from "@api/request"; import { apiRequest } from "@api/request";
@ -48,7 +48,7 @@ export const PartnerRequests = () => {
<ProfileBreadcrumbs <ProfileBreadcrumbs
links={[ links={[
{ name: "Главная", link: "/profile" }, { name: "Главная", link: "/profile" },
{ name: "Запросы и открытые позиции", link: "/profile/requests" } { name: "Запросы и открытые позиции", link: "/profile/requests" },
]} ]}
/> />
<h2 className="partnerRequests__title">Запросы</h2> <h2 className="partnerRequests__title">Запросы</h2>

View File

@ -21,12 +21,12 @@ export const PartnerSettings = () => {
const [inputsValue, setInputsValue] = useState({ const [inputsValue, setInputsValue] = useState({
name: "", name: "",
oldPassword: "", oldPassword: "",
password: "" password: "",
}); });
const [inputsError, setInputsError] = useState({ const [inputsError, setInputsError] = useState({
name: false, name: false,
password: false password: false,
}); });
const [loader, setLoader] = useState(false); const [loader, setLoader] = useState(false);
@ -44,37 +44,37 @@ export const PartnerSettings = () => {
apiRequest("/user/change-personal-data", { apiRequest("/user/change-personal-data", {
method: "PUT", method: "PUT",
data: { data: {
newUsername: inputsValue.name newUsername: inputsValue.name,
} },
}).then((data) => { }).then((data) => {
apiRequest("/user/change-password", { apiRequest("/user/change-password", {
method: "PUT", method: "PUT",
data: { data: {
password: inputsValue.oldPassword, password: inputsValue.oldPassword,
newPassword: inputsValue.password newPassword: inputsValue.password,
} },
}).then((data) => { }).then((data) => {
setLoader(false); setLoader(false);
if (data.status === "success") { if (data.status === "success") {
setInputsError({ setInputsError({
name: false, name: false,
password: false password: false,
}); });
setInputsValue({ setInputsValue({
name: "", name: "",
oldPassword: "", oldPassword: "",
password: "" password: "",
}); });
showNotification({ showNotification({
show: true, show: true,
text: "Данные изменены", text: "Данные изменены",
type: "success" type: "success",
}); });
} else { } else {
showNotification({ showNotification({
show: true, show: true,
text: "Неверные данные", text: "Неверные данные",
type: "error" type: "error",
}); });
} }
}); });
@ -88,7 +88,7 @@ export const PartnerSettings = () => {
<ProfileBreadcrumbs <ProfileBreadcrumbs
links={[ links={[
{ name: "Главная", link: "/profile" }, { name: "Главная", link: "/profile" },
{ name: "Настройки", link: "/profile/settings" } { name: "Настройки", link: "/profile/settings" },
]} ]}
/> />
<div className="partner-settings"> <div className="partner-settings">
@ -105,11 +105,11 @@ export const PartnerSettings = () => {
onChange={(e) => { onChange={(e) => {
setInputsValue((prevValue) => ({ setInputsValue((prevValue) => ({
...prevValue, ...prevValue,
name: e.target.value name: e.target.value,
})); }));
setInputsError((prevValue) => ({ setInputsError((prevValue) => ({
...prevValue, ...prevValue,
name: false name: false,
})); }));
}} }}
value={inputsValue.name} value={inputsValue.name}
@ -128,11 +128,11 @@ export const PartnerSettings = () => {
onChange={(e) => { onChange={(e) => {
setInputsValue((prevValue) => ({ setInputsValue((prevValue) => ({
...prevValue, ...prevValue,
oldPassword: e.target.value oldPassword: e.target.value,
})); }));
setInputsError((prevValue) => ({ setInputsError((prevValue) => ({
...prevValue, ...prevValue,
password: false password: false,
})); }));
}} }}
value={inputsValue.oldPassword} value={inputsValue.oldPassword}
@ -149,11 +149,11 @@ export const PartnerSettings = () => {
onChange={(e) => { onChange={(e) => {
setInputsValue((prevValue) => ({ setInputsValue((prevValue) => ({
...prevValue, ...prevValue,
password: e.target.value password: e.target.value,
})); }));
setInputsError((prevValue) => ({ setInputsError((prevValue) => ({
...prevValue, ...prevValue,
password: false password: false,
})); }));
}} }}
value={inputsValue.password} value={inputsValue.password}

View File

@ -31,7 +31,7 @@ export const PartnerTreaties = () => {
<ProfileBreadcrumbs <ProfileBreadcrumbs
links={[ links={[
{ name: "Главная", link: "/profile" }, { name: "Главная", link: "/profile" },
{ name: "Договора и отчетность", link: "/profile/treaties" } { name: "Договора и отчетность", link: "/profile/treaties" },
]} ]}
/> />
<h2 className="treaties__title">Договора и отчетность</h2> <h2 className="treaties__title">Договора и отчетность</h2>

View File

@ -37,7 +37,7 @@ export const PartnerCategories = () => {
description: description:
"Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript", "Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript",
available: true, available: true,
img: BackEndImg img: BackEndImg,
}, },
{ {
title: "Frontend разработчики", title: "Frontend разработчики",
@ -45,14 +45,14 @@ export const PartnerCategories = () => {
description: description:
"Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript", "Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript",
available: true, available: true,
img: FrontendImg img: FrontendImg,
}, },
{ {
title: "Архитектура проектов", title: "Архитектура проектов",
link: "/profile/categories/employees", link: "/profile/categories/employees",
description: "Потоки данных ER ERP CRM CQRS UML BPMN", description: "Потоки данных ER ERP CRM CQRS UML BPMN",
available: true, available: true,
img: ArchitectureImg img: ArchitectureImg,
}, },
{ {
title: "Дизайн проектов", title: "Дизайн проектов",
@ -60,35 +60,35 @@ export const PartnerCategories = () => {
description: description:
"Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript", "Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript",
available: true, available: true,
img: DesignImg img: DesignImg,
}, },
{ {
title: "Тестирование проектов", title: "Тестирование проектов",
link: "/profile/add-request", link: "/profile/add-request",
description: "SQL Postman TestRail Kibana Ручное тестирование", description: "SQL Postman TestRail Kibana Ручное тестирование",
available: false, available: false,
img: TestImg img: TestImg,
}, },
{ {
title: "Администрирование проектов", title: "Администрирование проектов",
link: "/profile/add-request", link: "/profile/add-request",
description: "DevOps ELK Kubernetes Docker Bash Apache Oracle Git", description: "DevOps ELK Kubernetes Docker Bash Apache Oracle Git",
available: false, available: false,
img: AdminImg img: AdminImg,
}, },
{ {
title: "Управление проектом", title: "Управление проектом",
link: "/profile/add-request", link: "/profile/add-request",
description: "Scrum Kanban Agile Miro CustDev", description: "Scrum Kanban Agile Miro CustDev",
available: false, available: false,
img: ManageImg img: ManageImg,
}, },
{ {
title: "Копирайтинг проектов", title: "Копирайтинг проектов",
link: "/profile/add-request", link: "/profile/add-request",
description: "Теги Заголовок H1 Дескриптор Абзац Сценарий", description: "Теги Заголовок H1 Дескриптор Абзац Сценарий",
available: false, available: false,
img: CopyImg img: CopyImg,
}, },
{ {
title: "Реклама и SMM", title: "Реклама и SMM",
@ -96,8 +96,8 @@ export const PartnerCategories = () => {
description: description:
"Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript", "Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript",
available: false, available: false,
img: SmmImg img: SmmImg,
} },
]); ]);
const [mokPersons] = useState([ const [mokPersons] = useState([
@ -109,7 +109,7 @@ export const PartnerCategories = () => {
project: "Админка НВД Консалтинг", project: "Админка НВД Консалтинг",
tasks_in_progress: 5, tasks_in_progress: 5,
month_hours: 140, month_hours: 140,
id: 1 id: 1,
}, },
{ {
personAvatar: avatarImg, personAvatar: avatarImg,
@ -119,7 +119,7 @@ export const PartnerCategories = () => {
project: "Админка НВД Консалтинг", project: "Админка НВД Консалтинг",
tasks_in_progress: 5, tasks_in_progress: 5,
month_hours: 140, month_hours: 140,
id: 2 id: 2,
}, },
{ {
personAvatar: avatarImg, personAvatar: avatarImg,
@ -129,8 +129,8 @@ export const PartnerCategories = () => {
project: "Админка НВД Консалтинг", project: "Админка НВД Консалтинг",
tasks_in_progress: 5, tasks_in_progress: 5,
month_hours: 140, month_hours: 140,
id: 3 id: 3,
} },
]); ]);
return ( return (
<div className="partnerCategories"> <div className="partnerCategories">
@ -140,7 +140,7 @@ export const PartnerCategories = () => {
<ProfileBreadcrumbs <ProfileBreadcrumbs
links={[ links={[
{ name: "Главная", link: "/profile" }, { name: "Главная", link: "/profile" },
{ name: "Данные моего персонала", link: "/profile/categories" } { name: "Данные моего персонала", link: "/profile/categories" },
]} ]}
/> />
<h2 className="partnerCategories__title">Данные персонала</h2> <h2 className="partnerCategories__title">Данные персонала</h2>

View File

@ -31,32 +31,32 @@ export const Profile = () => {
path: "profile/calendar", path: "profile/calendar",
img: reportsIcon, img: reportsIcon,
title: "Ваша отчетность", title: "Ваша отчетность",
description: "<span></span>Отработанных в этом месяце часов" description: "<span></span>Отработанных в этом месяце часов",
}, },
{ {
path: "profile/summary", path: "profile/summary",
img: summaryIcon, img: summaryIcon,
title: "Резюме", title: "Резюме",
description: "Ваше резюме<br/><span>заполнено</span>" description: "Ваше резюме<br/><span>заполнено</span>",
}, },
{ {
path: "profile/tracker", path: "profile/tracker",
img: timerIcon, img: timerIcon,
title: "Трекер времени", title: "Трекер времени",
description: "Сколько времени занимает<br/> выполнение задач" description: "Сколько времени занимает<br/> выполнение задач",
}, },
{ {
path: "profile/payouts", path: "profile/payouts",
img: paymentIcon, img: paymentIcon,
title: "Выплаты", title: "Выплаты",
description: "У вас <span>подтвержден</span><br/> статус самозанятого" description: "У вас <span>подтвержден</span><br/> статус самозанятого",
}, },
{ {
path: "profile/settings", path: "profile/settings",
img: settingIcon, img: settingIcon,
title: "Настройки профиля", title: "Настройки профиля",
description: "Перейдите чтобы начать<br/> редактирование" description: "Перейдите чтобы начать<br/> редактирование",
} },
], ],
partner: [ partner: [
{ {
@ -64,33 +64,33 @@ export const Profile = () => {
img: reportsIcon, img: reportsIcon,
title: "Запросы и открытые позиции", title: "Запросы и открытые позиции",
description: description:
"<span>У вас 2 вакансии<br/></span>открытые от лица компании" "<span>У вас 2 вакансии<br/></span>открытые от лица компании",
}, },
{ {
path: "profile/categories", path: "profile/categories",
img: summaryIcon, img: summaryIcon,
title: "Данные персонала", title: "Данные персонала",
description: "Наши специалисты <br/><span>уже работающие у вас</span>" description: "Наши специалисты <br/><span>уже работающие у вас</span>",
}, },
{ {
path: "profile/tracker", path: "profile/tracker",
img: timerIcon, img: timerIcon,
title: "Трекер времени", title: "Трекер времени",
description: "Контроль времени и<br/> выполнение задач" description: "Контроль времени и<br/> выполнение задач",
}, },
{ {
path: "profile/treaties", path: "profile/treaties",
img: paymentIcon, img: paymentIcon,
title: "Договора и отчетность", title: "Договора и отчетность",
description: "Ключевые условия<br/> договора" description: "Ключевые условия<br/> договора",
}, },
{ {
path: "profile/settings", path: "profile/settings",
img: settingIcon, img: settingIcon,
title: "Настройки профиля", title: "Настройки профиля",
description: "Перейдите чтобы начать<br/> редактирование" description: "Перейдите чтобы начать<br/> редактирование",
} },
] ],
}); });
return ( return (

View File

@ -20,14 +20,14 @@ export const ProfileCandidate = () => {
path: "quiz", path: "quiz",
img: reportsIcon, img: reportsIcon,
title: "Мои тесты", title: "Мои тесты",
description: "<span>У вас 122 часа<br/></span>отработанных в этом месяце" description: "<span>У вас 122 часа<br/></span>отработанных в этом месяце",
}, },
{ {
path: "profile/settings", path: "profile/settings",
img: settingIcon, img: settingIcon,
title: "Настройки профиля", title: "Настройки профиля",
description: "Перейдите чтобы начать редактирование" description: "Перейдите чтобы начать редактирование",
} },
]); ]);
return ( return (
<div className="profile-candidate"> <div className="profile-candidate">

View File

@ -20,7 +20,7 @@ import {
setColumnName, setColumnName,
setColumnPriority, setColumnPriority,
setProjectBoardFetch, setProjectBoardFetch,
setToggleTab setToggleTab,
} from "@redux/projectsTrackerSlice"; } from "@redux/projectsTrackerSlice";
import { urlForLocal } from "@utils/helper"; import { urlForLocal } from "@utils/helper";
@ -73,7 +73,7 @@ export const ProjectTracker = () => {
const [tags, setTags] = useState({ const [tags, setTags] = useState({
open: false, open: false,
add: false, add: false,
edit: false edit: false,
}); });
const [acceptModalOpen, setAcceptModalOpen] = useState(false); const [acceptModalOpen, setAcceptModalOpen] = useState(false);
const [currentColumnDelete, setCurrentColumnDelete] = useState(null); const [currentColumnDelete, setCurrentColumnDelete] = useState(null);
@ -93,13 +93,13 @@ export const ProjectTracker = () => {
const priority = { const priority = {
2: "Высокий", 2: "Высокий",
1: "Средний", 1: "Средний",
0: "Низкий" 0: "Низкий",
}; };
const priorityClass = { const priorityClass = {
2: "high", 2: "high",
1: "middle", 1: "middle",
0: "low" 0: "low",
}; };
useEffect(() => { useEffect(() => {
@ -117,7 +117,7 @@ export const ProjectTracker = () => {
if (column.tasks.length) columnsTasksEmpty = false; if (column.tasks.length) columnsTasksEmpty = false;
setOpenColumnSelect((prevState) => ({ setOpenColumnSelect((prevState) => ({
...prevState, ...prevState,
[column.id]: false [column.id]: false,
})); }));
columnHover[column.id] = false; columnHover[column.id] = false;
column.tasks.forEach((task) => (tasksHover[task.id] = false)); column.tasks.forEach((task) => (tasksHover[task.id] = false));
@ -154,7 +154,7 @@ export const ProjectTracker = () => {
function dragEndTaskHandler() { function dragEndTaskHandler() {
setTaskHover((prevState) => ({ [prevState]: false })); setTaskHover((prevState) => ({ [prevState]: false }));
setWrapperHover((prevState) => ({ setWrapperHover((prevState) => ({
[prevState]: false [prevState]: false,
})); }));
} }
@ -168,7 +168,7 @@ export const ProjectTracker = () => {
movePositionProjectTask({ movePositionProjectTask({
startTask: startWrapperIndexTest.current.task, startTask: startWrapperIndexTest.current.task,
finishTask: task, finishTask: task,
finishIndex: finishTask finishIndex: finishTask,
}) })
); );
} }
@ -184,7 +184,7 @@ export const ProjectTracker = () => {
setWrapperHover((prevState) => ({ setWrapperHover((prevState) => ({
[prevState]: false, [prevState]: false,
[columnId]: true [columnId]: true,
})); }));
} }
@ -192,7 +192,7 @@ export const ProjectTracker = () => {
e.preventDefault(); e.preventDefault();
setWrapperHover((prevState) => ({ setWrapperHover((prevState) => ({
[prevState]: false [prevState]: false,
})); }));
if ( if (
@ -206,7 +206,7 @@ export const ProjectTracker = () => {
dispatch( dispatch(
moveProjectTask({ moveProjectTask({
startWrapperIndex: startWrapperIndexTest.current, startWrapperIndex: startWrapperIndexTest.current,
columnId columnId,
}) })
); );
} }
@ -234,14 +234,14 @@ export const ProjectTracker = () => {
data: { data: {
column_id: column.id, column_id: column.id,
project_id: projectBoard.id, project_id: projectBoard.id,
status: 0 status: 0,
} },
}).then(() => { }).then(() => {
if (column.priority < projectBoard.columns.length) { if (column.priority < projectBoard.columns.length) {
for (let i = column.priority; i < projectBoard.columns.length; i++) { for (let i = column.priority; i < projectBoard.columns.length; i++) {
const currentColumn = { const currentColumn = {
column_id: projectBoard.columns[i].id, column_id: projectBoard.columns[i].id,
priority: i priority: i,
}; };
priorityColumns.push(currentColumn); priorityColumns.push(currentColumn);
} }
@ -249,8 +249,8 @@ export const ProjectTracker = () => {
method: "POST", method: "POST",
data: { data: {
project_id: projectBoard.id, project_id: projectBoard.id,
data: JSON.stringify(priorityColumns) data: JSON.stringify(priorityColumns),
} },
}).then(() => { }).then(() => {
dispatch(setProjectBoardFetch(projectBoard.id)); dispatch(setProjectBoardFetch(projectBoard.id));
}); });
@ -266,8 +266,8 @@ export const ProjectTracker = () => {
method: "DELETE", method: "DELETE",
data: { data: {
project_id: projectBoard.id, project_id: projectBoard.id,
user_id: userId user_id: userId,
} },
}).then(() => { }).then(() => {
dispatch(deletePersonOnProject(userId)); dispatch(deletePersonOnProject(userId));
}); });
@ -316,21 +316,21 @@ export const ProjectTracker = () => {
title: tagInfo.description, title: tagInfo.description,
slug: tagInfo.name, slug: tagInfo.name,
color: color, color: color,
status: 1 status: 1,
} },
}).then((data) => { }).then((data) => {
apiRequest("/mark/attach", { apiRequest("/mark/attach", {
method: "POST", method: "POST",
data: { data: {
mark_id: data.id, mark_id: data.id,
entity_type: 1, entity_type: 1,
entity_id: projectId.id entity_id: projectId.id,
} },
}).then((data) => { }).then((data) => {
dispatch(addNewTagToProject(data.mark)); dispatch(addNewTagToProject(data.mark));
setTags((prevState) => ({ setTags((prevState) => ({
...prevState, ...prevState,
add: false add: false,
})); }));
}); });
}); });
@ -343,13 +343,13 @@ export const ProjectTracker = () => {
mark_id: tagInfo.editMarkId, mark_id: tagInfo.editMarkId,
title: tagInfo.description, title: tagInfo.description,
slug: tagInfo.name, slug: tagInfo.name,
color: color color: color,
} },
}).then(() => { }).then(() => {
dispatch(setProjectBoardFetch(projectId.id)); dispatch(setProjectBoardFetch(projectId.id));
setTags((prevState) => ({ setTags((prevState) => ({
...prevState, ...prevState,
edit: false edit: false,
})); }));
setTagInfo({ description: "", name: "" }); setTagInfo({ description: "", name: "" });
setColor("#aabbcc"); setColor("#aabbcc");
@ -362,8 +362,8 @@ export const ProjectTracker = () => {
data: { data: {
mark_id: tagId, mark_id: tagId,
entity_type: 1, entity_type: 1,
entity_id: projectId.id entity_id: projectId.id,
} },
}).then(() => { }).then(() => {
dispatch(deleteTagProject(tagId)); dispatch(deleteTagProject(tagId));
}); });
@ -412,11 +412,11 @@ export const ProjectTracker = () => {
setTags({ setTags({
open: false, open: false,
add: false, add: false,
edit: false edit: false,
}); });
setTagInfo({ setTagInfo({
description: "", description: "",
name: "" name: "",
}); });
setColor("#aabbcc"); setColor("#aabbcc");
} }
@ -453,7 +453,7 @@ export const ProjectTracker = () => {
<ProfileBreadcrumbs <ProfileBreadcrumbs
links={[ links={[
{ name: "Главная", link: "/profile" }, { name: "Главная", link: "/profile" },
{ name: "Трекер", link: "/profile/tracker" } { name: "Трекер", link: "/profile/tracker" },
]} ]}
/> />
<h2 className="tracker__title">Управление проектами с трекером</h2> <h2 className="tracker__title">Управление проектами с трекером</h2>
@ -705,7 +705,7 @@ export const ProjectTracker = () => {
onClick={() => { onClick={() => {
setTags((prevState) => ({ setTags((prevState) => ({
...prevState, ...prevState,
open: !tags.open open: !tags.open,
})); }));
}} }}
> >
@ -719,7 +719,7 @@ export const ProjectTracker = () => {
onClick={() => onClick={() =>
setTags((prevState) => ({ setTags((prevState) => ({
...prevState, ...prevState,
add: true add: true,
})) }))
} }
> >
@ -751,12 +751,12 @@ export const ProjectTracker = () => {
onClick={() => { onClick={() => {
setTags((prevState) => ({ setTags((prevState) => ({
...prevState, ...prevState,
edit: true edit: true,
})); }));
setTagInfo({ setTagInfo({
description: tag.title, description: tag.title,
name: tag.slug, name: tag.slug,
editMarkId: tag.id editMarkId: tag.id,
}); });
setColor(tag.color); setColor(tag.color);
}} }}
@ -784,11 +784,11 @@ export const ProjectTracker = () => {
setTags((prevState) => ({ setTags((prevState) => ({
...prevState, ...prevState,
add: false, add: false,
edit: false edit: false,
})); }));
setTagInfo({ setTagInfo({
description: "", description: "",
name: "" name: "",
}); });
setColor("#aabbcc"); setColor("#aabbcc");
}} }}
@ -801,7 +801,7 @@ export const ProjectTracker = () => {
onChange={(e) => onChange={(e) =>
setTagInfo((prevState) => ({ setTagInfo((prevState) => ({
...prevState, ...prevState,
description: e.target.value description: e.target.value,
})) }))
} }
/> />
@ -813,7 +813,7 @@ export const ProjectTracker = () => {
onChange={(e) => onChange={(e) =>
setTagInfo((prevState) => ({ setTagInfo((prevState) => ({
...prevState, ...prevState,
name: e.target.value name: e.target.value,
})) }))
} }
/> />
@ -890,7 +890,7 @@ export const ProjectTracker = () => {
onClick={() => { onClick={() => {
setOpenColumnSelect((prevState) => ({ setOpenColumnSelect((prevState) => ({
...prevState, ...prevState,
[column.id]: true [column.id]: true,
})); }));
}} }}
className="more" className="more"
@ -906,7 +906,7 @@ export const ProjectTracker = () => {
onClick={() => { onClick={() => {
setOpenColumnSelect((prevState) => ({ setOpenColumnSelect((prevState) => ({
...prevState, ...prevState,
[column.id]: false [column.id]: false,
})); }));
dispatch(modalToggle("editColumn")); dispatch(modalToggle("editColumn"));
dispatch(setColumnName(column.title)); dispatch(setColumnName(column.title));
@ -970,7 +970,7 @@ export const ProjectTracker = () => {
</div> </div>
<p <p
dangerouslySetInnerHTML={{ dangerouslySetInnerHTML={{
__html: task.description __html: task.description,
}} }}
className="tasks__board__item__description" className="tasks__board__item__description"
></p> ></p>

View File

@ -15,13 +15,13 @@ const tasks = [
{ {
index: 1, index: 1,
text: "Задача «67 Навигационная система Главное меню Обновить иконки» заблокирована из-за отсутствия новых иконок", text: "Задача «67 Навигационная система Главное меню Обновить иконки» заблокирована из-за отсутствия новых иконок",
hours: 3 hours: 3,
}, },
{ {
index: 2, index: 2,
text: "Задача «83 Навигационная система Поиск по почтовому индексу Добавить экран поиска по почтовому индексу» не может быть завершена, т.к. работа над задачей «82 Навигационная система Разработать модуль поиска по почтовому индексу» ещё не начата", text: "Задача «83 Навигационная система Поиск по почтовому индексу Добавить экран поиска по почтовому индексу» не может быть завершена, т.к. работа над задачей «82 Навигационная система Разработать модуль поиска по почтовому индексу» ещё не начата",
hours: 3 hours: 3,
} },
]; ];
const SingleReportPage = () => { const SingleReportPage = () => {

View File

@ -29,29 +29,29 @@ const Statistics = () => {
name: "Дмитрий Рогов", name: "Дмитрий Рогов",
email: "dmitryi.zavadskyi@yandex.ru", email: "dmitryi.zavadskyi@yandex.ru",
role: "Программист", role: "Программист",
status: true status: true,
}, },
{ {
avatar: mockAvatar, avatar: mockAvatar,
name: "Марина Орехова", name: "Марина Орехова",
email: "dmitryi.zavadskyi@yandex.ru", email: "dmitryi.zavadskyi@yandex.ru",
role: "Менеджер", role: "Менеджер",
status: true status: true,
}, },
{ {
avatar: mockAvatar, avatar: mockAvatar,
name: "Тамара Доценко", name: "Тамара Доценко",
email: "dmitryi.zavadskyi@yandex.ru51515188151", email: "dmitryi.zavadskyi@yandex.ru51515188151",
role: "Тестировщик", role: "Тестировщик",
status: false status: false,
}, },
{ {
avatar: mockAvatar, avatar: mockAvatar,
name: "Кек Лолов", name: "Кек Лолов",
email: "dm4124gmail.com", email: "dm4124gmail.com",
role: "PM", role: "PM",
status: false status: false,
} },
]; ];
const toggleTabs = (index) => { const toggleTabs = (index) => {
@ -66,7 +66,7 @@ const Statistics = () => {
<ProfileBreadcrumbs <ProfileBreadcrumbs
links={[ links={[
{ name: "Главная", link: "/profile" }, { name: "Главная", link: "/profile" },
{ name: "Трекер", link: "/profile/tracker" } { name: "Трекер", link: "/profile/tracker" },
]} ]}
/> />
<h2 className="tracker__title">Управление проектами с трекером</h2> <h2 className="tracker__title">Управление проектами с трекером</h2>

View File

@ -60,9 +60,9 @@ export const Summary = () => {
method: "PUT", method: "PUT",
data: { data: {
UserCard: { UserCard: {
skill: selectedSkills.map((item) => item.skill_id) skill: selectedSkills.map((item) => item.skill_id),
} },
} },
}).then(() => {}); }).then(() => {});
} }
@ -70,8 +70,8 @@ export const Summary = () => {
apiRequest("/resume/edit-text", { apiRequest("/resume/edit-text", {
method: "PUT", method: "PUT",
data: { data: {
resume: summery resume: summery,
} },
}).then(() => {}); }).then(() => {});
} }
return ( return (
@ -83,7 +83,7 @@ export const Summary = () => {
<ProfileBreadcrumbs <ProfileBreadcrumbs
links={[ links={[
{ name: "Главная", link: "/profile" }, { name: "Главная", link: "/profile" },
{ name: "Резюме", link: "/profile/summary" } { name: "Резюме", link: "/profile/summary" },
]} ]}
/> />
<h2 className="summary__title"> <h2 className="summary__title">
@ -175,7 +175,7 @@ export const Summary = () => {
onClick={() => onClick={() =>
setSelectedSkills((prevValue) => [ setSelectedSkills((prevValue) => [
...prevValue, ...prevValue,
{ skill: skill, skill_id: skill.id } { skill: skill, skill_id: skill.id },
]) ])
} }
key={skill.id} key={skill.id}
@ -235,8 +235,8 @@ export const Summary = () => {
"ImageToolbar", "ImageToolbar",
"ImageUpload", "ImageUpload",
"MediaEmbed", "MediaEmbed",
"BlockQuote" "BlockQuote",
] ],
}} }}
onChange={(event, editor) => { onChange={(event, editor) => {
const data = editor.getData(); const data = editor.getData();

View File

@ -6,7 +6,7 @@ import {
getToggleTab, getToggleTab,
modalToggle, modalToggle,
setAllProjects, setAllProjects,
setToggleTab setToggleTab,
} from "@redux/projectsTrackerSlice"; } from "@redux/projectsTrackerSlice";
import { caseOfNum } from "@utils/helper"; import { caseOfNum } from "@utils/helper";
@ -134,7 +134,7 @@ export const Tracker = () => {
<ProfileBreadcrumbs <ProfileBreadcrumbs
links={[ links={[
{ name: "Главная", link: "/profile" }, { name: "Главная", link: "/profile" },
{ name: "Трекер", link: "/profile/tracker" } { name: "Трекер", link: "/profile/tracker" },
]} ]}
/> />
<h2 className="tracker__title">Управление проектами с трекером</h2> <h2 className="tracker__title">Управление проектами с трекером</h2>

View File

@ -6,7 +6,7 @@ import { apiRequest } from "@api/request";
import { import {
getCorrectDate, getCorrectDate,
getCreatedDate, getCreatedDate,
hourOfNum hourOfNum,
} from "@components/Calendar/calendarHelper"; } from "@components/Calendar/calendarHelper";
import { Footer } from "@components/Common/Footer/Footer"; import { Footer } from "@components/Common/Footer/Footer";
import { Loader } from "@components/Common/Loader/Loader"; import { Loader } from "@components/Common/Loader/Loader";
@ -57,7 +57,7 @@ export const ViewReport = () => {
const taskInfo = { const taskInfo = {
hours: task.hours_spent, hours: task.hours_spent,
task: task.task, task: task.task,
id: task.id id: task.id,
}; };
if (task.hours_spent) { if (task.hours_spent) {
spendTime += Number(task.hours_spent); spendTime += Number(task.hours_spent);
@ -96,7 +96,7 @@ export const ViewReport = () => {
links={[ links={[
{ name: "Главная", link: "/profile" }, { name: "Главная", link: "/profile" },
{ name: "Ваша отчетность", link: "/profile/calendar" }, { name: "Ваша отчетность", link: "/profile/calendar" },
{ name: "Просмотр отчета за день", link: "/profile/view" } { name: "Просмотр отчета за день", link: "/profile/view" },
]} ]}
/> />
<h2 className="viewReport__title"> <h2 className="viewReport__title">

View File

@ -27,7 +27,7 @@ export const PassingTests = () => {
autoStart: false, autoStart: false,
onExpire: () => { onExpire: () => {
navigate("/quiz"); navigate("/quiz");
} },
}); });
const onCloseWindow = (e) => { const onCloseWindow = (e) => {
@ -43,18 +43,18 @@ export const PassingTests = () => {
{ {
title: "Зачем?", title: "Зачем?",
description: description:
"Тесты itguild предназначены для того, чтобы подтверждать навыки, которые вы указали у себя." "Тесты itguild предназначены для того, чтобы подтверждать навыки, которые вы указали у себя.",
}, },
{ {
title: "Почему именно тестирование?", title: "Почему именно тестирование?",
description: description:
"Тесты itguild заменяют первое техническое собеседование по любой вакансии." "Тесты itguild заменяют первое техническое собеседование по любой вакансии.",
}, },
{ {
title: "Какие тесты нужно проходить?", title: "Какие тесты нужно проходить?",
description: description:
"Здесь все довольно просто — следует проходить тесты по инструментам и навыкам, которыми вы владеете." "Здесь все довольно просто — следует проходить тесты по инструментам и навыкам, которыми вы владеете.",
} },
]; ];
function onSwitchTab(e) { function onSwitchTab(e) {
@ -86,7 +86,7 @@ export const PassingTests = () => {
links={[ links={[
{ name: "Главная", link: "/profile-candidate" }, { name: "Главная", link: "/profile-candidate" },
{ name: "Тестирование", link: "/quiz" }, { name: "Тестирование", link: "/quiz" },
{ name: "Прохождение тестов", link: "/quiz/test" } { name: "Прохождение тестов", link: "/quiz/test" },
]} ]}
/> />
<div className="passing-tests-page__title main-title"> <div className="passing-tests-page__title main-title">

View File

@ -36,7 +36,7 @@ export const QuizPage = () => {
description: description:
"Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript", "Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript",
available: true, available: true,
img: BackEndImg img: BackEndImg,
}, },
{ {
title: "Frontend разработчики", title: "Frontend разработчики",
@ -44,14 +44,14 @@ export const QuizPage = () => {
description: description:
"Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript", "Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript",
available: true, available: true,
img: FrontendImg img: FrontendImg,
}, },
{ {
title: "Архитектура проектов", title: "Архитектура проектов",
link: "/registration-candidate", link: "/registration-candidate",
description: "Потоки данных ER ERP CRM CQRS UML BPMN", description: "Потоки данных ER ERP CRM CQRS UML BPMN",
available: true, available: true,
img: ArchitectureImg img: ArchitectureImg,
}, },
{ {
title: "Дизайн проектов", title: "Дизайн проектов",
@ -59,35 +59,35 @@ export const QuizPage = () => {
description: description:
"Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript", "Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript",
available: true, available: true,
img: DesignImg img: DesignImg,
}, },
{ {
title: "Тестирование проектов", title: "Тестирование проектов",
link: "/registration-candidate", link: "/registration-candidate",
description: "SQL Postman TestRail Kibana Ручное тестирование", description: "SQL Postman TestRail Kibana Ручное тестирование",
available: false, available: false,
img: TestImg img: TestImg,
}, },
{ {
title: "Администрирование проектов", title: "Администрирование проектов",
link: "/registration-candidate", link: "/registration-candidate",
description: "DevOps ELK Kubernetes Docker Bash Apache Oracle Git", description: "DevOps ELK Kubernetes Docker Bash Apache Oracle Git",
available: false, available: false,
img: AdminImg img: AdminImg,
}, },
{ {
title: "Управление проектом", title: "Управление проектом",
link: "/registration-candidate", link: "/registration-candidate",
description: "Scrum Kanban Agile Miro CustDev", description: "Scrum Kanban Agile Miro CustDev",
available: false, available: false,
img: ManageImg img: ManageImg,
}, },
{ {
title: "Копирайтинг проектов", title: "Копирайтинг проектов",
link: "/registration-candidate", link: "/registration-candidate",
description: "Теги Заголовок H1 Дескриптор Абзац Сценарий", description: "Теги Заголовок H1 Дескриптор Абзац Сценарий",
available: false, available: false,
img: CopyImg img: CopyImg,
}, },
{ {
title: "Реклама и SMM", title: "Реклама и SMM",
@ -95,8 +95,8 @@ export const QuizPage = () => {
description: description:
"Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript", "Java PHP Python C# React Vue.js NodeJs Golang Ruby JavaScript",
available: false, available: false,
img: SmmImg img: SmmImg,
} },
]); ]);
const userId = localStorage.getItem("id"); const userId = localStorage.getItem("id");
const [selectedCategory, setSetSelectedCategory] = useState(false); const [selectedCategory, setSetSelectedCategory] = useState(false);
@ -116,7 +116,7 @@ export const QuizPage = () => {
<ProfileBreadcrumbs <ProfileBreadcrumbs
links={[ links={[
{ name: "Главная", link: "/profile-candidate" }, { name: "Главная", link: "/profile-candidate" },
{ name: "Тестирование", link: "/quiz" } { name: "Тестирование", link: "/quiz" },
]} ]}
/> />
<div className="quiz-page__title main-title"> <div className="quiz-page__title main-title">

View File

@ -43,7 +43,7 @@ export const QuizReportPage = () => {
links={[ links={[
{ name: "Главная", link: "/profile-candidate" }, { name: "Главная", link: "/profile-candidate" },
{ name: "Тестирование", link: "/quiz" }, { name: "Тестирование", link: "/quiz" },
{ name: "Отчет по тестированию", link: "/quiz/report" } { name: "Отчет по тестированию", link: "/quiz/report" },
]} ]}
/> />
<div className="quiz-report-page__title main-title"> <div className="quiz-report-page__title main-title">

View File

@ -1,7 +1,7 @@
import { createSlice } from "@reduxjs/toolkit"; import { createSlice } from "@reduxjs/toolkit";
const initialState = { const initialState = {
isLoading: false isLoading: false,
}; };
export const loaderSlice = createSlice({ export const loaderSlice = createSlice({
@ -10,8 +10,8 @@ export const loaderSlice = createSlice({
reducers: { reducers: {
loading: (state, action) => { loading: (state, action) => {
state.isLoading = action.payload; state.isLoading = action.payload;
} },
} },
}); });
export const { loading } = loaderSlice.actions; export const { loading } = loaderSlice.actions;

View File

@ -17,8 +17,8 @@ const initialState = {
notification: { notification: {
show: false, show: false,
text: "", text: "",
type: "" type: "",
} },
}; };
export const outstaffingSlice = createSlice({ export const outstaffingSlice = createSlice({
@ -72,8 +72,8 @@ export const outstaffingSlice = createSlice({
}, },
closeNotification: (state) => { closeNotification: (state) => {
state.notification.show = false; state.notification.show = false;
} },
} },
}); });
export const { export const {
@ -92,7 +92,7 @@ export const {
setPartnerRequests, setPartnerRequests,
setPartnerRequestInfo, setPartnerRequestInfo,
setNotification, setNotification,
closeNotification closeNotification,
} = outstaffingSlice.actions; } = outstaffingSlice.actions;
export const selectProfiles = (state) => state.outstaffing.profiles; export const selectProfiles = (state) => state.outstaffing.profiles;

View File

@ -10,7 +10,7 @@ const initialState = {
boardLoader: false, boardLoader: false,
columnName: "", columnName: "",
columnId: 0, columnId: 0,
columnPriority: 0 columnPriority: 0,
}; };
export const setProjectBoardFetch = createAsyncThunk("userInfo", (id) => export const setProjectBoardFetch = createAsyncThunk("userInfo", (id) =>
@ -61,15 +61,15 @@ export const projectsTrackerSlice = createSlice({
if (column.id === action.payload.columnId) { if (column.id === action.payload.columnId) {
column.tasks.push({ column.tasks.push({
...action.payload.startWrapperIndex.task, ...action.payload.startWrapperIndex.task,
column_id: column.id column_id: column.id,
}); });
apiRequest(`/task/update-task`, { apiRequest(`/task/update-task`, {
method: "PUT", method: "PUT",
data: { data: {
task_id: action.payload.startWrapperIndex.task.id, task_id: action.payload.startWrapperIndex.task.id,
column_id: column.id, column_id: column.id,
priority: column.tasks.length - 1 priority: column.tasks.length - 1,
} },
}).then(() => {}); }).then(() => {});
} }
if (column.id === action.payload.startWrapperIndex.index) { if (column.id === action.payload.startWrapperIndex.index) {
@ -89,20 +89,20 @@ export const projectsTrackerSlice = createSlice({
if (column.id === action.payload.finishTask.column_id) { if (column.id === action.payload.finishTask.column_id) {
column.tasks.splice(action.payload.finishIndex, 0, { column.tasks.splice(action.payload.finishIndex, 0, {
...action.payload.startTask, ...action.payload.startTask,
column_id: column.id column_id: column.id,
}); });
apiRequest(`/task/update-task`, { apiRequest(`/task/update-task`, {
method: "PUT", method: "PUT",
data: { data: {
task_id: action.payload.startTask.id, task_id: action.payload.startTask.id,
column_id: column.id column_id: column.id,
} },
}).then(() => {}); }).then(() => {});
const priorityTasks = []; const priorityTasks = [];
column.tasks.forEach((task, index) => { column.tasks.forEach((task, index) => {
const curTask = { const curTask = {
task_id: task.id, task_id: task.id,
priority: index priority: index,
}; };
priorityTasks.push(curTask); priorityTasks.push(curTask);
}); });
@ -110,8 +110,8 @@ export const projectsTrackerSlice = createSlice({
method: "POST", method: "POST",
data: { data: {
data: JSON.stringify(priorityTasks), data: JSON.stringify(priorityTasks),
column_id: column.id column_id: column.id,
} },
}).then(() => {}); }).then(() => {});
} }
}); });
@ -162,14 +162,14 @@ export const projectsTrackerSlice = createSlice({
}, },
modalToggle: (state, action) => { modalToggle: (state, action) => {
state.modalType = action.payload; state.modalType = action.payload;
} },
}, },
extraReducers: { extraReducers: {
[setProjectBoardFetch.fulfilled]: (state, action) => { [setProjectBoardFetch.fulfilled]: (state, action) => {
state.projectBoard = action.payload; state.projectBoard = action.payload;
state.boardLoader = false; state.boardLoader = false;
} },
} },
}); });
export const { export const {
@ -192,7 +192,7 @@ export const {
filterCreatedByMe, filterCreatedByMe,
filteredParticipateTasks, filteredParticipateTasks,
filteredExecutorTasks, filteredExecutorTasks,
movePositionProjectTask movePositionProjectTask,
} = projectsTrackerSlice.actions; } = projectsTrackerSlice.actions;
export const getProjects = (state) => state.tracker.projects; export const getProjects = (state) => state.tracker.projects;

View File

@ -8,7 +8,7 @@ const initialState = {
questionnaires: [], questionnaires: [],
completedTest: false, completedTest: false,
selectedTest: {}, selectedTest: {},
result: null result: null,
}; };
export const fetchResultTest = createAsyncThunk("result", (uuid) => export const fetchResultTest = createAsyncThunk("result", (uuid) =>
@ -26,13 +26,13 @@ export const quizSlice = createSlice({
}, },
setCompleteTest: (state) => { setCompleteTest: (state) => {
state.completedTest = true; state.completedTest = true;
} },
}, },
extraReducers: { extraReducers: {
[fetchResultTest.fulfilled]: (state, action) => { [fetchResultTest.fulfilled]: (state, action) => {
state.result = action.payload; state.result = action.payload;
} },
} },
}); });
export const { setQuestions } = quizSlice.actions; export const { setQuestions } = quizSlice.actions;

View File

@ -4,7 +4,7 @@ const initialState = {
dateSelected: "", dateSelected: "",
reportDate: "", reportDate: "",
requestDates: "", requestDates: "",
sendRequest: "" sendRequest: "",
}; };
export const reportSlice = createSlice({ export const reportSlice = createSlice({
@ -22,8 +22,8 @@ export const reportSlice = createSlice({
}, },
setSendRequest: (state, action) => { setSendRequest: (state, action) => {
state.sendRequest = action.payload; state.sendRequest = action.payload;
} },
} },
}); });
export const { dateSelected, setReportDate, setRequestDate, setSendRequest } = export const { dateSelected, setReportDate, setRequestDate, setSendRequest } =

View File

@ -1,7 +1,7 @@
import { createSlice } from "@reduxjs/toolkit"; import { createSlice } from "@reduxjs/toolkit";
const initialState = { const initialState = {
role: null role: null,
}; };
export const roleSlice = createSlice({ export const roleSlice = createSlice({
@ -10,8 +10,8 @@ export const roleSlice = createSlice({
reducers: { reducers: {
setRole: (state, action) => { setRole: (state, action) => {
state.role = action.payload; state.role = action.payload;
} },
} },
}); });
export const { setRole } = roleSlice.actions; export const { setRole } = roleSlice.actions;

View File

@ -14,10 +14,10 @@ export const store = configureStore({
role: roleReducer, role: roleReducer,
report: reportReducer, report: reportReducer,
tracker: projectsTrackerSlice, tracker: projectsTrackerSlice,
quiz: quizSlice quiz: quizSlice,
}, },
middleware: (getDefaultMiddleware) => middleware: (getDefaultMiddleware) =>
getDefaultMiddleware({ getDefaultMiddleware({
serializableCheck: false serializableCheck: false,
}) }),
}); });

View File

@ -2,7 +2,7 @@ export const LEVELS = {
1: "Junior", 1: "Junior",
2: "Middle", 2: "Middle",
3: "Middle+", 3: "Middle+",
4: "Senior" 4: "Senior",
}; };
export const SKILLS = { export const SKILLS = {
@ -11,5 +11,5 @@ export const SKILLS = {
3: "Маркетолог", 3: "Маркетолог",
4: "Smm - специалист", 4: "Smm - специалист",
5: "Дизайнер", 5: "Дизайнер",
6: "Копирайтер" 6: "Копирайтер",
}; };

View File

@ -50,7 +50,7 @@ export const backendImg = (url) => `https://back.itguild.info${url}`;
export function scrollToForm() { export function scrollToForm() {
window.scrollTo({ window.scrollTo({
top: 850, top: 850,
behavior: "smooth" behavior: "smooth",
}); });
} }
@ -77,7 +77,7 @@ export function caseOfNum(number, type) {
files: ["файл", "файла", "файлов"], files: ["файл", "файла", "файлов"],
persons: ["участник", "участника", "участников"], persons: ["участник", "участника", "участников"],
tasks: ["задача", "задачи", "задач"], tasks: ["задача", "задачи", "задач"],
projects: ["проект", "проекта", "проектов"] projects: ["проект", "проекта", "проектов"],
}; };
const cases = [2, 0, 1, 1, 1, 2]; const cases = [2, 0, 1, 1, 1, 2];
return allTypes[type][ return allTypes[type][