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
9e60add3
Commit
9e60add3
authored
Jan 13, 2023
by
Ermolaev Timur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#149
Пофиксил баги
parent
29c6594e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
8 deletions
+7
-8
tasks.ts
planner-api/src/routers/tasks.ts
+1
-1
СustomSelect.js
planner-front/src/components/UI/СustomSelect/СustomSelect.js
+0
-1
EditRow.js
...iner/UsersTasksTableBody/UsersTasksRow/EditRow/EditRow.js
+1
-1
UsersTasksRow.js
...tainer/UsersTasksTableBody/UsersTasksRow/UsersTasksRow.js
+0
-1
helpers.js
...s/UsersTasksTableContainer/UsersTasksTableBody/helpers.js
+0
-1
UsersTasks.js
planner-front/src/containers/UsersTasks/UsersTasks.js
+5
-3
No files found.
planner-api/src/routers/tasks.ts
View file @
9e60add3
...
@@ -319,7 +319,7 @@ router.put('/:taskId',auth,authAuthorOrExecutorOfTask,async(req:Request, res:Res
...
@@ -319,7 +319,7 @@ router.put('/:taskId',auth,authAuthorOrExecutorOfTask,async(req:Request, res:Res
dateTimeDue
,
executor
,
accomplish
,
dateTimeDeadLine
,
dateTimeFactDeadLine
,
priority
}
=
req
.
body
;
dateTimeDue
,
executor
,
accomplish
,
dateTimeDeadLine
,
dateTimeFactDeadLine
,
priority
}
=
req
.
body
;
const
task
=
await
taskFinderById
(
taskId
)
const
task
=
await
taskFinderById
(
taskId
)
if
(
!
task
)
return
res
.
status
(
404
).
send
({
Message
:
'task not found'
})
if
(
!
task
)
return
res
.
status
(
404
).
send
({
Message
:
'task not found'
})
console
.
log
(
req
.
body
)
console
.
log
(
'dateTimeDeadLine '
,
dateTimeDeadLine
,
'authorStatus '
console
.
log
(
'dateTimeDeadLine '
,
dateTimeDeadLine
,
'authorStatus '
,
authorStatus
,
'executorStatus '
,
executorStatus
)
,
authorStatus
,
'executorStatus '
,
executorStatus
)
...
...
planner-front/src/components/UI/СustomSelect/СustomSelect.js
View file @
9e60add3
...
@@ -2,7 +2,6 @@ import { FormControl, InputLabel, MenuItem, Select } from '@mui/material';
...
@@ -2,7 +2,6 @@ import { FormControl, InputLabel, MenuItem, Select } from '@mui/material';
import
{
memo
}
from
'react'
;
import
{
memo
}
from
'react'
;
function
С
ustomSelect
({
value
,
onChange
,
label
,
variant
=
'standard'
,
items
,
id
,
defaultValue
,
name
,
sx
})
{
function
С
ustomSelect
({
value
,
onChange
,
label
,
variant
=
'standard'
,
items
,
id
,
defaultValue
,
name
,
sx
})
{
console
.
log
(
value
)
return
(
return
(
<>
<>
<
FormControl
variant
=
{
variant
}
sx
=
{
sx
?.
width
?
sx
:
{
m
:
0
,
minWidth
:
125
}}
>
<
FormControl
variant
=
{
variant
}
sx
=
{
sx
?.
width
?
sx
:
{
m
:
0
,
minWidth
:
125
}}
>
...
...
planner-front/src/components/UsersTasksCompoments/UsersTasksTableContainer/UsersTasksTableBody/UsersTasksRow/EditRow/EditRow.js
View file @
9e60add3
...
@@ -19,7 +19,7 @@ function EditRow({ buttons, dateTimeTasks, onChangeCurrentTaskHandler, currentTa
...
@@ -19,7 +19,7 @@ function EditRow({ buttons, dateTimeTasks, onChangeCurrentTaskHandler, currentTa
if
(
currentTask
?.
project
)
{
if
(
currentTask
?.
project
)
{
currentTask
.
project
=
allUserProjectsForModalTask
.
find
((
project
)
=>
project
?.
value
?.
id
===
currentTask
?.
project
?.
id
)?.
value
currentTask
.
project
=
allUserProjectsForModalTask
.
find
((
project
)
=>
project
?.
value
?.
id
===
currentTask
?.
project
?.
id
)?.
value
const
arrUsers
=
currentTask
?.
project
?.
members
.
map
((
member
)
=>
{
return
{
value
:
member
.
user
,
text
:
member
.
user
.
displayName
}
})
const
arrUsers
=
currentTask
?.
project
?.
members
.
map
((
member
)
=>
{
return
{
value
:
member
.
user
,
text
:
member
.
user
.
displayName
}
})
arrUsers
.
push
({
value
:
null
,
text
:
'Никто'
})
arrUsers
.
push
({
value
:
''
,
text
:
'Никто'
})
return
arrUsers
return
arrUsers
}
else
{
}
else
{
return
[{
value
:
''
,
text
:
'Выберите проект'
}]
return
[{
value
:
''
,
text
:
'Выберите проект'
}]
...
...
planner-front/src/components/UsersTasksCompoments/UsersTasksTableContainer/UsersTasksTableBody/UsersTasksRow/UsersTasksRow.js
View file @
9e60add3
...
@@ -10,7 +10,6 @@ import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
...
@@ -10,7 +10,6 @@ import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
import
KeyboardArrowUpIcon
from
'@mui/icons-material/KeyboardArrowUp'
;
import
KeyboardArrowUpIcon
from
'@mui/icons-material/KeyboardArrowUp'
;
import
TableForCopiesTasks
from
"./TableForCopiesTasks/TableForCopiesTasks"
;
import
TableForCopiesTasks
from
"./TableForCopiesTasks/TableForCopiesTasks"
;
import
EditRow
from
"./EditRow/EditRow"
;
import
EditRow
from
"./EditRow/EditRow"
;
import
{
accomplishStatuses
}
from
"../../../../../constants"
;
const
editClass
=
{
const
editClass
=
{
cursor
:
'pointer'
,
cursor
:
'pointer'
,
...
...
planner-front/src/components/UsersTasksCompoments/UsersTasksTableContainer/UsersTasksTableBody/helpers.js
View file @
9e60add3
...
@@ -16,7 +16,6 @@ function descendingComparator(a, b, orderBy, order) {
...
@@ -16,7 +16,6 @@ function descendingComparator(a, b, orderBy, order) {
}
}
export
function
getComparator
(
order
,
orderBy
)
{
export
function
getComparator
(
order
,
orderBy
)
{
console
.
log
(
order
)
return
order
===
'desc'
return
order
===
'desc'
?
(
a
,
b
)
=>
descendingComparator
(
a
,
b
,
orderBy
)
?
(
a
,
b
)
=>
descendingComparator
(
a
,
b
,
orderBy
)
:
(
a
,
b
)
=>
-
descendingComparator
(
a
,
b
,
orderBy
,
order
);
:
(
a
,
b
)
=>
-
descendingComparator
(
a
,
b
,
orderBy
,
order
);
...
...
planner-front/src/containers/UsersTasks/UsersTasks.js
View file @
9e60add3
...
@@ -115,12 +115,13 @@ export default function EnhancedTable() {
...
@@ -115,12 +115,13 @@ export default function EnhancedTable() {
},
[
addFormStatus
])
},
[
addFormStatus
])
const
createNewTaskHandler
=
useCallback
(()
=>
{
const
createNewTaskHandler
=
useCallback
(()
=>
{
if
(
newTask
.
priority
===
''
||
newTask
.
project
===
''
||
newTask
.
executor
)
{
if
(
newTask
.
priority
===
''
||
newTask
.
project
===
''
||
newTask
.
executor
===
''
)
{
const
task
=
{
const
task
=
{
...
newTask
,
...
newTask
,
priority
:
newTask
.
priority
?
newTask
.
priority
:
null
,
priority
:
newTask
.
priority
?
newTask
.
priority
:
null
,
project
:
newTask
.
project
?
newTask
.
project
:
null
,
project
:
newTask
.
project
?
newTask
.
project
:
null
,
executor
:
newTask
.
executor
?
newTask
.
executor
:
null
,
executor
:
newTask
.
executor
?
newTask
.
executor
:
null
,
dateTimeDeadLine
:
new
Date
(
newTask
.
dateTimeDeadLine
)
instanceof
Date
&&
!
isNaN
(
new
Date
(
newTask
.
dateTimeDeadLine
))
?
newTask
.
dateTimeDeadLine
:
null
}
}
dispatch
(
addTaskToUserTasksTable
(
task
))
dispatch
(
addTaskToUserTasksTable
(
task
))
}
else
{
}
else
{
...
@@ -151,12 +152,13 @@ export default function EnhancedTable() {
...
@@ -151,12 +152,13 @@ export default function EnhancedTable() {
}
}
const
editCurrentTaskHandler
=
useCallback
(()
=>
{
const
editCurrentTaskHandler
=
useCallback
(()
=>
{
if
(
currentTask
.
priority
===
''
||
currentTask
.
project
===
''
||
currentTask
.
executor
)
{
if
(
currentTask
.
priority
===
''
||
currentTask
.
project
===
''
||
currentTask
.
executor
===
''
||
!
Object
.
keys
(
currentTask
.
executor
).
length
)
{
const
task
=
{
const
task
=
{
...
currentTask
,
...
currentTask
,
priority
:
currentTask
.
priority
?
currentTask
.
priority
:
null
,
priority
:
currentTask
.
priority
?
currentTask
.
priority
:
null
,
project
:
currentTask
.
project
?
currentTask
.
project
:
null
,
project
:
currentTask
.
project
?
currentTask
.
project
:
null
,
executor
:
currentTask
.
executor
?
currentTask
.
executor
:
null
,
executor
:
currentTask
.
executor
&&
currentTask
.
executor
?.
id
?
currentTask
.
executor
:
null
,
dateTimeDeadLine
:
new
Date
(
currentTask
.
dateTimeDeadLine
)
instanceof
Date
&&
!
isNaN
(
new
Date
(
currentTask
.
dateTimeDeadLine
))
?
currentTask
.
dateTimeDeadLine
:
null
}
}
dispatch
(
editTaskUsers
(
task
))
dispatch
(
editTaskUsers
(
task
))
}
else
{
}
else
{
...
...
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