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
6516920b
Commit
6516920b
authored
Dec 10, 2022
by
Евгений Положенцев
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#94
added ProjecetComponents in Components
parent
beb6a6e8
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
34 additions
and
10 deletions
+34
-10
projects.ts
planner-api/src/routers/projects.ts
+8
-0
users.ts
planner-api/src/routers/users.ts
+16
-0
ProjectForm.js
...c/components/ProjectComponents/ProjectForm/ProjectForm.js
+1
-1
ProjectItem.js
...c/components/ProjectComponents/ProjectItem/ProjectItem.js
+0
-0
ProjectMembersItem.js
...rojectComponents/ProjectMembersItem/ProjectMembersItem.js
+0
-0
ProjectMembersList.js
...rojectComponents/ProjectMembersList/ProjectMembersList.js
+0
-0
ProjectTasksBody.js
...onents/ProjectComponents/ProjectTasks/ProjectTasksBody.js
+4
-4
ProjectTasksHeader.js
...ents/ProjectComponents/ProjectTasks/ProjectTasksHeader.js
+0
-0
ProjectsList.js
...components/ProjectComponents/ProjectsList/ProjectsList.js
+0
-0
FullProject.js
planner-front/src/containers/FullProject/FullProject.js
+2
-2
NewMember.js
planner-front/src/containers/NewMember/NewMember.js
+1
-1
NewProject.js
planner-front/src/containers/NewProject/NewProject.js
+1
-1
Projects.js
planner-front/src/containers/Projects/Projects.js
+1
-1
No files found.
planner-api/src/routers/projects.ts
View file @
6516920b
...
@@ -12,6 +12,7 @@ router.get('/',async (req:Request, res:Response): Promise<Response>=> {
...
@@ -12,6 +12,7 @@ router.get('/',async (req:Request, res:Response): Promise<Response>=> {
const
projects
:
Project
[]
=
await
dataSource
.
manager
.
find
(
Project
)
const
projects
:
Project
[]
=
await
dataSource
.
manager
.
find
(
Project
)
return
res
.
send
({
projects
})
return
res
.
send
({
projects
})
})
})
/**get projects were user is member, by user token */
/**get projects were user is member, by user token */
router
.
get
(
'/my'
,
auth
,
async
(
req
:
Request
,
res
:
Response
):
Promise
<
Response
>=>
{
router
.
get
(
'/my'
,
auth
,
async
(
req
:
Request
,
res
:
Response
):
Promise
<
Response
>=>
{
const
user
=
req
.
body
.
user
const
user
=
req
.
body
.
user
...
@@ -43,6 +44,9 @@ router.get('/my',auth, async (req:Request, res:Response): Promise<Response>=> {
...
@@ -43,6 +44,9 @@ router.get('/my',auth, async (req:Request, res:Response): Promise<Response>=> {
return
res
.
send
({
projects
})
return
res
.
send
({
projects
})
})
})
/**create new project */
/**create new project */
router
.
post
(
'/'
,
auth
,
async
(
req
:
Request
,
res
:
Response
):
Promise
<
Response
>
=>
{
router
.
post
(
'/'
,
auth
,
async
(
req
:
Request
,
res
:
Response
):
Promise
<
Response
>
=>
{
if
(
!
req
.
body
)
return
res
.
status
(
400
).
send
({
Message
:
'problem in incoming req.body'
})
if
(
!
req
.
body
)
return
res
.
status
(
400
).
send
({
Message
:
'problem in incoming req.body'
})
...
@@ -114,6 +118,10 @@ router.get('/user/:userId', async (req : Request, res : Response): Promise<Respo
...
@@ -114,6 +118,10 @@ router.get('/user/:userId', async (req : Request, res : Response): Promise<Respo
})
})
/** Add user to specific project */
/** Add user to specific project */
router
.
post
(
'/add-user/'
,
authAdminProject
,
async
(
req
:
Request
,
res
:
Response
):
Promise
<
Response
>=>
{
router
.
post
(
'/add-user/'
,
authAdminProject
,
async
(
req
:
Request
,
res
:
Response
):
Promise
<
Response
>=>
{
...
...
planner-api/src/routers/users.ts
View file @
6516920b
...
@@ -35,6 +35,22 @@ const users = await dataSource
...
@@ -35,6 +35,22 @@ const users = await dataSource
return
res
.
send
({
users
})
return
res
.
send
({
users
})
})
})
//** return all users of DB */
router
.
get
(
'/all-fields/'
,
async
(
req
:
Request
,
res
:
Response
):
Promise
<
object
>
=>
{
const
users
=
await
dataSource
.
getRepository
(
User
)
.
find
({
relations
:{
members
:{
project
:
true
,
user
:
true
},
}
})
return
res
.
send
({
users
})
})
/**create new user*/
/**create new user*/
router
.
post
(
'/'
,
upload
.
single
(
"avatar"
),
async
(
req
:
Request
,
res
:
Response
):
Promise
<
object
>
=>
{
router
.
post
(
'/'
,
upload
.
single
(
"avatar"
),
async
(
req
:
Request
,
res
:
Response
):
Promise
<
object
>
=>
{
const
{
name
,
surname
,
password
,
email
,
role
}
=
req
.
body
;
const
{
name
,
surname
,
password
,
email
,
role
}
=
req
.
body
;
...
...
planner-front/src/components/ProjectForm/ProjectForm.js
→
planner-front/src/components/Project
Components/Project
Form/ProjectForm.js
View file @
6516920b
import
{
Box
,
Button
,
Grid
,
Modal
}
from
"@mui/material"
;
import
{
Box
,
Button
,
Grid
,
Modal
}
from
"@mui/material"
;
import
{
useState
}
from
"react"
;
import
{
useState
}
from
"react"
;
import
{
useSelector
}
from
"react-redux"
;
import
{
useSelector
}
from
"react-redux"
;
import
FormElement
from
"../UI/Form/FormElement/FormElement"
;
import
FormElement
from
"../
../
UI/Form/FormElement/FormElement"
;
import
{
Typography
}
from
"@mui/material"
;
import
{
Typography
}
from
"@mui/material"
;
const
style
=
{
const
style
=
{
...
...
planner-front/src/components/ProjectItem/ProjectItem.js
→
planner-front/src/components/Project
Components/Project
Item/ProjectItem.js
View file @
6516920b
File moved
planner-front/src/components/ProjectMembersItem/ProjectMembersItem.js
→
planner-front/src/components/Project
Components/Project
MembersItem/ProjectMembersItem.js
View file @
6516920b
File moved
planner-front/src/components/ProjectMembersList/ProjectMembersList.js
→
planner-front/src/components/Project
Components/Project
MembersList/ProjectMembersList.js
View file @
6516920b
File moved
planner-front/src/components/ProjectTasks/ProjectTasksBody.js
→
planner-front/src/components/Project
Components/Project
Tasks/ProjectTasksBody.js
View file @
6516920b
...
@@ -10,11 +10,11 @@ import {
...
@@ -10,11 +10,11 @@ import {
Paper
Paper
}
from
"@mui/material"
;
}
from
"@mui/material"
;
import
{
useState
}
from
"react"
;
import
{
useState
}
from
"react"
;
import
TaskModal
from
"../../components/MyTasksCompoments/TaskModal/TaskModal"
;
import
TaskModal
from
"../../
../
components/MyTasksCompoments/TaskModal/TaskModal"
;
import
moment
from
"moment"
;
import
moment
from
"moment"
;
import
CustomTableCell
from
"../../components/MyTasksCompoments/CustomTableCell"
;
import
CustomTableCell
from
"../../
../
components/MyTasksCompoments/CustomTableCell"
;
import
MaterialUIPickers
from
"../../components/MyTasksCompoments/DateTimePicker/DateTimePicker"
;
import
MaterialUIPickers
from
"../../
../
components/MyTasksCompoments/DateTimePicker/DateTimePicker"
;
import
BasicSelect
from
"../../components/UI/Select/Select"
;
import
BasicSelect
from
"../../
../
components/UI/Select/Select"
;
import
ProjectTasksHeader
from
"./ProjectTasksHeader"
;
import
ProjectTasksHeader
from
"./ProjectTasksHeader"
;
export
default
function
ProjectTasksBody
({
tasks
})
{
export
default
function
ProjectTasksBody
({
tasks
})
{
...
...
planner-front/src/components/ProjectTasks/ProjectTasksHeader.js
→
planner-front/src/components/Project
Components/Project
Tasks/ProjectTasksHeader.js
View file @
6516920b
File moved
planner-front/src/components/ProjectsList/ProjectsList.js
→
planner-front/src/components/Project
Components/Project
sList/ProjectsList.js
View file @
6516920b
File moved
planner-front/src/containers/FullProject/FullProject.js
View file @
6516920b
...
@@ -3,9 +3,9 @@ import { useParams } from "react-router-dom";
...
@@ -3,9 +3,9 @@ import { useParams } from "react-router-dom";
import
{
useSelector
,
useDispatch
}
from
"react-redux"
;
import
{
useSelector
,
useDispatch
}
from
"react-redux"
;
import
{
useEffect
}
from
"react"
;
import
{
useEffect
}
from
"react"
;
import
{
fetchProject
}
from
"../../store/actions/projectsActions"
;
import
{
fetchProject
}
from
"../../store/actions/projectsActions"
;
import
ProjectTasksBody
from
"../../components/ProjectTasks/ProjectTasksBody"
;
import
ProjectTasksBody
from
"../../components/Project
Components/Project
Tasks/ProjectTasksBody"
;
import
{
fetchUsers
}
from
"../../store/actions/usersActions"
;
import
{
fetchUsers
}
from
"../../store/actions/usersActions"
;
import
ProjectMembersList
from
"../../components/ProjectMembersList/ProjectMembersList"
;
import
ProjectMembersList
from
"../../components/Project
Components/Project
MembersList/ProjectMembersList"
;
import
NewMember
from
"../NewMember/NewMember"
;
import
NewMember
from
"../NewMember/NewMember"
;
const
FullProject
=
()
=>
{
const
FullProject
=
()
=>
{
...
...
planner-front/src/containers/NewMember/NewMember.js
View file @
6516920b
...
@@ -2,7 +2,7 @@ import {useNavigate} from "react-router-dom";
...
@@ -2,7 +2,7 @@ import {useNavigate} from "react-router-dom";
import
{
useDispatch
,
useSelector
}
from
"react-redux"
;
import
{
useDispatch
,
useSelector
}
from
"react-redux"
;
import
{
useEffect
}
from
"react"
;
import
{
useEffect
}
from
"react"
;
import
ProjectForm
from
"../../components/ProjectForm/ProjectForm"
;
import
ProjectForm
from
"../../components/Project
Components/Project
Form/ProjectForm"
;
import
{
createMember
,
createProject
,
fetchMembers
,
fetchProjects
}
from
"../../store/actions/projectsActions"
;
import
{
createMember
,
createProject
,
fetchMembers
,
fetchProjects
}
from
"../../store/actions/projectsActions"
;
import
MemberForm
from
"../../components/MemberForm/MemberForm"
;
import
MemberForm
from
"../../components/MemberForm/MemberForm"
;
...
...
planner-front/src/containers/NewProject/NewProject.js
View file @
6516920b
...
@@ -2,7 +2,7 @@ import {useNavigate} from "react-router-dom";
...
@@ -2,7 +2,7 @@ import {useNavigate} from "react-router-dom";
import
{
useDispatch
,
useSelector
}
from
"react-redux"
;
import
{
useDispatch
,
useSelector
}
from
"react-redux"
;
import
{
useEffect
}
from
"react"
;
import
{
useEffect
}
from
"react"
;
import
ProjectForm
from
"../../components/ProjectForm/ProjectForm"
;
import
ProjectForm
from
"../../components/Project
Components/Project
Form/ProjectForm"
;
import
{
createProject
,
fetchProjects
}
from
"../../store/actions/projectsActions"
;
import
{
createProject
,
fetchProjects
}
from
"../../store/actions/projectsActions"
;
const
NewProject
=
()
=>
{
const
NewProject
=
()
=>
{
...
...
planner-front/src/containers/Projects/Projects.js
View file @
6516920b
...
@@ -5,7 +5,7 @@ import { useDispatch, useSelector } from "react-redux";
...
@@ -5,7 +5,7 @@ import { useDispatch, useSelector } from "react-redux";
import
Loader
from
"../../components/UI/Loader/Loader"
;
import
Loader
from
"../../components/UI/Loader/Loader"
;
import
HasAccess
from
"../../components/UI/HasAccess/HasAccess"
;
import
HasAccess
from
"../../components/UI/HasAccess/HasAccess"
;
import
{
fetchProjects
}
from
"../../store/actions/projectsActions"
;
import
{
fetchProjects
}
from
"../../store/actions/projectsActions"
;
import
ProjectsList
from
"../../components/ProjectsList/ProjectsList"
;
import
ProjectsList
from
"../../components/Project
Components/Project
sList/ProjectsList"
;
import
NewProject
from
"../NewProject/NewProject"
;
import
NewProject
from
"../NewProject/NewProject"
;
const
Projects
=
()
=>
{
const
Projects
=
()
=>
{
...
...
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