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
12acb7dc
Commit
12acb7dc
authored
Nov 14, 2022
by
Нелли Ибрагимова
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
добавила функцию HandleEdit Task, удалила лишние файлы
parent
9a852f06
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
373 deletions
+12
-373
CustomTableCell1.js
...ront/src/components/MyTasksCompoments/CustomTableCell1.js
+1
-1
MyTasks.js
planner-front/src/containers/MyTasks/MyTasks.js
+0
-366
MyTasks1.js
planner-front/src/containers/MyTasks/MyTasks1.js
+9
-5
tasksActions.js
planner-front/src/store/actions/tasksActions.js
+2
-1
No files found.
planner-front/src/components/MyTasksCompoments/CustomTableCell1.js
View file @
12acb7dc
...
@@ -3,7 +3,7 @@ import TableCell from "@mui/material/TableCell";
...
@@ -3,7 +3,7 @@ import TableCell from "@mui/material/TableCell";
import
Input
from
"@mui/material/Input"
;
import
Input
from
"@mui/material/Input"
;
const
CustomTableCell
=
({
task
,
name
,
value
,
onChange
,
onModalOpen
})
=>
{
const
CustomTableCell
=
({
task
,
name
,
value
,
onChange
,
onModalOpen
})
=>
{
const
styles
=
{
width
:
"auto"
,
height
:
"
40px"
};
const
styles
=
{
width
:
"auto"
,
height
:
"
10px"
};
if
(
task
)
{
if
(
task
)
{
return
(
return
(
...
...
planner-front/src/containers/MyTasks/MyTasks.js
deleted
100644 → 0
View file @
9a852f06
This diff is collapsed.
Click to expand it.
planner-front/src/containers/MyTasks/MyTasks1.js
View file @
12acb7dc
...
@@ -23,7 +23,7 @@ import MyTaskToolBar from "../../components/MyTasksCompoments/MyTaskToolBar";
...
@@ -23,7 +23,7 @@ import MyTaskToolBar from "../../components/MyTasksCompoments/MyTaskToolBar";
import
CustomTableCell
from
"../../components/MyTasksCompoments/CustomTableCell1"
;
import
CustomTableCell
from
"../../components/MyTasksCompoments/CustomTableCell1"
;
import
MaterialUIPickers
from
"../../components/MyTasksCompoments/DateTimePicker/DateTimePicker"
;
import
MaterialUIPickers
from
"../../components/MyTasksCompoments/DateTimePicker/DateTimePicker"
;
import
BasicSelect
from
"../../components/UI/Select/Select"
;
import
BasicSelect
from
"../../components/UI/Select/Select"
;
import
{
fetchAllTasks
,
deleteTask
}
from
"../../store/actions/tasksActions"
;
import
{
fetchAllTasks
,
deleteTask
,
editTask
,
addTask
}
from
"../../store/actions/tasksActions"
;
function
descendingComparator
(
a
,
b
,
orderBy
)
{
function
descendingComparator
(
a
,
b
,
orderBy
)
{
if
(
b
[
orderBy
]
<
a
[
orderBy
])
{
if
(
b
[
orderBy
]
<
a
[
orderBy
])
{
...
@@ -156,6 +156,10 @@ console.log(tasks)
...
@@ -156,6 +156,10 @@ console.log(tasks)
setRecievedTasks
(
newTasks
);
setRecievedTasks
(
newTasks
);
};
};
const
HandleEditTask
=
(
task
)
=>
{
dispatch
(
editTask
(
task
))
}
const
addTask
=
()
=>
{
const
addTask
=
()
=>
{
// let newTasks=[...tasks]
// let newTasks=[...tasks]
tasks
.
unshift
({
tasks
.
unshift
({
...
@@ -216,13 +220,13 @@ console.log(tasks)
...
@@ -216,13 +220,13 @@ console.log(tasks)
rowCount
=
{
tasks
.
length
}
rowCount
=
{
tasks
.
length
}
/
>
/
>
<
TableBody
>
<
TableBody
>
<
TableRow
>
<
TableRow
sx
=
{{
height
:
'1px'
,
margin
:
0
,
padding
:
0
}}
>
<
TableCell
align
=
"left"
>
<
TableCell
align
=
"left"
>
<
Input
value
=
{
order
}
name
=
"order"
/>
<
Input
sx
=
{{
height
:
'1px'
,
margin
:
0
,
padding
:
0
}}
value
=
{
''
}
name
=
"order"
/>
<
/TableCell
>
<
/TableCell
>
<
TableCell
align
=
"left"
>
<
TableCell
align
=
"left"
>
<
Input
value
=
{
orderBy
}
name
=
"orderBy"
/>
<
Input
sx
=
{{
height
:
'1px'
,
margin
:
0
,
padding
:
0
}}
value
=
{
''
}
name
=
"orderBy"
/>
<
/TableCell
>
<
/TableCell
>
<
/TableRow
>
<
/TableRow
>
...
@@ -306,7 +310,7 @@ console.log(tasks)
...
@@ -306,7 +310,7 @@ console.log(tasks)
{
task
.
isEditMode
?
(
{
task
.
isEditMode
?
(
<
IconButton
<
IconButton
aria
-
label
=
"done"
aria
-
label
=
"done"
onClick
=
{()
=>
{
onToggleEditMode
(
task
.
id
,
false
,
true
);
e
ditTask
(
task
)
}}
onClick
=
{()
=>
{
onToggleEditMode
(
task
.
id
);
HandleE
ditTask
(
task
)
}}
>
>
<
Done
/>
<
Done
/>
<
/IconButton
>
<
/IconButton
>
...
...
planner-front/src/store/actions/tasksActions.js
View file @
12acb7dc
...
@@ -101,11 +101,12 @@ export const editTask = (task) => {
...
@@ -101,11 +101,12 @@ export const editTask = (task) => {
const
token
=
getState
().
users
?.
user
?.
token
;
const
token
=
getState
().
users
?.
user
?.
token
;
try
{
try
{
console
.
log
(
task
)
console
.
log
(
task
)
await
axios
.
put
(
"/tasks"
,
task
,
{
const
r
=
await
axios
.
put
(
"/tasks"
,
task
,
{
headers
:
{
headers
:
{
'Authorization'
:
'IwGVRaksGTWtnKlOZd7zJ'
'Authorization'
:
'IwGVRaksGTWtnKlOZd7zJ'
}
}
});
});
console
.
log
(
r
)
dispatch
(
editTaskSuccess
())
dispatch
(
editTaskSuccess
())
dispatch
(
fetchAllTasks
())
dispatch
(
fetchAllTasks
())
dispatch
(
fetchCalendarTasks
())
dispatch
(
fetchCalendarTasks
())
...
...
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