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
Hide 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
{
Grid
}
from
"@mui/material"
;
import
{
memo
,
useEffect
,
useState
}
from
"react"
;
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
{
Grid
}
from
"@mui/material"
;
import
{
memo
,
useMemo
}
from
"react"
;
import
{
memo
,
useMemo
}
from
"react"
;
import
{
getHoursInDayNumbers
,
getAvailableTasks
,
getLinesInDay
,
getSortedTasks
}
from
"../../../../helpers/CalendarHelpers"
;
import
{
getHoursInDayNumbers
,
getAvailableTasks
,
getLinesInDay
,
getSortedTasks
}
from
"../../../../
../
helpers/CalendarHelpers"
;
import
CalendarStandartCell
from
"../
CalendarStandartCell.js
/CalendarStandartCell"
;
import
CalendarStandartCell
from
"../
../../CalendarStandartCell
/CalendarStandartCell"
;
import
CalendarTask
from
"../CalendarTask/CalendarTask"
;
import
CalendarTask
from
"../CalendarTask/CalendarTask"
;
import
EmptyBox
from
"./EmptyBox/EmptyBox"
;
import
EmptyBox
from
"./EmptyBox/EmptyBox"
;
import
{
getBoxesInLine
}
from
"./Helpers"
;
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
{
Box
,
FormControlLabel
,
Switch
}
from
"@mui/material"
;
import
{
useState
}
from
"react"
;
import
{
useState
}
from
"react"
;
import
CalendarRow
from
"./CalendarRow/CalendarRow"
;
import
CalendarRow
from
".
./..
/CalendarRow/CalendarRow"
;
import
CalendarSmallCell
from
"./CalendarSmallCell/CalendarSmallCell"
;
import
CalendarSmallCell
from
".
./..
/CalendarSmallCell/CalendarSmallCell"
;
import
CalendarStandartCell
from
".
/CalendarStandartCell.js
/CalendarStandartCell"
;
import
CalendarStandartCell
from
".
./../CalendarStandartCell
/CalendarStandartCell"
;
import
ModalTask
from
"../../
UI/ModalTask/ModalTask"
;
import
ModalTask
from
"../../
../UI/ModalTask/ModalTask"
import
MonthCalendarModalContent
from
"../MonthCalendarModalContent/MonthCalendarModalContent"
;
import
MonthCalendarModalContent
from
"../
../
MonthCalendarModalContent/MonthCalendarModalContent"
;
import
CalendarRowDay
from
"./CalendarRowDay/CalendarRowDay"
;
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
{
Box
,
Typography
}
from
'@mui/material'
;
import
{
memo
}
from
'react'
;
import
{
memo
}
from
'react'
;
import
ArrowDecrementButton
from
'../../../UI/ArrowDecrementButton/ArrowDecrementButton'
;
import
ArrowDecrementButton
from
'../../../
../
UI/ArrowDecrementButton/ArrowDecrementButton'
;
import
ArrowIncrementButton
from
'../../../UI/ArrowIncrementButton/ArrowIncrementButton'
;
import
ArrowIncrementButton
from
'../../../
../
UI/ArrowIncrementButton/ArrowIncrementButton'
;
function
MonthAndYearInfo
({
currentMonthString
,
year
,
incrementMonth
,
decrementMonth
})
{
function
MonthAndYearInfo
({
currentMonthString
,
year
,
incrementMonth
,
decrementMonth
})
{
return
(
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
{
Box
}
from
'@mui/system'
;
import
MonthAndYearInfo
from
'./MonthAndYearInfo/MonthAndYearInfo'
;
import
MonthAndYearInfo
from
'./MonthAndYearInfo/MonthAndYearInfo'
;
import
С
ustomSelect
from
'../../UI/СustomSelect/СustomSelect'
const
workers
=
[{
value
:
''
,
text
:
'--выберите сотрудника--'
},
{
value
:
'Василий'
,
text
:
'Василий'
},
{
value
:
'Никита'
,
text
:
'Никита'
}]
function
MonthCalendarHeader
({
currentMonthString
,
decrementMonth
,
incrementMonth
,
calendarType
,
onChangeWorkerHandler
,
onChangeCalendarTypeHandler
,
worker
,
year
,
setModal
})
{
const
types
=
[{
value
:
'Месяц'
,
text
:
'Месяц'
},
{
value
:
'Неделя'
,
text
:
'Неделя'
}]
function
MonthCalendarHeader
({
currentMonthString
,
decrementMonth
,
incrementMonth
,
calendarType
,
onChangeWorkerHandler
,
onChangeCalendarTypeHandler
,
worker
,
year
})
{
return
(
return
(
<>
<>
...
@@ -20,21 +16,15 @@ function MonthCalendarHeader({ currentMonthString, decrementMonth, incrementMont
...
@@ -20,21 +16,15 @@ function MonthCalendarHeader({ currentMonthString, decrementMonth, incrementMont
incrementMonth
=
{
incrementMonth
}
incrementMonth
=
{
incrementMonth
}
year
=
{
year
}
year
=
{
year
}
/
>
/
>
<
С
ustomSelect
value
=
{
worker
}
onChange
=
{(
e
)
=>
{
onChangeWorkerHandler
(
e
)
}}
label
=
{
'Сотрудник'
}
id
=
{
'worker'
}
items
=
{
workers
}
/
>
<
div
style
=
{{
marginLeft
:
'20px'
}}
>
<
div
style
=
{{
marginLeft
:
'20px'
}}
>
<
С
ustomSelect
<
Button
value
=
{
calendarType
}
onClick
=
{()
=>
{
setModal
((
prevState
)
=>!
prevState
)}
}
onChange
=
{(
e
)
=>
{
onChangeCalendarTypeHandler
(
e
)
}}
color
=
"inherit"
label
=
{
'Календарь'
}
size
=
"large"
id
=
{
'calendar-type'
}
>
items
=
{
types
}
Выбрать
сотрудника
/
>
<
/Button
>
<
/div
>
<
/div
>
<
/Toolbar
>
<
/Toolbar
>
<
/AppBar
>
<
/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
{
useMemo
}
from
"react"
;
import
{
getHoursInDayNumbers
,
getAvailableTasks
,
getLinesInDay
,
getSortedTasks
}
from
"../../../../helpers/CalendarHelpers"
;
import
{
getHoursInDayNumbers
,
getAvailableTasks
,
getLinesInDay
,
getSortedTasks
}
from
"../../../../
../
helpers/CalendarHelpers"
;
import
CalendarStandartCell
from
"../../../
MonthCalendar/MonthCalendarBody/CalendarStandartCell.js
/CalendarStandartCell"
;
import
CalendarStandartCell
from
"../../../
CalendarStandartCell
/CalendarStandartCell"
;
function
CalendarRowDayWeek
({
hoursInDay
,
tasks
,
month
,
year
,
day
,
hourFormat
})
{
function
CalendarRowDayWeek
({
hoursInDay
,
tasks
,
month
,
year
,
day
,
hourFormat
})
{
const
hours
=
useMemo
(()
=>
{
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
{
FormControlLabel
,
Grid
,
Switch
}
from
"@mui/material"
;
import
{
Box
}
from
"@mui/system"
;
import
{
Box
}
from
"@mui/system"
;
import
CalendarRow
from
"../../
MonthCalendar/MonthCalendarBody/
CalendarRow/CalendarRow"
;
import
CalendarRow
from
"../../CalendarRow/CalendarRow"
;
import
CalendarSmallCell
from
"../../
MonthCalendar/MonthCalendarBody/
CalendarSmallCell/CalendarSmallCell"
;
import
CalendarSmallCell
from
"../../CalendarSmallCell/CalendarSmallCell"
;
import
CalendarStandartCell
from
"../../
MonthCalendar/MonthCalendarBody/CalendarStandartCell.js
/CalendarStandartCell"
;
import
CalendarStandartCell
from
"../../
CalendarStandartCell
/CalendarStandartCell"
;
import
CalendarRowDayWeek
from
"./CalendarRowDayWeek/CalendarRowDayWeek"
;
import
CalendarRowDayWeek
from
"./CalendarRowDayWeek/CalendarRowDayWeek"
;
import
{
getCurrentWeekDayString
}
from
"./Helpers"
;
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
ArrowDecrementButton
from
'../../../
../
UI/ArrowDecrementButton/ArrowDecrementButton'
;
import
ArrowIncrementButton
from
'../../../UI/ArrowIncrementButton/ArrowIncrementButton'
;
import
ArrowIncrementButton
from
'../../../
../
UI/ArrowIncrementButton/ArrowIncrementButton'
;
import
{
Box
}
from
'@mui/system'
;
import
{
Box
}
from
'@mui/system'
;
import
{
Typography
}
from
'@mui/material'
;
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
{
useEffect
,
useCallback
,
useState
,
useMemo
}
from
'react'
;
import
{
useDispatch
,
useSelector
}
from
'react-redux'
;
import
{
useDispatch
,
useSelector
}
from
'react-redux'
;
import
MonthCalendarBody
from
'../../components/MonthCalendar/MonthCalendarBody/MonthCalendarBody'
;
import
MonthCalendarBody
from
'../../components/Calendars/MonthCalendar/MonthCalendarBody/MonthCalendarBody'
;
import
MonthCalendarHeader
from
'../../components/MonthCalendar/MonthCalendarHeader/MonthCalendarHeader'
;
import
MonthCalendarHeader
from
'../../components/Calendars/MonthCalendar/MonthCalendarHeader/MonthCalendarHeader'
;
import
DefaultModal
from
'../../components/UI/DefaultModal/DefaultModal'
;
import
{
dateToISOLikeButLocal
,
getCurrentMonthString
,
getDaysInMonth
}
from
'../../helpers/CalendarHelpers'
;
import
{
dateToISOLikeButLocal
,
getCurrentMonthString
,
getDaysInMonth
}
from
'../../helpers/CalendarHelpers'
;
import
{
addCalendarTask
,
addCopyCalendarTask
,
deleteCalendarTask
,
editCalendarTask
,
fetchCalendarTasks
}
from
'../../store/actions/tasksActions'
;
import
{
addCalendarTask
,
addCopyCalendarTask
,
deleteCalendarTask
,
editCalendarTask
,
fetchCalendarTasks
}
from
'../../store/actions/tasksActions'
;
...
@@ -18,6 +19,7 @@ function MonthCalendar() {
...
@@ -18,6 +19,7 @@ function MonthCalendar() {
const
[
copyTask
,
setCopyTask
]
=
useState
(
null
)
const
[
copyTask
,
setCopyTask
]
=
useState
(
null
)
const
[
cellSizes
,
setCellSizes
]
=
useState
({})
const
[
cellSizes
,
setCellSizes
]
=
useState
({})
const
[
userId
,
setUserId
]
=
useState
(
''
)
const
[
userId
,
setUserId
]
=
useState
(
''
)
const
[
modal
,
setModal
]
=
useState
(
false
)
useEffect
(()
=>
{
useEffect
(()
=>
{
setDateNow
({
setDateNow
({
...
@@ -206,6 +208,12 @@ function MonthCalendar() {
...
@@ -206,6 +208,12 @@ function MonthCalendar() {
return
(
return
(
<>
<>
<
DefaultModal
modal
=
{
modal
}
setModal
=
{
setModal
}
>
<
/DefaultModal
>
<
MonthCalendarHeader
<
MonthCalendarHeader
year
=
{
dateNow
.
year
}
year
=
{
dateNow
.
year
}
currentMonthString
=
{
currentMonthString
}
currentMonthString
=
{
currentMonthString
}
...
@@ -214,6 +222,7 @@ function MonthCalendar() {
...
@@ -214,6 +222,7 @@ function MonthCalendar() {
onChangeCalendarTypeHandler
=
{
onChangeCalendarTypeHandler
}
onChangeCalendarTypeHandler
=
{
onChangeCalendarTypeHandler
}
onChangeWorkerHandler
=
{
onChangeWorkerHandler
}
onChangeWorkerHandler
=
{
onChangeWorkerHandler
}
worker
=
{
worker
}
worker
=
{
worker
}
setModal
=
{
setModal
}
calendarType
=
{
calendarType
}
calendarType
=
{
calendarType
}
/
>
/
>
<
MonthCalendarBody
<
MonthCalendarBody
...
...
planner-front/src/containers/WeekCalendar/WeekCalendar.js
View file @
1fba0e35
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
{
useEffect
,
useState
,
useMemo
,
useCallback
}
from
'react'
;
import
{
useEffect
,
useState
,
useMemo
,
useCallback
}
from
'react'
;
import
{
useDispatch
,
useSelector
}
from
'react-redux'
;
import
{
useDispatch
,
useSelector
}
from
'react-redux'
;
import
WeekCalendarBody
from
'../../components/WeekCalendar/WeekCalendarBody/WeekCalendarBody'
;
import
WeekCalendarBody
from
'../../components/
Calendars/
WeekCalendar/WeekCalendarBody/WeekCalendarBody'
;
import
WeekCalendarHeader
from
'../../components/WeekCalendar/WeekCalendarHeader/WeekCalendarHeader'
import
WeekCalendarHeader
from
'../../components/
Calendars/
WeekCalendar/WeekCalendarHeader/WeekCalendarHeader'
import
{
getWeekInfoString
,
getWeekFromCurrentDate
}
from
'../../helpers/CalendarHelpers'
;
import
{
getWeekInfoString
,
getWeekFromCurrentDate
}
from
'../../helpers/CalendarHelpers'
;
import
{
fetchCalendarTasks
}
from
'../../store/actions/tasksActions'
;
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