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
b01f6813
Commit
b01f6813
authored
Nov 07, 2022
by
“Yevgeniy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor fix of imports and remove of comments
parent
9ddb2ade
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
48 deletions
+4
-48
projects.ts
planner-api/src/routers/projects.ts
+0
-7
App.js
planner-front/src/App.js
+4
-4
AppToolbar.js
planner-front/src/components/UI/AppToolbar/AppToolbar.js
+0
-37
No files found.
planner-api/src/routers/projects.ts
View file @
b01f6813
...
@@ -50,13 +50,6 @@ router.get("/id/:id",async (req:Request, res:Response): Promise<Response> => {
...
@@ -50,13 +50,6 @@ router.get("/id/:id",async (req:Request, res:Response): Promise<Response> => {
router
.
get
(
'/userId/:userId'
,
async
(
req
:
Request
,
res
:
Response
):
Promise
<
Response
>=>
{
router
.
get
(
'/userId/:userId'
,
async
(
req
:
Request
,
res
:
Response
):
Promise
<
Response
>=>
{
const
userId
:
string
=
req
.
params
.
userId
const
userId
:
string
=
req
.
params
.
userId
const
user
=
await
dataSource
.
createQueryBuilder
()
.
select
(
"user"
)
.
from
(
User
,
"user"
)
.
where
(
"user.id = :id"
,
{
id
:
userId
})
.
getOne
()
console
.
log
(
'user '
,
user
)
const
userProjects
=
await
dataSource
const
userProjects
=
await
dataSource
.
createQueryBuilder
()
.
createQueryBuilder
()
.
select
(
'project'
)
.
select
(
'project'
)
...
...
planner-front/src/App.js
View file @
b01f6813
import
{
Routes
,
Route
,
Outlet
,
Navigate
,
BrowserRouter
}
from
"react-router-dom"
;
import
{
Routes
,
Route
,
Outlet
,
Navigate
,
BrowserRouter
}
from
"react-router-dom"
;
import
{
Container
}
from
"@mui/material"
;
import
{
Container
}
from
"@mui/material"
;
import
{
useSelector
}
from
"react-redux"
;
import
{
useSelector
}
from
"react-redux"
;
import
AppToolbar
from
'./components/UI/AppToolBar/AppToolbar'
import
AppToolbar
from
"./components/UI/AppToolBar/AppToolBar"
;
import
MyTasks
from
'./containers/MyTasks/MyTasks'
import
MyTasks
from
'./containers/MyTasks/MyTasks'
;
import
Login
from
'./containers/Login/Login'
import
Login
from
'./containers/Login/Login'
;
import
Register
from
'./containers/Register/Register'
import
Register
from
'./containers/Register/Register'
;
const
ProtectedRoute
=
({
isAllowed
,
roles
,
redirectUrl
,
children
})
=>
{
const
ProtectedRoute
=
({
isAllowed
,
roles
,
redirectUrl
,
children
})
=>
{
const
user
=
useSelector
(
state
=>
state
.
users
?.
user
);
const
user
=
useSelector
(
state
=>
state
.
users
?.
user
);
...
...
planner-front/src/components/UI/AppToolbar/AppToolbar.js
deleted
100644 → 0
View file @
9ddb2ade
import
{
AppBar
,
Box
,
Toolbar
,
Typography
}
from
"@mui/material"
;
import
{
NavLink
}
from
"react-router-dom"
;
import
{
useSelector
}
from
"react-redux"
;
import
HasAccess
from
"../HasAccess/HasAccess"
;
import
AnonymousMenu
from
"../../Menus/AnonymousMenu/AnonymousMenu"
;
import
WorkerMenu
from
"../../Menus/WorkerMenu/WorkerMenu"
;
import
AdminMenu
from
"../../Menus/AdminMenu/AdminMenu"
;
const
AppToolbar
=
()
=>
{
const
user
=
useSelector
(
state
=>
state
.
users
.
user
);
return
<
Box
sx
=
{{
flexGrow
:
1
,
mb
:
"40px"
}}
>
<
AppBar
position
=
"static"
>
<
Toolbar
>
<
Typography
variant
=
"h4"
component
=
"div"
sx
=
{{
flexGrow
:
1
}}
>
<
NavLink
to
=
'/'
style
=
{{
textDecoration
:
'none'
,
color
:
'inherit'
}}
>
Task
Manager
<
/NavLink
>
<
/Typography>
<
HasAccess
allowed
=
{
!
user
}
>
<
AnonymousMenu
/>
<
/HasAccess
>
<
HasAccess
roles
=
{[
'user'
]}
>
<
WorkerMenu
/>
<
/HasAccess
>
<
HasAccess
roles
=
{[
'superuser'
]}
>
<
AdminMenu
/>
<
/HasAccess
>
<
/Toolbar
>
<
/AppBar
>
<
/Box
>
};
export
default
AppToolbar
;
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