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
fe5adeb6
Commit
fe5adeb6
authored
Jan 13, 2023
by
Ermolaev Timur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#149
Небольшие изменения
parent
97c343f3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
15 deletions
+20
-15
СustomSelect.js
planner-front/src/components/UI/СustomSelect/СustomSelect.js
+1
-1
EditRow.js
...iner/UsersTasksTableBody/UsersTasksRow/EditRow/EditRow.js
+5
-4
UsersTasksRow.js
...tainer/UsersTasksTableBody/UsersTasksRow/UsersTasksRow.js
+6
-9
UsersTasksTableHead.js
...TableContainer/UsersTasksTableHead/UsersTasksTableHead.js
+1
-1
tasksReducer.js
planner-front/src/store/reducers/tasksReducer.js
+7
-0
No files found.
planner-front/src/components/UI/СustomSelect/СustomSelect.js
View file @
fe5adeb6
...
...
@@ -2,7 +2,7 @@ import { FormControl, InputLabel, MenuItem, Select } from '@mui/material';
import
{
memo
}
from
'react'
;
function
С
ustomSelect
({
value
,
onChange
,
label
,
variant
=
'standard'
,
items
,
id
,
defaultValue
,
name
,
sx
})
{
console
.
log
(
value
)
return
(
<>
<
FormControl
variant
=
{
variant
}
sx
=
{
sx
?.
width
?
sx
:
{
m
:
0
,
minWidth
:
125
}}
>
...
...
planner-front/src/components/UsersTasksCompoments/UsersTasksTableContainer/UsersTasksTableBody/UsersTasksRow/EditRow/EditRow.js
View file @
fe5adeb6
...
...
@@ -15,12 +15,13 @@ const StyledTooltip = styled(({ className, ...props }) => (
`
;
function
EditRow
({
buttons
,
dateTimeTasks
,
onChangeCurrentTaskHandler
,
currentTask
,
allUserProjectsForModalTask
,
onDateChangeEditHandler
})
{
function
EditRow
({
buttons
,
dateTimeTasks
,
onChangeCurrentTaskHandler
,
currentTask
,
allUserProjectsForModalTask
,
onDateChangeEditHandler
,
user
})
{
const
workers
=
useMemo
(()
=>
{
if
(
currentTask
?.
project
)
{
currentTask
.
project
=
allUserProjectsForModalTask
.
find
((
project
)
=>
project
?.
value
?.
id
===
currentTask
?.
project
?.
id
)?.
value
return
currentTask
?.
project
?.
members
.
map
((
member
)
=>
{
return
{
value
:
member
.
user
.
id
,
text
:
member
.
user
.
displayName
}
})
const
arrUsers
=
currentTask
?.
project
?.
members
.
map
((
member
)
=>
{
return
{
value
:
member
.
user
,
text
:
member
.
user
.
displayName
}
})
arrUsers
.
push
({
value
:
null
,
text
:
'Никто'
})
return
arrUsers
}
else
{
return
[{
value
:
''
,
text
:
'Выберите проект'
}]
}
...
...
@@ -81,7 +82,7 @@ function EditRow({ buttons, dateTimeTasks, onChangeCurrentTaskHandler, currentTa
<
/TableCell
>
<
TableCell
sx
=
{{
width
:
'8%'
}}
>
<
CustomSelect
value
=
{
currentTask
.
executor
.
id
}
value
=
{
currentTask
.
executor
}
name
=
{
'executor'
}
variant
=
{
'outlined'
}
onChange
=
{
onChangeCurrentTaskHandler
}
...
...
planner-front/src/components/UsersTasksCompoments/UsersTasksTableContainer/UsersTasksTableBody/UsersTasksRow/UsersTasksRow.js
View file @
fe5adeb6
...
...
@@ -101,8 +101,8 @@ function UsersTasksRow({ row, deleteTaskHandler, calendarOpen, deleteCopyTaskHan
if
(
!
editMode
)
{
setCurrentTask
({
...
row
,
project
:
{
...
row
.
project
},
executor
:
{
...
row
.
executor
}
project
:
{
...
row
.
project
},
executor
:
{
...
row
.
executor
}
})
}
else
{
editCurrentTaskHandler
()
...
...
@@ -152,6 +152,7 @@ function UsersTasksRow({ row, deleteTaskHandler, calendarOpen, deleteCopyTaskHan
currentTask
=
{
currentTask
}
allUserProjectsForModalTask
=
{
allUserProjectsForModalTask
}
onDateChangeEditHandler
=
{
onDateChangeEditHandler
}
user
=
{
user
}
/
>
<
/
>
:
...
...
@@ -159,7 +160,7 @@ function UsersTasksRow({ row, deleteTaskHandler, calendarOpen, deleteCopyTaskHan
<
TableCell
sx
=
{{
width
:
'4%'
}}
>
{
row
.
priority
?
row
.
priority
:
null
}
<
/TableCell
>
<
TableCell
sx
=
{{
width
:
'10%'
}}
>
{
moment
(
row
.
createdAt
).
format
(
'DD.MM.YYYY'
)}
<
/TableCell
>
<
Tooltip
title
=
{
row
.
description
}
>
<
TableCell
sx
=
{{
width
:
'25%'
,
overflow
:
'hidden'
,
textOverflow
:
'ellipsis'
}}
>
<
TableCell
sx
=
{{
width
:
'25%'
}}
>
{
row
.
title
}
<
/TableCell
>
<
/Tooltip
>
...
...
@@ -173,12 +174,8 @@ function UsersTasksRow({ row, deleteTaskHandler, calendarOpen, deleteCopyTaskHan
<
TableCell
sx
=
{{
width
:
'10%'
}}
>
{
row
.
dateTimeDeadLine
?
moment
(
row
.
dateTimeDeadLine
).
utc
().
format
(
'DD.MM.YYYY HH:MM'
)
:
null
}
<
/TableCell
>
<
TableCell
sx
=
{{
width
:
'7%'
}}
>
{
accomplishStatuses
.
find
((
status
)
=>
{
if
(
status
.
value
===
row
.
accomplish
)
{
return
status
}
return
null
}).
text
}
<
/TableCell
>
{
row
.
accomplishTranslate
}
<
/TableCell
>
<
TableCell
size
=
'medium'
sx
=
{{
width
:
'5%'
,
position
:
'relative'
}}
>
{
buttons
}
<
/TableCell
>
...
...
planner-front/src/components/UsersTasksCompoments/UsersTasksTableContainer/UsersTasksTableHead/UsersTasksTableHead.js
View file @
fe5adeb6
...
...
@@ -68,7 +68,7 @@ const headCells = [
}
},
{
id
:
"accomplish"
,
id
:
"accomplish
Translate
"
,
label
:
"Статус"
,
canSort
:
true
,
style
:
{
...
...
planner-front/src/store/reducers/tasksReducer.js
View file @
fe5adeb6
import
{
accomplishStatuses
}
from
"../../constants"
;
import
{
ADD_NEW_TASK_FAILURE
,
ADD_NEW_TASK_REQUEST
,
...
...
@@ -96,6 +97,12 @@ const tasksReduсer = (state = initialState, action) => {
authorName
:
task
.
author
.
displayName
,
projectTitle
:
task
.
project
.
title
,
executorName
:
task
?.
executor
?.
displayName
||
null
,
accomplishTranslate
:
accomplishStatuses
.
find
((
status
)
=>
{
if
(
status
.
value
===
task
.
accomplish
)
{
return
status
}
return
null
}).
text
}})
return
{
...
state
,
loading
:
false
,
tasks
:
newArr
,
projects
:
action
.
projects
};
case
FETCH_CALENDAR_TASKS_FAILURE
:
...
...
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