Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
depocoder committed Dec 2, 2024
2 parents c90fa60 + 0bdac10 commit 8c49dbf
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 33 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/Calendar/ExitBtn.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import {useNavigate} from "react-router-dom";
import cross from "../../img/arrow.png";
import cross from "../../img/cross.png";

const ExitBtn = () => {
const navigate = useNavigate();
Expand Down
18 changes: 9 additions & 9 deletions frontend/src/components/Calendar/LessonTimes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ const LessonTimes = ({ events, selectedEvent, setSelectedEvent }) => {

// Массив временных интервалов пар, начиная с 10:00
const lessonTimesArray = [
"10:00 - 11:30", // 1 пара
"12:00 - 13:30", // 2 пара
"13:45 - 15:15", // 3 пара
"15:30 - 17:00", // 4 пара
"17:10 - 18:40", // 5 пара
"18:50 - 20:20" // 6 пара
"10:00 11:30", // 1 пара
"12:00 13:30", // 2 пара
"13:45 15:15", // 3 пара
"15:30 17:00", // 4 пара
"17:10 18:40", // 5 пара
"18:50 20:20" // 6 пара
];

const populateWeekDays = (events) => {
Expand Down Expand Up @@ -79,9 +79,9 @@ const LessonTimes = ({ events, selectedEvent, setSelectedEvent }) => {
const lessonEndFormatted = formatDateToAMPM(lessonEndTime);

return (
lessonStartFormatted === timeSlot.split(' - ')[0] ||
lessonEndFormatted === timeSlot.split(' - ')[1] ||
(lessonStartFormatted >= timeSlot.split(' - ')[0] && lessonEndFormatted <= timeSlot.split(' - ')[1])
lessonStartFormatted === timeSlot.split(' ')[0] ||
lessonEndFormatted === timeSlot.split(' ')[1] ||
(lessonStartFormatted >= timeSlot.split(' ')[0] && lessonEndFormatted <= timeSlot.split(' ')[1])
);
});
return (
Expand Down
7 changes: 3 additions & 4 deletions frontend/src/components/Header/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ export default function Header() {
<button className="export-btn">Экспорт .ics</button>
<button className="cache-btn">Сбросить кэш расписания</button>
</div>
<button className="exit-btn" href="#">
Выйти
<img className="exit-btn-cross" src={cross} alt={cross} />
</button>
<div className="exit-btn-zone">
<button className="exit-btn" href="#"> Выйти <img className="exit-btn-cross" src={cross} alt={cross}/></button>
</div>
</div>
<div className="rectangle">
<div className="rectangle-info">
Expand Down
26 changes: 16 additions & 10 deletions frontend/src/style/calendar.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.deadline {
&-info {
//height: 28px;
margin-top: 6px;
margin-top: 2px;
//width: 95%;
text-align: left;
padding: 5px 11px;
Expand All @@ -13,6 +13,8 @@
font-weight: 700;
font-size: 13px;
transition: color 0.3s linear;
height: 95%;
width: 95%;
&:hover {
cursor: pointer;
color: #F46386;
Expand Down Expand Up @@ -50,9 +52,7 @@
}

.days {
padding-left: 30px;
padding-bottom: 10px;
padding-top: 10px;
padding: 5px;
font-family: "Unbounded", sans-serif;
font-weight: 500;
font-size: 13px;
Expand All @@ -75,9 +75,10 @@

.vertical-deadline {
vertical-align: top;
text-align: center;
height: 72px;
width: 195px;
padding-left: 20px;
padding: 1px 4px;
border-bottom: 1px dotted #adadad;
&-heading {
padding-left: 47px;
Expand All @@ -97,11 +98,15 @@
}

.vertical {
height: 72px;
height: 80px;
width: 195px;
padding-left: 20px;
padding: 1px 4px;
border-bottom: 1px dotted #adadad;
text-align: center;
vertical-align: middle;
&-heading {
text-align: right;
vertical-align: top;
padding-left: 47px;
padding-top: 7px;
padding-bottom: 7px;
Expand Down Expand Up @@ -153,6 +158,7 @@
}

.company-name {
margin-top: 7px;
vertical-align: top;
font-family: "Roboto", sans-serif;
font-weight: 500;
Expand All @@ -171,7 +177,7 @@
.netology-lesson {
display: flex;
flex-direction: column;
justify-content: space-evenly;
justify-content: flex-start;
padding-left: 12px;
text-align: left;
width: 95%;
Expand All @@ -187,8 +193,8 @@
.TyumGU-lesson {
display: flex;
flex-direction: column;
justify-content: space-evenly;
padding: 12px;
justify-content: flex-start;
padding-left: 12px;
text-align: left;
//width: 95%;
height: 95%;
Expand Down
23 changes: 14 additions & 9 deletions frontend/src/style/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
}

.header {
max-width: 80%;
margin: auto;
max-width: 100%;
margin-left: 10%;
margin-right: 3%;

&-line {
display: flex;
Expand Down Expand Up @@ -72,6 +73,7 @@
&-first-word {
font-family: "Roboto", sans-serif;
font-weight: 400;
font-size: 13px;
}
}
}
Expand All @@ -90,6 +92,7 @@

.export-btn {
cursor: pointer;
margin-left: 18px;
height: 28px;
background-color: #5856d6;
color: #fff;
Expand All @@ -99,8 +102,8 @@
padding: 4px 8px;
font-family: "Roboto", sans-serif;
font-weight: 400;
font-size: 13px;
font-style: normal;
margin-left: 18px;
transition: color 0.2s linear;

&:hover {
Expand Down Expand Up @@ -142,8 +145,7 @@
font-family: "Roboto", sans-serif;
font-weight: 400;
font-size: 13px;

&-cross {
&-cross{
margin-left: 7px;
}
}
Expand All @@ -153,8 +155,6 @@
}

.name-event {
margin-top: 26px;

&-text {
color: #2c2d2e;
font-family: "Unbounded", sans-serif;
Expand All @@ -163,9 +163,14 @@
}
}

.task-event {
margin-top: 7px;
a {
text-decoration: none;
}


.task-event {
padding-left: 2px;
margin-bottom: 5px;
&-text {
color: #2c2d2e;
font-family: "Roboto", sans-serif;
Expand Down
8 changes: 8 additions & 0 deletions frontend/src/utils/dateUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,12 @@ export const formatDate = (dateString) => {
const day = dateObj.getUTCDate().toString().padStart(2, '0');
const month = (dateObj.getUTCMonth() + 1).toString().padStart(2, '0');
return `${day}.${month}`; // Возвращаем строку в формате "дд.мм"
};

export const formatDateFull = (dateString) => {
const dateObj = new Date(dateString);
const day = dateObj.getDate().toString().padStart(2, '0');
const month = (dateObj.getMonth() + 1).toString().padStart(2, '0');
const year = (dateObj.getFullYear().toString().padStart(4, '0'))
return `${day}.${month}.${year}`; // Возвращаем строку в формате "дд.мм.гггг"
};

0 comments on commit 8c49dbf

Please sign in to comment.