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
bacaa9de
Commit
bacaa9de
authored
Dec 05, 2022
by
Евгений Положенцев
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#89
added delete edit buttons to the fall out datetimeTals
parent
a60811ad
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
1 deletion
+62
-1
TableRowTask.js
...components/MyTasksCompoments/TableRowTask/TableRowTask.js
+50
-1
MyTasks.js
planner-front/src/containers/MyTasks/MyTasks.js
+12
-0
No files found.
planner-front/src/components/MyTasksCompoments/TableRowTask/TableRowTask.js
View file @
bacaa9de
...
@@ -13,6 +13,7 @@ import {
...
@@ -13,6 +13,7 @@ import {
}
from
"@mui/material"
;
}
from
"@mui/material"
;
import
{
Done
,
Edit
}
from
"@mui/icons-material"
;
import
{
Done
,
Edit
}
from
"@mui/icons-material"
;
import
RemoveIcon
from
'@mui/icons-material/Remove'
;
import
DeleteIcon
from
"@mui/icons-material/Delete"
;
import
DeleteIcon
from
"@mui/icons-material/Delete"
;
import
moment
from
"moment"
;
import
moment
from
"moment"
;
import
CustomTableCell
from
"../CustomTableCell"
;
import
CustomTableCell
from
"../CustomTableCell"
;
...
@@ -29,6 +30,8 @@ const TableRowTask= ({
...
@@ -29,6 +30,8 @@ const TableRowTask= ({
task
,
task
,
deleteHandle
,
deleteHandle
,
handleEditTask
,
handleEditTask
,
deleteDateTimeTask
,
handleEditDateTimeTask
,
onChange
,
onChange
,
onModalOpen
,
onModalOpen
,
onProjectChange
,
onProjectChange
,
...
@@ -56,6 +59,9 @@ const TableRowTask= ({
...
@@ -56,6 +59,9 @@ const TableRowTask= ({
return
weekDays
[
date
.
day
()];
return
weekDays
[
date
.
day
()];
}
}
// const handleEditDateTimeTask =(dateTimeTask)=>{
// console.log('edit handleEditDateTimeTask')
// }
return
(
return
(
...
@@ -304,13 +310,16 @@ const TableRowTask= ({
...
@@ -304,13 +310,16 @@ const TableRowTask= ({
<
Typography
variant
=
"h6"
gutterBottom
component
=
"div"
>
<
Typography
variant
=
"h6"
gutterBottom
component
=
"div"
>
Расписание
Расписание
<
/Typography
>
<
/Typography
>
<
Table
size
=
"small"
aria
-
label
=
"purchases"
>
<
Table
size
=
"small"
aria
-
label
=
"purchases"
sx
=
{{
backgroundColor
:
"#ebebeb"
}}
>
<
TableHead
>
<
TableHead
>
<
TableRow
>
<
TableRow
>
<
TableCell
colSpan
=
{
10
}
>
Дата
создания
<
/TableCell
>
<
TableCell
colSpan
=
{
10
}
>
Дата
создания
<
/TableCell
>
<
TableCell
align
=
"right"
>
День
недели
<
/TableCell
>
<
TableCell
align
=
"right"
>
День
недели
<
/TableCell
>
<
TableCell
align
=
"right"
>
Начало
<
/TableCell
>
<
TableCell
align
=
"right"
>
Начало
<
/TableCell
>
<
TableCell
align
=
"center"
colSpan
=
{
1
}
>
Окончание
<
/TableCell
>
<
TableCell
align
=
"center"
colSpan
=
{
1
}
>
Окончание
<
/TableCell
>
<
TableCell
align
=
"center"
><
/TableCell
>
<
TableCell
align
=
"center"
><
/TableCell
>
<
/TableRow
>
<
/TableRow
>
<
/TableHead
>
<
/TableHead
>
<
TableBody
>
<
TableBody
>
...
@@ -332,6 +341,46 @@ const TableRowTask= ({
...
@@ -332,6 +341,46 @@ const TableRowTask= ({
<
TableCell
align
=
"center"
colSpan
=
{
1
}
>
<
TableCell
align
=
"center"
colSpan
=
{
1
}
>
{
timeTransform
(
dateTimeTask
.
dateTimeDue
)}
{
timeTransform
(
dateTimeTask
.
dateTimeDue
)}
<
/TableCell
>
<
/TableCell
>
{
/* Edit option datetimeTask */
}
<
TableCell
style
=
{{
width
:
'0%'
}}
>
<
Tooltip
title
=
"Редактировать Копию"
>
{
task
.
isEditMode
?
(
<
IconButton
aria
-
label
=
"done"
onClick
=
{()
=>
{
onToggleEditModeDone
(
dateTimeTask
.
id
);
handleEditDateTimeTask
(
dateTimeTask
);
}}
>
<
Done
/>
<
/IconButton
>
)
:
(
<
IconButton
aria
-
label
=
"edit"
onClick
=
{()
=>
onToggleEditMode
(
dateTimeTask
.
id
)}
>
<
Edit
/>
<
/IconButton
>
)}
<
/Tooltip
>
<
/TableCell
>
{
/* delete option datetimeTask */
}
{
task
.
author
.
id
===
user
.
id
?
(
<
TableCell
style
=
{{
width
:
'0%'
}}
>
<
Tooltip
title
=
"Удалить Копию"
>
<
IconButton
onClick
=
{(
id
)
=>
{
deleteDateTimeTask
(
dateTimeTask
.
id
);
}}
>
<
RemoveIcon
/>
<
/IconButton
>
<
/Tooltip
>
<
/TableCell>
)
:null
}
<
/TableRow
>
<
/TableRow
>
))}
))}
<
/TableBody
>
<
/TableBody
>
...
...
planner-front/src/containers/MyTasks/MyTasks.js
View file @
bacaa9de
...
@@ -162,6 +162,16 @@ useEffect(() => {
...
@@ -162,6 +162,16 @@ useEffect(() => {
dispatch
(
deleteTask
(
id
));
dispatch
(
deleteTask
(
id
));
};
};
const
deleteDateTimeTask
=
(
dateTImeTaskId
)
=>
{
console
.
log
(
'delete by dateTImeTaskId'
)
// dispatch(deleteDateTimeTask(dateTImeTaskId))
}
const
handleEditDateTimeTask
=
(
dateTimeTask
)
=>
{
console
.
log
(
'edit by dateTImeTask'
)
// dispatch(handleEditDateTimeTask(dateTimeTask))
}
const
onModalOpen
=
(
event
,
task
)
=>
{
const
onModalOpen
=
(
event
,
task
)
=>
{
event
.
stopPropagation
();
event
.
stopPropagation
();
...
@@ -261,6 +271,8 @@ console.log('tasks', tasks)
...
@@ -261,6 +271,8 @@ console.log('tasks', tasks)
task
=
{
task
}
task
=
{
task
}
deleteHandle
=
{
deleteHandle
}
deleteHandle
=
{
deleteHandle
}
handleEditTask
=
{
handleEditTask
}
handleEditTask
=
{
handleEditTask
}
handleEditDateTimeTask
=
{
handleEditDateTimeTask
}
deleteDateTimeTask
=
{
deleteDateTimeTask
}
onChange
=
{
onChange
}
onChange
=
{
onChange
}
onModalOpen
=
{
onModalOpen
}
onModalOpen
=
{
onModalOpen
}
onProjectChange
=
{
onProjectChange
}
onProjectChange
=
{
onProjectChange
}
...
...
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