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
291c66b9
Commit
291c66b9
authored
Nov 09, 2022
by
Нелли Ибрагимова
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
добавила селект на выбор статуса задачи
parent
143897d6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
88 additions
and
36 deletions
+88
-36
CustomTableCell.js
...front/src/components/MyTasksCompoments/CustomTableCell.js
+1
-1
DateTimePicker.js
...onents/MyTasksCompoments/DateTimePicker/DateTimePicker.js
+3
-5
DateTimePickerDue.js
...nts/MyTasksCompoments/DateTimePicker/DateTimePickerDue.js
+0
-0
Select.js
planner-front/src/components/UI/Select/Select.js
+57
-0
MyTasks.js
planner-front/src/containers/MyTasks/MyTasks.js
+26
-29
MyTasksHeader.js
...ont/src/containers/MyTasks/MyTasksHeader/MyTasksHeader.js
+1
-1
No files found.
planner-front/src/components/MyTasksCompoments/CustomTableCell.js
View file @
291c66b9
...
...
@@ -3,7 +3,7 @@ import TableCell from '@mui/material/TableCell';
import
IconButton
from
'@mui/material/IconButton'
;
import
Input
from
'@mui/material/Input'
;
import
{
Done
,
CalendarToday
}
from
'@mui/icons-material'
;
import
MaterialUIPickers
from
'.
./UI
/DateTimePicker/DateTimePicker'
;
import
MaterialUIPickers
from
'./DateTimePicker/DateTimePicker'
;
const
CustomTableCell
=
({
task
,
name
,
onChange
,
onModalOpen
})
=>
{
...
...
planner-front/src/components/
UI
/DateTimePicker/DateTimePicker.js
→
planner-front/src/components/
MyTasksCompoments
/DateTimePicker/DateTimePicker.js
View file @
291c66b9
...
...
@@ -9,15 +9,13 @@ import { AdapterMoment } from "@mui/x-date-pickers/AdapterMoment";
export
default
function
MaterialUIPickers
(
props
)
{
console
.
log
(
props
)
return
(
<
LocalizationProvider
dateAdapter
=
{
AdapterMoment
}
sx
=
{{
width
:
"auto"
,
fontSize
:
"9px"
,
fontWeight
:
"200"
}}
>
<
LocalizationProvider
dateAdapter
=
{
AdapterMoment
}
sx
=
{{
width
:
"auto"
,
fontSize
:
5
,
fontWeight
:
"200"
}}
>
<
DateTimePicker
readOnly
=
{
props
.
readOnly
}
renderInput
=
{(
params
)
=>
(
<
TextField
{...
params
}
sx
=
{{
width
:
"auto"
,
fontWeight
:
"200"
,
fontSize
:
'9 px'
}}
sx
=
{{
width
:
"auto"
,
fontWeight
:
"200"
,
fontSize
:
5
}}
name
=
"dateCreated"
/>
)}
value
=
{
...
...
planner-front/src/components/
UI
/DateTimePicker/DateTimePickerDue.js
→
planner-front/src/components/
MyTasksCompoments
/DateTimePicker/DateTimePickerDue.js
View file @
291c66b9
File moved
planner-front/src/components/UI/Select/Select.js
0 → 100644
View file @
291c66b9
import
*
as
React
from
'react'
;
import
Box
from
'@mui/material/Box'
;
import
InputLabel
from
'@mui/material/InputLabel'
;
import
MenuItem
from
'@mui/material/MenuItem'
;
import
FormControl
from
'@mui/material/FormControl'
;
import
Select
from
'@mui/material/Select'
;
export
default
function
BasicSelect
(
props
)
{
const
[
taskContent
,
setTaskContent
]
=
React
.
useState
(
props
.
task
.
accomplish
);
const
handleChange
=
(
event
)
=>
{
setTaskContent
(
event
.
target
.
value
);
};
React
.
useEffect
(()
=>
{
if
(
props
.
task
!==
null
)
{
setTaskContent
({
accomplish
:
props
.
task
.
accomplish
,
});
}
},
[
props
.
task
]);
const
inputChangeHandler
=
(
e
)
=>
{
const
{
name
,
value
}
=
e
.
target
;
console
.
log
(
e
.
target
)
setTaskContent
((
prevState
)
=>
{
return
{
...
prevState
,
[
name
]:
value
};
});
props
.
onChange
(
e
,
props
.
task
);
};
console
.
log
(
props
)
return
(
<
Box
sx
=
{{
minWidth
:
60
}}
>
<
FormControl
fullWidth
>
<
InputLabel
id
=
"demo-simple-select-label"
><
/InputLabel
>
<
Select
labelId
=
"demo-simple-select-label"
id
=
"demo-simple-select"
value
=
{
taskContent
?.
accomplish
}
label
=
""
name
=
{
"accomplish"
}
onChange
=
{
inputChangeHandler
}
sx
=
{{
marginTop
:
2
}}
// className={'disabled'}
>
<
MenuItem
value
=
{
props
.
itemOne
}
>
{
props
.
itemOne
}
<
/MenuItem
>
<
MenuItem
value
=
{
props
.
itemTwo
}
>
{
props
.
itemTwo
}
<
/MenuItem
>
<
MenuItem
value
=
{
props
.
itemThree
}
>
{
props
.
itemThree
}
<
/MenuItem
>
<
/Select
>
<
/FormControl
>
<
/Box
>
);
}
\ No newline at end of file
planner-front/src/containers/MyTasks/MyTasks.js
View file @
291c66b9
...
...
@@ -3,30 +3,26 @@ import {
Box
,
Table
,
TableBody
,
TextField
,
TableCell
,
TableContainer
,
TablePagination
,
TableRow
,
Typography
,
Paper
,
IconButton
,
Tooltip
,
Input
,
}
from
"@mui/material"
;
import
{
useState
,
useEffect
}
from
"react"
;
import
{
Done
,
Edit
}
from
"@mui/icons-material"
;
import
DeleteIcon
from
"@mui/icons-material/Delete"
;
import
TaskModal
from
"../../components/MyTasksCompoments/TaskModal/TaskModal"
;
import
EnhancedTableHead
from
"./MyTasksHeader/MyTasksHeader"
;
import
{
Container
}
from
"@mui/system"
;
import
{
DateTimePicker
,
LocalizationProvider
}
from
"@mui/x-date-pickers"
;
import
{
AdapterMoment
}
from
"@mui/x-date-pickers/AdapterMoment"
;
import
moment
from
"moment"
;
import
MyTaskToolBar
from
'../../components/MyTasksCompoments/MyTaskToolBar'
;
import
CustomTableCell
from
"../../components/MyTasksCompoments/CustomTableCell"
;
import
MaterialUIPickers
from
"../../components/UI/DateTimePicker/DateTimePicker"
;
import
MaterialUIPickersDue
from
"../../components/UI/DateTimePicker/DateTimePickerDue"
;
import
MaterialUIPickers
from
"../../components/MyTasksCompoments/DateTimePicker/DateTimePicker"
;
import
MaterialUIPickersDue
from
"../../components/MyTasksCompoments/DateTimePicker/DateTimePickerDue"
;
import
BasicSelect
from
"../../components/UI/Select/Select"
function
descendingComparator
(
a
,
b
,
orderBy
)
{
if
(
b
[
orderBy
]
<
a
[
orderBy
])
{
...
...
@@ -83,10 +79,10 @@ export default function EnhancedTable() {
dateTimeStart
:
"2022-10-26T11:00:00"
,
dateTimeDue
:
"2022-10-27T10:30:00"
,
id
:
1
,
dateCreated
:
"26.10.2022"
createdAt
:
"26.10.2022"
,
accomplish
:
" "
},
{
user
:
"second"
,
title
:
"задача2"
,
description
:
"описание задачи222222"
,
author
:
"Ivan"
,
...
...
@@ -95,23 +91,25 @@ export default function EnhancedTable() {
dateTimeStart
:
"2022-10-26T13:30:00"
,
dateTimeDue
:
"2022-10-27T12:30:00"
,
id
:
2
,
dateCreated
:
"26.10.2022"
createdAt
:
"26.10.2022"
,
accomplish
:
" "
},
{
user
:
"theird"
,
id
:
3
,
title
:
"задача3"
,
description
:
"описание задачи333333bjh,khkuhlhvilv hmgjtycikg mkgyxxkjfkkmgyhkfrdtseygdtjtuliuo8plfyvguh,bb"
,
createdAt
:
"27.10.2022"
,
dateTimeStart
:
"2022-10-30T09:30:00"
,
dateTimeDue
:
"2022-11-02T09:30:00"
,
accomplish
:
" "
,
author
:
"Artem"
,
project
:
"Project1"
,
executor
:
"Bota"
,
priority
:
"B"
,
dateTimeStart
:
"2022-10-30T09:30:00"
,
dateTimeDue
:
"2022-11-02T09:30:00"
,
id
:
3
,
dateCreated
:
"27.10.2022"
,
}
])
useEffect
(()
=>
{
if
(
newStartedDate
)
{
...
...
@@ -174,7 +172,6 @@ export default function EnhancedTable() {
setOrderBy
(
property
);
};
const
deleteTask
=
(
id
)
=>
{
console
.
log
(
id
)
let
newTasks
=
[...
tasks
]
...
...
@@ -207,7 +204,6 @@ export default function EnhancedTable() {
let
newTasks
=
[...
tasks
]
newTasks
.
unshift
(
{
user
:
""
,
title
:
""
,
description
:
""
,
priority
:
""
,
...
...
@@ -216,13 +212,13 @@ export default function EnhancedTable() {
dateTimeStart
:
""
,
dateTimeDue
:
""
,
id
:
4
,
dateCreated
:
""
createdAt
:
""
,
accomplish
:
" "
}
)
setTasks
(
newTasks
)
};
return
(
<
Box
sx
=
{{
width
:
'fullwidth'
}}
>
<
Paper
sx
=
{{
width
:
'100%'
,
mb
:
2
}}
>
...
...
@@ -262,11 +258,10 @@ export default function EnhancedTable() {
padding
=
"none"
><
/TableCell>
<
CustomTableCell
{...{
task
,
name
:
"priority"
,
onChange
}}
/
>
<
CustomTableCell
{...{
task
,
name
:
"
dateCreated
"
,
onChange
}}
/
>
<
CustomTableCell
{...{
task
,
name
:
"
createdAt
"
,
onChange
}}
/
>
<
CustomTableCell
{...{
task
,
name
:
"title"
,
onChange
,
onModalOpen
}}
/
>
<
CustomTableCell
{...{
task
,
name
:
"author"
,
onChange
}}
/
>
<
TableCell
key
=
{
task
.
id
}
>
<
MaterialUIPickers
newStartedDate
=
{
newStartedDate
}
...
...
@@ -275,7 +270,6 @@ export default function EnhancedTable() {
readOnly
=
{
readOnly
}
/
>
<
/TableCell
>
<
TableCell
key
=
{
task
.
id
}
>
<
MaterialUIPickersDue
newDueDate
=
{
newDueDate
}
...
...
@@ -285,8 +279,12 @@ export default function EnhancedTable() {
/
>
<
/TableCell
>
<
CustomTableCell
{...{
task
,
name
:
"done"
,
onChange
}}
/>
<
BasicSelect
itemOne
=
{
"open"
}
itemTwo
=
{
"done"
}
itemThree
=
{
"failed"
}
task
=
{
task
}
/>
<
TableCell
>
...
...
@@ -317,7 +315,6 @@ export default function EnhancedTable() {
<
/TableCell
>
<
/TableRow
>
);
})}
...
...
planner-front/src/containers/MyTasks/MyTasksHeader/MyTasksHeader.js
View file @
291c66b9
...
...
@@ -56,7 +56,7 @@ const headCells = [
id
:
'done'
,
numeric
:
true
,
disablePadding
:
false
,
label
:
'
Выполнено
'
,
label
:
'
Статус
'
,
},
{
id
:
'change'
,
...
...
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