diff --git a/src/components/Calendar/calendarComponent.scss b/src/components/Calendar/calendarComponent.scss index 1d525bd3..5552dd04 100644 --- a/src/components/Calendar/calendarComponent.scss +++ b/src/components/Calendar/calendarComponent.scss @@ -132,6 +132,8 @@ text-align: center; } } + + margin-bottom: 60px; } &__form { diff --git a/src/components/ProfileCalendar/ProfileCalendarComponent.js b/src/components/ProfileCalendar/ProfileCalendarComponent.js index 8f2452e6..3fba3ecc 100644 --- a/src/components/ProfileCalendar/ProfileCalendarComponent.js +++ b/src/components/ProfileCalendar/ProfileCalendarComponent.js @@ -27,8 +27,8 @@ export const ProfileCalendarComponent = React.memo( const [currentDay] = useState(moment()); const [calendar, setCalendar] = useState([]); const [month, setMonth] = useState(""); + const [dayReport, setDayReport] = useState(""); const [shortReport, setShortReport] = useState(false); - const [dayTest, setDayTest] = useState(""); useEffect(() => { setCalendar(calendarHelper(value)); @@ -148,7 +148,7 @@ export const ProfileCalendarComponent = React.memo( dispatch(setReportDate(day)); dispatch(setSendRequest(true)); setShortReport(true); - setDayTest(day); + setDayReport(day); }} key={day} className={dayStyles(day)} @@ -171,9 +171,13 @@ export const ProfileCalendarComponent = React.memo( )} - - - + + {shortReport && ( + + + + )} + {shortReport && } ); diff --git a/src/components/ShortReport/ShortReport.jsx b/src/components/ShortReport/ShortReport.jsx index fb6bba74..b4b3ee6b 100644 --- a/src/components/ShortReport/ShortReport.jsx +++ b/src/components/ShortReport/ShortReport.jsx @@ -18,7 +18,7 @@ import "./shortReport.scss"; export const ShortReport = ({}) => { const reportDate = useSelector(getReportDate); - const sendTest = useSelector(getSendRequest); + const sendReport = useSelector(getSendRequest); const dispatch = useDispatch(); const [taskText, setTaskText] = useState([]); @@ -26,7 +26,6 @@ export const ShortReport = ({}) => { const [tomorrowTask, setTomorrowTask] = useState([]); const [totalHours, setTotalHours] = useState(0); const [loader, setLoader] = useState(false); - const [reportDay] = useState(new Date(getCreatedDate(reportDate))); function getReportFromDate(day) { setLoader(true); @@ -39,7 +38,6 @@ export const ShortReport = ({}) => { "cardId" )}&date=${day}` ).then((res) => { - console.log(res); let spendTime = 0; for (const item of res) { if (item.difficulties) { @@ -66,14 +64,14 @@ export const ShortReport = ({}) => { }); } - if (sendTest) { + if (sendReport) { dispatch(setSendRequest(false)); getReportFromDate(getCreatedDate(reportDate)); } return (
-
+

Ваши отчеты - просмотр отчета за день

diff --git a/src/components/ShortReport/shortReport.scss b/src/components/ShortReport/shortReport.scss index e69de29b..3dc557ed 100644 --- a/src/components/ShortReport/shortReport.scss +++ b/src/components/ShortReport/shortReport.scss @@ -0,0 +1,3 @@ +.short-report { + margin-bottom: 30px; +}