prettier config
This commit is contained in:
@ -12,7 +12,7 @@ const ArchiveTasksItem = ({ task, index }) => {
|
||||
<p
|
||||
className="date"
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: task.description,
|
||||
__html: task.description
|
||||
}}
|
||||
/>
|
||||
</td>
|
||||
|
@ -51,7 +51,7 @@ export const AuthBox = ({ title }) => {
|
||||
dispatch(loading(true));
|
||||
apiRequest("/user/login", {
|
||||
method: "POST",
|
||||
data: formData,
|
||||
data: formData
|
||||
}).then((res) => {
|
||||
if (!res.access_token) {
|
||||
setError("Введены некорректные данные для входа");
|
||||
|
@ -86,7 +86,7 @@ export function getCorrectDate(day) {
|
||||
"сентября",
|
||||
"октября",
|
||||
"ноября",
|
||||
"декабря",
|
||||
"декабря"
|
||||
];
|
||||
return `${new Date(day).getDate()} ${
|
||||
months[new Date(day).getMonth()]
|
||||
|
@ -4,7 +4,7 @@ import { Link, Navigate, useNavigate, useParams } from "react-router-dom";
|
||||
|
||||
import {
|
||||
currentCandidate,
|
||||
selectCurrentCandidate,
|
||||
selectCurrentCandidate
|
||||
} from "@redux/outstaffingSlice";
|
||||
|
||||
import { LEVELS, SKILLS } from "@utils/constants";
|
||||
@ -58,7 +58,7 @@ const Candidate = () => {
|
||||
const styles = {
|
||||
classes: "",
|
||||
header: "",
|
||||
img: "",
|
||||
img: ""
|
||||
};
|
||||
|
||||
switch (Number(position_id)) {
|
||||
@ -100,14 +100,14 @@ const Candidate = () => {
|
||||
{ name: "Главная", link: "/profile" },
|
||||
{
|
||||
name: "Каталог свободных специалистов",
|
||||
link: "/profile/catalog",
|
||||
link: "/profile/catalog"
|
||||
},
|
||||
{
|
||||
name: `${currentCandidateObj.specification} ${
|
||||
SKILLS[currentCandidateObj.position_id]
|
||||
}, ${LEVELS[currentCandidateObj.level]}`,
|
||||
link: `/candidate/${currentCandidateObj.id}`,
|
||||
},
|
||||
link: `/candidate/${currentCandidateObj.id}`
|
||||
}
|
||||
]}
|
||||
/>
|
||||
|
||||
|
@ -34,7 +34,7 @@ const CandidateSidebar = ({ candidate, setActiveSnippet, activeSnippet }) => {
|
||||
let levelAspt = {
|
||||
spec: candidate.specification,
|
||||
skils: SKILLS[candidate.position_id],
|
||||
level: LEVELS[candidate.level],
|
||||
level: LEVELS[candidate.level]
|
||||
};
|
||||
|
||||
return (
|
||||
|
@ -15,8 +15,8 @@ const FileTracker = ({ file, setDeletedTask, taskId }) => {
|
||||
file_id: file.id,
|
||||
entity_type: 2,
|
||||
entity_id: taskId,
|
||||
status: 0,
|
||||
},
|
||||
status: 0
|
||||
}
|
||||
}).then(() => {
|
||||
setDeletedTask(file);
|
||||
});
|
||||
|
@ -22,7 +22,7 @@ const Form = () => {
|
||||
const [data, setData] = useState({
|
||||
email: "",
|
||||
phone: "",
|
||||
comment: "",
|
||||
comment: ""
|
||||
});
|
||||
const [isFetching, setIsFetching] = useState(false);
|
||||
|
||||
@ -40,7 +40,7 @@ const Form = () => {
|
||||
: () => {
|
||||
setStatus(null);
|
||||
navigate(`/candidate/${urlParams.id}`);
|
||||
},
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@ -55,7 +55,7 @@ const Form = () => {
|
||||
|
||||
setData((prev) => ({
|
||||
...prev,
|
||||
[id]: value,
|
||||
[id]: value
|
||||
}));
|
||||
};
|
||||
|
||||
@ -73,8 +73,8 @@ const Form = () => {
|
||||
method: "POST",
|
||||
params: {
|
||||
profile_id: urlParams.id,
|
||||
...data,
|
||||
},
|
||||
...data
|
||||
}
|
||||
}).then((res) => {
|
||||
setStatus(res);
|
||||
setIsFetching(false);
|
||||
|
@ -23,7 +23,7 @@ export const FreeDevelopers = () => {
|
||||
<ProfileBreadcrumbs
|
||||
links={[
|
||||
{ name: "Главная", link: "/auth" },
|
||||
{ name: "Свободные разработчики", link: "/worker" },
|
||||
{ name: "Свободные разработчики", link: "/worker" }
|
||||
]}
|
||||
/>
|
||||
|
||||
|
@ -18,13 +18,13 @@ export const ModalRegistration = ({ active, setActive }) => {
|
||||
const [inputsValue, setInputsValue] = useState({
|
||||
userName: "",
|
||||
email: "",
|
||||
password: "",
|
||||
password: ""
|
||||
});
|
||||
|
||||
const [inputsError, setInputsError] = useState({
|
||||
name: false,
|
||||
email: false,
|
||||
password: false,
|
||||
password: false
|
||||
});
|
||||
|
||||
const [loader, setLoader] = useState(false);
|
||||
@ -68,22 +68,22 @@ export const ModalRegistration = ({ active, setActive }) => {
|
||||
data: {
|
||||
username: inputsValue.userName,
|
||||
email: inputsValue.email,
|
||||
password: inputsValue.password,
|
||||
},
|
||||
password: inputsValue.password
|
||||
}
|
||||
}).then((data) => {
|
||||
setLoader(false);
|
||||
if (!data) {
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Аккаунт с таким логином или email уже существует",
|
||||
type: "error",
|
||||
type: "error"
|
||||
});
|
||||
} else {
|
||||
closeModal();
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Аккаунт успешно создан",
|
||||
type: "success",
|
||||
type: "success"
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -93,12 +93,12 @@ export const ModalRegistration = ({ active, setActive }) => {
|
||||
setInputsValue({
|
||||
userName: "",
|
||||
email: "",
|
||||
password: "",
|
||||
password: ""
|
||||
});
|
||||
setInputsError({
|
||||
name: false,
|
||||
email: false,
|
||||
password: false,
|
||||
password: false
|
||||
});
|
||||
setActive(false);
|
||||
};
|
||||
@ -122,11 +122,11 @@ export const ModalRegistration = ({ active, setActive }) => {
|
||||
setInputsError({
|
||||
name: false,
|
||||
email: false,
|
||||
password: false,
|
||||
password: false
|
||||
});
|
||||
setInputsValue((prevValue) => ({
|
||||
...prevValue,
|
||||
userName: e.target.value,
|
||||
userName: e.target.value
|
||||
}));
|
||||
}}
|
||||
value={inputsValue.userName}
|
||||
@ -143,11 +143,11 @@ export const ModalRegistration = ({ active, setActive }) => {
|
||||
setInputsError({
|
||||
name: false,
|
||||
email: false,
|
||||
password: false,
|
||||
password: false
|
||||
});
|
||||
setInputsValue((prevValue) => ({
|
||||
...prevValue,
|
||||
email: e.target.value,
|
||||
email: e.target.value
|
||||
}));
|
||||
}}
|
||||
value={inputsValue.email}
|
||||
@ -167,11 +167,11 @@ export const ModalRegistration = ({ active, setActive }) => {
|
||||
setInputsError({
|
||||
name: false,
|
||||
email: false,
|
||||
password: false,
|
||||
password: false
|
||||
});
|
||||
setInputsValue((prevValue) => ({
|
||||
...prevValue,
|
||||
password: e.target.value,
|
||||
password: e.target.value
|
||||
}));
|
||||
}}
|
||||
value={inputsValue.password}
|
||||
@ -188,11 +188,11 @@ export const ModalRegistration = ({ active, setActive }) => {
|
||||
setInputsError({
|
||||
name: false,
|
||||
email: false,
|
||||
password: false,
|
||||
password: false
|
||||
});
|
||||
setInputsValue((prevValue) => ({
|
||||
...prevValue,
|
||||
password: e.target.value,
|
||||
password: e.target.value
|
||||
}));
|
||||
}}
|
||||
value={inputsValue.password}
|
||||
|
@ -17,13 +17,13 @@ export const ModalResetPassword = ({ active, setActive }) => {
|
||||
const [inputsValue, setInputsValue] = useState({
|
||||
email: "",
|
||||
token: "",
|
||||
password: "",
|
||||
password: ""
|
||||
});
|
||||
|
||||
const [inputsError, setInputsError] = useState({
|
||||
email: false,
|
||||
password: false,
|
||||
token: false,
|
||||
token: false
|
||||
});
|
||||
|
||||
const validateEmail = (email) => {
|
||||
@ -40,7 +40,7 @@ export const ModalResetPassword = ({ active, setActive }) => {
|
||||
setInputsValue({
|
||||
email: "",
|
||||
token: "",
|
||||
password: "",
|
||||
password: ""
|
||||
});
|
||||
};
|
||||
|
||||
@ -51,22 +51,22 @@ export const ModalResetPassword = ({ active, setActive }) => {
|
||||
return showNotification({
|
||||
show: true,
|
||||
text: "Введите корректный e-mail",
|
||||
type: "error",
|
||||
type: "error"
|
||||
});
|
||||
}
|
||||
setLoader(true);
|
||||
apiRequest("/register/request-password-reset", {
|
||||
method: "POST",
|
||||
data: {
|
||||
email: inputsValue.email,
|
||||
},
|
||||
email: inputsValue.email
|
||||
}
|
||||
}).then((data) => {
|
||||
setLoader(false);
|
||||
if (data) {
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Письмо отправлено Вам на почту",
|
||||
type: "success",
|
||||
type: "success"
|
||||
});
|
||||
setStep(true);
|
||||
}
|
||||
@ -77,12 +77,12 @@ export const ModalResetPassword = ({ active, setActive }) => {
|
||||
setInputsError((prevValue) => ({
|
||||
...prevValue,
|
||||
password: true,
|
||||
token: true,
|
||||
token: true
|
||||
}));
|
||||
return showNotification({
|
||||
show: true,
|
||||
text: "Введите данные",
|
||||
type: "error",
|
||||
type: "error"
|
||||
});
|
||||
}
|
||||
if (inputsValue.password.length < 6) {
|
||||
@ -94,15 +94,15 @@ export const ModalResetPassword = ({ active, setActive }) => {
|
||||
method: "POST",
|
||||
data: {
|
||||
token: inputsValue.token,
|
||||
password: inputsValue.password,
|
||||
},
|
||||
password: inputsValue.password
|
||||
}
|
||||
}).then((data) => {
|
||||
setLoader(false);
|
||||
if (data.code === 0) {
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Введите корректные данные",
|
||||
type: "error",
|
||||
type: "error"
|
||||
});
|
||||
} else {
|
||||
setActive(false);
|
||||
@ -110,7 +110,7 @@ export const ModalResetPassword = ({ active, setActive }) => {
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Пароль изменён",
|
||||
type: "success",
|
||||
type: "success"
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -133,12 +133,12 @@ export const ModalResetPassword = ({ active, setActive }) => {
|
||||
onChange={(e) => {
|
||||
setInputsValue((prevValue) => ({
|
||||
...prevValue,
|
||||
email: e.target.value,
|
||||
email: e.target.value
|
||||
}));
|
||||
setInputsError({
|
||||
email: false,
|
||||
password: false,
|
||||
token: false,
|
||||
token: false
|
||||
});
|
||||
}}
|
||||
placeholder="E-mail"
|
||||
@ -173,11 +173,11 @@ export const ModalResetPassword = ({ active, setActive }) => {
|
||||
setInputsError({
|
||||
email: false,
|
||||
password: false,
|
||||
token: false,
|
||||
token: false
|
||||
});
|
||||
setInputsValue((prevValue) => ({
|
||||
...prevValue,
|
||||
token: e.target.value,
|
||||
token: e.target.value
|
||||
}));
|
||||
}}
|
||||
value={inputsValue.token}
|
||||
@ -193,12 +193,12 @@ export const ModalResetPassword = ({ active, setActive }) => {
|
||||
onChange={(e) => {
|
||||
setInputsValue((prevValue) => ({
|
||||
...prevValue,
|
||||
password: e.target.value,
|
||||
password: e.target.value
|
||||
}));
|
||||
setInputsError({
|
||||
email: false,
|
||||
password: false,
|
||||
token: false,
|
||||
token: false
|
||||
});
|
||||
}}
|
||||
placeholder="password"
|
||||
|
@ -15,7 +15,7 @@ import {
|
||||
caseOfNum,
|
||||
getCorrectRequestDate,
|
||||
getToken,
|
||||
urlForLocal,
|
||||
urlForLocal
|
||||
} from "@utils/helper";
|
||||
|
||||
import { apiRequest } from "@api/request";
|
||||
@ -56,7 +56,7 @@ export const ModalTiсket = ({
|
||||
projectName,
|
||||
projectUsers,
|
||||
projectOwnerId,
|
||||
projectMarks,
|
||||
projectMarks
|
||||
}) => {
|
||||
const dispatch = useDispatch();
|
||||
const [addSubtask, setAddSubtask] = useState(false);
|
||||
@ -64,7 +64,7 @@ export const ModalTiсket = ({
|
||||
const [inputsValue, setInputsValue] = useState({
|
||||
title: task.title,
|
||||
description: task.description,
|
||||
comment: "",
|
||||
comment: ""
|
||||
});
|
||||
const [comments, setComments] = useState([]);
|
||||
const [deadLine, setDeadLine] = useState(task.dead_line);
|
||||
@ -85,7 +85,7 @@ export const ModalTiсket = ({
|
||||
const [currentTimerCount, setCurrentTimerCount] = useState({
|
||||
hours: 0,
|
||||
minute: 0,
|
||||
seconds: 0,
|
||||
seconds: 0
|
||||
});
|
||||
const [timerId, setTimerId] = useState(null);
|
||||
const [taskFiles, setTaskFiles] = useState([]);
|
||||
@ -104,15 +104,15 @@ export const ModalTiсket = ({
|
||||
method: "PUT",
|
||||
data: {
|
||||
task_id: task.id,
|
||||
status: 0,
|
||||
},
|
||||
status: 0
|
||||
}
|
||||
}).then(() => {
|
||||
setActive(false);
|
||||
dispatch(setProjectBoardFetch(projectId));
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Задача успешно была перемещена в архив",
|
||||
type: "archive",
|
||||
type: "archive"
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -120,22 +120,22 @@ export const ModalTiсket = ({
|
||||
const priority = {
|
||||
2: "Высокий",
|
||||
1: "Средний",
|
||||
0: "Низкий",
|
||||
0: "Низкий"
|
||||
};
|
||||
|
||||
const priorityTypes = [
|
||||
{
|
||||
name: "Высокий",
|
||||
key: 2,
|
||||
key: 2
|
||||
},
|
||||
{
|
||||
name: "Средний",
|
||||
key: 1,
|
||||
key: 1
|
||||
},
|
||||
{
|
||||
name: "Низкий",
|
||||
key: 0,
|
||||
},
|
||||
key: 0
|
||||
}
|
||||
];
|
||||
|
||||
function archiveTask() {
|
||||
@ -147,7 +147,7 @@ export const ModalTiсket = ({
|
||||
return showNotification({
|
||||
show: true,
|
||||
text: "Заполните поля",
|
||||
type: "error",
|
||||
type: "error"
|
||||
});
|
||||
}
|
||||
apiRequest("/task/update-task", {
|
||||
@ -155,15 +155,15 @@ export const ModalTiсket = ({
|
||||
data: {
|
||||
task_id: task.id,
|
||||
title: inputsValue.title,
|
||||
description: inputsValue.description,
|
||||
},
|
||||
description: inputsValue.description
|
||||
}
|
||||
}).then((res) => {
|
||||
setEditOpen(!editOpen);
|
||||
dispatch(setProjectBoardFetch(projectId));
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Изменения сохранены",
|
||||
type: "success",
|
||||
type: "success"
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -176,8 +176,8 @@ export const ModalTiсket = ({
|
||||
data: {
|
||||
text: inputsValue.comment,
|
||||
entity_type: 2,
|
||||
entity_id: task.id,
|
||||
},
|
||||
entity_id: task.id
|
||||
}
|
||||
}).then((res) => {
|
||||
let newComment = res;
|
||||
setCommentSendDisable(false);
|
||||
@ -199,8 +199,8 @@ export const ModalTiсket = ({
|
||||
method: "PUT",
|
||||
data: {
|
||||
comment_id: subComment.id,
|
||||
status: 0,
|
||||
},
|
||||
status: 0
|
||||
}
|
||||
}).then(() => {});
|
||||
});
|
||||
}
|
||||
@ -234,8 +234,8 @@ export const ModalTiсket = ({
|
||||
data: {
|
||||
entity_type: 2,
|
||||
entity_id: task.id,
|
||||
created_at: getCorrectRequestDate(new Date()),
|
||||
},
|
||||
created_at: getCorrectRequestDate(new Date())
|
||||
}
|
||||
}).then((res) => {
|
||||
setTimerStart(true);
|
||||
setTimerInfo(res);
|
||||
@ -248,8 +248,8 @@ export const ModalTiсket = ({
|
||||
method: "PUT",
|
||||
data: {
|
||||
timer_id: timerInfo.id,
|
||||
stopped_at: getCorrectRequestDate(new Date()),
|
||||
},
|
||||
stopped_at: getCorrectRequestDate(new Date())
|
||||
}
|
||||
}).then(() => {
|
||||
setTimerStart(false);
|
||||
clearInterval(timerId);
|
||||
@ -261,8 +261,8 @@ export const ModalTiсket = ({
|
||||
method: "PUT",
|
||||
data: {
|
||||
task_id: task.id,
|
||||
executor_id: person.user_id,
|
||||
},
|
||||
executor_id: person.user_id
|
||||
}
|
||||
}).then((res) => {
|
||||
setExecutorId(person.user_id);
|
||||
setDropListOpen(false);
|
||||
@ -276,8 +276,8 @@ export const ModalTiсket = ({
|
||||
method: "PUT",
|
||||
data: {
|
||||
task_id: task.id,
|
||||
executor_id: 0,
|
||||
},
|
||||
executor_id: 0
|
||||
}
|
||||
}).then(() => {
|
||||
setExecutorId(null);
|
||||
setExecutor(null);
|
||||
@ -291,8 +291,8 @@ export const ModalTiсket = ({
|
||||
method: "PUT",
|
||||
data: {
|
||||
task_id: task.id,
|
||||
execution_priority: key,
|
||||
},
|
||||
execution_priority: key
|
||||
}
|
||||
}).then(() => {
|
||||
dispatch(setProjectBoardFetch(projectId));
|
||||
});
|
||||
@ -303,8 +303,8 @@ export const ModalTiсket = ({
|
||||
method: "POST",
|
||||
data: {
|
||||
task_id: task.id,
|
||||
user_id: person.user_id,
|
||||
},
|
||||
user_id: person.user_id
|
||||
}
|
||||
}).then((res) => {
|
||||
setDropListMembersOpen(false);
|
||||
setMembers((prevValue) => [...prevValue, res]);
|
||||
@ -317,8 +317,8 @@ export const ModalTiсket = ({
|
||||
method: "DELETE",
|
||||
data: {
|
||||
task_id: task.id,
|
||||
user_id: person.user_id,
|
||||
},
|
||||
user_id: person.user_id
|
||||
}
|
||||
}).then(() => {
|
||||
setMembers(members.filter((item) => item.user_id !== person.user_id));
|
||||
dispatch(setProjectBoardFetch(projectId));
|
||||
@ -351,7 +351,7 @@ export const ModalTiсket = ({
|
||||
setCurrentTimerCount({
|
||||
hours: Math.floor(timerSeconds / 60 / 60),
|
||||
minute: Math.floor((timerSeconds / 60) % 60),
|
||||
seconds: timerSeconds % 60,
|
||||
seconds: timerSeconds % 60
|
||||
});
|
||||
updateTimerHours = Math.floor(timerSeconds / 60 / 60);
|
||||
updateTimerMinute = Math.floor((timerSeconds / 60) % 60);
|
||||
@ -386,10 +386,10 @@ export const ModalTiсket = ({
|
||||
{
|
||||
user: {
|
||||
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", {
|
||||
method: "POST",
|
||||
body: formData,
|
||||
headers: { ...getToken() },
|
||||
headers: { ...getToken() }
|
||||
});
|
||||
|
||||
const data = await res.json();
|
||||
@ -430,8 +430,8 @@ export const ModalTiсket = ({
|
||||
file_id: id,
|
||||
entity_type: 2,
|
||||
entity_id: task.id,
|
||||
status: 1,
|
||||
},
|
||||
status: 1
|
||||
}
|
||||
}).then((res) => {
|
||||
setTaskFiles((prevValue) => [...prevValue, res]);
|
||||
// setUploadedFile(null);
|
||||
@ -470,7 +470,7 @@ export const ModalTiсket = ({
|
||||
return setCurrentTimerCount({
|
||||
hours: updateTimerHours,
|
||||
minute: updateTimerMinute,
|
||||
seconds: updateTimerSec,
|
||||
seconds: updateTimerSec
|
||||
});
|
||||
}
|
||||
|
||||
@ -496,7 +496,7 @@ export const ModalTiсket = ({
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Ссылка скопирована в буфер обмена",
|
||||
type: "copy",
|
||||
type: "copy"
|
||||
});
|
||||
}
|
||||
|
||||
@ -505,8 +505,8 @@ export const ModalTiсket = ({
|
||||
method: "PUT",
|
||||
data: {
|
||||
task_id: task.id,
|
||||
dead_line: getCorrectRequestDate(date),
|
||||
},
|
||||
dead_line: getCorrectRequestDate(date)
|
||||
}
|
||||
}).then(() => {
|
||||
dispatch(setProjectBoardFetch(projectId));
|
||||
});
|
||||
@ -518,8 +518,8 @@ export const ModalTiсket = ({
|
||||
data: {
|
||||
mark_id: tagId,
|
||||
entity_type: 2,
|
||||
entity_id: task.id,
|
||||
},
|
||||
entity_id: task.id
|
||||
}
|
||||
}).then((data) => {
|
||||
setSelectTagsOpen(false);
|
||||
setTaskTags((prevValue) => [...prevValue, data.mark]);
|
||||
@ -533,8 +533,8 @@ export const ModalTiсket = ({
|
||||
data: {
|
||||
mark_id: tagId,
|
||||
entity_type: 2,
|
||||
entity_id: task.id,
|
||||
},
|
||||
entity_id: task.id
|
||||
}
|
||||
}).then(() => {
|
||||
setTaskTags((prevValue) => prevValue.filter((tag) => tag.id !== tagId));
|
||||
dispatch(setProjectBoardFetch(projectId));
|
||||
@ -617,7 +617,7 @@ export const ModalTiсket = ({
|
||||
onChange={(e) => {
|
||||
setInputsValue((prevValue) => ({
|
||||
...prevValue,
|
||||
title: e.target.value,
|
||||
title: e.target.value
|
||||
}));
|
||||
}}
|
||||
/>
|
||||
@ -640,14 +640,14 @@ export const ModalTiсket = ({
|
||||
"ImageToolbar",
|
||||
"ImageUpload",
|
||||
"MediaEmbed",
|
||||
"BlockQuote",
|
||||
],
|
||||
"BlockQuote"
|
||||
]
|
||||
}}
|
||||
onChange={(event, editor) => {
|
||||
const data = editor.getData();
|
||||
setInputsValue((prevValue) => ({
|
||||
...prevValue,
|
||||
description: data,
|
||||
description: data
|
||||
}));
|
||||
}}
|
||||
/>
|
||||
@ -729,7 +729,7 @@ export const ModalTiсket = ({
|
||||
onChange={(e) => {
|
||||
setInputsValue((prevValue) => ({
|
||||
...prevValue,
|
||||
comment: e.target.value,
|
||||
comment: e.target.value
|
||||
}));
|
||||
}}
|
||||
/>
|
||||
|
@ -12,7 +12,7 @@ import {
|
||||
getBoarderLoader,
|
||||
modalToggle,
|
||||
setProjectBoardFetch,
|
||||
setToggleTab,
|
||||
setToggleTab
|
||||
} from "@redux/projectsTrackerSlice";
|
||||
|
||||
import {
|
||||
@ -20,7 +20,7 @@ import {
|
||||
caseOfNum,
|
||||
getCorrectRequestDate,
|
||||
getToken,
|
||||
urlForLocal,
|
||||
urlForLocal
|
||||
} from "@utils/helper";
|
||||
|
||||
import { apiRequest } from "@api/request";
|
||||
@ -77,7 +77,7 @@ export const TicketFullScreen = () => {
|
||||
const [currentTimerCount, setCurrentTimerCount] = useState({
|
||||
hours: 0,
|
||||
minute: 0,
|
||||
seconds: 0,
|
||||
seconds: 0
|
||||
});
|
||||
const profileInfo = useSelector(getProfileInfo);
|
||||
const [timerId, setTimerId] = useState(null);
|
||||
@ -102,22 +102,22 @@ export const TicketFullScreen = () => {
|
||||
const priority = {
|
||||
2: "Высокий",
|
||||
1: "Средний",
|
||||
0: "Низкий",
|
||||
0: "Низкий"
|
||||
};
|
||||
|
||||
const priorityTypes = [
|
||||
{
|
||||
name: "Высокий",
|
||||
key: 2,
|
||||
key: 2
|
||||
},
|
||||
{
|
||||
name: "Средний",
|
||||
key: 1,
|
||||
key: 1
|
||||
},
|
||||
{
|
||||
name: "Низкий",
|
||||
key: 0,
|
||||
},
|
||||
key: 0
|
||||
}
|
||||
];
|
||||
|
||||
useEffect(() => {
|
||||
@ -133,7 +133,7 @@ export const TicketFullScreen = () => {
|
||||
setInputsValue({
|
||||
title: taskInfo.title,
|
||||
description: taskInfo.description,
|
||||
comment: "",
|
||||
comment: ""
|
||||
});
|
||||
setTaskTags(taskInfo.mark);
|
||||
apiRequest(
|
||||
@ -168,7 +168,7 @@ export const TicketFullScreen = () => {
|
||||
setCurrentTimerCount({
|
||||
hours: Math.floor(timerSeconds / 60 / 60),
|
||||
minute: Math.floor((timerSeconds / 60) % 60),
|
||||
seconds: timerSeconds % 60,
|
||||
seconds: timerSeconds % 60
|
||||
});
|
||||
updateTimerHours = Math.floor(timerSeconds / 60 / 60);
|
||||
updateTimerMinute = Math.floor((timerSeconds / 60) % 60);
|
||||
@ -208,8 +208,8 @@ export const TicketFullScreen = () => {
|
||||
method: "PUT",
|
||||
data: {
|
||||
task_id: ticketId.id,
|
||||
status: 0,
|
||||
},
|
||||
status: 0
|
||||
}
|
||||
}).then(() => {
|
||||
navigate(`/tracker/project/${taskInfo.project_id}`);
|
||||
});
|
||||
@ -224,7 +224,7 @@ export const TicketFullScreen = () => {
|
||||
return showNotification({
|
||||
show: true,
|
||||
text: "Заполните поля",
|
||||
type: "error",
|
||||
type: "error"
|
||||
});
|
||||
}
|
||||
apiRequest("/task/update-task", {
|
||||
@ -232,13 +232,13 @@ export const TicketFullScreen = () => {
|
||||
data: {
|
||||
task_id: taskInfo.id,
|
||||
title: inputsValue.title,
|
||||
description: inputsValue.description,
|
||||
},
|
||||
description: inputsValue.description
|
||||
}
|
||||
}).then(() => {
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Изменения сохранены",
|
||||
type: "success",
|
||||
type: "success"
|
||||
});
|
||||
setEditOpen(!editOpen);
|
||||
});
|
||||
@ -252,8 +252,8 @@ export const TicketFullScreen = () => {
|
||||
data: {
|
||||
text: inputsValue.comment,
|
||||
entity_type: 2,
|
||||
entity_id: taskInfo.id,
|
||||
},
|
||||
entity_id: taskInfo.id
|
||||
}
|
||||
}).then((res) => {
|
||||
let newComment = res;
|
||||
setCommentSendDisable(false);
|
||||
@ -270,8 +270,8 @@ export const TicketFullScreen = () => {
|
||||
data: {
|
||||
entity_type: 2,
|
||||
entity_id: taskInfo.id,
|
||||
created_at: getCorrectRequestDate(new Date()),
|
||||
},
|
||||
created_at: getCorrectRequestDate(new Date())
|
||||
}
|
||||
}).then((res) => {
|
||||
setTimerStart(true);
|
||||
setTimerInfo(res);
|
||||
@ -284,8 +284,8 @@ export const TicketFullScreen = () => {
|
||||
method: "PUT",
|
||||
data: {
|
||||
timer_id: timerInfo.id,
|
||||
stopped_at: getCorrectRequestDate(new Date()),
|
||||
},
|
||||
stopped_at: getCorrectRequestDate(new Date())
|
||||
}
|
||||
}).then(() => {
|
||||
setTimerStart(false);
|
||||
clearInterval(timerId);
|
||||
@ -297,8 +297,8 @@ export const TicketFullScreen = () => {
|
||||
method: "DELETE",
|
||||
data: {
|
||||
project_id: projectInfo.id,
|
||||
user_id: userId,
|
||||
},
|
||||
user_id: userId
|
||||
}
|
||||
}).then(() => {
|
||||
dispatch(deletePersonOnProject(userId));
|
||||
});
|
||||
@ -314,8 +314,8 @@ export const TicketFullScreen = () => {
|
||||
method: "PUT",
|
||||
data: {
|
||||
comment_id: subComment.id,
|
||||
status: 0,
|
||||
},
|
||||
status: 0
|
||||
}
|
||||
}).then(() => {});
|
||||
});
|
||||
}
|
||||
@ -391,7 +391,7 @@ export const TicketFullScreen = () => {
|
||||
return setCurrentTimerCount({
|
||||
hours: updateTimerHours,
|
||||
minute: updateTimerMinute,
|
||||
seconds: updateTimerSec,
|
||||
seconds: updateTimerSec
|
||||
});
|
||||
}
|
||||
|
||||
@ -405,13 +405,13 @@ export const TicketFullScreen = () => {
|
||||
method: "PUT",
|
||||
data: {
|
||||
task_id: taskInfo.id,
|
||||
executor_id: 0,
|
||||
},
|
||||
executor_id: 0
|
||||
}
|
||||
}).then(() => {
|
||||
setTaskInfo((prevState) => ({
|
||||
...prevState,
|
||||
executor_id: null,
|
||||
executor: null,
|
||||
executor: null
|
||||
}));
|
||||
});
|
||||
}
|
||||
@ -421,14 +421,14 @@ export const TicketFullScreen = () => {
|
||||
method: "PUT",
|
||||
data: {
|
||||
task_id: taskInfo.id,
|
||||
executor_id: person.user_id,
|
||||
},
|
||||
executor_id: person.user_id
|
||||
}
|
||||
}).then((res) => {
|
||||
setDropListOpen(false);
|
||||
setTaskInfo((prevState) => ({
|
||||
...prevState,
|
||||
executor_id: res.executor_id,
|
||||
executor: res.executor,
|
||||
executor: res.executor
|
||||
}));
|
||||
});
|
||||
}
|
||||
@ -438,14 +438,14 @@ export const TicketFullScreen = () => {
|
||||
method: "DELETE",
|
||||
data: {
|
||||
task_id: taskInfo.id,
|
||||
user_id: person.user_id,
|
||||
},
|
||||
user_id: person.user_id
|
||||
}
|
||||
}).then(() => {
|
||||
setTaskInfo((prevState) => ({
|
||||
...prevState,
|
||||
taskUsers: taskInfo.taskUsers.filter(
|
||||
(item) => item.user_id !== person.user_id
|
||||
),
|
||||
)
|
||||
}));
|
||||
});
|
||||
}
|
||||
@ -455,13 +455,13 @@ export const TicketFullScreen = () => {
|
||||
method: "POST",
|
||||
data: {
|
||||
task_id: taskInfo.id,
|
||||
user_id: person.user_id,
|
||||
},
|
||||
user_id: person.user_id
|
||||
}
|
||||
}).then((res) => {
|
||||
setDropListMembersOpen(false);
|
||||
setTaskInfo((prevValue) => ({
|
||||
...prevValue,
|
||||
taskUsers: [...prevValue.taskUsers, res],
|
||||
taskUsers: [...prevValue.taskUsers, res]
|
||||
}));
|
||||
});
|
||||
}
|
||||
@ -471,8 +471,8 @@ export const TicketFullScreen = () => {
|
||||
method: "PUT",
|
||||
data: {
|
||||
task_id: taskInfo.id,
|
||||
dead_line: getCorrectRequestDate(date),
|
||||
},
|
||||
dead_line: getCorrectRequestDate(date)
|
||||
}
|
||||
}).then(() => {});
|
||||
}
|
||||
|
||||
@ -482,7 +482,7 @@ export const TicketFullScreen = () => {
|
||||
const res = await fetch("https://itguild.info/api/file/upload", {
|
||||
method: "POST",
|
||||
body: formData,
|
||||
headers: { ...getToken() },
|
||||
headers: { ...getToken() }
|
||||
});
|
||||
|
||||
const data = await res.json();
|
||||
@ -497,8 +497,8 @@ export const TicketFullScreen = () => {
|
||||
file_id: uploadedFile[0].id,
|
||||
entity_type: 2,
|
||||
entity_id: taskInfo.id,
|
||||
status: 1,
|
||||
},
|
||||
status: 1
|
||||
}
|
||||
}).then((res) => {
|
||||
setTaskFiles((prevValue) => [...prevValue, res]);
|
||||
setUploadedFile(null);
|
||||
@ -515,8 +515,8 @@ export const TicketFullScreen = () => {
|
||||
method: "PUT",
|
||||
data: {
|
||||
task_id: taskInfo.id,
|
||||
execution_priority: key,
|
||||
},
|
||||
execution_priority: key
|
||||
}
|
||||
}).then(() => {});
|
||||
}
|
||||
|
||||
@ -552,8 +552,8 @@ export const TicketFullScreen = () => {
|
||||
data: {
|
||||
mark_id: tagId,
|
||||
entity_type: 2,
|
||||
entity_id: taskInfo.id,
|
||||
},
|
||||
entity_id: taskInfo.id
|
||||
}
|
||||
}).then(() => {
|
||||
setTaskTags((prevValue) => prevValue.filter((tag) => tag.id !== tagId));
|
||||
});
|
||||
@ -565,8 +565,8 @@ export const TicketFullScreen = () => {
|
||||
data: {
|
||||
mark_id: tagId,
|
||||
entity_type: 2,
|
||||
entity_id: taskInfo.id,
|
||||
},
|
||||
entity_id: taskInfo.id
|
||||
}
|
||||
}).then((data) => {
|
||||
setSelectTagsOpen(false);
|
||||
setTaskTags((prevValue) => [...prevValue, data.mark]);
|
||||
@ -639,7 +639,7 @@ export const TicketFullScreen = () => {
|
||||
<ProfileBreadcrumbs
|
||||
links={[
|
||||
{ name: "Главная", link: "/profile" },
|
||||
{ name: "Трекер", link: "/profile/tracker" },
|
||||
{ name: "Трекер", link: "/profile/tracker" }
|
||||
]}
|
||||
/>
|
||||
<h2 className="tracker__title">Управление проектами с трекером</h2>
|
||||
@ -794,7 +794,7 @@ export const TicketFullScreen = () => {
|
||||
onChange={(e) => {
|
||||
setInputsValue((prevValue) => ({
|
||||
...prevValue,
|
||||
title: e.target.value,
|
||||
title: e.target.value
|
||||
}));
|
||||
}}
|
||||
/>
|
||||
@ -819,14 +819,14 @@ export const TicketFullScreen = () => {
|
||||
"ImageToolbar",
|
||||
"ImageUpload",
|
||||
"MediaEmbed",
|
||||
"BlockQuote",
|
||||
],
|
||||
"BlockQuote"
|
||||
]
|
||||
}}
|
||||
onChange={(event, editor) => {
|
||||
const data = editor.getData();
|
||||
setInputsValue((prevValue) => ({
|
||||
...prevValue,
|
||||
description: data,
|
||||
description: data
|
||||
}));
|
||||
}}
|
||||
/>
|
||||
@ -834,7 +834,7 @@ export const TicketFullScreen = () => {
|
||||
<p
|
||||
className="fullDescription fullScreenDescription"
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: inputsValue.description,
|
||||
__html: inputsValue.description
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
@ -917,7 +917,7 @@ export const TicketFullScreen = () => {
|
||||
onChange={(e) => {
|
||||
setInputsValue((prevValue) => ({
|
||||
...prevValue,
|
||||
comment: e.target.value,
|
||||
comment: e.target.value
|
||||
}));
|
||||
}}
|
||||
/>
|
||||
|
@ -19,7 +19,7 @@ import {
|
||||
setColumnName,
|
||||
setColumnPriority,
|
||||
setProject,
|
||||
setProjectBoardFetch,
|
||||
setProjectBoardFetch
|
||||
} from "@redux/projectsTrackerSlice";
|
||||
|
||||
import { getCorrectRequestDate, urlForLocal } from "@utils/helper";
|
||||
@ -52,7 +52,7 @@ export const TrackerModal = ({
|
||||
projectId,
|
||||
priorityTask,
|
||||
projectUsers,
|
||||
projectMarks,
|
||||
projectMarks
|
||||
}) => {
|
||||
const dispatch = useDispatch();
|
||||
const projectBoard = useSelector(getProjectBoard);
|
||||
@ -93,16 +93,16 @@ export const TrackerModal = ({
|
||||
const priority = [
|
||||
{
|
||||
name: "Высокий",
|
||||
key: 2,
|
||||
key: 2
|
||||
},
|
||||
{
|
||||
name: "Средний",
|
||||
key: 1,
|
||||
key: 1
|
||||
},
|
||||
{
|
||||
name: "Низкий",
|
||||
key: 0,
|
||||
},
|
||||
key: 0
|
||||
}
|
||||
];
|
||||
|
||||
function createTab() {
|
||||
@ -118,8 +118,8 @@ export const TrackerModal = ({
|
||||
priority: projectBoard.columns.length
|
||||
? projectBoard.columns.at(-1).priority + 1
|
||||
: 1,
|
||||
title: valueColumn,
|
||||
},
|
||||
title: valueColumn
|
||||
}
|
||||
}).then(() => {
|
||||
dispatch(setProjectBoardFetch(projectBoard.id));
|
||||
});
|
||||
@ -132,7 +132,7 @@ export const TrackerModal = ({
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Введите название и описание",
|
||||
type: "error",
|
||||
type: "error"
|
||||
});
|
||||
return;
|
||||
}
|
||||
@ -148,14 +148,14 @@ export const TrackerModal = ({
|
||||
column_id: selectedTab,
|
||||
execution_priority: selectedPriority ? selectedPriority.key : "",
|
||||
priority: priorityTask,
|
||||
dead_line: deadLineDate ? getCorrectRequestDate(deadLineDate) : "",
|
||||
},
|
||||
dead_line: deadLineDate ? getCorrectRequestDate(deadLineDate) : ""
|
||||
}
|
||||
}).then((res) => {
|
||||
if (res.status === 500) {
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Задача с таким именем уже существует",
|
||||
type: "error",
|
||||
type: "error"
|
||||
});
|
||||
} else {
|
||||
for (let i = 0; i < taskTags.length; i++) {
|
||||
@ -164,8 +164,8 @@ export const TrackerModal = ({
|
||||
data: {
|
||||
mark_id: taskTags[i].id,
|
||||
entity_type: 2,
|
||||
entity_id: res.id,
|
||||
},
|
||||
entity_id: res.id
|
||||
}
|
||||
}).then(() => {
|
||||
setTaskTags([]);
|
||||
});
|
||||
@ -175,8 +175,8 @@ export const TrackerModal = ({
|
||||
method: "PUT",
|
||||
data: {
|
||||
task_id: res.id,
|
||||
executor_id: selectedExecutorTask.user_id,
|
||||
},
|
||||
executor_id: selectedExecutorTask.user_id
|
||||
}
|
||||
}).then(() => {
|
||||
dispatch(setProjectBoardFetch(projectBoard.id));
|
||||
setActive(false);
|
||||
@ -195,7 +195,7 @@ export const TrackerModal = ({
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Задача создана",
|
||||
type: "success",
|
||||
type: "success"
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -206,8 +206,8 @@ export const TrackerModal = ({
|
||||
method: "PUT",
|
||||
data: {
|
||||
project_id: projectId,
|
||||
name: projectName,
|
||||
},
|
||||
name: projectName
|
||||
}
|
||||
}).then(() => {
|
||||
setActive(false);
|
||||
dispatch(editProjectName({ id: projectId, name: projectName }));
|
||||
@ -220,20 +220,20 @@ export const TrackerModal = ({
|
||||
const priorityColumns = [
|
||||
{
|
||||
column_id: column.id,
|
||||
priority: Number(columnPriority),
|
||||
},
|
||||
priority: Number(columnPriority)
|
||||
}
|
||||
];
|
||||
for (let i = column.priority; i < columnPriority; i++) {
|
||||
const currentColumn = {
|
||||
column_id: projectBoard.columns[i].id,
|
||||
priority: i,
|
||||
priority: i
|
||||
};
|
||||
priorityColumns.push(currentColumn);
|
||||
}
|
||||
for (let i = column.priority; i > columnPriority; i--) {
|
||||
const currentColumn = {
|
||||
column_id: projectBoard.columns[i - 2].id,
|
||||
priority: i,
|
||||
priority: i
|
||||
};
|
||||
priorityColumns.push(currentColumn);
|
||||
}
|
||||
@ -241,8 +241,8 @@ export const TrackerModal = ({
|
||||
method: "POST",
|
||||
data: {
|
||||
project_id: projectBoard.id,
|
||||
data: JSON.stringify(priorityColumns),
|
||||
},
|
||||
data: JSON.stringify(priorityColumns)
|
||||
}
|
||||
}).then(() => {
|
||||
dispatch(setProjectBoardFetch(projectBoard.id));
|
||||
});
|
||||
@ -256,8 +256,8 @@ export const TrackerModal = ({
|
||||
method: "PUT",
|
||||
data: {
|
||||
column_id: columnId,
|
||||
title: columnName,
|
||||
},
|
||||
title: columnName
|
||||
}
|
||||
}).then(() => {
|
||||
setActive(false);
|
||||
dispatch(editColumnName({ id: columnId, title: columnName }));
|
||||
@ -273,8 +273,8 @@ export const TrackerModal = ({
|
||||
data: {
|
||||
user_id: localStorage.getItem("id"),
|
||||
name: nameProject,
|
||||
status: 19,
|
||||
},
|
||||
status: 19
|
||||
}
|
||||
}).then((res) => {
|
||||
if (!Array.isArray(res.name)) {
|
||||
const result = { ...res, columns: [] };
|
||||
@ -285,7 +285,7 @@ export const TrackerModal = ({
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Проект с таким именем уже существует",
|
||||
type: "error",
|
||||
type: "error"
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -297,8 +297,8 @@ export const TrackerModal = ({
|
||||
method: "POST",
|
||||
data: {
|
||||
user_id: selectedWorker.user_id,
|
||||
project_id: projectBoard.id,
|
||||
},
|
||||
project_id: projectBoard.id
|
||||
}
|
||||
}).then((el) => {
|
||||
dispatch(addPersonToProject(el));
|
||||
setActive(false);
|
||||
@ -332,10 +332,10 @@ export const TrackerModal = ({
|
||||
{
|
||||
user: {
|
||||
avatar: profileInfo.photo,
|
||||
fio: profileInfo.fio,
|
||||
fio: profileInfo.fio
|
||||
},
|
||||
user_id: profileInfo.id_user,
|
||||
},
|
||||
user_id: profileInfo.id_user
|
||||
}
|
||||
]);
|
||||
} else {
|
||||
setCorrectProjectUsers(projectUsers);
|
||||
@ -525,10 +525,10 @@ export const TrackerModal = ({
|
||||
"italic",
|
||||
"link",
|
||||
"bulletedList",
|
||||
"numberedList",
|
||||
"numberedList"
|
||||
],
|
||||
removePlugins: ["BlockQuote"],
|
||||
placeholder: "Описание задачи",
|
||||
placeholder: "Описание задачи"
|
||||
}}
|
||||
onChange={(event, editor) => {
|
||||
const data = editor.getData();
|
||||
|
@ -22,55 +22,55 @@ export const Navigation = () => {
|
||||
developer: [
|
||||
{
|
||||
path: "/summary",
|
||||
name: "Резюме",
|
||||
name: "Резюме"
|
||||
},
|
||||
{
|
||||
path: "/calendar",
|
||||
name: "Отчеты",
|
||||
name: "Отчеты"
|
||||
},
|
||||
{
|
||||
path: "/tracker",
|
||||
name: "Трекер",
|
||||
name: "Трекер"
|
||||
},
|
||||
{
|
||||
path: "/payouts",
|
||||
name: "Выплаты",
|
||||
name: "Выплаты"
|
||||
},
|
||||
{
|
||||
path: "/quiz",
|
||||
name: "Тесты",
|
||||
name: "Тесты"
|
||||
},
|
||||
{
|
||||
path: "/settings",
|
||||
name: "Настройки",
|
||||
},
|
||||
name: "Настройки"
|
||||
}
|
||||
],
|
||||
partner: [
|
||||
{
|
||||
path: "/catalog",
|
||||
name: "Каталог",
|
||||
name: "Каталог"
|
||||
},
|
||||
{
|
||||
path: "/requests",
|
||||
name: "Запросы",
|
||||
name: "Запросы"
|
||||
},
|
||||
{
|
||||
path: "/categories",
|
||||
name: "Персонал",
|
||||
name: "Персонал"
|
||||
},
|
||||
{
|
||||
path: "/tracker",
|
||||
name: "Трекер",
|
||||
name: "Трекер"
|
||||
},
|
||||
{
|
||||
path: "/treaties",
|
||||
name: "Договора",
|
||||
name: "Договора"
|
||||
},
|
||||
{
|
||||
path: "/settings",
|
||||
name: "Настройки",
|
||||
},
|
||||
],
|
||||
name: "Настройки"
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
|
@ -15,7 +15,7 @@ const images = {
|
||||
archive: archive,
|
||||
error: error,
|
||||
copy: copy,
|
||||
success: success,
|
||||
success: success
|
||||
};
|
||||
|
||||
export const Notification = () => {
|
||||
|
@ -4,7 +4,7 @@ import { useDispatch, useSelector } from "react-redux";
|
||||
import {
|
||||
getPositionId,
|
||||
selectTags,
|
||||
setPositionId,
|
||||
setPositionId
|
||||
} from "@redux/outstaffingSlice";
|
||||
|
||||
import OutstaffingBlock from "@components/OutstaffingBlock/OutstaffingBlock";
|
||||
@ -34,7 +34,7 @@ const Outstaffing = () => {
|
||||
const onSelectPosition = createSelectPositionHandler({
|
||||
positionId,
|
||||
setPositionId,
|
||||
dispatch,
|
||||
dispatch
|
||||
});
|
||||
return (
|
||||
<>
|
||||
|
@ -13,13 +13,13 @@ const handlePositionClick = ({
|
||||
positionId,
|
||||
isSelected,
|
||||
onSelect,
|
||||
apiRequest,
|
||||
apiRequest
|
||||
}) => {
|
||||
if (isSelected) {
|
||||
apiRequest("/profile", {
|
||||
params: {
|
||||
limit: 1000,
|
||||
},
|
||||
limit: 1000
|
||||
}
|
||||
}).then((profileArr) => {
|
||||
dispatch(profiles(profileArr));
|
||||
dispatch(selectedItems([]));
|
||||
@ -29,8 +29,8 @@ const handlePositionClick = ({
|
||||
apiRequest("/profile", {
|
||||
params: {
|
||||
limit: "1000",
|
||||
position_id: positionId,
|
||||
},
|
||||
position_id: positionId
|
||||
}
|
||||
}).then((res) => {
|
||||
dispatch(profiles(res));
|
||||
dispatch(selectedItems([]));
|
||||
@ -46,7 +46,7 @@ const OutstaffingBlock = ({
|
||||
header,
|
||||
positionId,
|
||||
isSelected,
|
||||
onSelect,
|
||||
onSelect
|
||||
}) => {
|
||||
const dispatch = useDispatch();
|
||||
|
||||
@ -87,7 +87,7 @@ const OutstaffingBlock = ({
|
||||
positionId,
|
||||
isSelected,
|
||||
onSelect,
|
||||
apiRequest,
|
||||
apiRequest
|
||||
})
|
||||
}
|
||||
>
|
||||
|
@ -8,7 +8,7 @@ import { getProfileInfo } from "@redux/outstaffingSlice";
|
||||
import {
|
||||
getRequestDates,
|
||||
setReportDate,
|
||||
setRequestDate,
|
||||
setRequestDate
|
||||
} from "@redux/reportSlice";
|
||||
|
||||
import { urlForLocal } from "@utils/helper";
|
||||
@ -89,7 +89,7 @@ export const ProfileCalendar = () => {
|
||||
<ProfileBreadcrumbs
|
||||
links={[
|
||||
{ name: "Главная", link: "/profile" },
|
||||
{ name: "Отчеты", link: "/profile/calendar" },
|
||||
{ name: "Отчеты", link: "/profile/calendar" }
|
||||
]}
|
||||
/>
|
||||
<h2 className="summary__title">Ваши отчеты</h2>
|
||||
|
@ -7,7 +7,7 @@ import { Link } from "react-router-dom";
|
||||
import {
|
||||
setReportDate,
|
||||
setRequestDate,
|
||||
setSendRequest,
|
||||
setSendRequest
|
||||
} from "@redux/reportSlice";
|
||||
|
||||
import { getCorrectYYMMDD } from "@utils/helper";
|
||||
@ -20,7 +20,7 @@ import {
|
||||
currentMonthAndDay,
|
||||
getCorrectDate,
|
||||
getReports,
|
||||
hourOfNum,
|
||||
hourOfNum
|
||||
} from "@components/Calendar/calendarHelper";
|
||||
import BaseButton from "@components/Common/BaseButton/BaseButton";
|
||||
import ShortReport from "@components/ShortReport/ShortReport";
|
||||
@ -40,7 +40,7 @@ export const ProfileCalendarComponent = React.memo(
|
||||
startRangeDays,
|
||||
toggleRangeDays,
|
||||
startDate,
|
||||
setStartDateRange,
|
||||
setStartDateRange
|
||||
}) => {
|
||||
const dispatch = useDispatch();
|
||||
|
||||
@ -58,7 +58,7 @@ export const ProfileCalendarComponent = React.memo(
|
||||
calendarHelper(value).map((array) => {
|
||||
setSelectedRangeDays((prevState) => ({
|
||||
...prevState,
|
||||
[array[0]]: false,
|
||||
[array[0]]: false
|
||||
}));
|
||||
});
|
||||
if (endDate) {
|
||||
@ -196,7 +196,7 @@ export const ProfileCalendarComponent = React.memo(
|
||||
calendarHelper(value).map((array) => {
|
||||
setSelectedRangeDays((prevState) => ({
|
||||
...prevState,
|
||||
[array[0]]: false,
|
||||
[array[0]]: false
|
||||
}));
|
||||
});
|
||||
}
|
||||
@ -316,15 +316,15 @@ export const ProfileCalendarComponent = React.memo(
|
||||
? `${getCorrectDate(startDate)} - ${getCorrectDate(endDate)}`
|
||||
: `${getCorrectDate(endDate)} - ${getCorrectDate(startDate)}`
|
||||
: activePeriod
|
||||
? "Выберите диапазон на календаре"
|
||||
: "Выбрать диапазон"}
|
||||
? "Выберите диапазон на календаре"
|
||||
: "Выбрать диапазон"}
|
||||
</span>
|
||||
<span>
|
||||
{totalRangeHours
|
||||
? `${totalRangeHours} ${hourOfNum(totalRangeHours)}`
|
||||
: endDate
|
||||
? "0 часов"
|
||||
: ""}
|
||||
? "0 часов"
|
||||
: ""}
|
||||
</span>
|
||||
{endDate && (
|
||||
<BaseButton
|
||||
|
@ -58,14 +58,14 @@ export const ProjectTiket = ({ project, index }) => {
|
||||
method: "PUT",
|
||||
data: {
|
||||
project_id: project.id,
|
||||
status: 10,
|
||||
},
|
||||
status: 10
|
||||
}
|
||||
}).then(() => {
|
||||
dispatch(deleteProject(project));
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Проект успешно была перемещена в архив",
|
||||
type: "archive",
|
||||
type: "archive"
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ import remove from "assets/icons/remove.svg";
|
||||
import {
|
||||
getCorrectDate,
|
||||
getCreatedDate,
|
||||
hourOfNum,
|
||||
hourOfNum
|
||||
} from "../Calendar/calendarHelper";
|
||||
import "./reportForm.scss";
|
||||
|
||||
@ -48,7 +48,7 @@ const ReportForm = () => {
|
||||
const [datePickerOpen, setDatePickerOpen] = useState(false);
|
||||
|
||||
const [inputs, setInputs] = useState([
|
||||
{ task: "", hours_spent: "", minutes_spent: 0 },
|
||||
{ task: "", hours_spent: "", minutes_spent: 0 }
|
||||
]);
|
||||
const [troublesInputValue, setTroublesInputValue] = useState("");
|
||||
const [scheduledInputValue, setScheduledInputValue] = useState("");
|
||||
@ -56,7 +56,7 @@ const ReportForm = () => {
|
||||
const addInput = () => {
|
||||
setInputs((prev) => [
|
||||
...prev,
|
||||
{ task: "", hours_spent: "", minutes_spent: 0 },
|
||||
{ task: "", hours_spent: "", minutes_spent: 0 }
|
||||
]);
|
||||
};
|
||||
|
||||
@ -101,8 +101,8 @@ const ReportForm = () => {
|
||||
difficulties: troublesInputValue,
|
||||
tomorrow: scheduledInputValue,
|
||||
created_at: getCreatedDate(startDate),
|
||||
status: 1,
|
||||
},
|
||||
status: 1
|
||||
}
|
||||
}).then(() => {
|
||||
setReportSuccess("Отчет отправлен");
|
||||
setTimeout(() => {
|
||||
@ -126,7 +126,7 @@ const ReportForm = () => {
|
||||
links={[
|
||||
{ name: "Главная", link: "/profile" },
|
||||
{ name: "Отчеты", link: "/profile/calendar" },
|
||||
{ name: "Добавить отчет", link: "/report" },
|
||||
{ name: "Добавить отчет", link: "/report" }
|
||||
]}
|
||||
/>
|
||||
<h2 className="summary__title">
|
||||
@ -207,7 +207,7 @@ const ReportForm = () => {
|
||||
return index === inputIndex
|
||||
? {
|
||||
...input,
|
||||
task: e.target.value,
|
||||
task: e.target.value
|
||||
}
|
||||
: input;
|
||||
})
|
||||
@ -233,7 +233,7 @@ const ReportForm = () => {
|
||||
return index === inputIndex
|
||||
? {
|
||||
...input,
|
||||
hours_spent: Number(e.target.value),
|
||||
hours_spent: Number(e.target.value)
|
||||
}
|
||||
: input;
|
||||
})
|
||||
|
@ -7,7 +7,7 @@ import {
|
||||
selectItems,
|
||||
selectTags,
|
||||
selectedItems,
|
||||
setPositionId,
|
||||
setPositionId
|
||||
} from "@redux/outstaffingSlice";
|
||||
|
||||
import { apiRequest } from "@api/request";
|
||||
@ -31,7 +31,7 @@ const TagSelect = () => {
|
||||
const params = filterItemsId ? { skill: filterItemsId } : "";
|
||||
|
||||
apiRequest("/profile", {
|
||||
params: { ...params, limit: 1000 },
|
||||
params: { ...params, limit: 1000 }
|
||||
}).then((res) => {
|
||||
dispatch(profiles(res));
|
||||
setSearchLoading(false);
|
||||
@ -58,7 +58,7 @@ const TagSelect = () => {
|
||||
return {
|
||||
id: item.id,
|
||||
value: item.value,
|
||||
label: item.value,
|
||||
label: item.value
|
||||
};
|
||||
})
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ import { Link } from "react-router-dom";
|
||||
import {
|
||||
getReportDate,
|
||||
getSendRequest,
|
||||
setSendRequest,
|
||||
setSendRequest
|
||||
} from "@redux/reportSlice";
|
||||
|
||||
import { apiRequest } from "@api/request";
|
||||
@ -13,7 +13,7 @@ import { apiRequest } from "@api/request";
|
||||
import {
|
||||
getCorrectDate,
|
||||
getCreatedDate,
|
||||
hourOfNum,
|
||||
hourOfNum
|
||||
} from "@components/Calendar/calendarHelper";
|
||||
import { Loader } from "@components/Common/Loader/Loader";
|
||||
|
||||
@ -56,7 +56,7 @@ export const ShortReport = () => {
|
||||
const taskInfo = {
|
||||
hours: task.hours_spent,
|
||||
task: task.task,
|
||||
id: task.id,
|
||||
id: task.id
|
||||
};
|
||||
if (task.hours_spent) {
|
||||
spendTime += Number(task.hours_spent);
|
||||
|
@ -18,24 +18,24 @@ export const SliderWorkers = ({ title, titleInfo, subTitle }) => {
|
||||
const [workers] = useState([
|
||||
{
|
||||
avatar: mockWorker,
|
||||
skils: "React / Vue Front end, Middle разработчик",
|
||||
skils: "React / Vue Front end, Middle разработчик"
|
||||
},
|
||||
{
|
||||
avatar: avatarMockFirst,
|
||||
skils: "Vue / React Front end, Senior разработчик",
|
||||
skils: "Vue / React Front end, Senior разработчик"
|
||||
},
|
||||
{
|
||||
avatar: avatarMockSecond,
|
||||
skils: "NodeJs Fullstack, Middle разработчик",
|
||||
skils: "NodeJs Fullstack, Middle разработчик"
|
||||
},
|
||||
{
|
||||
avatar: avatarMockThird,
|
||||
skils: "React / Vue Front end, Middle разработчик",
|
||||
skils: "React / Vue Front end, Middle разработчик"
|
||||
},
|
||||
{
|
||||
avatar: avatarMockFourth,
|
||||
skils: "React / PHP Fullstack, Middle разработчик",
|
||||
},
|
||||
skils: "React / PHP Fullstack, Middle разработчик"
|
||||
}
|
||||
]);
|
||||
|
||||
const settings = {
|
||||
@ -44,7 +44,7 @@ export const SliderWorkers = ({ title, titleInfo, subTitle }) => {
|
||||
slidesToShow: 3,
|
||||
slidesToScroll: 1,
|
||||
autoplay: true,
|
||||
autoplaySpeed: 4500,
|
||||
autoplaySpeed: 4500
|
||||
};
|
||||
|
||||
if (window.innerWidth < 575) {
|
||||
|
@ -6,7 +6,7 @@ const StarRating = ({
|
||||
countStars = 1,
|
||||
countActiveStars = 1,
|
||||
color = "#52B709",
|
||||
size = 61,
|
||||
size = 61
|
||||
}) => {
|
||||
const [shadedStars, setShadedStars] = useState([]);
|
||||
const [noShadedStars, setNoShadedStars] = useState([]);
|
||||
@ -22,16 +22,16 @@ const StarRating = ({
|
||||
}, []);
|
||||
|
||||
const ratingStyle = {
|
||||
"--size": size + "px",
|
||||
"--size": size + "px"
|
||||
};
|
||||
const activeStyle = {
|
||||
"--width": percent + "%",
|
||||
"--color": color,
|
||||
"--content": shadedStars.join(""),
|
||||
"--content": shadedStars.join("")
|
||||
};
|
||||
const bodyStyle = {
|
||||
"--content": noShadedStars.join(""),
|
||||
"--color": color,
|
||||
"--color": color
|
||||
};
|
||||
|
||||
return (
|
||||
|
@ -27,7 +27,7 @@ export const TrackerSelectColumn = ({ columns, task, currentColumn }) => {
|
||||
dispatch(
|
||||
moveProjectTask({
|
||||
startWrapperIndex: { index: currentColumn.id, task },
|
||||
columnId: column.id,
|
||||
columnId: column.id
|
||||
})
|
||||
);
|
||||
}}
|
||||
|
@ -19,7 +19,7 @@ export const TrackerTaskComment = ({
|
||||
comment,
|
||||
commentDelete,
|
||||
addSubComment,
|
||||
subCommentDelete,
|
||||
subCommentDelete
|
||||
}) => {
|
||||
const [commentsEditOpen, setCommentsEditOpen] = useState(false);
|
||||
const [commentsEditText, setCommentsEditText] = useState(comment.text);
|
||||
@ -32,8 +32,8 @@ export const TrackerTaskComment = ({
|
||||
method: "PUT",
|
||||
data: {
|
||||
comment_id: comment.id,
|
||||
text: commentsEditText,
|
||||
},
|
||||
text: commentsEditText
|
||||
}
|
||||
}).then(() => {});
|
||||
}
|
||||
|
||||
@ -42,8 +42,8 @@ export const TrackerTaskComment = ({
|
||||
method: "PUT",
|
||||
data: {
|
||||
comment_id: comment.id,
|
||||
status: 0,
|
||||
},
|
||||
status: 0
|
||||
}
|
||||
}).then(() => {
|
||||
if (comment.parent_id) {
|
||||
subCommentDelete(comment);
|
||||
@ -62,8 +62,8 @@ export const TrackerTaskComment = ({
|
||||
text: subCommentsCreateText,
|
||||
entity_type: 2,
|
||||
entity_id: taskId,
|
||||
parent_id: comment.id,
|
||||
},
|
||||
parent_id: comment.id
|
||||
}
|
||||
}).then((res) => {
|
||||
let newSubComment = res;
|
||||
newSubComment.created_at = new Date();
|
||||
@ -80,7 +80,7 @@ export const TrackerTaskComment = ({
|
||||
: "",
|
||||
"comments__list__item",
|
||||
commentsEditOpen ? "comment__edit--open" : "",
|
||||
comment.parent_id ? "comments__list__item__subComment" : "",
|
||||
comment.parent_id ? "comments__list__item__subComment" : ""
|
||||
].join(" ")}
|
||||
>
|
||||
<div className="comments__list__item__info">
|
||||
@ -131,8 +131,8 @@ export const TrackerTaskComment = ({
|
||||
"ImageToolbar",
|
||||
"ImageUpload",
|
||||
"MediaEmbed",
|
||||
"BlockQuote",
|
||||
],
|
||||
"BlockQuote"
|
||||
]
|
||||
}}
|
||||
onChange={(event, editor) => {
|
||||
const data = editor.getData();
|
||||
|
@ -16,7 +16,7 @@ export const Instruction = () => {
|
||||
|
||||
useEffect(() => {
|
||||
apiRequest("/user-questionnaire/get-question-number", {
|
||||
params: { user_questionnaire_uuid: test.uuid },
|
||||
params: { user_questionnaire_uuid: test.uuid }
|
||||
}).then((res) => setCountQuestions(res.question_number));
|
||||
}, []);
|
||||
|
||||
|
@ -28,7 +28,7 @@ export const QuizPassingInformation = ({ setStartTest, uuid, timer }) => {
|
||||
showNotification({
|
||||
show: true,
|
||||
text: res?.message || "",
|
||||
type: "error",
|
||||
type: "error"
|
||||
});
|
||||
return;
|
||||
}
|
||||
@ -54,7 +54,7 @@ export const QuizPassingInformation = ({ setStartTest, uuid, timer }) => {
|
||||
|
||||
const completeTest = () =>
|
||||
apiRequest("/user-questionnaire/questionnaire-completed", {
|
||||
method: "POST",
|
||||
method: "POST"
|
||||
});
|
||||
|
||||
const finishQuiz = async () => {
|
||||
|
@ -29,7 +29,7 @@ export const TaskQuiz = ({ timer }) => {
|
||||
|
||||
const { userResponses, handleChange } = useHandlerFieldTest({
|
||||
questions,
|
||||
indexQuestion: index,
|
||||
indexQuestion: index
|
||||
});
|
||||
|
||||
const nextQuestion = async (e) => {
|
||||
@ -50,13 +50,13 @@ export const TaskQuiz = ({ timer }) => {
|
||||
data: {
|
||||
user_id: userId,
|
||||
user_questionnaire_uuid: uuid,
|
||||
userResponses: JSON.stringify(userResponses),
|
||||
},
|
||||
userResponses: JSON.stringify(userResponses)
|
||||
}
|
||||
}).then(() => {
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Тест успешно пройден",
|
||||
type: "success",
|
||||
type: "success"
|
||||
});
|
||||
navigate("/quiz");
|
||||
// if (String(res?.status)[0] !== "2") {
|
||||
|
Reference in New Issue
Block a user