Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
planner-team-one
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
21
Issues
21
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Евгений Положенцев
planner-team-one
Commits
1fba0e35
Commit
1fba0e35
authored
Dec 12, 2022
by
Ermolaev Timur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#103
чуть изменил расположение файлов
parent
d029fe4c
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
104 additions
and
21 deletions
+104
-21
CalendarRow.js
...front/src/components/Calendars/CalendarRow/CalendarRow.js
+0
-0
CalendarSmallCell.js
...mponents/Calendars/CalendarSmallCell/CalendarSmallCell.js
+0
-0
CalendarStandartCell.js
...ts/Calendars/CalendarStandartCell/CalendarStandartCell.js
+2
-1
CalendarRowDay.js
...lendar/MonthCalendarBody/CalendarRowDay/CalendarRowDay.js
+2
-2
EmptyBox.js
...dar/MonthCalendarBody/CalendarRowDay/EmptyBox/EmptyBox.js
+0
-0
Helpers.js
...MonthCalendar/MonthCalendarBody/CalendarRowDay/Helpers.js
+0
-0
CalendarTask.js
...thCalendar/MonthCalendarBody/CalendarTask/CalendarTask.js
+0
-0
DefaultTask.js
...onthCalendar/MonthCalendarBody/DefaultTask/DefaultTask.js
+0
-0
MonthCalendarBody.js
...dars/MonthCalendar/MonthCalendarBody/MonthCalendarBody.js
+5
-5
MonthAndYearInfo.js
.../MonthCalendarHeader/MonthAndYearInfo/MonthAndYearInfo.js
+2
-2
MonthCalendarHeader.js
.../MonthCalendar/MonthCalendarHeader/MonthCalendarHeader.js
+36
-0
MonthCalendarModalContent.js
...rs/MonthCalendarModalContent/MonthCalendarModalContent.js
+0
-0
CalendarRowDayWeek.js
...WeekCalendarBody/CalendarRowDayWeek/CalendarRowDayWeek.js
+2
-2
Helpers.js
...onents/Calendars/WeekCalendar/WeekCalendarBody/Helpers.js
+0
-0
WeekCalendarBody.js
...lendars/WeekCalendar/WeekCalendarBody/WeekCalendarBody.js
+3
-3
WeekCalendarHeader.js
...ars/WeekCalendar/WeekCalendarHeader/WeekCalendarHeader.js
+0
-0
WeekCalendarHeaderInfo.js
...arHeader/WeekCalendarHeaderInfo/WeekCalendarHeaderInfo.js
+2
-2
DefaultModal.js
planner-front/src/components/UI/DefaultModal/DefaultModal.js
+37
-0
MonthCalendar.js
planner-front/src/containers/MonthCalendar/MonthCalendar.js
+11
-2
WeekCalendar.js
planner-front/src/containers/WeekCalendar/WeekCalendar.js
+2
-2
No files found.
planner-front/src/components/
MonthCalendar/MonthCalendarBody
/CalendarRow/CalendarRow.js
→
planner-front/src/components/
Calendars
/CalendarRow/CalendarRow.js
View file @
1fba0e35
File moved
planner-front/src/components/
MonthCalendar/MonthCalendarBody
/CalendarSmallCell/CalendarSmallCell.js
→
planner-front/src/components/
Calendars
/CalendarSmallCell/CalendarSmallCell.js
View file @
1fba0e35
File moved
planner-front/src/components/
MonthCalendar/MonthCalendarBody/CalendarStandartCell.js
/CalendarStandartCell.js
→
planner-front/src/components/
Calendars/CalendarStandartCell
/CalendarStandartCell.js
View file @
1fba0e35
import
{
Grid
}
from
"@mui/material"
;
import
{
memo
,
useEffect
,
useState
}
from
"react"
;
import
DefaultTask
from
"../DefaultTask/DefaultTask"
;
import
DefaultTask
from
"../MonthCalendar/MonthCalendarBody/DefaultTask/DefaultTask"
;
...
...
planner-front/src/components/MonthCalendar/MonthCalendarBody/CalendarRowDay/CalendarRowDay.js
→
planner-front/src/components/
Calendars/
MonthCalendar/MonthCalendarBody/CalendarRowDay/CalendarRowDay.js
View file @
1fba0e35
import
{
Grid
}
from
"@mui/material"
;
import
{
memo
,
useMemo
}
from
"react"
;
import
{
getHoursInDayNumbers
,
getAvailableTasks
,
getLinesInDay
,
getSortedTasks
}
from
"../../../../helpers/CalendarHelpers"
;
import
CalendarStandartCell
from
"../
CalendarStandartCell.js
/CalendarStandartCell"
;
import
{
getHoursInDayNumbers
,
getAvailableTasks
,
getLinesInDay
,
getSortedTasks
}
from
"../../../../
../
helpers/CalendarHelpers"
;
import
CalendarStandartCell
from
"../
../../CalendarStandartCell
/CalendarStandartCell"
;
import
CalendarTask
from
"../CalendarTask/CalendarTask"
;
import
EmptyBox
from
"./EmptyBox/EmptyBox"
;
import
{
getBoxesInLine
}
from
"./Helpers"
;
...
...
planner-front/src/components/MonthCalendar/MonthCalendarBody/CalendarRowDay/EmptyBox/EmptyBox.js
→
planner-front/src/components/
Calendars/
MonthCalendar/MonthCalendarBody/CalendarRowDay/EmptyBox/EmptyBox.js
View file @
1fba0e35
File moved
planner-front/src/components/MonthCalendar/MonthCalendarBody/CalendarRowDay/Helpers.js
→
planner-front/src/components/
Calendars/
MonthCalendar/MonthCalendarBody/CalendarRowDay/Helpers.js
View file @
1fba0e35
File moved
planner-front/src/components/MonthCalendar/MonthCalendarBody/CalendarTask/CalendarTask.js
→
planner-front/src/components/
Calendars/
MonthCalendar/MonthCalendarBody/CalendarTask/CalendarTask.js
View file @
1fba0e35
File moved
planner-front/src/components/MonthCalendar/MonthCalendarBody/DefaultTask/DefaultTask.js
→
planner-front/src/components/
Calendars/
MonthCalendar/MonthCalendarBody/DefaultTask/DefaultTask.js
View file @
1fba0e35
File moved
planner-front/src/components/MonthCalendar/MonthCalendarBody/MonthCalendarBody.js
→
planner-front/src/components/
Calendars/
MonthCalendar/MonthCalendarBody/MonthCalendarBody.js
View file @
1fba0e35
import
{
Box
,
FormControlLabel
,
Switch
}
from
"@mui/material"
;
import
{
useState
}
from
"react"
;
import
CalendarRow
from
"./CalendarRow/CalendarRow"
;
import
CalendarSmallCell
from
"./CalendarSmallCell/CalendarSmallCell"
;
import
CalendarStandartCell
from
".
/CalendarStandartCell.js
/CalendarStandartCell"
;
import
ModalTask
from
"../../
UI/ModalTask/ModalTask"
;
import
MonthCalendarModalContent
from
"../MonthCalendarModalContent/MonthCalendarModalContent"
;
import
CalendarRow
from
".
./..
/CalendarRow/CalendarRow"
;
import
CalendarSmallCell
from
".
./..
/CalendarSmallCell/CalendarSmallCell"
;
import
CalendarStandartCell
from
".
./../CalendarStandartCell
/CalendarStandartCell"
;
import
ModalTask
from
"../../
../UI/ModalTask/ModalTask"
import
MonthCalendarModalContent
from
"../
../
MonthCalendarModalContent/MonthCalendarModalContent"
;
import
CalendarRowDay
from
"./CalendarRowDay/CalendarRowDay"
;
...
...
planner-front/src/components/MonthCalendar/MonthCalendarHeader/MonthAndYearInfo/MonthAndYearInfo.js
→
planner-front/src/components/
Calendars/
MonthCalendar/MonthCalendarHeader/MonthAndYearInfo/MonthAndYearInfo.js
View file @
1fba0e35
import
{
Box
,
Typography
}
from
'@mui/material'
;
import
{
memo
}
from
'react'
;
import
ArrowDecrementButton
from
'../../../UI/ArrowDecrementButton/ArrowDecrementButton'
;
import
ArrowIncrementButton
from
'../../../UI/ArrowIncrementButton/ArrowIncrementButton'
;
import
ArrowDecrementButton
from
'../../../
../
UI/ArrowDecrementButton/ArrowDecrementButton'
;
import
ArrowIncrementButton
from
'../../../
../
UI/ArrowIncrementButton/ArrowIncrementButton'
;
function
MonthAndYearInfo
({
currentMonthString
,
year
,
incrementMonth
,
decrementMonth
})
{
return
(
...
...
planner-front/src/components/MonthCalendar/MonthCalendarHeader/MonthCalendarHeader.js
→
planner-front/src/components/
Calendars/
MonthCalendar/MonthCalendarHeader/MonthCalendarHeader.js
View file @
1fba0e35
import
{
AppBar
,
Toolbar
}
from
'@mui/material'
;
import
{
AppBar
,
Button
,
Toolbar
}
from
'@mui/material'
;
import
{
Box
}
from
'@mui/system'
;
import
MonthAndYearInfo
from
'./MonthAndYearInfo/MonthAndYearInfo'
;
import
С
ustomSelect
from
'../../UI/СustomSelect/СustomSelect'
const
workers
=
[{
value
:
''
,
text
:
'--выберите сотрудника--'
},
{
value
:
'Василий'
,
text
:
'Василий'
},
{
value
:
'Никита'
,
text
:
'Никита'
}]
const
types
=
[{
value
:
'Месяц'
,
text
:
'Месяц'
},
{
value
:
'Неделя'
,
text
:
'Неделя'
}]
function
MonthCalendarHeader
({
currentMonthString
,
decrementMonth
,
incrementMonth
,
calendarType
,
onChangeWorkerHandler
,
onChangeCalendarTypeHandler
,
worker
,
year
})
{
function
MonthCalendarHeader
({
currentMonthString
,
decrementMonth
,
incrementMonth
,
calendarType
,
onChangeWorkerHandler
,
onChangeCalendarTypeHandler
,
worker
,
year
,
setModal
})
{
return
(
<>
...
...
@@ -20,21 +16,15 @@ function MonthCalendarHeader({ currentMonthString, decrementMonth, incrementMont
incrementMonth
=
{
incrementMonth
}
year
=
{
year
}
/
>
<
С
ustomSelect
value
=
{
worker
}
onChange
=
{(
e
)
=>
{
onChangeWorkerHandler
(
e
)
}}
label
=
{
'Сотрудник'
}
id
=
{
'worker'
}
items
=
{
workers
}
/
>
<
div
style
=
{{
marginLeft
:
'20px'
}}
>
<
С
ustomSelect
value
=
{
calendarType
}
onChange
=
{(
e
)
=>
{
onChangeCalendarTypeHandler
(
e
)
}}
label
=
{
'Календарь'
}
id
=
{
'calendar-type'
}
items
=
{
types
}
/
>
<
Button
onClick
=
{()
=>
{
setModal
((
prevState
)
=>!
prevState
)}
}
color
=
"inherit"
size
=
"large"
>
Выбрать
сотрудника
<
/Button
>
<
/div
>
<
/Toolbar
>
<
/AppBar
>
...
...
planner-front/src/components/
MonthCalendar
/MonthCalendarModalContent/MonthCalendarModalContent.js
→
planner-front/src/components/
Calendars
/MonthCalendarModalContent/MonthCalendarModalContent.js
View file @
1fba0e35
File moved
planner-front/src/components/WeekCalendar/WeekCalendarBody/CalendarRowDayWeek/CalendarRowDayWeek.js
→
planner-front/src/components/
Calendars/
WeekCalendar/WeekCalendarBody/CalendarRowDayWeek/CalendarRowDayWeek.js
View file @
1fba0e35
import
{
useMemo
}
from
"react"
;
import
{
getHoursInDayNumbers
,
getAvailableTasks
,
getLinesInDay
,
getSortedTasks
}
from
"../../../../helpers/CalendarHelpers"
;
import
CalendarStandartCell
from
"../../../
MonthCalendar/MonthCalendarBody/CalendarStandartCell.js
/CalendarStandartCell"
;
import
{
getHoursInDayNumbers
,
getAvailableTasks
,
getLinesInDay
,
getSortedTasks
}
from
"../../../../
../
helpers/CalendarHelpers"
;
import
CalendarStandartCell
from
"../../../
CalendarStandartCell
/CalendarStandartCell"
;
function
CalendarRowDayWeek
({
hoursInDay
,
tasks
,
month
,
year
,
day
,
hourFormat
})
{
const
hours
=
useMemo
(()
=>
{
...
...
planner-front/src/components/WeekCalendar/WeekCalendarBody/Helpers.js
→
planner-front/src/components/
Calendars/
WeekCalendar/WeekCalendarBody/Helpers.js
View file @
1fba0e35
File moved
planner-front/src/components/WeekCalendar/WeekCalendarBody/WeekCalendarBody.js
→
planner-front/src/components/
Calendars/
WeekCalendar/WeekCalendarBody/WeekCalendarBody.js
View file @
1fba0e35
import
{
FormControlLabel
,
Grid
,
Switch
}
from
"@mui/material"
;
import
{
Box
}
from
"@mui/system"
;
import
CalendarRow
from
"../../
MonthCalendar/MonthCalendarBody/
CalendarRow/CalendarRow"
;
import
CalendarSmallCell
from
"../../
MonthCalendar/MonthCalendarBody/
CalendarSmallCell/CalendarSmallCell"
;
import
CalendarStandartCell
from
"../../
MonthCalendar/MonthCalendarBody/CalendarStandartCell.js
/CalendarStandartCell"
;
import
CalendarRow
from
"../../CalendarRow/CalendarRow"
;
import
CalendarSmallCell
from
"../../CalendarSmallCell/CalendarSmallCell"
;
import
CalendarStandartCell
from
"../../
CalendarStandartCell
/CalendarStandartCell"
;
import
CalendarRowDayWeek
from
"./CalendarRowDayWeek/CalendarRowDayWeek"
;
import
{
getCurrentWeekDayString
}
from
"./Helpers"
;
...
...
planner-front/src/components/WeekCalendar/WeekCalendarHeader/WeekCalendarHeader.js
→
planner-front/src/components/
Calendars/
WeekCalendar/WeekCalendarHeader/WeekCalendarHeader.js
View file @
1fba0e35
File moved
planner-front/src/components/WeekCalendar/WeekCalendarHeader/WeekCalendarHeaderInfo/WeekCalendarHeaderInfo.js
→
planner-front/src/components/
Calendars/
WeekCalendar/WeekCalendarHeader/WeekCalendarHeaderInfo/WeekCalendarHeaderInfo.js
View file @
1fba0e35
import
ArrowDecrementButton
from
'../../../UI/ArrowDecrementButton/ArrowDecrementButton'
;
import
ArrowIncrementButton
from
'../../../UI/ArrowIncrementButton/ArrowIncrementButton'
;
import
ArrowDecrementButton
from
'../../../
../
UI/ArrowDecrementButton/ArrowDecrementButton'
;
import
ArrowIncrementButton
from
'../../../
../
UI/ArrowIncrementButton/ArrowIncrementButton'
;
import
{
Box
}
from
'@mui/system'
;
import
{
Typography
}
from
'@mui/material'
;
...
...
planner-front/src/components/UI/DefaultModal/DefaultModal.js
0 → 100644
View file @
1fba0e35
import
*
as
React
from
'react'
;
import
Box
from
'@mui/material/Box'
;
import
Button
from
'@mui/material/Button'
;
import
Typography
from
'@mui/material/Typography'
;
import
Modal
from
'@mui/material/Modal'
;
const
style
=
{
position
:
'absolute'
,
top
:
'50%'
,
left
:
'50%'
,
transform
:
'translate(-50%, -50%)'
,
width
:
400
,
bgcolor
:
'background.paper'
,
border
:
'2px solid #000'
,
boxShadow
:
24
,
p
:
4
,
};
export
default
function
DefaultModal
({
modal
,
setModal
})
{
console
.
log
(
modal
)
const
handleClose
=
()
=>
setModal
(
false
);
return
(
<
div
>
<
Modal
open
=
{
modal
}
onClose
=
{
handleClose
}
aria
-
labelledby
=
"modal-modal-title"
aria
-
describedby
=
"modal-modal-description"
>
<
Box
sx
=
{
style
}
>
<>
lol
<
/
>
<
/Box
>
<
/Modal
>
<
/div
>
);
}
\ No newline at end of file
planner-front/src/containers/MonthCalendar/MonthCalendar.js
View file @
1fba0e35
import
{
useEffect
,
useCallback
,
useState
,
useMemo
}
from
'react'
;
import
{
useDispatch
,
useSelector
}
from
'react-redux'
;
import
MonthCalendarBody
from
'../../components/MonthCalendar/MonthCalendarBody/MonthCalendarBody'
;
import
MonthCalendarHeader
from
'../../components/MonthCalendar/MonthCalendarHeader/MonthCalendarHeader'
;
import
MonthCalendarBody
from
'../../components/Calendars/MonthCalendar/MonthCalendarBody/MonthCalendarBody'
;
import
MonthCalendarHeader
from
'../../components/Calendars/MonthCalendar/MonthCalendarHeader/MonthCalendarHeader'
;
import
DefaultModal
from
'../../components/UI/DefaultModal/DefaultModal'
;
import
{
dateToISOLikeButLocal
,
getCurrentMonthString
,
getDaysInMonth
}
from
'../../helpers/CalendarHelpers'
;
import
{
addCalendarTask
,
addCopyCalendarTask
,
deleteCalendarTask
,
editCalendarTask
,
fetchCalendarTasks
}
from
'../../store/actions/tasksActions'
;
...
...
@@ -18,6 +19,7 @@ function MonthCalendar() {
const
[
copyTask
,
setCopyTask
]
=
useState
(
null
)
const
[
cellSizes
,
setCellSizes
]
=
useState
({})
const
[
userId
,
setUserId
]
=
useState
(
''
)
const
[
modal
,
setModal
]
=
useState
(
false
)
useEffect
(()
=>
{
setDateNow
({
...
...
@@ -206,6 +208,12 @@ function MonthCalendar() {
return
(
<>
<
DefaultModal
modal
=
{
modal
}
setModal
=
{
setModal
}
>
<
/DefaultModal
>
<
MonthCalendarHeader
year
=
{
dateNow
.
year
}
currentMonthString
=
{
currentMonthString
}
...
...
@@ -214,6 +222,7 @@ function MonthCalendar() {
onChangeCalendarTypeHandler
=
{
onChangeCalendarTypeHandler
}
onChangeWorkerHandler
=
{
onChangeWorkerHandler
}
worker
=
{
worker
}
setModal
=
{
setModal
}
calendarType
=
{
calendarType
}
/
>
<
MonthCalendarBody
...
...
planner-front/src/containers/WeekCalendar/WeekCalendar.js
View file @
1fba0e35
import
moment
from
'moment'
;
import
{
useEffect
,
useState
,
useMemo
,
useCallback
}
from
'react'
;
import
{
useDispatch
,
useSelector
}
from
'react-redux'
;
import
WeekCalendarBody
from
'../../components/WeekCalendar/WeekCalendarBody/WeekCalendarBody'
;
import
WeekCalendarHeader
from
'../../components/WeekCalendar/WeekCalendarHeader/WeekCalendarHeader'
import
WeekCalendarBody
from
'../../components/
Calendars/
WeekCalendar/WeekCalendarBody/WeekCalendarBody'
;
import
WeekCalendarHeader
from
'../../components/
Calendars/
WeekCalendar/WeekCalendarHeader/WeekCalendarHeader'
import
{
getWeekInfoString
,
getWeekFromCurrentDate
}
from
'../../helpers/CalendarHelpers'
;
import
{
fetchCalendarTasks
}
from
'../../store/actions/tasksActions'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment