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
1773954f
Commit
1773954f
authored
Feb 22, 2023
by
Евгений Положенцев
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#167
added fetchprojects non watcher function to the UsersTasks container
parent
632e753c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
projects.ts
planner-api/src/routers/projects.ts
+1
-1
MyTasks.js
planner-front/src/containers/MyTasks/MyTasks.js
+0
-1
UsersTasks.js
planner-front/src/containers/UsersTasks/UsersTasks.js
+3
-2
No files found.
planner-api/src/routers/projects.ts
View file @
1773954f
...
...
@@ -67,7 +67,7 @@ router.post('/',auth, async (req:Request, res:Response): Promise<Response> => {
where
:{
title
:
titleTrimed
}})
if
(
projectCheck
.
length
>
0
)
{
return
res
.
status
(
400
).
send
({
message
:
"such
c
Project already exists"
})}
if
(
projectCheck
.
length
>
0
)
{
return
res
.
status
(
400
).
send
({
message
:
"such Project already exists"
})}
const
member
:
Member
=
new
Member
;
member
.
user
=
user
;
member
.
roleProject
=
MemberRole
.
ADMIN
;
...
...
planner-front/src/containers/MyTasks/MyTasks.js
View file @
1773954f
...
...
@@ -119,7 +119,6 @@ export default function MyTasks() {
}
dispatch
(
fetchProjectsNonWatcherForTaskCreate
(
user
.
id
))
setAddFormStatus
((
prevState
)
=>
{
return
!
prevState
})
// }, [addFormStatus])
},
[])
...
...
planner-front/src/containers/UsersTasks/UsersTasks.js
View file @
1773954f
...
...
@@ -5,7 +5,7 @@ import UsersTasksTableContainer from '../../components/UsersTasksCompoments/User
import
{
activateCreateCopyTasksMode
,
addTaskToUserTasksTable
,
deleteDateTimeTaskUsers
,
deleteTaskUsers
,
editTaskUsers
,
fetchAllTasksByMembership
,
sortTaskByProjects
}
from
'../../store/actions/tasksActions'
;
import
{
shallowEqual
,
useDispatch
,
useSelector
}
from
'react-redux'
;
import
{
useCallback
,
useEffect
,
useState
}
from
'react'
;
import
{
fetchAllUserProjects
,
fetchProjects
}
from
'../../store/actions/projectsActions'
;
import
{
fetchAllUserProjects
,
fetchProjects
,
fetchProjectsNonWatcherForTaskCreate
}
from
'../../store/actions/projectsActions'
;
import
moment
from
'moment'
;
import
{
useNavigate
}
from
'react-router-dom'
;
...
...
@@ -125,8 +125,9 @@ export default function UsersTasks() {
dateTimeDeadLine
:
null
})
}
dispatch
(
fetchProjectsNonWatcherForTaskCreate
(
user
.
id
))
setAddFormStatus
((
prevState
)
=>
{
return
!
prevState
})
},
[
addFormStatus
])
},
[])
const
createNewTaskHandler
=
useCallback
(()
=>
{
if
(
newTask
.
priority
===
''
||
newTask
.
project
===
''
||
newTask
.
executor
===
''
)
{
...
...
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