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
59ece50e
Commit
59ece50e
authored
Nov 26, 2022
by
Ermolaev Timur
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'task-66-enhance/enhance-modal-task' into 'development'
Task 66 enhance/enhance modal task See merge request
!44
parents
fb898090
bd708933
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
126 additions
and
42 deletions
+126
-42
CalendarTask.js
...components/MonthCalendarBody/CalendarTask/CalendarTask.js
+13
-5
MonthCalendarBody.js
...ont/src/components/MonthCalendarBody/MonthCalendarBody.js
+4
-2
MonthCalendarHeader.js
...src/components/MonthCalendarHeader/MonthCalendarHeader.js
+2
-1
MonthCalendarModalContent.js
...ts/MonthCalendarModalContent/MonthCalendarModalContent.js
+26
-7
ModalTask.js
planner-front/src/components/UI/ModalTask/ModalTask.js
+43
-5
Select.js
planner-front/src/components/UI/Select/Select.js
+1
-1
СustomSelect.js
planner-front/src/components/UI/СustomSelect/СustomSelect.js
+1
-1
MonthCalendar.js
planner-front/src/containers/MonthCalendar/MonthCalendar.js
+36
-20
No files found.
planner-front/src/components/MonthCalendarBody/CalendarTask/CalendarTask.js
View file @
59ece50e
...
@@ -28,7 +28,15 @@ const CalendarTask = ({setCurrentTask, handleOpen, task, line, setCurrentLine, i
...
@@ -28,7 +28,15 @@ const CalendarTask = ({setCurrentTask, handleOpen, task, line, setCurrentLine, i
const
onClickTaskHandler
=
(
e
,
task
)
=>
{
const
onClickTaskHandler
=
(
e
,
task
)
=>
{
e
.
stopPropagation
();
e
.
stopPropagation
();
setCurrentTask
(
task
);
setCurrentTask
((
prevState
)
=>
{
return
{
...
task
,
infoForCell
:
{
...
task
.
infoForCell
,
endHour
:
task
.
infoForCell
.
endHour
+
1
}
}
});
handleOpen
(
e
)
handleOpen
(
e
)
}
}
...
@@ -63,9 +71,9 @@ const CalendarTask = ({setCurrentTask, handleOpen, task, line, setCurrentLine, i
...
@@ -63,9 +71,9 @@ const CalendarTask = ({setCurrentTask, handleOpen, task, line, setCurrentLine, i
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
>
<
div
>
<
span
>
{
task
.
title
}
{
task
.
title
}
<
/span
>
<
/div
>
<
/div
>
<
/
>
<
/
>
...
@@ -76,9 +84,9 @@ const CalendarTask = ({setCurrentTask, handleOpen, task, line, setCurrentLine, i
...
@@ -76,9 +84,9 @@ const CalendarTask = ({setCurrentTask, handleOpen, task, line, setCurrentLine, i
<
ArrowBackIcon
sx
=
{
arrowClass
}
onClick
=
{(
e
)
=>
{
e
.
stopPropagation
();
increaseTaskHandler
(
line
,
task
,
true
)}}
/
>
<
ArrowBackIcon
sx
=
{
arrowClass
}
onClick
=
{(
e
)
=>
{
e
.
stopPropagation
();
increaseTaskHandler
(
line
,
task
,
true
)}}
/
>
<
ArrowForwardIcon
sx
=
{
arrowClass
}
onClick
=
{(
e
)
=>
{
e
.
stopPropagation
();
reduceTaskHandler
(
line
,
task
,
true
)}}
/
>
<
ArrowForwardIcon
sx
=
{
arrowClass
}
onClick
=
{(
e
)
=>
{
e
.
stopPropagation
();
reduceTaskHandler
(
line
,
task
,
true
)}}
/
>
<
/div
>
<
/div
>
<
span
>
{
task
.
title
}
{
task
.
title
}
<
/span
>
<
div
style
=
{{
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
div
style
=
{{
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Button
sx
=
{{
color
:
'black'
,
fontWeight
:
'600'
}}
onClick
=
{(
e
)
=>
{
e
.
stopPropagation
();
setCopyTask
(
task
)}}
>
<
Button
sx
=
{{
color
:
'black'
,
fontWeight
:
'600'
}}
onClick
=
{(
e
)
=>
{
e
.
stopPropagation
();
setCopyTask
(
task
)}}
>
Copy
Copy
...
...
planner-front/src/components/MonthCalendarBody/MonthCalendarBody.js
View file @
59ece50e
...
@@ -15,8 +15,8 @@ function MonthCalendarBody({month, year, tasks, createTaskInCellHandler, current
...
@@ -15,8 +15,8 @@ function MonthCalendarBody({month, year, tasks, createTaskInCellHandler, current
const
handleOpen
=
(
e
)
=>
{
const
handleOpen
=
(
e
)
=>
{
setModal
(
{
setModal
(
{
open
:
true
,
open
:
true
,
y
Page
:
e
.
clientY
,
y
Click
С
ordinates
:
e
.
clientY
,
x
Page
:
e
.
clientX
,
x
Click
С
ordinates
:
e
.
clientX
,
yDivClick
:
e
.
nativeEvent
.
offsetY
,
yDivClick
:
e
.
nativeEvent
.
offsetY
,
xDivClick
:
e
.
nativeEvent
.
offsetX
,
xDivClick
:
e
.
nativeEvent
.
offsetX
,
yDiv
:
e
.
target
.
offsetHeight
,
yDiv
:
e
.
target
.
offsetHeight
,
...
@@ -89,6 +89,8 @@ function MonthCalendarBody({month, year, tasks, createTaskInCellHandler, current
...
@@ -89,6 +89,8 @@ function MonthCalendarBody({month, year, tasks, createTaskInCellHandler, current
title
=
{
currentTask
.
title
}
title
=
{
currentTask
.
title
}
description
=
{
currentTask
.
description
}
description
=
{
currentTask
.
description
}
priority
=
{
currentTask
.
priority
}
priority
=
{
currentTask
.
priority
}
startHour
=
{
currentTask
.
infoForCell
?.
startHour
}
endHour
=
{
currentTask
.
infoForCell
?.
endHour
}
onChangeCurrentTaskHandler
=
{(
e
)
=>
{
onChangeCurrentTaskHandler
(
e
)}}
onChangeCurrentTaskHandler
=
{(
e
)
=>
{
onChangeCurrentTaskHandler
(
e
)}}
sendNewTaskHandler
=
{()
=>
{
sendNewTaskHandler
();
handleClose
()}}
sendNewTaskHandler
=
{()
=>
{
sendNewTaskHandler
();
handleClose
()}}
deleteTaskHandler
=
{()
=>
{
deleteTaskHandler
(
currentTask
.
id
);
handleClose
()}}
deleteTaskHandler
=
{()
=>
{
deleteTaskHandler
(
currentTask
.
id
);
handleClose
()}}
...
...
planner-front/src/components/MonthCalendarHeader/MonthCalendarHeader.js
View file @
59ece50e
...
@@ -27,7 +27,7 @@ function MonthCalendarHeader({ currentMonthString, decrementMonth, incrementMont
...
@@ -27,7 +27,7 @@ function MonthCalendarHeader({ currentMonthString, decrementMonth, incrementMont
id
=
{
'worker'
}
id
=
{
'worker'
}
items
=
{
workers
}
items
=
{
workers
}
/
>
/
>
<
div
style
=
{{
marginLeft
:
'20px'
}}
>
<
С
ustomSelect
<
С
ustomSelect
value
=
{
calendarType
}
value
=
{
calendarType
}
onChange
=
{(
e
)
=>
{
onChangeCalendarTypeHandler
(
e
)}}
onChange
=
{(
e
)
=>
{
onChangeCalendarTypeHandler
(
e
)}}
...
@@ -35,6 +35,7 @@ function MonthCalendarHeader({ currentMonthString, decrementMonth, incrementMont
...
@@ -35,6 +35,7 @@ function MonthCalendarHeader({ currentMonthString, decrementMonth, incrementMont
id
=
{
'calendar-type'
}
id
=
{
'calendar-type'
}
items
=
{
types
}
items
=
{
types
}
/
>
/
>
<
/div
>
<
/Toolbar
>
<
/Toolbar
>
<
/AppBar
>
<
/AppBar
>
<
/Box
>
<
/Box
>
...
...
planner-front/src/components/MonthCalendarModalContent/MonthCalendarModalContent.js
View file @
59ece50e
import
{
Button
,
FormControl
,
InputLabel
,
MenuItem
,
Select
,
TextField
}
from
"@mui/material"
;
import
{
Button
,
TextField
}
from
"@mui/material"
;
import
{
memo
}
from
"react"
;
import
{
memo
}
from
"react"
;
import
CustomSelect
from
'../UI/СustomSelect/СustomSelect'
import
CustomSelect
from
'../UI/СustomSelect/СustomSelect'
const
priorities
=
[{
value
:
''
,
text
:
'--Приоритет--'
},
{
value
:
'A'
,
text
:
'A'
},
{
value
:
'B'
,
text
:
'B'
},
{
value
:
'C'
,
text
:
'C'
}]
const
priorities
=
[{
value
:
null
,
text
:
'--Приоритет--'
},
{
value
:
'A'
,
text
:
'A'
},
{
value
:
'B'
,
text
:
'B'
},
{
value
:
'C'
,
text
:
'C'
}]
function
MonthCalendarModalContent
({
title
,
onChangeCurrentTaskHandler
,
description
,
priority
,
sendNewTaskHandler
,
deleteTaskHandler
})
{
function
MonthCalendarModalContent
({
title
,
onChangeCurrentTaskHandler
,
description
,
priority
,
sendNewTaskHandler
,
deleteTaskHandler
,
startHour
,
endHour
})
{
return
(
<>
return
(
<>
<
TextField
<
TextField
id
=
"task-description-title"
id
=
"task-description-title"
...
@@ -27,9 +27,8 @@ function MonthCalendarModalContent({title, onChangeCurrentTaskHandler, descripti
...
@@ -27,9 +27,8 @@ function MonthCalendarModalContent({title, onChangeCurrentTaskHandler, descripti
name
=
'description'
name
=
'description'
onChange
=
{(
e
)
=>
{
onChangeCurrentTaskHandler
(
e
)}}
onChange
=
{(
e
)
=>
{
onChangeCurrentTaskHandler
(
e
)}}
/
>
/
>
<
CustomSelect
<
CustomSelect
defaultValue
=
{
''
}
defaultValue
=
{
null
}
value
=
{
priority
}
value
=
{
priority
}
name
=
{
'priority'
}
name
=
{
'priority'
}
variant
=
{
'outlined'
}
variant
=
{
'outlined'
}
...
@@ -38,8 +37,28 @@ function MonthCalendarModalContent({title, onChangeCurrentTaskHandler, descripti
...
@@ -38,8 +37,28 @@ function MonthCalendarModalContent({title, onChangeCurrentTaskHandler, descripti
id
=
{
'priority-type'
}
id
=
{
'priority-type'
}
items
=
{
priorities
}
items
=
{
priorities
}
/
>
/
>
<
Button
sx
=
{{
marginRight
:
'40px'
}}
onClick
=
{
sendNewTaskHandler
}
>
Сохранить
<
/Button
>
<
div
style
=
{{
display
:
'flex'
,
gap
:
'20px'
,
margin
:
'20px 0'
}}
>
<
Button
onClick
=
{
deleteTaskHandler
}
>
Удалить
<
/Button
>
<
TextField
id
=
"task-startHour"
value
=
{
startHour
}
label
=
"От"
variant
=
"outlined"
name
=
'startHour'
onChange
=
{(
e
)
=>
{
onChangeCurrentTaskHandler
(
e
)}}
/
>
<
TextField
id
=
"task-endHour"
value
=
{
endHour
}
label
=
"До"
variant
=
"outlined"
name
=
'endHour'
onChange
=
{(
e
)
=>
{
onChangeCurrentTaskHandler
(
e
)}}
/
>
<
/div
>
<
div
style
=
{{
display
:
'flex'
,
gap
:
'20px'
,
margin
:
'10px 0'
}}
>
<
Button
onClick
=
{
sendNewTaskHandler
}
>
Сохранить
<
/Button
>
<
Button
onClick
=
{
deleteTaskHandler
}
>
Удалить
<
/Button
>
<
/div
>
<
/>
)
;
<
/>
)
;
}
}
...
...
planner-front/src/components/UI/ModalTask/ModalTask.js
View file @
59ece50e
import
Box
from
'@mui/material/Box'
;
import
Box
from
'@mui/material/Box'
;
import
Modal
from
'@mui/material/Modal'
;
import
Modal
from
'@mui/material/Modal'
;
import
{
useEffect
,
useRef
,
useState
}
from
'react'
;
export
default
function
ModalTask
({
modal
,
handleClose
,
children
})
{
export
default
function
ModalTask
({
modal
,
handleClose
,
children
})
{
const
[
windowDimenion
,
detectHW
]
=
useState
({
winWidth
:
window
.
innerWidth
,
winHeight
:
window
.
innerHeight
,
})
const
detectSize
=
()
=>
{
detectHW
({
winWidth
:
window
.
innerWidth
,
winHeight
:
window
.
innerHeight
,
})
}
useEffect
(()
=>
{
window
.
addEventListener
(
'resize'
,
detectSize
)
return
()
=>
{
window
.
removeEventListener
(
'resize'
,
detectSize
)
}
},
[
windowDimenion
])
const
modalRef
=
useRef
(
''
)
const
getYCordinatesToModal
=
()
=>
{
if
(
windowDimenion
.
winHeight
>
modal
.
yClick
С
ordinates
+
450
)
{
return
modal
.
yClick
С
ordinates
-
modal
.
yDiv
-
modal
.
yDivClick
}
else
{
return
modal
.
yClick
С
ordinates
-
modal
.
yDiv
-
modal
.
yDivClick
-
((
modal
.
yClick
С
ordinates
+
450
)
-
windowDimenion
.
winHeight
)
-
30
}
}
const
getXCordinatesToModal
=
()
=>
{
if
(
windowDimenion
.
winWidth
>
modal
.
xClick
С
ordinates
+
270
+
modal
.
xDiv
)
{
return
modal
.
xClick
С
ordinates
+
modal
.
xDiv
-
modal
.
xDivClick
+
10
}
else
{
return
windowDimenion
.
winWidth
-
(
windowDimenion
.
winWidth
-
modal
.
xClick
С
ordinates
)
-
modal
.
xDivClick
-
270
-
80
}
}
const
style
=
{
const
style
=
{
display
:
'flex'
,
flexDirection
:
'column'
,
position
:
'absolute'
,
position
:
'absolute'
,
top
:
modal
.
yPage
-
modal
.
yDiv
-
modal
.
yDivClick
,
top
:
getYCordinatesToModal
()
,
left
:
modal
.
xPage
+
modal
.
xDiv
-
modal
.
xDivClick
+
10
,
left
:
getXCordinatesToModal
()
,
width
:
2
5
0
,
width
:
2
7
0
,
height
:
3
50
,
height
:
4
50
,
bgcolor
:
'background.paper'
,
bgcolor
:
'background.paper'
,
border
:
'2px solid #000'
,
border
:
'2px solid #000'
,
boxShadow
:
24
,
boxShadow
:
24
,
...
@@ -24,7 +62,7 @@ export default function ModalTask({modal, handleClose, children}) {
...
@@ -24,7 +62,7 @@ export default function ModalTask({modal, handleClose, children}) {
aria
-
describedby
=
"modal-modal-description"
aria
-
describedby
=
"modal-modal-description"
BackdropProps
=
{{
style
:
{
backgroundColor
:
'rgba(255,255,255, 0)'
}
}}
BackdropProps
=
{{
style
:
{
backgroundColor
:
'rgba(255,255,255, 0)'
}
}}
>
>
<
Box
sx
=
{
style
}
>
<
Box
sx
=
{
style
}
ref
=
{
modalRef
}
>
{
children
}
{
children
}
<
/Box
>
<
/Box
>
<
/Modal
>
<
/Modal
>
...
...
planner-front/src/components/UI/Select/Select.js
View file @
59ece50e
...
@@ -8,7 +8,7 @@ import Select from "@mui/material/Select";
...
@@ -8,7 +8,7 @@ import Select from "@mui/material/Select";
export
default
function
BasicSelect
({
value
,
label
,
name
,
onChange
,
task
,
items
})
{
export
default
function
BasicSelect
({
value
,
label
,
name
,
onChange
,
task
,
items
})
{
return
(
return
(
<
Box
sx
=
{{
minWidth
:
60
}}
>
<
Box
sx
=
{{
minWidth
:
60
,
m
:
0
}}
>
<
FormControl
fullWidth
>
<
FormControl
fullWidth
>
<
InputLabel
id
=
"demo-simple-select-label"
><
/InputLabel
>
<
InputLabel
id
=
"demo-simple-select-label"
><
/InputLabel
>
<
Select
<
Select
...
...
planner-front/src/components/UI/СustomSelect/СustomSelect.js
View file @
59ece50e
...
@@ -5,7 +5,7 @@ function СustomSelect({value, onChange, label, variant='standard', items, id,
...
@@ -5,7 +5,7 @@ function СustomSelect({value, onChange, label, variant='standard', items, id,
return
(
return
(
<>
<>
<
FormControl
variant
=
{
variant
}
sx
=
{{
m
:
1
,
minWidth
:
120
}}
>
<
FormControl
variant
=
{
variant
}
sx
=
{{
m
:
0
,
minWidth
:
120
}}
>
<
InputLabel
id
=
{
`
${
id
}
-select-label`
}
>
{
label
}
<
/InputLabel
>
<
InputLabel
id
=
{
`
${
id
}
-select-label`
}
>
{
label
}
<
/InputLabel
>
<
Select
<
Select
labelId
=
{
`
${
id
}
-select-label`
}
labelId
=
{
`
${
id
}
-select-label`
}
...
...
planner-front/src/containers/MonthCalendar/MonthCalendar.js
View file @
59ece50e
...
@@ -13,7 +13,7 @@ function MonthCalendar() {
...
@@ -13,7 +13,7 @@ function MonthCalendar() {
const
[
dateNow
,
setDateNow
]
=
useState
({
month
:
''
,
year
:
''
})
const
[
dateNow
,
setDateNow
]
=
useState
({
month
:
''
,
year
:
''
})
const
[
worker
,
setWorker
]
=
useState
(
''
);
const
[
worker
,
setWorker
]
=
useState
(
''
);
const
[
calendarType
,
setCalendarType
]
=
useState
(
'Месяц'
);
const
[
calendarType
,
setCalendarType
]
=
useState
(
'Месяц'
);
const
[
currentTask
,
setCurrentTask
]
=
useState
({
title
:
''
,
description
:
''
,
priority
:
''
})
const
[
currentTask
,
setCurrentTask
]
=
useState
({
title
:
''
,
description
:
''
,
priority
:
null
,
infoForCell
:
{
startHour
:
null
,
endHour
:
null
}
})
const
[
copyTask
,
setCopyTask
]
=
useState
(
null
)
const
[
copyTask
,
setCopyTask
]
=
useState
(
null
)
const
[
cellSizes
,
setCellSizes
]
=
useState
({})
const
[
cellSizes
,
setCellSizes
]
=
useState
({})
...
@@ -65,7 +65,7 @@ function MonthCalendar() {
...
@@ -65,7 +65,7 @@ function MonthCalendar() {
return
{...
prevState
,
month
:
prevState
.
month
+
1
}
return
{...
prevState
,
month
:
prevState
.
month
+
1
}
})
})
},
[])
},
[])
console
.
log
(
currentTask
)
const
decrementMonth
=
useCallback
(()
=>
{
const
decrementMonth
=
useCallback
(()
=>
{
setDateNow
((
prevState
)
=>
{
setDateNow
((
prevState
)
=>
{
if
(
prevState
.
month
-
1
===
-
1
)
{
if
(
prevState
.
month
-
1
===
-
1
)
{
...
@@ -77,12 +77,24 @@ function MonthCalendar() {
...
@@ -77,12 +77,24 @@ function MonthCalendar() {
const
onChangeCurrentTaskHandler
=
useCallback
((
e
)
=>
{
const
onChangeCurrentTaskHandler
=
useCallback
((
e
)
=>
{
const
{
name
,
value
}
=
e
.
target
;
const
{
name
,
value
}
=
e
.
target
;
setCurrentTask
((
prevState
)
=>
{
if
(
name
===
'startHour'
||
name
===
'endHour'
)
{
setCurrentTask
((
prevState
)
=>
{
return
{
...
prevState
,
infoForCell
:
{
...
prevState
.
infoForCell
,
[
name
]:
parseInt
(
value
)
}
}
});
}
else
{
setCurrentTask
((
prevState
)
=>
{
return
{
return
{
...
prevState
,
...
prevState
,
[
name
]:
value
[
name
]:
value
}
}
});
});
}
},
[]);
},
[]);
const
createTaskInCellHandler
=
(
dayNumber
,
dayHour
)
=>
{
const
createTaskInCellHandler
=
(
dayNumber
,
dayHour
)
=>
{
...
@@ -94,9 +106,9 @@ function MonthCalendar() {
...
@@ -94,9 +106,9 @@ function MonthCalendar() {
}
}
let
hourDue
let
hourDue
if
(
hourFormat
)
{
if
(
hourFormat
)
{
hourDue
=
hour
+
0
}
else
{
hourDue
=
hour
+
1
hourDue
=
hour
+
1
}
else
{
hourDue
=
hour
+
2
}
}
const
newTask
=
{
const
newTask
=
{
title
:
"Задача"
,
title
:
"Задача"
,
...
@@ -104,6 +116,11 @@ function MonthCalendar() {
...
@@ -104,6 +116,11 @@ function MonthCalendar() {
priority
:
null
,
priority
:
null
,
dateTimeStart
:
dateToISOLikeButLocal
(
new
Date
(
dateNow
.
year
,
dateNow
.
month
,
dayNumber
,
hour
,
0
)),
dateTimeStart
:
dateToISOLikeButLocal
(
new
Date
(
dateNow
.
year
,
dateNow
.
month
,
dayNumber
,
hour
,
0
)),
dateTimeDue
:
dateToISOLikeButLocal
(
new
Date
(
dateNow
.
year
,
dateNow
.
month
,
dayNumber
,
hourDue
,
59
)),
dateTimeDue
:
dateToISOLikeButLocal
(
new
Date
(
dateNow
.
year
,
dateNow
.
month
,
dayNumber
,
hourDue
,
59
)),
infoForCell
:
{
startHour
:
hour
,
endHour
:
hourDue
,
startDay
:
dayNumber
}
}
}
setCurrentTask
((
newTask
))
setCurrentTask
((
newTask
))
}
}
...
@@ -191,22 +208,21 @@ function MonthCalendar() {
...
@@ -191,22 +208,21 @@ function MonthCalendar() {
}
}
const
sendNewTaskHandler
=
async
()
=>
{
const
sendNewTaskHandler
=
async
()
=>
{
const
timeEndHour
=
currentTask
.
infoForCell
.
endHour
const
timeStartHour
=
currentTask
.
infoForCell
.
startHour
const
day
=
currentTask
.
infoForCell
.
startDay
const
due
=
dateToISOLikeButLocal
(
new
Date
(
dateNow
.
year
,
dateNow
.
month
,
day
,
timeEndHour
-
1
,
59
))
const
start
=
dateToISOLikeButLocal
(
new
Date
(
dateNow
.
year
,
dateNow
.
month
,
day
,
timeStartHour
,
0
))
const
newTask
=
{
...
currentTask
,
dateTimeStart
:
start
,
dateTimeDue
:
due
}
delete
newTask
.
infoForCell
if
(
currentTask
.
id
)
{
if
(
currentTask
.
id
)
{
delete
currentTask
.
infoForCell
await
dispatch
(
editCalendarTask
(
newTask
))
setCurrentTask
(()
=>
{
return
{
...
currentTask
,
}}
)
await
dispatch
(
editCalendarTask
(
currentTask
))
}
else
{
}
else
{
setCurrentTask
(()
=>
{
await
dispatch
(
addCalendarTask
(
newTask
))
return
{
...
currentTask
,
}}
)
delete
currentTask
.
infoForCell
await
dispatch
(
addCalendarTask
(
currentTask
))
}
}
}
}
...
...
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