add ModalTicketToReport and add OpenRequest, fix
LandingTracker, fix url ModalTicket
This commit is contained in:
@ -84,7 +84,9 @@ export const LandingTracker = () => {
|
||||
<h3>
|
||||
ITGu <br /> ild
|
||||
</h3>
|
||||
<img className="intro-logo__cup" src={trackerCup} alt="" />
|
||||
<div className="intro-logo__cup">
|
||||
<img src={trackerCup} alt="" />
|
||||
</div>
|
||||
</div>
|
||||
<div className="intro-content">
|
||||
<div className="intro-content__sublogo">
|
||||
|
@ -57,6 +57,32 @@
|
||||
position: absolute;
|
||||
bottom: -85px;
|
||||
right: -150px;
|
||||
|
||||
&::before {
|
||||
content: "Не нужно заваривать мышь";
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
top: 100px;
|
||||
left: -80px;
|
||||
width: 182px;
|
||||
height: 106px;
|
||||
border-radius: 8px;
|
||||
border: 0.5px solid #ffffff;
|
||||
background: linear-gradient(
|
||||
110.06deg,
|
||||
rgba(255, 255, 255, 0.34) 0%,
|
||||
rgba(199, 206, 198, 0.34) 99.25%
|
||||
);
|
||||
backdrop-filter: blur(8.6999998093px);
|
||||
box-shadow: 10px 9px 14px 0 rgba(0, 0, 0, 0.06);
|
||||
padding: 0 15px;
|
||||
font-size: 17px;
|
||||
font-weight: 700;
|
||||
line-height: 19.72px;
|
||||
letter-spacing: 0.01em;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
32
src/pages/OpenRequests/OpenRequest.jsx
Normal file
32
src/pages/OpenRequests/OpenRequest.jsx
Normal file
@ -0,0 +1,32 @@
|
||||
import React from "react";
|
||||
|
||||
import { Footer } from "@components/Common/Footer/Footer";
|
||||
import { Navigation } from "@components/Navigation/Navigation";
|
||||
import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";
|
||||
import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader";
|
||||
|
||||
import "./OpenRequest.scss";
|
||||
|
||||
export const OpenRequest = () => {
|
||||
return (
|
||||
<div className="open-request">
|
||||
<ProfileHeader />
|
||||
<Navigation />
|
||||
<div className="container">
|
||||
<div className="open-request-content">
|
||||
<ProfileBreadcrumbs
|
||||
links={[
|
||||
{ name: "Главная", link: "/profile" },
|
||||
{
|
||||
name: "Работа в IT открытые запросы",
|
||||
link: "/profile/open-request"
|
||||
}
|
||||
]}
|
||||
/>
|
||||
<h2 className="summary__title">Работа в IT открытые запросы</h2>
|
||||
</div>
|
||||
</div>
|
||||
<Footer />
|
||||
</div>
|
||||
);
|
||||
};
|
0
src/pages/OpenRequests/OpenRequest.scss
Normal file
0
src/pages/OpenRequests/OpenRequest.scss
Normal file
@ -29,7 +29,7 @@ export const Profile = () => {
|
||||
const [profileItemsInfo] = useState({
|
||||
developer: [
|
||||
{
|
||||
path: "profile",
|
||||
path: "profile/open-requests",
|
||||
img: paymentIcon,
|
||||
title: "Работа в IT <br/>открытые запросы",
|
||||
description: "Перейдите чтобы посмотреть <br/>открытые позиции"
|
||||
|
@ -1,7 +1,7 @@
|
||||
import moment from "moment";
|
||||
import React, { useEffect, useRef, useState } from "react";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
import { Link, useParams } from "react-router-dom";
|
||||
import { Link, useLocation, useNavigate, useParams } from "react-router-dom";
|
||||
|
||||
import {
|
||||
activeLoader,
|
||||
@ -51,6 +51,8 @@ import avatarMok from "assets/images/avatarMok.webp";
|
||||
export const ProjectTracker = () => {
|
||||
const dispatch = useDispatch();
|
||||
const projectId = useParams();
|
||||
const location = useLocation();
|
||||
const navigate = useNavigate();
|
||||
|
||||
const [openColumnSelect, setOpenColumnSelect] = useState({});
|
||||
const [selectedTab, setSelectedTab] = useState(0);
|
||||
@ -97,6 +99,24 @@ export const ProjectTracker = () => {
|
||||
} else {
|
||||
setFilteredNoTasks(false);
|
||||
}
|
||||
|
||||
const path = location.pathname;
|
||||
const match = path.match(/\/task\/(\d+)/);
|
||||
console.log(match);
|
||||
if (match) {
|
||||
const extractedTaskId = match[1];
|
||||
|
||||
console.log(extractedTaskId);
|
||||
// Убираем /task/id из URL
|
||||
const newUrl = path.replace(/\/task\/\d+/, "");
|
||||
navigate(newUrl, { replace: true });
|
||||
|
||||
// Открываем тикет
|
||||
console.log("asd", projectBoard);
|
||||
const Dtask = tasks.find((task) => task.id === extractedTaskId);
|
||||
console.log("asd", Dtask);
|
||||
// openTicket(extractedTaskId);
|
||||
}
|
||||
}, [projectBoard]);
|
||||
|
||||
function dragOverHandler(e) {
|
||||
@ -148,9 +168,16 @@ export const ProjectTracker = () => {
|
||||
function openTicket(e, task) {
|
||||
setSelectedTicket(task);
|
||||
setModalActiveTicket(true);
|
||||
const currentUrl = window.location.pathname;
|
||||
const newUrl = `${currentUrl}/task/${task.id}`;
|
||||
window.history.pushState({}, "", newUrl);
|
||||
document.body.style.overflow = "hidden";
|
||||
}
|
||||
|
||||
// useEffect(() => {
|
||||
|
||||
// }, [location]);
|
||||
|
||||
function deleteColumn(column) {
|
||||
const priorityColumns = [];
|
||||
apiRequest("/project-column/update-column", {
|
||||
|
@ -1,6 +1,7 @@
|
||||
import React from "react";
|
||||
import { Navigate, Route, Routes } from "react-router-dom";
|
||||
import { Route, Routes } from "react-router-dom";
|
||||
|
||||
import { OpenRequest } from "@pages/OpenRequests/openRequest";
|
||||
import { PartnerSettings } from "@pages/PartnerSettings/PartnerSettings";
|
||||
import { PartnerTreaties } from "@pages/PartnerTreaties/PartnerTreaties";
|
||||
import { Payouts } from "@pages/Payouts/Payouts";
|
||||
@ -14,7 +15,6 @@ import { Summary } from "@pages/Summary/Summary";
|
||||
import { Tracker } from "@pages/Tracker/Tracker";
|
||||
import { ViewReport } from "@pages/ViewReport/ViewReport";
|
||||
|
||||
import { TicketFullScreen } from "@components/Modal/Tracker/TicketFullScreen/TicketFullScreen";
|
||||
import { ProfileCalendar } from "@components/ProfileCalendar/ProfileCalendar";
|
||||
import { ReportForm } from "@components/ReportForm/ReportForm";
|
||||
|
||||
@ -23,9 +23,10 @@ export const DeveloperPage = () => {
|
||||
<Routes>
|
||||
<Route
|
||||
exact
|
||||
path="/tracker/task/:id"
|
||||
element={<TicketFullScreen />}
|
||||
></Route>
|
||||
path="/tracker/project/:id/task/:taskId"
|
||||
element={<ProjectTracker />}
|
||||
/>
|
||||
|
||||
<Route exact path="/tracker/project/:id" element={<ProjectTracker />} />
|
||||
|
||||
<Route exact path="profile">
|
||||
@ -33,6 +34,7 @@ export const DeveloperPage = () => {
|
||||
<Route exact path="calendar" element={<ProfileCalendar />} />
|
||||
<Route exact path="calendar/report" element={<ReportForm />} />
|
||||
<Route exact path="calendar/view/:date/:id" element={<ViewReport />} />
|
||||
<Route exact path="open-requests" element={<OpenRequest />} />
|
||||
<Route exact path="summary" element={<Summary />} />
|
||||
<Route exact path="tracker" element={<Tracker />} />
|
||||
<Route exact path="statistics/:id" element={<Statistics />} />
|
||||
@ -45,7 +47,7 @@ export const DeveloperPage = () => {
|
||||
<Route exact path="report/:uuid" element={<QuizReportPage />} />
|
||||
</Route>
|
||||
</Route>
|
||||
<Route path="*" element={<Navigate to="/profile" replace />} />
|
||||
{/* <Route path="*" element={<Navigate to="/profile" replace />} /> */}
|
||||
</Routes>
|
||||
);
|
||||
};
|
||||
|
@ -19,7 +19,6 @@ import { ViewReport } from "@pages/ViewReport/ViewReport";
|
||||
|
||||
import { Calendar } from "@components/Calendar/Calendar";
|
||||
import { Candidate } from "@components/Candidate/Candidate";
|
||||
import { TicketFullScreen } from "@components/Modal/Tracker/TicketFullScreen/TicketFullScreen";
|
||||
|
||||
export const PartnerPage = () => {
|
||||
return (
|
||||
@ -28,11 +27,6 @@ export const PartnerPage = () => {
|
||||
<Route exact path="/candidate/:id/form" element={<FormPage />} />
|
||||
<Route path="/:userId/calendar" element={<Calendar />} />
|
||||
|
||||
<Route
|
||||
exact
|
||||
path="/tracker/task/:id"
|
||||
element={<TicketFullScreen />}
|
||||
></Route>
|
||||
<Route exact path="/tracker/project/:id" element={<ProjectTracker />} />
|
||||
|
||||
<Route exact path="profile">
|
||||
|
Reference in New Issue
Block a user