summary-skills #1
910
package-lock.json
generated
910
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -19,7 +19,7 @@ export const apiRequest = (
|
|||||||
"Access-Control-Allow-Origin": "*",
|
"Access-Control-Allow-Origin": "*",
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
},
|
},
|
||||||
} = {},
|
} = {}
|
||||||
) => {
|
) => {
|
||||||
const fullHeaders = { ...headers, ...getToken() };
|
const fullHeaders = { ...headers, ...getToken() };
|
||||||
let urWithParams = urlHasParams(url);
|
let urWithParams = urlHasParams(url);
|
||||||
@ -41,7 +41,7 @@ export const apiRequest = (
|
|||||||
// dispatch(auth(false));
|
// dispatch(auth(false));
|
||||||
}
|
}
|
||||||
return resolve(response);
|
return resolve(response);
|
||||||
}),
|
})
|
||||||
)
|
)
|
||||||
.then((response) => new Promise((resolve) => resolve(response.data)));
|
.then((response) => new Promise((resolve) => resolve(response.data)));
|
||||||
};
|
};
|
||||||
|
@ -63,7 +63,7 @@ export const AuthBox = ({ title }) => {
|
|||||||
localStorage.setItem("role_status", res.status);
|
localStorage.setItem("role_status", res.status);
|
||||||
localStorage.setItem(
|
localStorage.setItem(
|
||||||
"access_token_expired_at",
|
"access_token_expired_at",
|
||||||
res.access_token_expired_at,
|
res.access_token_expired_at
|
||||||
);
|
);
|
||||||
dispatch(auth(true));
|
dispatch(auth(true));
|
||||||
dispatch(setUserInfo(res));
|
dispatch(setUserInfo(res));
|
||||||
|
@ -89,7 +89,7 @@ const CalendarComponent = ({ onSelect }) => {
|
|||||||
<img className={"calendar__icon"} src={calendarIcon} alt="" />
|
<img className={"calendar__icon"} src={calendarIcon} alt="" />
|
||||||
{currentMonthAndDay(day)}
|
{currentMonthAndDay(day)}
|
||||||
</button>
|
</button>
|
||||||
)),
|
))
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -17,7 +17,7 @@ export function calendarHelper(value) {
|
|||||||
calendar.push(
|
calendar.push(
|
||||||
Array(1)
|
Array(1)
|
||||||
.fill(0)
|
.fill(0)
|
||||||
.map(() => day.add(1, "day").clone()),
|
.map(() => day.add(1, "day").clone())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ export function getReports(value) {
|
|||||||
export function getCreatedDate(day) {
|
export function getCreatedDate(day) {
|
||||||
if (day) {
|
if (day) {
|
||||||
return `${new Date(day).getFullYear()}-${correctDay(
|
return `${new Date(day).getFullYear()}-${correctDay(
|
||||||
new Date(day).getMonth() + 1,
|
new Date(day).getMonth() + 1
|
||||||
)}-${correctDay(new Date(day).getDate())}`;
|
)}-${correctDay(new Date(day).getDate())}`;
|
||||||
} else {
|
} else {
|
||||||
const date = new Date();
|
const date = new Date();
|
||||||
|
@ -48,7 +48,7 @@ const Candidate = () => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
apiRequest(`/user/me`, {}).then((el) =>
|
apiRequest(`/user/me`, {}).then((el) =>
|
||||||
dispatch(currentCandidate(el.userCard)),
|
dispatch(currentCandidate(el.userCard))
|
||||||
);
|
);
|
||||||
}, [dispatch]);
|
}, [dispatch]);
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ export const ModalTiсket = ({
|
|||||||
const [deadLine, setDeadLine] = useState(task.dead_line);
|
const [deadLine, setDeadLine] = useState(task.dead_line);
|
||||||
const [datePickerOpen, setDatePickerOpen] = useState(false);
|
const [datePickerOpen, setDatePickerOpen] = useState(false);
|
||||||
const [startDate, setStartDate] = useState(
|
const [startDate, setStartDate] = useState(
|
||||||
task.dead_line ? new Date(task.dead_line) : new Date(),
|
task.dead_line ? new Date(task.dead_line) : new Date()
|
||||||
);
|
);
|
||||||
const [dropListOpen, setDropListOpen] = useState(false);
|
const [dropListOpen, setDropListOpen] = useState(false);
|
||||||
const [dropListMembersOpen, setDropListMembersOpen] = useState(false);
|
const [dropListMembersOpen, setDropListMembersOpen] = useState(false);
|
||||||
@ -190,7 +190,7 @@ export const ModalTiсket = ({
|
|||||||
|
|
||||||
function commentDelete(comment) {
|
function commentDelete(comment) {
|
||||||
setComments((prevValue) =>
|
setComments((prevValue) =>
|
||||||
prevValue.filter((item) => item.id !== comment.id),
|
prevValue.filter((item) => item.id !== comment.id)
|
||||||
);
|
);
|
||||||
if (comment.subComments.length) {
|
if (comment.subComments.length) {
|
||||||
// promiseAll
|
// promiseAll
|
||||||
@ -221,7 +221,7 @@ export const ModalTiсket = ({
|
|||||||
deleteSubComment.forEach((comment, index) => {
|
deleteSubComment.forEach((comment, index) => {
|
||||||
if (comment.id === subComment.parent_id) {
|
if (comment.id === subComment.parent_id) {
|
||||||
deleteSubComment[index].subComments = comment.subComments.filter(
|
deleteSubComment[index].subComments = comment.subComments.filter(
|
||||||
(item) => item.id !== subComment.id,
|
(item) => item.id !== subComment.id
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -328,7 +328,7 @@ export const ModalTiсket = ({
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
initListeners();
|
initListeners();
|
||||||
apiRequest(
|
apiRequest(
|
||||||
`/comment/get-by-entity?entity_type=2&entity_id=${task.id}`,
|
`/comment/get-by-entity?entity_type=2&entity_id=${task.id}`
|
||||||
).then((res) => {
|
).then((res) => {
|
||||||
const comments = res.reduce((acc, cur) => {
|
const comments = res.reduce((acc, cur) => {
|
||||||
if (!cur.parent_id) {
|
if (!cur.parent_id) {
|
||||||
@ -362,7 +362,7 @@ export const ModalTiсket = ({
|
|||||||
setTimerInfo(time);
|
setTimerInfo(time);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
apiRequest(`/file/get-by-entity?entity_type=2&entity_id=${task.id}`).then(
|
apiRequest(`/file/get-by-entity?entity_type=2&entity_id=${task.id}`).then(
|
||||||
@ -370,15 +370,15 @@ export const ModalTiсket = ({
|
|||||||
if (Array.isArray(res)) {
|
if (Array.isArray(res)) {
|
||||||
setTaskFiles(res);
|
setTaskFiles(res);
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
if (
|
if (
|
||||||
localStorage.getItem("role_status") !== "18" &&
|
localStorage.getItem("role_status") !== "18" &&
|
||||||
Boolean(
|
Boolean(
|
||||||
!correctProjectUsers.find(
|
!correctProjectUsers.find(
|
||||||
(item) => item.user_id === profileInfo.id_user,
|
(item) => item.user_id === profileInfo.id_user
|
||||||
),
|
)
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
setCorrectProjectUsers((prevState) => [
|
setCorrectProjectUsers((prevState) => [
|
||||||
@ -400,7 +400,7 @@ export const ModalTiсket = ({
|
|||||||
projectMarks.reduce((acc, cur) => {
|
projectMarks.reduce((acc, cur) => {
|
||||||
if (!tagIds.includes(cur.id)) acc.push(cur);
|
if (!tagIds.includes(cur.id)) acc.push(cur);
|
||||||
return acc;
|
return acc;
|
||||||
}, []),
|
}, [])
|
||||||
);
|
);
|
||||||
}, [taskTags]);
|
}, [taskTags]);
|
||||||
|
|
||||||
@ -440,7 +440,7 @@ export const ModalTiсket = ({
|
|||||||
|
|
||||||
function deleteFile(file) {
|
function deleteFile(file) {
|
||||||
setTaskFiles((prevValue) =>
|
setTaskFiles((prevValue) =>
|
||||||
prevValue.filter((item) => item.id !== file.id),
|
prevValue.filter((item) => item.id !== file.id)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -448,7 +448,7 @@ export const ModalTiсket = ({
|
|||||||
setTimerId(
|
setTimerId(
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
run();
|
run();
|
||||||
}, 1000),
|
}, 1000)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -485,13 +485,13 @@ export const ModalTiсket = ({
|
|||||||
projectUsers.reduce((acc, cur) => {
|
projectUsers.reduce((acc, cur) => {
|
||||||
if (!ids.includes(cur.user_id)) acc.push(cur);
|
if (!ids.includes(cur.user_id)) acc.push(cur);
|
||||||
return acc;
|
return acc;
|
||||||
}, []),
|
}, [])
|
||||||
);
|
);
|
||||||
}, [members]);
|
}, [members]);
|
||||||
|
|
||||||
function copyTicketLink() {
|
function copyTicketLink() {
|
||||||
navigator.clipboard.writeText(
|
navigator.clipboard.writeText(
|
||||||
`https://itguild.info/tracker/task/${task.id}`,
|
`https://itguild.info/tracker/task/${task.id}`
|
||||||
);
|
);
|
||||||
showNotification({
|
showNotification({
|
||||||
show: true,
|
show: true,
|
||||||
@ -558,7 +558,7 @@ export const ModalTiсket = ({
|
|||||||
(div) =>
|
(div) =>
|
||||||
div.classList &&
|
div.classList &&
|
||||||
(div.classList.contains("button-add-worker") ||
|
(div.classList.contains("button-add-worker") ||
|
||||||
div.classList.contains("dropdownList")),
|
div.classList.contains("dropdownList"))
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
setDropListOpen(false);
|
setDropListOpen(false);
|
||||||
@ -571,7 +571,7 @@ export const ModalTiсket = ({
|
|||||||
(div) =>
|
(div) =>
|
||||||
div.classList &&
|
div.classList &&
|
||||||
(div.classList.contains("deadLine") ||
|
(div.classList.contains("deadLine") ||
|
||||||
div.classList.contains("react-datepicker-popper")),
|
div.classList.contains("react-datepicker-popper"))
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
setDatePickerOpen(false);
|
setDatePickerOpen(false);
|
||||||
@ -583,7 +583,7 @@ export const ModalTiсket = ({
|
|||||||
(div) =>
|
(div) =>
|
||||||
div.classList &&
|
div.classList &&
|
||||||
(div.classList.contains("tags") ||
|
(div.classList.contains("tags") ||
|
||||||
div.classList.contains("tags__dropDown")),
|
div.classList.contains("tags__dropDown"))
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
setSelectTagsOpen(false);
|
setSelectTagsOpen(false);
|
||||||
|
@ -128,7 +128,7 @@ export const TicketFullScreen = () => {
|
|||||||
setDeadLine(taskInfo.dead_line);
|
setDeadLine(taskInfo.dead_line);
|
||||||
setTaskPriority(taskInfo.execution_priority);
|
setTaskPriority(taskInfo.execution_priority);
|
||||||
setStartDate(
|
setStartDate(
|
||||||
taskInfo.dead_line ? new Date(taskInfo.dead_line) : new Date(),
|
taskInfo.dead_line ? new Date(taskInfo.dead_line) : new Date()
|
||||||
);
|
);
|
||||||
setInputsValue({
|
setInputsValue({
|
||||||
title: taskInfo.title,
|
title: taskInfo.title,
|
||||||
@ -137,7 +137,7 @@ export const TicketFullScreen = () => {
|
|||||||
});
|
});
|
||||||
setTaskTags(taskInfo.mark);
|
setTaskTags(taskInfo.mark);
|
||||||
apiRequest(
|
apiRequest(
|
||||||
`/comment/get-by-entity?entity_type=2&entity_id=${taskInfo.id}`,
|
`/comment/get-by-entity?entity_type=2&entity_id=${taskInfo.id}`
|
||||||
).then((res) => {
|
).then((res) => {
|
||||||
const comments = res.reduce((acc, cur) => {
|
const comments = res.reduce((acc, cur) => {
|
||||||
if (!cur.parent_id) {
|
if (!cur.parent_id) {
|
||||||
@ -152,14 +152,14 @@ export const TicketFullScreen = () => {
|
|||||||
setComments(comments);
|
setComments(comments);
|
||||||
});
|
});
|
||||||
apiRequest(
|
apiRequest(
|
||||||
`/file/get-by-entity?entity_type=2&entity_id=${taskInfo.id}`,
|
`/file/get-by-entity?entity_type=2&entity_id=${taskInfo.id}`
|
||||||
).then((res) => {
|
).then((res) => {
|
||||||
if (Array.isArray(res)) {
|
if (Array.isArray(res)) {
|
||||||
setTaskFiles(res);
|
setTaskFiles(res);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
apiRequest(
|
apiRequest(
|
||||||
`/timer/get-by-entity?entity_type=2&entity_id=${taskInfo.id}`,
|
`/timer/get-by-entity?entity_type=2&entity_id=${taskInfo.id}`
|
||||||
).then((res) => {
|
).then((res) => {
|
||||||
let timerSeconds = 0;
|
let timerSeconds = 0;
|
||||||
res.length &&
|
res.length &&
|
||||||
@ -181,13 +181,13 @@ export const TicketFullScreen = () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
apiRequest(
|
apiRequest(
|
||||||
`/project/get-project?project_id=${taskInfo.project_id}&expand=columns,mark`,
|
`/project/get-project?project_id=${taskInfo.project_id}&expand=columns,mark`
|
||||||
).then((res) => {
|
).then((res) => {
|
||||||
setProjectInfo(res);
|
setProjectInfo(res);
|
||||||
setCorrectProjectUsers(res.projectUsers);
|
setCorrectProjectUsers(res.projectUsers);
|
||||||
});
|
});
|
||||||
setLoader(boardLoader);
|
setLoader(boardLoader);
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
@ -198,7 +198,7 @@ export const TicketFullScreen = () => {
|
|||||||
projectInfo.mark.reduce((acc, cur) => {
|
projectInfo.mark.reduce((acc, cur) => {
|
||||||
if (!tagIds.includes(cur.id)) acc.push(cur);
|
if (!tagIds.includes(cur.id)) acc.push(cur);
|
||||||
return acc;
|
return acc;
|
||||||
}, []),
|
}, [])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}, [taskTags, projectInfo]);
|
}, [taskTags, projectInfo]);
|
||||||
@ -306,7 +306,7 @@ export const TicketFullScreen = () => {
|
|||||||
|
|
||||||
function commentDelete(comment) {
|
function commentDelete(comment) {
|
||||||
setComments((prevValue) =>
|
setComments((prevValue) =>
|
||||||
prevValue.filter((item) => item.id !== comment.id),
|
prevValue.filter((item) => item.id !== comment.id)
|
||||||
);
|
);
|
||||||
if (comment.subComments.length) {
|
if (comment.subComments.length) {
|
||||||
comment.subComments.forEach((subComment) => {
|
comment.subComments.forEach((subComment) => {
|
||||||
@ -336,7 +336,7 @@ export const TicketFullScreen = () => {
|
|||||||
deleteSubComment.forEach((comment, index) => {
|
deleteSubComment.forEach((comment, index) => {
|
||||||
if (comment.id === subComment.parent_id) {
|
if (comment.id === subComment.parent_id) {
|
||||||
deleteSubComment[index].subComments = comment.subComments.filter(
|
deleteSubComment[index].subComments = comment.subComments.filter(
|
||||||
(item) => item.id !== subComment.id,
|
(item) => item.id !== subComment.id
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -349,7 +349,7 @@ export const TicketFullScreen = () => {
|
|||||||
|
|
||||||
function copyTicketLink() {
|
function copyTicketLink() {
|
||||||
navigator.clipboard.writeText(
|
navigator.clipboard.writeText(
|
||||||
`https://itguild.info/tracker/task/${taskInfo.id}`,
|
`https://itguild.info/tracker/task/${taskInfo.id}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -357,7 +357,7 @@ export const TicketFullScreen = () => {
|
|||||||
setTimerId(
|
setTimerId(
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
run();
|
run();
|
||||||
}, 1000),
|
}, 1000)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -368,7 +368,7 @@ export const TicketFullScreen = () => {
|
|||||||
projectInfo.projectUsers.reduce((acc, cur) => {
|
projectInfo.projectUsers.reduce((acc, cur) => {
|
||||||
if (!ids.includes(cur.user_id)) acc.push(cur);
|
if (!ids.includes(cur.user_id)) acc.push(cur);
|
||||||
return acc;
|
return acc;
|
||||||
}, []),
|
}, [])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}, [taskInfo.taskUsers, projectInfo]);
|
}, [taskInfo.taskUsers, projectInfo]);
|
||||||
@ -444,7 +444,7 @@ export const TicketFullScreen = () => {
|
|||||||
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
|
||||||
),
|
),
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
@ -538,7 +538,7 @@ export const TicketFullScreen = () => {
|
|||||||
|
|
||||||
function deleteFile(file) {
|
function deleteFile(file) {
|
||||||
setTaskFiles((prevValue) =>
|
setTaskFiles((prevValue) =>
|
||||||
prevValue.filter((item) => item.id !== file.id),
|
prevValue.filter((item) => item.id !== file.id)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -586,7 +586,7 @@ export const TicketFullScreen = () => {
|
|||||||
(div) =>
|
(div) =>
|
||||||
div.classList &&
|
div.classList &&
|
||||||
(div.classList.contains("button-add-worker") ||
|
(div.classList.contains("button-add-worker") ||
|
||||||
div.classList.contains("dropdownList")),
|
div.classList.contains("dropdownList"))
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
setDropListOpen(false);
|
setDropListOpen(false);
|
||||||
@ -599,7 +599,7 @@ export const TicketFullScreen = () => {
|
|||||||
(div) =>
|
(div) =>
|
||||||
div.classList &&
|
div.classList &&
|
||||||
(div.classList.contains("deadLine") ||
|
(div.classList.contains("deadLine") ||
|
||||||
div.classList.contains("react-datepicker-popper")),
|
div.classList.contains("react-datepicker-popper"))
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
setDatePickerOpen(false);
|
setDatePickerOpen(false);
|
||||||
@ -611,7 +611,7 @@ export const TicketFullScreen = () => {
|
|||||||
(div) =>
|
(div) =>
|
||||||
div.classList &&
|
div.classList &&
|
||||||
(div.classList.contains("tags") ||
|
(div.classList.contains("tags") ||
|
||||||
div.classList.contains("tags__dropDown")),
|
div.classList.contains("tags__dropDown"))
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
setSelectTagsOpen(false);
|
setSelectTagsOpen(false);
|
||||||
@ -623,7 +623,7 @@ export const TicketFullScreen = () => {
|
|||||||
(div) =>
|
(div) =>
|
||||||
div.classList &&
|
div.classList &&
|
||||||
(div.classList.contains("addPerson") ||
|
(div.classList.contains("addPerson") ||
|
||||||
div.classList.contains("persons__list")),
|
div.classList.contains("persons__list"))
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
setPersonListOpen(false);
|
setPersonListOpen(false);
|
||||||
|
@ -71,10 +71,10 @@ export const TrackerModal = ({
|
|||||||
const [selectWorkersOpen, setSelectWorkersOpen] = useState(false);
|
const [selectWorkersOpen, setSelectWorkersOpen] = useState(false);
|
||||||
const [selectedWorker, setSelectedWorker] = useState(null);
|
const [selectedWorker, setSelectedWorker] = useState(null);
|
||||||
const [selectColumnPriority, setSelectColumnPriority] = useState(
|
const [selectColumnPriority, setSelectColumnPriority] = useState(
|
||||||
"Выберите приоритет колонки",
|
"Выберите приоритет колонки"
|
||||||
);
|
);
|
||||||
const [selectedExecutorTask, setSelectedExecutorTask] = useState(
|
const [selectedExecutorTask, setSelectedExecutorTask] = useState(
|
||||||
"Выберите исполнителя задачи",
|
"Выберите исполнителя задачи"
|
||||||
);
|
);
|
||||||
const [selectExecutorTaskOpen, setSelectExecutorTaskOpen] = useState(false);
|
const [selectExecutorTaskOpen, setSelectExecutorTaskOpen] = useState(false);
|
||||||
const [correctProjectUsers, setCorrectProjectUsers] = useState([]);
|
const [correctProjectUsers, setCorrectProjectUsers] = useState([]);
|
||||||
@ -316,7 +316,7 @@ export const TrackerModal = ({
|
|||||||
persons.reduce((acc, cur) => {
|
persons.reduce((acc, cur) => {
|
||||||
if (!ids.includes(cur.user_id)) acc.push(cur);
|
if (!ids.includes(cur.user_id)) acc.push(cur);
|
||||||
return acc;
|
return acc;
|
||||||
}, []),
|
}, [])
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
: "";
|
: "";
|
||||||
@ -324,7 +324,7 @@ export const TrackerModal = ({
|
|||||||
localStorage.getItem("role_status") !== "18" &&
|
localStorage.getItem("role_status") !== "18" &&
|
||||||
projectUsers &&
|
projectUsers &&
|
||||||
Boolean(
|
Boolean(
|
||||||
!projectUsers.find((item) => item.user_id === profileInfo.id_user),
|
!projectUsers.find((item) => item.user_id === profileInfo.id_user)
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
setCorrectProjectUsers([
|
setCorrectProjectUsers([
|
||||||
@ -350,7 +350,7 @@ export const TrackerModal = ({
|
|||||||
projectMarks.reduce((acc, cur) => {
|
projectMarks.reduce((acc, cur) => {
|
||||||
if (!tagIds.includes(cur.id)) acc.push(cur);
|
if (!tagIds.includes(cur.id)) acc.push(cur);
|
||||||
return acc;
|
return acc;
|
||||||
}, []),
|
}, [])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}, [taskTags, projectMarks]);
|
}, [taskTags, projectMarks]);
|
||||||
@ -368,7 +368,7 @@ export const TrackerModal = ({
|
|||||||
(div) =>
|
(div) =>
|
||||||
div.classList &&
|
div.classList &&
|
||||||
(div.classList.contains("tags__selected__name") ||
|
(div.classList.contains("tags__selected__name") ||
|
||||||
div.classList.contains("tags__dropDown")),
|
div.classList.contains("tags__dropDown"))
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
setSelectTagsOpen(false);
|
setSelectTagsOpen(false);
|
||||||
@ -380,7 +380,7 @@ export const TrackerModal = ({
|
|||||||
(div) =>
|
(div) =>
|
||||||
div.classList &&
|
div.classList &&
|
||||||
(div.classList.contains("select__executor") ||
|
(div.classList.contains("select__executor") ||
|
||||||
div.classList.contains("select__executor__dropDown")),
|
div.classList.contains("select__executor__dropDown"))
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
setSelectExecutorTaskOpen(false);
|
setSelectExecutorTaskOpen(false);
|
||||||
@ -555,8 +555,8 @@ export const TrackerModal = ({
|
|||||||
onClick={() =>
|
onClick={() =>
|
||||||
setTaskTags((prevState) =>
|
setTaskTags((prevState) =>
|
||||||
prevState.filter(
|
prevState.filter(
|
||||||
(prevTag) => prevTag.id !== tag.id,
|
(prevTag) => prevTag.id !== tag.id
|
||||||
),
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
@ -15,7 +15,7 @@ export const Navigation = () => {
|
|||||||
|
|
||||||
const profileInfo = useSelector(getProfileInfo);
|
const profileInfo = useSelector(getProfileInfo);
|
||||||
const [user] = useState(
|
const [user] = useState(
|
||||||
localStorage.getItem("role_status") === "18" ? "partner" : "developer",
|
localStorage.getItem("role_status") === "18" ? "partner" : "developer"
|
||||||
);
|
);
|
||||||
|
|
||||||
const [navInfo] = useState({
|
const [navInfo] = useState({
|
||||||
@ -79,9 +79,9 @@ export const Navigation = () => {
|
|||||||
apiRequest(`/user/me`).then((profileInfo) =>
|
apiRequest(`/user/me`).then((profileInfo) =>
|
||||||
dispatch(
|
dispatch(
|
||||||
setProfileInfo(
|
setProfileInfo(
|
||||||
profileInfo.userCard ? profileInfo.userCard : profileInfo,
|
profileInfo.userCard ? profileInfo.userCard : profileInfo
|
||||||
),
|
)
|
||||||
),
|
)
|
||||||
);
|
);
|
||||||
}, [dispatch]);
|
}, [dispatch]);
|
||||||
|
|
||||||
|
@ -64,8 +64,8 @@ export const ProfileCalendar = () => {
|
|||||||
}
|
}
|
||||||
apiRequest(
|
apiRequest(
|
||||||
`/reports/reports-by-date?${requestDates}&user_card_id=${localStorage.getItem(
|
`/reports/reports-by-date?${requestDates}&user_card_id=${localStorage.getItem(
|
||||||
"cardId",
|
"cardId"
|
||||||
)}`,
|
)}`
|
||||||
).then((reports) => {
|
).then((reports) => {
|
||||||
let spendTime = 0;
|
let spendTime = 0;
|
||||||
for (const report of reports) {
|
for (const report of reports) {
|
||||||
|
@ -86,7 +86,7 @@ export const ProfileCalendarComponent = React.memo(
|
|||||||
for (const date of reports) {
|
for (const date of reports) {
|
||||||
if (
|
if (
|
||||||
`${new Date(day).getFullYear()}-${correctDay(
|
`${new Date(day).getFullYear()}-${correctDay(
|
||||||
new Date(day).getMonth() + 1,
|
new Date(day).getMonth() + 1
|
||||||
)}-${correctDay(new Date(day).getDate())}` === date.created_at
|
)}-${correctDay(new Date(day).getDate())}` === date.created_at
|
||||||
) {
|
) {
|
||||||
return `before`;
|
return `before`;
|
||||||
@ -101,7 +101,7 @@ export const ProfileCalendarComponent = React.memo(
|
|||||||
for (const date of reports) {
|
for (const date of reports) {
|
||||||
if (
|
if (
|
||||||
`${new Date(day).getFullYear()}-${correctDay(
|
`${new Date(day).getFullYear()}-${correctDay(
|
||||||
new Date(day).getMonth() + 1,
|
new Date(day).getMonth() + 1
|
||||||
)}-${correctDay(new Date(day).getDate())}` === date.created_at
|
)}-${correctDay(new Date(day).getDate())}` === date.created_at
|
||||||
) {
|
) {
|
||||||
return "#";
|
return "#";
|
||||||
@ -122,15 +122,15 @@ export const ProfileCalendarComponent = React.memo(
|
|||||||
const requestDates =
|
const requestDates =
|
||||||
startDate < endDay
|
startDate < endDay
|
||||||
? `fromDate=${getCorrectYYMMDD(
|
? `fromDate=${getCorrectYYMMDD(
|
||||||
startDate._d,
|
startDate._d
|
||||||
)}&toDate=${getCorrectYYMMDD(endDay._d)}`
|
)}&toDate=${getCorrectYYMMDD(endDay._d)}`
|
||||||
: `fromDate=${getCorrectYYMMDD(endDay._d)}&toDate=${getCorrectYYMMDD(
|
: `fromDate=${getCorrectYYMMDD(endDay._d)}&toDate=${getCorrectYYMMDD(
|
||||||
startDate._d,
|
startDate._d
|
||||||
)}`;
|
)}`;
|
||||||
apiRequest(
|
apiRequest(
|
||||||
`/reports/reports-by-date?${requestDates}&user_card_id=${localStorage.getItem(
|
`/reports/reports-by-date?${requestDates}&user_card_id=${localStorage.getItem(
|
||||||
"cardId",
|
"cardId"
|
||||||
)}`,
|
)}`
|
||||||
).then((reports) => {
|
).then((reports) => {
|
||||||
let spendTime = 0;
|
let spendTime = 0;
|
||||||
for (const report of reports) {
|
for (const report of reports) {
|
||||||
@ -298,7 +298,7 @@ export const ProfileCalendarComponent = React.memo(
|
|||||||
{currentMonthAndDay(day)}
|
{currentMonthAndDay(day)}
|
||||||
</Link>
|
</Link>
|
||||||
</button>
|
</button>
|
||||||
)),
|
))
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -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
|
||||||
@ -342,5 +342,5 @@ export const ProfileCalendarComponent = React.memo(
|
|||||||
{shortReport && <ShortReport />}
|
{shortReport && <ShortReport />}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
|
@ -15,7 +15,7 @@ export const ProfileHeader = () => {
|
|||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const profileInfo = useSelector(getProfileInfo);
|
const profileInfo = useSelector(getProfileInfo);
|
||||||
const [user] = useState(
|
const [user] = useState(
|
||||||
localStorage.getItem("role_status") === "18" ? "partner" : "developer",
|
localStorage.getItem("role_status") === "18" ? "partner" : "developer"
|
||||||
);
|
);
|
||||||
|
|
||||||
const [isLoggingOut, setIsLoggingOut] = useState(false);
|
const [isLoggingOut, setIsLoggingOut] = useState(false);
|
||||||
@ -30,8 +30,8 @@ export const ProfileHeader = () => {
|
|||||||
apiRequest(`/user/me`).then((profileInfo) => {
|
apiRequest(`/user/me`).then((profileInfo) => {
|
||||||
dispatch(
|
dispatch(
|
||||||
setProfileInfo(
|
setProfileInfo(
|
||||||
profileInfo.userCard ? profileInfo.userCard : profileInfo,
|
profileInfo.userCard ? profileInfo.userCard : profileInfo
|
||||||
),
|
)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}, [dispatch]);
|
}, [dispatch]);
|
||||||
|
@ -46,7 +46,7 @@ export const ProjectTiket = ({ project, index }) => {
|
|||||||
event &&
|
event &&
|
||||||
!path.find(
|
!path.find(
|
||||||
(div) =>
|
(div) =>
|
||||||
div.classList && div.classList.contains(`project-${project.id}`),
|
div.classList && div.classList.contains(`project-${project.id}`)
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
setModalSelect(false);
|
setModalSelect(false);
|
||||||
@ -91,7 +91,7 @@ export const ProjectTiket = ({ project, index }) => {
|
|||||||
{project.columns.reduce(
|
{project.columns.reduce(
|
||||||
(accumulator, currentValue) =>
|
(accumulator, currentValue) =>
|
||||||
accumulator + currentValue.tasks.length,
|
accumulator + currentValue.tasks.length,
|
||||||
0,
|
0
|
||||||
)}
|
)}
|
||||||
</span>
|
</span>
|
||||||
<img src={avatarProject} alt="#" className="project__avatar" />
|
<img src={avatarProject} alt="#" className="project__avatar" />
|
||||||
|
@ -43,7 +43,7 @@ const ReportForm = () => {
|
|||||||
const [isFetching, setIsFetching] = useState(false);
|
const [isFetching, setIsFetching] = useState(false);
|
||||||
const [reportSuccess, setReportSuccess] = useState("");
|
const [reportSuccess, setReportSuccess] = useState("");
|
||||||
const [startDate, setStartDate] = useState(
|
const [startDate, setStartDate] = useState(
|
||||||
reportDate ? new Date(reportDate._d) : new Date(),
|
reportDate ? new Date(reportDate._d) : new Date()
|
||||||
);
|
);
|
||||||
const [datePickerOpen, setDatePickerOpen] = useState(false);
|
const [datePickerOpen, setDatePickerOpen] = useState(false);
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ const ReportForm = () => {
|
|||||||
(div) =>
|
(div) =>
|
||||||
div.classList &&
|
div.classList &&
|
||||||
(div.classList.contains("report-form__block-img") ||
|
(div.classList.contains("report-form__block-img") ||
|
||||||
div.classList.contains("react-datepicker-popper")),
|
div.classList.contains("react-datepicker-popper"))
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
setDatePickerOpen(false);
|
setDatePickerOpen(false);
|
||||||
@ -210,7 +210,7 @@ const ReportForm = () => {
|
|||||||
task: e.target.value,
|
task: e.target.value,
|
||||||
}
|
}
|
||||||
: input;
|
: input;
|
||||||
}),
|
})
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
@ -236,7 +236,7 @@ const ReportForm = () => {
|
|||||||
hours_spent: Number(e.target.value),
|
hours_spent: Number(e.target.value),
|
||||||
}
|
}
|
||||||
: input;
|
: input;
|
||||||
}),
|
})
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
@ -40,8 +40,8 @@ export const ShortReport = () => {
|
|||||||
setTotalHours(0);
|
setTotalHours(0);
|
||||||
apiRequest(
|
apiRequest(
|
||||||
`reports/find-by-date?user_card_id=${localStorage.getItem(
|
`reports/find-by-date?user_card_id=${localStorage.getItem(
|
||||||
"cardId",
|
"cardId"
|
||||||
)}&date=${day}`,
|
)}&date=${day}`
|
||||||
).then((res) => {
|
).then((res) => {
|
||||||
let spendTime = 0;
|
let spendTime = 0;
|
||||||
for (const item of res) {
|
for (const item of res) {
|
||||||
|
@ -28,7 +28,7 @@ export const TrackerSelectColumn = ({ columns, task, currentColumn }) => {
|
|||||||
moveProjectTask({
|
moveProjectTask({
|
||||||
startWrapperIndex: { index: currentColumn.id, task },
|
startWrapperIndex: { index: currentColumn.id, task },
|
||||||
columnId: column.id,
|
columnId: column.id,
|
||||||
}),
|
})
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
@ -14,7 +14,7 @@ export const Results = () => {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
dispatch(fetchResultTest(test.uuid));
|
dispatch(fetchResultTest(test.uuid));
|
||||||
apiRequest(
|
apiRequest(
|
||||||
`/user-questionnaire/get-points-number?user_questionnaire_uuid=${test.uuid}`,
|
`/user-questionnaire/get-points-number?user_questionnaire_uuid=${test.uuid}`
|
||||||
).then((res) => setMaxScore(res.sum_point));
|
).then((res) => setMaxScore(res.sum_point));
|
||||||
}, [apiRequest, dispatch, test]);
|
}, [apiRequest, dispatch, test]);
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ export const TaskQuiz = () => {
|
|||||||
(response) => {
|
(response) => {
|
||||||
dispatch(fetchGetAnswers(response[0].id));
|
dispatch(fetchGetAnswers(response[0].id));
|
||||||
setStripValue(((+index + 1) * 100) / response.length);
|
setStripValue(((+index + 1) * 100) / response.length);
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
}, [dispatch]);
|
}, [dispatch]);
|
||||||
|
|
||||||
|
@ -9,5 +9,5 @@ import { store } from "./store/store";
|
|||||||
ReactDOM.createRoot(document.getElementById("root")).render(
|
ReactDOM.createRoot(document.getElementById("root")).render(
|
||||||
<Provider store={store}>
|
<Provider store={store}>
|
||||||
<App />
|
<App />
|
||||||
</Provider>,
|
</Provider>
|
||||||
);
|
);
|
||||||
|
@ -43,7 +43,7 @@ const Home = () => {
|
|||||||
const tempTags = values.map((value, index) =>
|
const tempTags = values.map((value, index) =>
|
||||||
value.map((val) => {
|
value.map((val) => {
|
||||||
return { id: val.id, value: val.tags, name: keys[index] };
|
return { id: val.id, value: val.tags, name: keys[index] };
|
||||||
}),
|
})
|
||||||
);
|
);
|
||||||
dispatch(tags(tempTags));
|
dispatch(tags(tempTags));
|
||||||
});
|
});
|
||||||
|
@ -40,11 +40,11 @@ export const PartnerAddRequest = () => {
|
|||||||
const [editRequest, setEditRequest] = useState(false);
|
const [editRequest, setEditRequest] = useState(false);
|
||||||
const [selectedSkills, setSelectedSkills] = useState([]);
|
const [selectedSkills, setSelectedSkills] = useState([]);
|
||||||
const [selectedSpecialization, setSelectedSpecialization] = useState(
|
const [selectedSpecialization, setSelectedSpecialization] = useState(
|
||||||
"Выберите специализацию",
|
"Выберите специализацию"
|
||||||
);
|
);
|
||||||
const [selectedLevel, setSelectedLevel] = useState("Выберите уровень");
|
const [selectedLevel, setSelectedLevel] = useState("Выберите уровень");
|
||||||
const [selectedCount, setSelectedCount] = useState(
|
const [selectedCount, setSelectedCount] = useState(
|
||||||
"Выберите кол-во сотрудников",
|
"Выберите кол-во сотрудников"
|
||||||
);
|
);
|
||||||
const [inputs, setInputs] = useState({ title: "", description: "" });
|
const [inputs, setInputs] = useState({ title: "", description: "" });
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ export const PartnerAddRequest = () => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
apiRequest(`/profile/positions-list`).then((el) =>
|
apiRequest(`/profile/positions-list`).then((el) =>
|
||||||
setSpecializationList(el),
|
setSpecializationList(el)
|
||||||
);
|
);
|
||||||
apiRequest(`/profile/level-list`).then((el) => setLevelList(el));
|
apiRequest(`/profile/level-list`).then((el) => setLevelList(el));
|
||||||
apiRequest(`/skills/get-skills-list`).then((el) => {
|
apiRequest(`/skills/get-skills-list`).then((el) => {
|
||||||
@ -247,7 +247,7 @@ export const PartnerAddRequest = () => {
|
|||||||
setSelectedSkills(
|
setSelectedSkills(
|
||||||
selectedSkills.filter((skill, indexSkill) => {
|
selectedSkills.filter((skill, indexSkill) => {
|
||||||
return indexSkill !== index;
|
return indexSkill !== index;
|
||||||
}),
|
})
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
@ -263,7 +263,7 @@ export const PartnerAddRequest = () => {
|
|||||||
return skill.name
|
return skill.name
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.includes(e.target.value.toLowerCase());
|
.includes(e.target.value.toLowerCase());
|
||||||
}),
|
})
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
@ -282,12 +282,12 @@ export const PartnerAddRequest = () => {
|
|||||||
setFilteredSkills(
|
setFilteredSkills(
|
||||||
filteredSkills.filter((skill, skillIndex) => {
|
filteredSkills.filter((skill, skillIndex) => {
|
||||||
return skillIndex !== index;
|
return skillIndex !== index;
|
||||||
}),
|
})
|
||||||
);
|
);
|
||||||
setSkills(
|
setSkills(
|
||||||
skills.filter((initSkill) => {
|
skills.filter((initSkill) => {
|
||||||
return initSkill.id !== skill.id;
|
return initSkill.id !== skill.id;
|
||||||
}),
|
})
|
||||||
);
|
);
|
||||||
setOpenSkillsSelect(false);
|
setOpenSkillsSelect(false);
|
||||||
}}
|
}}
|
||||||
|
@ -140,8 +140,8 @@ export const PartnerBid = () => {
|
|||||||
partnerRequests[
|
partnerRequests[
|
||||||
partnerRequests.findIndex((el) => el.id === requestId) -
|
partnerRequests.findIndex((el) => el.id === requestId) -
|
||||||
1
|
1
|
||||||
].id,
|
].id
|
||||||
),
|
)
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@ -162,8 +162,8 @@ export const PartnerBid = () => {
|
|||||||
partnerRequests[
|
partnerRequests[
|
||||||
partnerRequests.findIndex((el) => el.id === requestId) +
|
partnerRequests.findIndex((el) => el.id === requestId) +
|
||||||
1
|
1
|
||||||
].id,
|
].id
|
||||||
),
|
)
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
@ -33,8 +33,8 @@ export const PartnerRequests = () => {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
apiRequest(
|
apiRequest(
|
||||||
`/request/get-request-list?user_id=${localStorage.getItem(
|
`/request/get-request-list?user_id=${localStorage.getItem(
|
||||||
"id",
|
"id"
|
||||||
)}&search_depth=3`,
|
)}&search_depth=3`
|
||||||
).then((el) => {
|
).then((el) => {
|
||||||
setRequests(el);
|
setRequests(el);
|
||||||
setLoader(false);
|
setLoader(false);
|
||||||
|
@ -23,7 +23,7 @@ import "./profile.scss";
|
|||||||
export const Profile = () => {
|
export const Profile = () => {
|
||||||
const profileInfo = useSelector(getProfileInfo);
|
const profileInfo = useSelector(getProfileInfo);
|
||||||
const [user] = useState(
|
const [user] = useState(
|
||||||
localStorage.getItem("role_status") === "18" ? "partner" : "developer",
|
localStorage.getItem("role_status") === "18" ? "partner" : "developer"
|
||||||
);
|
);
|
||||||
const [profileItemsInfo] = useState({
|
const [profileItemsInfo] = useState({
|
||||||
developer: [
|
developer: [
|
||||||
|
@ -169,7 +169,7 @@ export const ProjectTracker = () => {
|
|||||||
startTask: startWrapperIndexTest.current.task,
|
startTask: startWrapperIndexTest.current.task,
|
||||||
finishTask: task,
|
finishTask: task,
|
||||||
finishIndex: finishTask,
|
finishIndex: finishTask,
|
||||||
}),
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -207,7 +207,7 @@ export const ProjectTracker = () => {
|
|||||||
moveProjectTask({
|
moveProjectTask({
|
||||||
startWrapperIndex: startWrapperIndexTest.current,
|
startWrapperIndex: startWrapperIndexTest.current,
|
||||||
columnId,
|
columnId,
|
||||||
}),
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -382,7 +382,7 @@ export const ProjectTracker = () => {
|
|||||||
(div) =>
|
(div) =>
|
||||||
div.classList &&
|
div.classList &&
|
||||||
(div.classList.contains("addPerson") ||
|
(div.classList.contains("addPerson") ||
|
||||||
div.classList.contains("persons__list")),
|
div.classList.contains("persons__list"))
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
setPersonListOpen(false);
|
setPersonListOpen(false);
|
||||||
@ -394,7 +394,7 @@ export const ProjectTracker = () => {
|
|||||||
(div) =>
|
(div) =>
|
||||||
div.classList &&
|
div.classList &&
|
||||||
(div.classList.contains("tasks__head__executor") ||
|
(div.classList.contains("tasks__head__executor") ||
|
||||||
div.classList.contains("tasks__head__executorDropdown")),
|
div.classList.contains("tasks__head__executorDropdown"))
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
setSelectedExecutorOpen(false);
|
setSelectedExecutorOpen(false);
|
||||||
@ -406,7 +406,7 @@ export const ProjectTracker = () => {
|
|||||||
(div) =>
|
(div) =>
|
||||||
div.classList &&
|
div.classList &&
|
||||||
(div.classList.contains("tasks__head__tags") ||
|
(div.classList.contains("tasks__head__tags") ||
|
||||||
div.classList.contains("tags__list")),
|
div.classList.contains("tags__list"))
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
setTags({
|
setTags({
|
||||||
@ -427,7 +427,7 @@ export const ProjectTracker = () => {
|
|||||||
(div) =>
|
(div) =>
|
||||||
div.classList &&
|
div.classList &&
|
||||||
(div.classList.contains("board__head__more") ||
|
(div.classList.contains("board__head__more") ||
|
||||||
div.classList.contains("column__select")),
|
div.classList.contains("column__select"))
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
setOpenColumnSelect((prevState) => {
|
setOpenColumnSelect((prevState) => {
|
||||||
@ -577,7 +577,7 @@ export const ProjectTracker = () => {
|
|||||||
<span>{projectBoard.projectUsers?.length}</span>
|
<span>{projectBoard.projectUsers?.length}</span>
|
||||||
{caseOfNum(
|
{caseOfNum(
|
||||||
projectBoard.projectUsers?.length,
|
projectBoard.projectUsers?.length,
|
||||||
"persons",
|
"persons"
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="persons__list__info">
|
<div className="persons__list__info">
|
||||||
@ -880,7 +880,7 @@ export const ProjectTracker = () => {
|
|||||||
column.id,
|
column.id,
|
||||||
projectBoard?.columns && column.tasks.length
|
projectBoard?.columns && column.tasks.length
|
||||||
? column.tasks[0].priority - 1
|
? column.tasks[0].priority - 1
|
||||||
: 1,
|
: 1
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@ -959,7 +959,7 @@ export const ProjectTracker = () => {
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (window.innerWidth < 985) {
|
if (window.innerWidth < 985) {
|
||||||
window.location.replace(
|
window.location.replace(
|
||||||
`/tracker/task/${task.id}`,
|
`/tracker/task/${task.id}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
@ -1037,7 +1037,7 @@ export const ProjectTracker = () => {
|
|||||||
{task.comment_count}{" "}
|
{task.comment_count}{" "}
|
||||||
{caseOfNum(
|
{caseOfNum(
|
||||||
task.comment_count,
|
task.comment_count,
|
||||||
"comments",
|
"comments"
|
||||||
)}
|
)}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -1051,7 +1051,7 @@ export const ProjectTracker = () => {
|
|||||||
</div>
|
</div>
|
||||||
<TrackerSelectColumn
|
<TrackerSelectColumn
|
||||||
columns={projectBoard.columns.filter(
|
columns={projectBoard.columns.filter(
|
||||||
(item) => item.id !== column.id,
|
(item) => item.id !== column.id
|
||||||
)}
|
)}
|
||||||
currentColumn={column}
|
currentColumn={column}
|
||||||
task={task}
|
task={task}
|
||||||
|
@ -17,6 +17,8 @@ import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader";
|
|||||||
|
|
||||||
import rightArrow from "assets/icons/arrows/arrowRight.svg";
|
import rightArrow from "assets/icons/arrows/arrowRight.svg";
|
||||||
import arrow from "assets/icons/arrows/left-arrow.png";
|
import arrow from "assets/icons/arrows/left-arrow.png";
|
||||||
|
import arrowDown from "assets/icons/arrows/selectArrow.png";
|
||||||
|
import deleteIcon from "assets/icons/closeProjectPersons.svg";
|
||||||
import gitImgItem from "assets/icons/gitItemImg.svg";
|
import gitImgItem from "assets/icons/gitItemImg.svg";
|
||||||
import avatarMok from "assets/images/avatarMok.png";
|
import avatarMok from "assets/images/avatarMok.png";
|
||||||
|
|
||||||
@ -30,18 +32,40 @@ export const Summary = () => {
|
|||||||
const [openGit, setOpenGit] = useState(false);
|
const [openGit, setOpenGit] = useState(false);
|
||||||
const [gitInfo, setGitInfo] = useState([]);
|
const [gitInfo, setGitInfo] = useState([]);
|
||||||
const [editSummeryOpen, setEditSummeryOpen] = useState(false);
|
const [editSummeryOpen, setEditSummeryOpen] = useState(false);
|
||||||
|
const [editSkills, setEditSkills] = useState(false);
|
||||||
const [summery, setSummery] = useState("");
|
const [summery, setSummery] = useState("");
|
||||||
|
const [selectedSkills, setSelectedSkills] = useState([]);
|
||||||
|
const [selectSkillsOpen, setSelectSkillsOpen] = useState(false);
|
||||||
|
const [skillsList, seSkillsList] = useState([]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
apiRequest(
|
apiRequest(
|
||||||
`/profile/portfolio-projects?card_id=${localStorage.getItem("cardId")}`,
|
`/profile/portfolio-projects?card_id=${localStorage.getItem("cardId")}`
|
||||||
).then((responseGit) => setGitInfo(responseGit));
|
).then((responseGit) => setGitInfo(responseGit));
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setSummery(profileInfo.vc_text);
|
setSummery(profileInfo.vc_text);
|
||||||
|
setSelectedSkills(profileInfo.skillValues);
|
||||||
}, [profileInfo]);
|
}, [profileInfo]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
apiRequest(`/skills/get-skills-list`).then((el) => {
|
||||||
|
seSkillsList(el);
|
||||||
|
});
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
function setSkills() {
|
||||||
|
apiRequest("/resume/edit-skills", {
|
||||||
|
method: "PUT",
|
||||||
|
data: {
|
||||||
|
UserCard: {
|
||||||
|
skill: selectedSkills.map((item) => item.skill_id),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}).then(() => {});
|
||||||
|
}
|
||||||
|
|
||||||
function editSummery() {
|
function editSummery() {
|
||||||
apiRequest("/resume/edit-text", {
|
apiRequest("/resume/edit-text", {
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
@ -98,18 +122,84 @@ export const Summary = () => {
|
|||||||
<div className="summary__skills skills__section">
|
<div className="summary__skills skills__section">
|
||||||
<div className="summary__sections__head">
|
<div className="summary__sections__head">
|
||||||
<h3>Основной стек</h3>
|
<h3>Основной стек</h3>
|
||||||
<button>Редактировать</button>
|
<button
|
||||||
|
className={editSkills ? "edit" : ""}
|
||||||
|
onClick={() => {
|
||||||
|
if (editSkills) {
|
||||||
|
setSkills();
|
||||||
|
}
|
||||||
|
setEditSkills(!editSkills);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{editSkills ? "Сохранить" : "Редактировать"}
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div className="skills__section__items">
|
<div className="skills__section__items">
|
||||||
<div className="skills__section__items__wrapper">
|
{editSkills ? (
|
||||||
{profileInfo.skillValues &&
|
<div className="editSkills">
|
||||||
profileInfo.skillValues.map((skill, index) => (
|
{selectedSkills &&
|
||||||
<span key={skill.id} className="skill_item">
|
selectedSkills.map((skill) => {
|
||||||
{skill.skill.name}
|
return (
|
||||||
{profileInfo.skillValues.length > index + 1 && ","}
|
<span key={skill.skill_id}>
|
||||||
</span>
|
{skill.skill.name}
|
||||||
))}
|
<img
|
||||||
</div>
|
src={deleteIcon}
|
||||||
|
alt="deleteIcon"
|
||||||
|
onClick={() =>
|
||||||
|
setSelectedSkills((prevValue) =>
|
||||||
|
prevValue.filter(
|
||||||
|
(item) => item.skill_id !== skill.skill_id
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
<div className="selectSkills">
|
||||||
|
<div
|
||||||
|
className="selectSkills__name"
|
||||||
|
onClick={() => setSelectSkillsOpen(!selectSkillsOpen)}
|
||||||
|
>
|
||||||
|
Выберите скилл
|
||||||
|
<img
|
||||||
|
className={selectSkillsOpen ? "open" : ""}
|
||||||
|
src={arrowDown}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
{selectSkillsOpen && (
|
||||||
|
<div className="selectSkills__dropDown">
|
||||||
|
{skillsList.map((skill) => {
|
||||||
|
return (
|
||||||
|
<p
|
||||||
|
onClick={() =>
|
||||||
|
setSelectedSkills((prevValue) => [
|
||||||
|
...prevValue,
|
||||||
|
{ skill: skill, skill_id: skill.id },
|
||||||
|
])
|
||||||
|
}
|
||||||
|
key={skill.id}
|
||||||
|
className="selectSkills__item"
|
||||||
|
>
|
||||||
|
{skill.name}
|
||||||
|
</p>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<div className="skills__section__items__wrapper">
|
||||||
|
{selectedSkills &&
|
||||||
|
selectedSkills.map((skill, index) => (
|
||||||
|
<span key={skill.id} className="skill_item">
|
||||||
|
{skill.skill.name}
|
||||||
|
{selectedSkills.length > index + 1 && ","}
|
||||||
|
</span>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
@ -250,6 +250,89 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.editSkills {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 14px;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
span {
|
||||||
|
display: flex;
|
||||||
|
column-gap: 8px;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
border-radius: 15px;
|
||||||
|
padding: 3px 10px 3px 10px;
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 32px;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-transform: uppercase;
|
||||||
|
|
||||||
|
img {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectSkills {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 16px;
|
||||||
|
|
||||||
|
&__name {
|
||||||
|
display: flex;
|
||||||
|
column-gap: 12px;
|
||||||
|
align-items: center;
|
||||||
|
cursor: pointer;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
border-radius: 15px;
|
||||||
|
padding: 3px 10px 3px 10px;
|
||||||
|
|
||||||
|
img {
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.open {
|
||||||
|
transform: rotate(180deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&__dropDown {
|
||||||
|
position: absolute;
|
||||||
|
background-color: white;
|
||||||
|
border-radius: 12px;
|
||||||
|
max-height: 300px;
|
||||||
|
overflow-y: auto;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
row-gap: 5px;
|
||||||
|
align-items: center;
|
||||||
|
padding: 7px;
|
||||||
|
top: 35px;
|
||||||
|
|
||||||
|
&::-webkit-scrollbar {
|
||||||
|
width: 3px;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-webkit-scrollbar-thumb {
|
||||||
|
background: #cbd9f9;
|
||||||
|
border-radius: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-webkit-scrollbar-track {
|
||||||
|
background: #c5c0c6;
|
||||||
|
border-radius: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__experience {
|
&__experience {
|
||||||
|
@ -57,8 +57,8 @@ export const Tracker = () => {
|
|||||||
setLoader(true);
|
setLoader(true);
|
||||||
apiRequest(
|
apiRequest(
|
||||||
`/project/project-list?user_id=${localStorage.getItem(
|
`/project/project-list?user_id=${localStorage.getItem(
|
||||||
"id",
|
"id"
|
||||||
)}&expand=columns`,
|
)}&expand=columns`
|
||||||
).then((el) => {
|
).then((el) => {
|
||||||
dispatch(setAllProjects(el.projects));
|
dispatch(setAllProjects(el.projects));
|
||||||
setLoader(false);
|
setLoader(false);
|
||||||
@ -74,9 +74,7 @@ export const Tracker = () => {
|
|||||||
// }, []))
|
// }, []))
|
||||||
});
|
});
|
||||||
apiRequest(
|
apiRequest(
|
||||||
`/task/get-user-tasks?user_id=${localStorage.getItem(
|
`/task/get-user-tasks?user_id=${localStorage.getItem("id")}&expand=timers`
|
||||||
"id",
|
|
||||||
)}&expand=timers`,
|
|
||||||
).then((el) => {
|
).then((el) => {
|
||||||
const allTasks = el ? el.filter((item) => item.status !== 0) : [];
|
const allTasks = el ? el.filter((item) => item.status !== 0) : [];
|
||||||
const completedTasks = el ? el.filter((item) => item.status === 0) : [];
|
const completedTasks = el ? el.filter((item) => item.status === 0) : [];
|
||||||
@ -105,7 +103,7 @@ export const Tracker = () => {
|
|||||||
) {
|
) {
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
}),
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -123,7 +121,7 @@ export const Tracker = () => {
|
|||||||
) {
|
) {
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
}),
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -207,7 +205,7 @@ export const Tracker = () => {
|
|||||||
{typeof projects === "object" &&
|
{typeof projects === "object" &&
|
||||||
(!Boolean(projects.length) ||
|
(!Boolean(projects.length) ||
|
||||||
!Boolean(
|
!Boolean(
|
||||||
projects.filter((project) => project.status !== 10).length,
|
projects.filter((project) => project.status !== 10).length
|
||||||
)) &&
|
)) &&
|
||||||
!loader && (
|
!loader && (
|
||||||
<div className="no-projects">
|
<div className="no-projects">
|
||||||
@ -473,7 +471,7 @@ export const Tracker = () => {
|
|||||||
? "-"
|
? "-"
|
||||||
: task.timers.map((item) => {
|
: task.timers.map((item) => {
|
||||||
let time = new Date(
|
let time = new Date(
|
||||||
item.deltaSeconds * 1000,
|
item.deltaSeconds * 1000
|
||||||
)
|
)
|
||||||
.toISOString()
|
.toISOString()
|
||||||
.slice(11, 19);
|
.slice(11, 19);
|
||||||
@ -509,13 +507,13 @@ export const Tracker = () => {
|
|||||||
${caseOfNum(
|
${caseOfNum(
|
||||||
projects.filter((project) => project.status === 10)
|
projects.filter((project) => project.status === 10)
|
||||||
.length,
|
.length,
|
||||||
"projects",
|
"projects"
|
||||||
)}`}
|
)}`}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="archive__tasksWrapper">
|
<div className="archive__tasksWrapper">
|
||||||
{Boolean(
|
{Boolean(
|
||||||
projects.filter((project) => project.status === 10).length,
|
projects.filter((project) => project.status === 10).length
|
||||||
) ? (
|
) ? (
|
||||||
projects.map((project, index) => {
|
projects.map((project, index) => {
|
||||||
return project.status === 10 ? (
|
return project.status === 10 ? (
|
||||||
|
@ -42,8 +42,8 @@ export const ViewReport = () => {
|
|||||||
setTomorrowTask([]);
|
setTomorrowTask([]);
|
||||||
apiRequest(
|
apiRequest(
|
||||||
`reports/find-by-date?user_card_id=${localStorage.getItem(
|
`reports/find-by-date?user_card_id=${localStorage.getItem(
|
||||||
"cardId",
|
"cardId"
|
||||||
)}&date=${day}`,
|
)}&date=${day}`
|
||||||
).then((res) => {
|
).then((res) => {
|
||||||
let spendTime = 0;
|
let spendTime = 0;
|
||||||
for (const item of res) {
|
for (const item of res) {
|
||||||
|
@ -103,7 +103,7 @@ export const QuizPage = () => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
apiRequest(
|
apiRequest(
|
||||||
`/user-questionnaire/questionnaires-list?user_id=${userId}`,
|
`/user-questionnaire/questionnaires-list?user_id=${userId}`
|
||||||
).then((res) => dispatch(setQuestionnaires(res)));
|
).then((res) => dispatch(setQuestionnaires(res)));
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ const initialState = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const setProjectBoardFetch = createAsyncThunk("userInfo", (id) =>
|
export const setProjectBoardFetch = createAsyncThunk("userInfo", (id) =>
|
||||||
apiRequest(`/project/get-project?project_id=${id}&expand=columns,mark`),
|
apiRequest(`/project/get-project?project_id=${id}&expand=columns,mark`)
|
||||||
);
|
);
|
||||||
|
|
||||||
export const projectsTrackerSlice = createSlice({
|
export const projectsTrackerSlice = createSlice({
|
||||||
@ -39,12 +39,12 @@ export const projectsTrackerSlice = createSlice({
|
|||||||
},
|
},
|
||||||
deletePersonOnProject: (state, action) => {
|
deletePersonOnProject: (state, action) => {
|
||||||
state.projectBoard.projectUsers = state.projectBoard.projectUsers.filter(
|
state.projectBoard.projectUsers = state.projectBoard.projectUsers.filter(
|
||||||
(person) => person.user_id !== action.payload,
|
(person) => person.user_id !== action.payload
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
deleteTagProject: (state, action) => {
|
deleteTagProject: (state, action) => {
|
||||||
state.projectBoard.mark = state.projectBoard.mark.filter(
|
state.projectBoard.mark = state.projectBoard.mark.filter(
|
||||||
(tag) => tag.id !== action.payload,
|
(tag) => tag.id !== action.payload
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
addPersonToProject: (state, action) => {
|
addPersonToProject: (state, action) => {
|
||||||
@ -74,7 +74,7 @@ export const projectsTrackerSlice = createSlice({
|
|||||||
}
|
}
|
||||||
if (column.id === action.payload.startWrapperIndex.index) {
|
if (column.id === action.payload.startWrapperIndex.index) {
|
||||||
state.projectBoard.columns[index].tasks = column.tasks.filter(
|
state.projectBoard.columns[index].tasks = column.tasks.filter(
|
||||||
(task) => task.id !== action.payload.startWrapperIndex.task.id,
|
(task) => task.id !== action.payload.startWrapperIndex.task.id
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -83,7 +83,7 @@ export const projectsTrackerSlice = createSlice({
|
|||||||
state.projectBoard.columns.forEach((column, index) => {
|
state.projectBoard.columns.forEach((column, index) => {
|
||||||
if (column.id === action.payload.startTask.column_id) {
|
if (column.id === action.payload.startTask.column_id) {
|
||||||
state.projectBoard.columns[index].tasks = column.tasks.filter(
|
state.projectBoard.columns[index].tasks = column.tasks.filter(
|
||||||
(task) => task.id !== action.payload.startTask.id,
|
(task) => task.id !== action.payload.startTask.id
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (column.id === action.payload.finishTask.column_id) {
|
if (column.id === action.payload.finishTask.column_id) {
|
||||||
@ -119,21 +119,21 @@ export const projectsTrackerSlice = createSlice({
|
|||||||
filterCreatedByMe: (state, action) => {
|
filterCreatedByMe: (state, action) => {
|
||||||
state.projectBoard.columns.forEach((column) => {
|
state.projectBoard.columns.forEach((column) => {
|
||||||
column.tasks = column.tasks.filter(
|
column.tasks = column.tasks.filter(
|
||||||
(task) => task.user_id === action.payload,
|
(task) => task.user_id === action.payload
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
filteredParticipateTasks: (state, action) => {
|
filteredParticipateTasks: (state, action) => {
|
||||||
state.projectBoard.columns.forEach((column) => {
|
state.projectBoard.columns.forEach((column) => {
|
||||||
column.tasks = column.tasks.filter((task) =>
|
column.tasks = column.tasks.filter((task) =>
|
||||||
task.taskUsers.some((person) => person.user_id === action.payload),
|
task.taskUsers.some((person) => person.user_id === action.payload)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
filteredExecutorTasks: (state, action) => {
|
filteredExecutorTasks: (state, action) => {
|
||||||
state.projectBoard.columns.forEach((column) => {
|
state.projectBoard.columns.forEach((column) => {
|
||||||
column.tasks = column.tasks.filter(
|
column.tasks = column.tasks.filter(
|
||||||
(task) => task.executor_id === action.payload,
|
(task) => task.executor_id === action.payload
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -76,7 +76,7 @@ const initialState = {
|
|||||||
userInfo: null,
|
userInfo: null,
|
||||||
};
|
};
|
||||||
export const setUserInfo = createAsyncThunk("userInfo", (id) =>
|
export const setUserInfo = createAsyncThunk("userInfo", (id) =>
|
||||||
apiRequest(`/profile/get-main-data?user_id=${id}`),
|
apiRequest(`/profile/get-main-data?user_id=${id}`)
|
||||||
);
|
);
|
||||||
|
|
||||||
export const fetchUserAnswersMany = createAsyncThunk(
|
export const fetchUserAnswersMany = createAsyncThunk(
|
||||||
@ -85,7 +85,7 @@ export const fetchUserAnswersMany = createAsyncThunk(
|
|||||||
apiRequest("/user-response/set-responses", {
|
apiRequest("/user-response/set-responses", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: { userResponses: checkedValues },
|
data: { userResponses: checkedValues },
|
||||||
}),
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
export const fetchUserAnswerOne = createAsyncThunk(
|
export const fetchUserAnswerOne = createAsyncThunk(
|
||||||
@ -94,17 +94,17 @@ export const fetchUserAnswerOne = createAsyncThunk(
|
|||||||
apiRequest("/user-response/set-response", {
|
apiRequest("/user-response/set-response", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: checkedValues[0],
|
data: checkedValues[0],
|
||||||
}),
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
export const fetchGetAnswers = createAsyncThunk("answers", (question_id) =>
|
export const fetchGetAnswers = createAsyncThunk("answers", (question_id) =>
|
||||||
apiRequest(`/answer/get-answers?question_id=${question_id}`),
|
apiRequest(`/answer/get-answers?question_id=${question_id}`)
|
||||||
);
|
);
|
||||||
|
|
||||||
export const fetchResultTest = createAsyncThunk("result", (uuid) =>
|
export const fetchResultTest = createAsyncThunk("result", (uuid) =>
|
||||||
apiRequest(
|
apiRequest(
|
||||||
`/user-questionnaire/questionnaire-completed?user_questionnaire_uuid=${uuid}`,
|
`/user-questionnaire/questionnaire-completed?user_questionnaire_uuid=${uuid}`
|
||||||
),
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
export const quizSlice = createSlice({
|
export const quizSlice = createSlice({
|
||||||
|
@ -89,6 +89,6 @@ export function caseOfNum(number, type) {
|
|||||||
|
|
||||||
export function copyProjectLink(projectId) {
|
export function copyProjectLink(projectId) {
|
||||||
navigator.clipboard.writeText(
|
navigator.clipboard.writeText(
|
||||||
`https://itguild.info/tracker/project/${projectId}`,
|
`https://itguild.info/tracker/project/${projectId}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user