Added new page statistics

This commit is contained in:
MaxOvs19 2023-10-02 21:26:06 +03:00
parent c155462ab4
commit 6b6432330b
4 changed files with 116 additions and 1 deletions

View File

@ -43,6 +43,7 @@ import { RegistrationForCandidate } from "./pages/RegistrationForCandidate/Regis
import { ProfileCandidate } from "./pages/ProfileCandidate/ProfileCandidate";
import { PassingTests } from "./pages/quiz/PassingTests";
import Blog from "./pages/Blog/Blog";
import Statistics from "@pages/Statistics/Statistics";
import { ProjectTracker } from "./pages/ProjectTracker/ProjectTracker";
import { FrequentlyAskedQuestions } from "./pages/FrequentlyAskedQuestions/FrequentlyAskedQuestions";
import { FrequentlyAskedQuestion } from "./pages/FrequentlyAskedQuestion/FrequentlyAskedQuestion";
@ -53,6 +54,7 @@ import "./assets/global.scss";
import "./assets/fonts/stylesheet.css";
import "bootstrap/dist/css/bootstrap.min.css";
const App = () => {
const notification = useSelector(getNotification)
return (
@ -118,6 +120,7 @@ const App = () => {
<Route exact path="summary" element={<Summary />} />
<Route exact path="view/:id" element={<ViewReport />} />
<Route exact path="tracker" element={<Tracker />} />
<Route exact path="statistics/:id" element={<Statistics/>}/>
<Route exact path="payouts" element={<Payouts />} />
<Route exact path="settings" element={<PartnerSettings />} />
<Route exact path="requests" element={<PartnerRequests />} />

View File

@ -92,7 +92,10 @@ export const ProjectTiket = ({ project, index }) => {
...
</span>
</div>
<Link to={`#`} className="project__statistics">
<Link
to={`/profile/statistics/${project.id}`}
className="project__statistics"
>
Просмотреть статистику
</Link>

View File

@ -0,0 +1,90 @@
import React from "react";
import { useDispatch } from "react-redux";
import { Link } from "react-router-dom";
import { setToggleTab } from "@redux/projectsTrackerSlice";
import { Navigation } from "@components/Navigation/Navigation";
import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";
import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader";
import arrow from "assets/icons/arrows/arrowCalendar.png";
import link from "assets/icons/link.svg";
import project from "assets/icons/trackerProject.svg";
import tasks from "assets/icons/trackerTasks.svg";
import archive from "assets/images/archiveIcon.png";
import "./statistics.scss";
const Statistics = () => {
const dispatch = useDispatch();
const toggleTabs = (index) => {
dispatch(setToggleTab(index));
};
return (
<div className="statistics">
<ProfileHeader />
<Navigation />
<div className="container">
<div className="tracker__content">
<ProfileBreadcrumbs
links={[
{ name: "Главная", link: "/profile" },
{ name: "Трекер", link: "/profile/tracker" },
]}
/>
<h2 className="tracker__title">Управление проектами с трекером</h2>
</div>
</div>
<div className="tracker__tabs">
<div className="tracker__tabs__head">
<Link
to="/profile/tracker"
className="tab active-tab projectsTab"
onClick={() => toggleTabs(1)}
>
<img src={project} alt="img" />
<p>Проекты </p>
</Link>
<Link
to="/profile/tracker"
className="tab tasksTab"
onClick={() => toggleTabs(2)}
>
<img src={tasks} alt="img" />
<p>Все мои задачи</p>
</Link>
<Link
to="/profile/tracker"
className="tab archiveTab"
onClick={() => toggleTabs(3)}
>
<img src={archive} alt="img" />
<p>Архив</p>
</Link>
</div>
<div className="tracker__tabs__content">
<div className="tracker__tabs__content__wrapper statistics-body">
<div className="statistics-header">
<div className="statistics-header__menu">
<h1>Статистика проекта</h1>
<img src={link} alt="#" />
<span>ссылка на проект</span>
</div>
<div className="statistics-header__return">
<img src={arrow} alt="#" />
<span>вернуться на все проекты</span>
</div>
</div>
<div className="statistics-info"></div>
<div className="statistics-team"></div>
</div>
</div>
</div>
</div>
);
};
export default Statistics;

View File

@ -0,0 +1,19 @@
.statistics {
background: #f1f1f1;
height: 100%;
min-height: 100vh;
font-family: "LabGrotesque", sans-serif;
position: relative;
&-header {
display: flex;
&__return {
img {
width: 19px;
height: 19px;
transform: rotate(-180deg);
}
}
}
}