Compare commits
	
		
			4 Commits
		
	
	
		
			c532302f73
			...
			75cf13d945
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					75cf13d945 | ||
| 
						 | 
					a3e39b75d8 | ||
| 271374b6c6 | |||
| 811ef4f69d | 
@@ -95,11 +95,21 @@ export const ProfileCalendar = () => {
 | 
			
		||||
              alt="avatar"
 | 
			
		||||
            />
 | 
			
		||||
            <p className="summary__name">
 | 
			
		||||
              {profileInfo?.fio || profileInfo?.username},{" "}
 | 
			
		||||
              {profileInfo.specification} разработчик
 | 
			
		||||
              {profileInfo?.fio || profileInfo?.username}{" "}
 | 
			
		||||
              {profileInfo.specification}
 | 
			
		||||
            </p>
 | 
			
		||||
            <hr />
 | 
			
		||||
            <div className="summary__direction">Front End</div>
 | 
			
		||||
            <div className="summary__level">Middle+</div>
 | 
			
		||||
          </div>
 | 
			
		||||
          <Link to="/profile/calendar/report">
 | 
			
		||||
          <div className="summary__skill">
 | 
			
		||||
            <p>Ключевые навыки:</p>
 | 
			
		||||
            <div>Java</div>
 | 
			
		||||
            <div>Java</div>
 | 
			
		||||
            <div>Solid</div>
 | 
			
		||||
            <div>Java</div>
 | 
			
		||||
          </div>
 | 
			
		||||
          {/* <Link to="/profile/calendar/report">
 | 
			
		||||
            <button
 | 
			
		||||
              className="calendar__btn"
 | 
			
		||||
              onClick={() => {
 | 
			
		||||
@@ -109,7 +119,7 @@ export const ProfileCalendar = () => {
 | 
			
		||||
            >
 | 
			
		||||
              Заполнить отчет
 | 
			
		||||
            </button>
 | 
			
		||||
          </Link>
 | 
			
		||||
          </Link> */}
 | 
			
		||||
        </div>
 | 
			
		||||
        {loader ? (
 | 
			
		||||
          <div className="loader__wrapper">
 | 
			
		||||
 
 | 
			
		||||
@@ -289,16 +289,16 @@ 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
 | 
			
		||||
 
 | 
			
		||||
@@ -22,6 +22,25 @@
 | 
			
		||||
    @media (max-width: 500px) {
 | 
			
		||||
      padding-right: 5px;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    .summary__skill {
 | 
			
		||||
      color: #6f6f6f;
 | 
			
		||||
      font-size: 14px;
 | 
			
		||||
      font-weight: 300;
 | 
			
		||||
      display: flex;
 | 
			
		||||
      flex-direction: row;
 | 
			
		||||
      align-items: center;
 | 
			
		||||
      column-gap: 10px;
 | 
			
		||||
 | 
			
		||||
      div {
 | 
			
		||||
        font-size: 12px;
 | 
			
		||||
        font-weight: 400;
 | 
			
		||||
 | 
			
		||||
        border: #8dc63f 0.5px solid;
 | 
			
		||||
        border-radius: 44px;
 | 
			
		||||
        padding: 3px 20px;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .loader__wrapper {
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										113
									
								
								src/components/TrackerSelectExecutor/TrackerSelectExecutor.jsx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										113
									
								
								src/components/TrackerSelectExecutor/TrackerSelectExecutor.jsx
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,113 @@
 | 
			
		||||
import React, { useEffect, useState } from "react";
 | 
			
		||||
import { useDispatch } from "react-redux";
 | 
			
		||||
 | 
			
		||||
import { filteredExecutorTasks } from "@redux/projectsTrackerSlice";
 | 
			
		||||
 | 
			
		||||
import { removeLast, urlForLocal } from "@utils/helper";
 | 
			
		||||
 | 
			
		||||
import arrowDown from "assets/icons/arrows/selectArrow.png";
 | 
			
		||||
import close from "assets/icons/close.png";
 | 
			
		||||
import avatarMok from "assets/images/avatarMok.png";
 | 
			
		||||
 | 
			
		||||
import "./trackerSelectExecutor.scss";
 | 
			
		||||
 | 
			
		||||
const TrackerSelectExecutor = ({
 | 
			
		||||
  selectedExecutor,
 | 
			
		||||
  setSelectedExecutor,
 | 
			
		||||
  deleteSelectedExecutor,
 | 
			
		||||
  projectBoard
 | 
			
		||||
}) => {
 | 
			
		||||
  const [selectExecutorOpen, setSelectedExecutorOpen] = useState(false);
 | 
			
		||||
  const dispatch = useDispatch();
 | 
			
		||||
 | 
			
		||||
  const initListeners = () => {
 | 
			
		||||
    document.addEventListener("click", closeByClickingOut);
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  const closeByClickingOut = (event) => {
 | 
			
		||||
    const path = event.path || (event.composedPath && event.composedPath());
 | 
			
		||||
 | 
			
		||||
    if (
 | 
			
		||||
      event &&
 | 
			
		||||
      !path.find(
 | 
			
		||||
        (div) =>
 | 
			
		||||
          div.classList &&
 | 
			
		||||
          (div.classList.contains("tasks__head__executor") ||
 | 
			
		||||
            div.classList.contains("tasks__head__executor-dropdown"))
 | 
			
		||||
      )
 | 
			
		||||
    ) {
 | 
			
		||||
      setSelectedExecutorOpen(false);
 | 
			
		||||
    }
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  function executorFilter(user) {
 | 
			
		||||
    dispatch(filteredExecutorTasks(user.user_id));
 | 
			
		||||
    setSelectedExecutor(user);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  useEffect(() => {
 | 
			
		||||
    initListeners();
 | 
			
		||||
  }, []);
 | 
			
		||||
 | 
			
		||||
  if (selectedExecutor) {
 | 
			
		||||
    return (
 | 
			
		||||
      <div className="tasks__head__executor-selected">
 | 
			
		||||
        <p>{removeLast(selectedExecutor.user.fio)}</p>
 | 
			
		||||
        <img
 | 
			
		||||
          className="avatar"
 | 
			
		||||
          src={
 | 
			
		||||
            selectedExecutor.user?.avatar
 | 
			
		||||
              ? urlForLocal(selectedExecutor.user.avatar)
 | 
			
		||||
              : avatarMok
 | 
			
		||||
          }
 | 
			
		||||
          alt="avatar"
 | 
			
		||||
        />
 | 
			
		||||
        <img
 | 
			
		||||
          className="delete"
 | 
			
		||||
          src={close}
 | 
			
		||||
          alt="delete"
 | 
			
		||||
          onClick={deleteSelectedExecutor}
 | 
			
		||||
        />
 | 
			
		||||
      </div>
 | 
			
		||||
    );
 | 
			
		||||
  } else {
 | 
			
		||||
    return (
 | 
			
		||||
      <div
 | 
			
		||||
        className="tasks__head__executor"
 | 
			
		||||
        onClick={() => setSelectedExecutorOpen(!selectExecutorOpen)}
 | 
			
		||||
      >
 | 
			
		||||
        <p>Выберите исполнителя</p>
 | 
			
		||||
        <img
 | 
			
		||||
          className={selectExecutorOpen ? "open" : ""}
 | 
			
		||||
          src={arrowDown}
 | 
			
		||||
          alt="arrow"
 | 
			
		||||
        />
 | 
			
		||||
        {selectExecutorOpen && (
 | 
			
		||||
          <div className="tasks__head__executor-dropdown">
 | 
			
		||||
            {projectBoard.projectUsers.map((user) => {
 | 
			
		||||
              return (
 | 
			
		||||
                <div
 | 
			
		||||
                  className="executor-dropdown__person"
 | 
			
		||||
                  key={user.user_id}
 | 
			
		||||
                  onClick={() => executorFilter(user)}
 | 
			
		||||
                >
 | 
			
		||||
                  <p>{removeLast(user.user?.fio)}</p>
 | 
			
		||||
                  <img
 | 
			
		||||
                    src={
 | 
			
		||||
                      user.user?.avatar
 | 
			
		||||
                        ? urlForLocal(user.user.avatar)
 | 
			
		||||
                        : avatarMok
 | 
			
		||||
                    }
 | 
			
		||||
                    alt="avatar"
 | 
			
		||||
                  />
 | 
			
		||||
                </div>
 | 
			
		||||
              );
 | 
			
		||||
            })}
 | 
			
		||||
          </div>
 | 
			
		||||
        )}
 | 
			
		||||
      </div>
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export default TrackerSelectExecutor;
 | 
			
		||||
@@ -40,6 +40,7 @@ import { Navigation } from "@components/Navigation/Navigation";
 | 
			
		||||
import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";
 | 
			
		||||
import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader";
 | 
			
		||||
import TrackerSelectColumn from "@components/TrackerSelectColumn/TrackerSelectColumn";
 | 
			
		||||
import TrackerSelectExecutor from "@components/TrackerSelectExecutor/TrackerSelectExecutor";
 | 
			
		||||
 | 
			
		||||
import arrow from "assets/icons/arrows/arrowRight.png";
 | 
			
		||||
import arrowDown from "assets/icons/arrows/selectArrow.png";
 | 
			
		||||
@@ -53,7 +54,6 @@ import trackerNoTasks from "assets/icons/trackerNoTasks.svg";
 | 
			
		||||
import project from "assets/icons/trackerProject.svg";
 | 
			
		||||
import tasks from "assets/icons/trackerTasks.svg";
 | 
			
		||||
import accept from "assets/images/accept.png";
 | 
			
		||||
import archive from "assets/images/archiveIcon.png";
 | 
			
		||||
import avatarMok from "assets/images/avatarMok.png";
 | 
			
		||||
 | 
			
		||||
import { getCorrectDate } from "../../utils/calendarHelper";
 | 
			
		||||
@@ -85,7 +85,6 @@ export const ProjectTracker = () => {
 | 
			
		||||
  const [filteredNoTasks, setFilteredNoTasks] = useState(false);
 | 
			
		||||
  const [checkBoxMyTasks, setCheckBoxMyTasks] = useState(false);
 | 
			
		||||
  const [selectedExecutor, setSelectedExecutor] = useState(null);
 | 
			
		||||
  const [selectExecutorOpen, setSelectedExecutorOpen] = useState(false);
 | 
			
		||||
  const startWrapperIndexTest = useRef({});
 | 
			
		||||
  const projectBoard = useSelector(getProjectBoard);
 | 
			
		||||
  const loader = useSelector(getBoarderLoader);
 | 
			
		||||
@@ -288,11 +287,6 @@ export const ProjectTracker = () => {
 | 
			
		||||
    setCheckBoxMyTasks(!checkBoxMyTasks);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  function executorFilter(user) {
 | 
			
		||||
    dispatch(filteredExecutorTasks(user.user_id));
 | 
			
		||||
    setSelectedExecutor(user);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  function deleteSelectedExecutorFilter() {
 | 
			
		||||
    setSelectedExecutor(null);
 | 
			
		||||
    setCheckBoxParticipateTasks(false);
 | 
			
		||||
@@ -394,18 +388,6 @@ export const ProjectTracker = () => {
 | 
			
		||||
      setPersonListOpen(false);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (
 | 
			
		||||
      event &&
 | 
			
		||||
      !path.find(
 | 
			
		||||
        (div) =>
 | 
			
		||||
          div.classList &&
 | 
			
		||||
          (div.classList.contains("tasks__head__executor") ||
 | 
			
		||||
            div.classList.contains("tasks__head__executor-dropdown"))
 | 
			
		||||
      )
 | 
			
		||||
    ) {
 | 
			
		||||
      setSelectedExecutorOpen(false);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (
 | 
			
		||||
      event &&
 | 
			
		||||
      !path.find(
 | 
			
		||||
@@ -577,63 +559,14 @@ export const ProjectTracker = () => {
 | 
			
		||||
                      {checkBoxMyTasks && <img src={accept} alt="accept" />}
 | 
			
		||||
                    </div>
 | 
			
		||||
                  </div>
 | 
			
		||||
                  {selectedExecutor ? (
 | 
			
		||||
                    <div className="tasks__head__executor-selected">
 | 
			
		||||
                      <p>{removeLast(selectedExecutor.user.fio)}</p>
 | 
			
		||||
                      <img
 | 
			
		||||
                        className="avatar"
 | 
			
		||||
                        src={
 | 
			
		||||
                          selectedExecutor.user?.avatar
 | 
			
		||||
                            ? urlForLocal(selectedExecutor.user.avatar)
 | 
			
		||||
                            : avatarMok
 | 
			
		||||
                        }
 | 
			
		||||
                        alt="avatar"
 | 
			
		||||
                      />
 | 
			
		||||
                      <img
 | 
			
		||||
                        className="delete"
 | 
			
		||||
                        src={close}
 | 
			
		||||
                        alt="delete"
 | 
			
		||||
                        onClick={deleteSelectedExecutorFilter}
 | 
			
		||||
                      />
 | 
			
		||||
                    </div>
 | 
			
		||||
                  ) : (
 | 
			
		||||
                    <div
 | 
			
		||||
                      className="tasks__head__executor"
 | 
			
		||||
                      onClick={() =>
 | 
			
		||||
                        setSelectedExecutorOpen(!selectExecutorOpen)
 | 
			
		||||
                      }
 | 
			
		||||
                    >
 | 
			
		||||
                      <p>Выберите исполнителя</p>
 | 
			
		||||
                      <img
 | 
			
		||||
                        className={selectExecutorOpen ? "open" : ""}
 | 
			
		||||
                        src={arrowDown}
 | 
			
		||||
                        alt="arrow"
 | 
			
		||||
                      />
 | 
			
		||||
                      {selectExecutorOpen && (
 | 
			
		||||
                        <div className="tasks__head__executor-dropdown">
 | 
			
		||||
                          {projectBoard.projectUsers.map((user) => {
 | 
			
		||||
                            return (
 | 
			
		||||
                              <div
 | 
			
		||||
                                className="executor-dropdown__person"
 | 
			
		||||
                                key={user.user_id}
 | 
			
		||||
                                onClick={() => executorFilter(user)}
 | 
			
		||||
                              >
 | 
			
		||||
                                <p>{removeLast(user.user?.fio)}</p>
 | 
			
		||||
                                <img
 | 
			
		||||
                                  src={
 | 
			
		||||
                                    user.user?.avatar
 | 
			
		||||
                                      ? urlForLocal(user.user.avatar)
 | 
			
		||||
                                      : avatarMok
 | 
			
		||||
                                  }
 | 
			
		||||
                                  alt="avatar"
 | 
			
		||||
                                />
 | 
			
		||||
                              </div>
 | 
			
		||||
                            );
 | 
			
		||||
                          })}
 | 
			
		||||
                        </div>
 | 
			
		||||
                      )}
 | 
			
		||||
                    </div>
 | 
			
		||||
                  )}
 | 
			
		||||
 | 
			
		||||
                  <TrackerSelectExecutor
 | 
			
		||||
                    deleteSelectedExecutor={deleteSelectedExecutorFilter}
 | 
			
		||||
                    projectBoard={projectBoard}
 | 
			
		||||
                    selectedExecutor={selectedExecutor}
 | 
			
		||||
                    setSelectedExecutor={setSelectedExecutor}
 | 
			
		||||
                  />
 | 
			
		||||
 | 
			
		||||
                  <div className="tasks__head__tags">
 | 
			
		||||
                    <div
 | 
			
		||||
                      className="tags__add"
 | 
			
		||||
 
 | 
			
		||||
@@ -116,8 +116,8 @@ export const Summary = () => {
 | 
			
		||||
                alt="avatar"
 | 
			
		||||
              />
 | 
			
		||||
              <p className="summary__name">
 | 
			
		||||
                {profileInfo?.fio || profileInfo?.username},{" "}
 | 
			
		||||
                {profileInfo.specification} разработчик
 | 
			
		||||
                {profileInfo?.fio || profileInfo?.username}{" "}
 | 
			
		||||
                {profileInfo.specification}
 | 
			
		||||
              </p>
 | 
			
		||||
              <hr />
 | 
			
		||||
              <div className="summary__direction">Front End</div>
 | 
			
		||||
 
 | 
			
		||||
@@ -36,6 +36,7 @@
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  &__info {
 | 
			
		||||
    width: 100%;
 | 
			
		||||
    min-height: 110px;
 | 
			
		||||
    background: white;
 | 
			
		||||
    border-radius: 12px;
 | 
			
		||||
@@ -64,6 +65,12 @@
 | 
			
		||||
    align-items: center;
 | 
			
		||||
    column-gap: 20px;
 | 
			
		||||
 | 
			
		||||
    hr {
 | 
			
		||||
      background-color: #00000081;
 | 
			
		||||
      height: 30px;
 | 
			
		||||
      width: 1px;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @media (max-width: 825px) {
 | 
			
		||||
      column-gap: 20px;
 | 
			
		||||
    }
 | 
			
		||||
@@ -131,6 +138,7 @@
 | 
			
		||||
    border-radius: 44px;
 | 
			
		||||
    font-size: 14px;
 | 
			
		||||
    font-weight: 400;
 | 
			
		||||
    padding: 5px 17px;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  &__git {
 | 
			
		||||
 
 | 
			
		||||
@@ -170,101 +170,87 @@ export const ViewReport = () => {
 | 
			
		||||
            </div>
 | 
			
		||||
          )}
 | 
			
		||||
        </div>
 | 
			
		||||
        <div className="view-report__switch-date">
 | 
			
		||||
          <div onClick={() => previousDay()}>
 | 
			
		||||
            <Link
 | 
			
		||||
              to={`/profile/calendar/view/${getCreatedDate(
 | 
			
		||||
                previousReportDay
 | 
			
		||||
              )}/${params.id}`}
 | 
			
		||||
            >
 | 
			
		||||
              <div className="view-report__switch-date__prev switch-date">
 | 
			
		||||
                <img src={arrowSwitchDate} alt="arrow" />
 | 
			
		||||
              </div>
 | 
			
		||||
            </Link>
 | 
			
		||||
          </div>
 | 
			
		||||
 | 
			
		||||
          <p>{getCorrectDate(params.date)}</p>
 | 
			
		||||
 | 
			
		||||
          <div
 | 
			
		||||
            onClick={() => nextDay()}
 | 
			
		||||
            className={`${
 | 
			
		||||
              getCreatedDate(currentDay) === params.date ? "disable" : ""
 | 
			
		||||
            }`}
 | 
			
		||||
          >
 | 
			
		||||
            <Link
 | 
			
		||||
              to={`/profile/calendar/view/${getCreatedDate(nextReportDay)}/${
 | 
			
		||||
                params.id
 | 
			
		||||
              }`}
 | 
			
		||||
            >
 | 
			
		||||
              <div className={`view-report__switch-date__next switch-date`}>
 | 
			
		||||
                <img src={arrowSwitchDate} alt="arrow" />
 | 
			
		||||
              </div>
 | 
			
		||||
            </Link>
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        {loader && <Loader width={75} height={75} />}
 | 
			
		||||
        {Boolean(taskText.length) && (
 | 
			
		||||
          <div className="view-report__content">
 | 
			
		||||
            <div className="table__container">
 | 
			
		||||
              <table className="view-report__done">
 | 
			
		||||
                <thead>
 | 
			
		||||
                  <tr>
 | 
			
		||||
                    <th>
 | 
			
		||||
                      <p>Выполненные задачи</p>
 | 
			
		||||
                    </th>
 | 
			
		||||
                    <th>
 | 
			
		||||
                      <p>Время</p>
 | 
			
		||||
                    </th>
 | 
			
		||||
                  </tr>
 | 
			
		||||
                </thead>
 | 
			
		||||
                <tbody>
 | 
			
		||||
                  {taskText.length &&
 | 
			
		||||
                    taskText.map((task, index) => {
 | 
			
		||||
                      return (
 | 
			
		||||
                        <tr key={task.id}>
 | 
			
		||||
                          <td>
 | 
			
		||||
                            <p>
 | 
			
		||||
                              {index + 1}. {task.task}
 | 
			
		||||
                            </p>
 | 
			
		||||
                          </td>
 | 
			
		||||
                          <td>
 | 
			
		||||
                            <div className="view-report__done__hours__item">
 | 
			
		||||
                              <span>{Math.floor(task.hours)}</span>
 | 
			
		||||
                              <p className="hours">
 | 
			
		||||
                                {hourOfNum(Math.floor(task.hours))}
 | 
			
		||||
                              </p>
 | 
			
		||||
                            </div>
 | 
			
		||||
                          </td>
 | 
			
		||||
                        </tr>
 | 
			
		||||
                      );
 | 
			
		||||
                    })}
 | 
			
		||||
                  <tr>
 | 
			
		||||
                    <td></td>
 | 
			
		||||
                    <td>
 | 
			
		||||
                      <span>
 | 
			
		||||
                        Всего: {totalHours} {hourOfNum(totalHours)}
 | 
			
		||||
                      </span>
 | 
			
		||||
                    </td>
 | 
			
		||||
                  </tr>
 | 
			
		||||
                </tbody>
 | 
			
		||||
              </table>
 | 
			
		||||
            <div className="view-report__switch-date">
 | 
			
		||||
              <div onClick={() => previousDay()}>
 | 
			
		||||
                <Link
 | 
			
		||||
                  to={`/profile/calendar/view/${getCreatedDate(
 | 
			
		||||
                    previousReportDay
 | 
			
		||||
                  )}/${params.id}`}
 | 
			
		||||
                >
 | 
			
		||||
                  <div className="view-report__switch-date__prev switch-date">
 | 
			
		||||
                    <img src={arrowSwitchDate} alt="arrow" />
 | 
			
		||||
                  </div>
 | 
			
		||||
                </Link>
 | 
			
		||||
              </div>
 | 
			
		||||
 | 
			
		||||
              <p>{getCorrectDate(params.date)}</p>
 | 
			
		||||
 | 
			
		||||
              <div
 | 
			
		||||
                onClick={() => nextDay()}
 | 
			
		||||
                className={`${
 | 
			
		||||
                  getCreatedDate(currentDay) === params.date ? "disable" : ""
 | 
			
		||||
                }`}
 | 
			
		||||
              >
 | 
			
		||||
                <Link
 | 
			
		||||
                  to={`/profile/calendar/view/${getCreatedDate(
 | 
			
		||||
                    nextReportDay
 | 
			
		||||
                  )}/${params.id}`}
 | 
			
		||||
                >
 | 
			
		||||
                  <div className={`view-report__switch-date__next switch-date`}>
 | 
			
		||||
                    <img src={arrowSwitchDate} alt="arrow" />
 | 
			
		||||
                  </div>
 | 
			
		||||
                </Link>
 | 
			
		||||
              </div>
 | 
			
		||||
            </div>
 | 
			
		||||
            {Boolean(difficulties.length) && (
 | 
			
		||||
              <div className="view-report__item">
 | 
			
		||||
                <h3>Возникшие сложности</h3>
 | 
			
		||||
                {difficulties.map((item, index) => {
 | 
			
		||||
                  return <p key={index}>{item}</p>;
 | 
			
		||||
            <div className="view-report__done">
 | 
			
		||||
              <h2>Выполненные задачи</h2>
 | 
			
		||||
              {taskText.length &&
 | 
			
		||||
                taskText.map((task, index) => {
 | 
			
		||||
                  return (
 | 
			
		||||
                    <div className="view-report__done-task" key={task.id}>
 | 
			
		||||
                      <div>
 | 
			
		||||
                        <p>
 | 
			
		||||
                          {index + 1}. {task.task}
 | 
			
		||||
                        </p>
 | 
			
		||||
                      </div>
 | 
			
		||||
 | 
			
		||||
                      <div className="view-report__done__hours__item">
 | 
			
		||||
                        <span>{Math.floor(task.hours)}</span>
 | 
			
		||||
                        <p className="hours">
 | 
			
		||||
                          / {hourOfNum(Math.floor(task.hours))}
 | 
			
		||||
                        </p>
 | 
			
		||||
                      </div>
 | 
			
		||||
                      <div>Задача ( On Review ) - Уведомления </div>
 | 
			
		||||
                    </div>
 | 
			
		||||
                  );
 | 
			
		||||
                })}
 | 
			
		||||
              </div>
 | 
			
		||||
            )}
 | 
			
		||||
            {Boolean(tomorrowTask.length) && (
 | 
			
		||||
              <div className="view-report__item">
 | 
			
		||||
                <h3>Что планируется сделать завтра?</h3>
 | 
			
		||||
                {tomorrowTask.map((item, index) => {
 | 
			
		||||
                  return <p key={index}>{item}</p>;
 | 
			
		||||
                })}
 | 
			
		||||
              </div>
 | 
			
		||||
            )}
 | 
			
		||||
 | 
			
		||||
              <p className="view-report__done-total-hours">
 | 
			
		||||
                Всего: {totalHours} <span>/ {hourOfNum(totalHours)}</span>
 | 
			
		||||
              </p>
 | 
			
		||||
            </div>
 | 
			
		||||
            <div className="view-report__addition">
 | 
			
		||||
              {Boolean(difficulties.length) && (
 | 
			
		||||
                <div className="view-report__addition-item">
 | 
			
		||||
                  <h3>Возникшие сложности</h3>
 | 
			
		||||
                  {difficulties.map((item, index) => {
 | 
			
		||||
                    return <p key={index}>{item}</p>;
 | 
			
		||||
                  })}
 | 
			
		||||
                </div>
 | 
			
		||||
              )}
 | 
			
		||||
              {Boolean(tomorrowTask.length) && (
 | 
			
		||||
                <div className="view-report__addition-item">
 | 
			
		||||
                  <h3>Что планируется сделать завтра?</h3>
 | 
			
		||||
                  {tomorrowTask.map((item, index) => {
 | 
			
		||||
                    return <p key={index}>{item}</p>;
 | 
			
		||||
                  })}
 | 
			
		||||
                </div>
 | 
			
		||||
              )}
 | 
			
		||||
            </div>
 | 
			
		||||
          </div>
 | 
			
		||||
        )}
 | 
			
		||||
        {!Boolean(taskText.length) && !loader && (
 | 
			
		||||
 
 | 
			
		||||
@@ -16,6 +16,12 @@
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  &__content {
 | 
			
		||||
    background-color: #ffffff;
 | 
			
		||||
    border-bottom-left-radius: 12px;
 | 
			
		||||
    border-bottom-right-radius: 12px;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  &__info {
 | 
			
		||||
    display: flex;
 | 
			
		||||
    flex-direction: column;
 | 
			
		||||
@@ -60,7 +66,8 @@
 | 
			
		||||
    display: flex;
 | 
			
		||||
    margin-top: 20px;
 | 
			
		||||
    background: #ffffff;
 | 
			
		||||
    border-radius: 12px;
 | 
			
		||||
    border-top-left-radius: 12px;
 | 
			
		||||
    border-top-right-radius: 12px;
 | 
			
		||||
    padding: 20px 33px;
 | 
			
		||||
    align-items: center;
 | 
			
		||||
    column-gap: 20px;
 | 
			
		||||
@@ -121,10 +128,10 @@
 | 
			
		||||
 | 
			
		||||
  &__switch-date {
 | 
			
		||||
    display: flex;
 | 
			
		||||
    margin: 20px 0;
 | 
			
		||||
    justify-content: center;
 | 
			
		||||
    column-gap: 30px;
 | 
			
		||||
    align-items: center;
 | 
			
		||||
    padding: 20px 20px 20px 30px;
 | 
			
		||||
    border-bottom: #eeeeee 1px solid;
 | 
			
		||||
 | 
			
		||||
    @media (max-width: 500px) {
 | 
			
		||||
      column-gap: 0;
 | 
			
		||||
@@ -132,17 +139,16 @@
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    p {
 | 
			
		||||
      font-weight: 400;
 | 
			
		||||
      font-size: 18px;
 | 
			
		||||
      line-height: 32px;
 | 
			
		||||
      color: #000000;
 | 
			
		||||
      font-weight: 500;
 | 
			
		||||
      font-size: 22px;
 | 
			
		||||
      color: #2e3a59;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    .switch-date {
 | 
			
		||||
      width: 48px;
 | 
			
		||||
      height: 48px;
 | 
			
		||||
      background: #8dc63f;
 | 
			
		||||
      border-radius: 50px;
 | 
			
		||||
      width: 20px;
 | 
			
		||||
      height: 47px;
 | 
			
		||||
      background-color: #e5f1fb;
 | 
			
		||||
      border-radius: 5px;
 | 
			
		||||
      display: flex;
 | 
			
		||||
      justify-content: center;
 | 
			
		||||
      align-items: center;
 | 
			
		||||
@@ -186,6 +192,34 @@
 | 
			
		||||
    border-collapse: separate;
 | 
			
		||||
    border-spacing: 28px 0;
 | 
			
		||||
 | 
			
		||||
    h2 {
 | 
			
		||||
      color: #1458dd;
 | 
			
		||||
      font-size: 20px;
 | 
			
		||||
      font-weight: 500;
 | 
			
		||||
      padding: 35px;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    &-task {
 | 
			
		||||
      display: grid;
 | 
			
		||||
      grid-template-columns: 40% 15% 30%;
 | 
			
		||||
      align-items: center;
 | 
			
		||||
      font-size: 15px;
 | 
			
		||||
      font-weight: 500;
 | 
			
		||||
      color: #111112;
 | 
			
		||||
      justify-content: space-evenly;
 | 
			
		||||
      margin: 0 0 20px 0;
 | 
			
		||||
 | 
			
		||||
      div {
 | 
			
		||||
        background-color: #f4f7ff;
 | 
			
		||||
        height: 61px;
 | 
			
		||||
        display: flex;
 | 
			
		||||
        align-items: center;
 | 
			
		||||
        justify-content: center;
 | 
			
		||||
        border-radius: 10px;
 | 
			
		||||
        padding: 10px 20px;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @media (max-width: 1205px) {
 | 
			
		||||
      display: grid;
 | 
			
		||||
      border-collapse: collapse;
 | 
			
		||||
@@ -309,57 +343,17 @@
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      &__item {
 | 
			
		||||
        display: flex;
 | 
			
		||||
        column-gap: 25px;
 | 
			
		||||
        align-items: center;
 | 
			
		||||
        min-width: 155px;
 | 
			
		||||
 | 
			
		||||
        .hours {
 | 
			
		||||
          font-size: 15px;
 | 
			
		||||
 | 
			
		||||
          @media (max-width: 1170px) {
 | 
			
		||||
            font-size: 13px;
 | 
			
		||||
            text-align: center;
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @media (max-width: 900px) {
 | 
			
		||||
          column-gap: 0;
 | 
			
		||||
          justify-content: space-between;
 | 
			
		||||
          min-width: auto;
 | 
			
		||||
          width: 100%;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        @media (max-width: 775px) {
 | 
			
		||||
          flex-direction: column;
 | 
			
		||||
          justify-content: center;
 | 
			
		||||
          row-gap: 10px;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        span {
 | 
			
		||||
          max-width: 48px;
 | 
			
		||||
          height: 48px;
 | 
			
		||||
          background: #8dc63f;
 | 
			
		||||
          border-radius: 50px;
 | 
			
		||||
          display: flex;
 | 
			
		||||
          align-items: center;
 | 
			
		||||
          justify-content: center;
 | 
			
		||||
          font-weight: 700;
 | 
			
		||||
          font-size: 22px;
 | 
			
		||||
          line-height: 32px;
 | 
			
		||||
          font-size: 20px;
 | 
			
		||||
          color: #000000;
 | 
			
		||||
          width: 100%;
 | 
			
		||||
 | 
			
		||||
          @media (max-width: 900px) {
 | 
			
		||||
            max-width: 40px;
 | 
			
		||||
            height: 40px;
 | 
			
		||||
          }
 | 
			
		||||
          margin: 5px;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        p {
 | 
			
		||||
          font-weight: 400;
 | 
			
		||||
          font-size: 12px;
 | 
			
		||||
          line-height: 32px;
 | 
			
		||||
          font-size: 15px;
 | 
			
		||||
          color: #6f6f6f;
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
@@ -369,40 +363,54 @@
 | 
			
		||||
        line-height: 32px;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  &__item {
 | 
			
		||||
    display: flex;
 | 
			
		||||
    flex-direction: column;
 | 
			
		||||
    row-gap: 10px;
 | 
			
		||||
    background: #ffffff;
 | 
			
		||||
    border-radius: 12px;
 | 
			
		||||
    margin: 20px 0;
 | 
			
		||||
    padding: 15px;
 | 
			
		||||
 | 
			
		||||
    h3 {
 | 
			
		||||
    &-total-hours {
 | 
			
		||||
      color: #000000;
 | 
			
		||||
      font-size: 20px;
 | 
			
		||||
      font-weight: 500;
 | 
			
		||||
      font-size: 22px;
 | 
			
		||||
      line-height: 32px;
 | 
			
		||||
      margin: 35px 0 0 30px;
 | 
			
		||||
 | 
			
		||||
      @media (max-width: 650px) {
 | 
			
		||||
        font-size: 16px;
 | 
			
		||||
        line-height: 20px;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    p {
 | 
			
		||||
      font-weight: 400;
 | 
			
		||||
      font-size: 15px;
 | 
			
		||||
 | 
			
		||||
      @media (max-width: 650px) {
 | 
			
		||||
        font-size: 13px;
 | 
			
		||||
      span {
 | 
			
		||||
        font-weight: 400;
 | 
			
		||||
        font-size: 15px;
 | 
			
		||||
        color: #6f6f6f;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  &__item:last-child {
 | 
			
		||||
    margin-bottom: 0;
 | 
			
		||||
  &__addition {
 | 
			
		||||
    display: grid;
 | 
			
		||||
    grid-template-columns: 55% 45%;
 | 
			
		||||
    column-gap: 15px;
 | 
			
		||||
    padding: 35px;
 | 
			
		||||
 | 
			
		||||
    &-item {
 | 
			
		||||
      display: flex;
 | 
			
		||||
      flex-direction: column;
 | 
			
		||||
      row-gap: 10px;
 | 
			
		||||
      background-color: #f4f7ff;
 | 
			
		||||
      border-radius: 10px;
 | 
			
		||||
      padding: 15px;
 | 
			
		||||
 | 
			
		||||
      h3 {
 | 
			
		||||
        color: #1458dd;
 | 
			
		||||
        font-weight: 500;
 | 
			
		||||
        font-size: 20px;
 | 
			
		||||
 | 
			
		||||
        @media (max-width: 650px) {
 | 
			
		||||
          font-size: 16px;
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      p {
 | 
			
		||||
        font-weight: 400;
 | 
			
		||||
        font-size: 15px;
 | 
			
		||||
 | 
			
		||||
        @media (max-width: 650px) {
 | 
			
		||||
          font-size: 13px;
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  &__no-task {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user