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
88a534fc
Commit
88a534fc
authored
Nov 15, 2022
by
Нелли Ибрагимова
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
обновила проект с гита
parent
9ed799cd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
5 deletions
+36
-5
MyTaskToolBar.js
...r-front/src/components/MyTasksCompoments/MyTaskToolBar.js
+3
-0
MultipleSelect.js
...-front/src/components/UI/MultipleSelect/MultipleSelect.js
+6
-5
MyTasks.js
planner-front/src/containers/MyTasks/MyTasks.js
+27
-0
No files found.
planner-front/src/components/MyTasksCompoments/MyTaskToolBar.js
View file @
88a534fc
...
...
@@ -17,6 +17,9 @@ export default function MyTaskToolBar(props) {
<
/Typography
>
<
MultipleSelect
projects
=
{
props
.
projects
}
onClose
=
{
props
.
onClose
}
projectName
=
{
props
.
projectName
}
setProjectName
=
{
props
.
setProjectName
}
/
>
<
Button
color
=
"inherit"
onClick
=
{
props
.
onClick
}
>
Добавить
задачу
<
/Button
>
<
/Toolbar
>
...
...
planner-front/src/components/UI/MultipleSelect/MultipleSelect.js
View file @
88a534fc
...
...
@@ -31,18 +31,18 @@ function getStyles(name, personName, theme) {
export
default
function
MultipleSelect
(
props
)
{
const
theme
=
useTheme
();
const
[
projectName
,
setProjectName
]
=
React
.
useState
([]);
const
handleChange
=
(
event
)
=>
{
const
{
target
:
{
value
},
}
=
event
;
setProjectName
(
props
.
setProjectName
(
// On autofill we get a stringified value.
typeof
value
===
'string'
?
value
.
split
(
','
)
:
value
,
);
};
console
.
log
(
projectName
)
return
(
<
div
>
<
FormControl
sx
=
{{
m
:
1
,
width
:
250
,
borderColor
:
'white'
}}
>
...
...
@@ -51,17 +51,18 @@ console.log(projectName)
labelId
=
"demo-multiple-name-label"
id
=
"demo-multiple-name"
multiple
value
=
{
projectName
}
value
=
{
pro
ps
.
pro
jectName
}
onChange
=
{
handleChange
}
input
=
{
<
OutlinedInput
label
=
"Name"
/>
}
MenuProps
=
{
MenuProps
}
sx
=
{{
color
:
'white'
}}
onClose
=
{(
e
)
=>
{
props
.
onClose
(
props
.
projectName
)}}
>
{
props
.
projects
.
map
((
project
)
=>
(
<
MenuItem
key
=
{
project
}
value
=
{
project
}
style
=
{
getStyles
(
project
,
projectName
,
theme
)}
style
=
{
getStyles
(
project
,
pro
ps
.
pro
jectName
,
theme
)}
>
{
project
}
<
/MenuItem
>
...
...
planner-front/src/containers/MyTasks/MyTasks.js
View file @
88a534fc
...
...
@@ -201,7 +201,31 @@ console.log(tasks)
const
handleClose
=
()
=>
{
setModal
({
...
modal
,
open
:
false
,
id
:
null
});
};
// ++++++++фильтрация по проектам+++++++++++++++
const
[
projectName
,
setProjectName
]
=
React
.
useState
([]);
const
[
filter
,
setFilter
]
=
React
.
useState
(
false
);
const
onClose
=
(
projectName
)
=>
{
console
.
log
(
projectName
)
setFilter
(
true
)
}
useEffect
(()
=>
{
if
(
tasks
&&
tasks
?.
length
>
0
)
{
let
currentTasks
=
[];
let
i
for
(
i
=
0
;
i
<
projectName
?.
lenght
;
i
++
)
{
currentTasks
=
tasks
?.
map
((
task
)
=>
{
if
(
task
.
project
=
projectName
)
return
{
...
task
,
};
})};
setRecievedTasks
(
currentTasks
);
}
},
[
filter
==
true
]);
// ++++++++фильтрация по проектам+++++++++++++++
if
(
tasks
&&
tasks
?.
length
>
0
&&
...
...
@@ -216,6 +240,9 @@ console.log(tasks)
addTask
();
}}
projects
=
{
projects
}
onClose
=
{
onClose
}
projectName
=
{
projectName
}
setProjectName
=
{
setProjectName
}
/
>
<
TableContainer
>
...
...
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