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
ecd467fb
Commit
ecd467fb
authored
Jan 17, 2023
by
Ermolaev Timur
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'task-157-fix/delete_project_page' into 'development'
#157
Удалил проекты See merge request
!126
parents
24ad2745
732adcdf
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
3 additions
and
22 deletions
+3
-22
App.js
planner-front/src/App.js
+0
-9
ProjectItem.js
...s/ProjectsWrapper/ProjectsList/ProjectItem/ProjectItem.js
+1
-3
ProjectsList.js
...tsComponents/ProjectsWrapper/ProjectsList/ProjectsList.js
+1
-2
ProjectsWrapper.js
...nts/ProjectsComponents/ProjectsWrapper/ProjectsWrapper.js
+1
-2
Projects.js
planner-front/src/containers/Projects/Projects.js
+0
-6
No files found.
planner-front/src/App.js
View file @
ecd467fb
...
...
@@ -8,7 +8,6 @@ import Register from './containers/Register/Register';
import
MonthCalendar
from
'./containers/MonthCalendar/MonthCalendar'
;
import
ForgottenPassword
from
"./containers/ForgottenPassword/ForgottenPassword"
;
import
Projects
from
"./containers/Projects/Projects"
;
import
FullProject
from
"./containers/FullProject/FullProject"
;
import
WeekCalendar
from
"./containers/WeekCalendar/WeekCalendar"
;
import
UsersTasks
from
"./containers/UsersTasks/UsersTasks"
;
...
...
@@ -44,14 +43,6 @@ const App = () => {
<
Projects
/>
<
/ProtectedRoute
>
}
/
>
<
Route
path
=
{
"/projects/:id"
}
element
=
{
<
ProtectedRoute
isAllowed
=
{
user
}
redirectUrl
=
{
"/sign-in"
}
>
<
FullProject
/>
<
/ProtectedRoute
>
}
/
>
<
Route
path
=
{
"/"
}
element
=
{
<
ProtectedRoute
isAllowed
=
{
user
}
...
...
planner-front/src/components/ProjectsComponents/ProjectsWrapper/ProjectsList/ProjectItem/ProjectItem.js
View file @
ecd467fb
...
...
@@ -2,7 +2,6 @@ import {Box, Typography } from "@mui/material";
import
{
useSelector
}
from
"react-redux"
;
import
{
memo
,
useMemo
}
from
"react"
;
import
DeleteButton
from
"../../../../UI/DeleteButton/DeleteButton"
;
import
ArrowIncrementButton
from
"../../../../UI/ArrowIncrementButton/ArrowIncrementButton"
;
const
styleBlock
=
{
border
:
'2px solid black'
,
...
...
@@ -19,7 +18,7 @@ const styleText = {
fontWeight
:
'600'
,
}
const
ProjectItem
=
({
title
,
members
,
onClickProjectHandler
,
onClickGoToSpecificProjectHandler
,
deleteProjectHandler
})
=>
{
const
ProjectItem
=
({
title
,
members
,
onClickProjectHandler
,
deleteProjectHandler
})
=>
{
const
{
user
}
=
useSelector
(
state
=>
state
.
users
);
const
currentRoleInProject
=
useMemo
(()
=>
{
...
...
@@ -47,7 +46,6 @@ const ProjectItem = ({ title, members, onClickProjectHandler, onClickGoToSpecifi
<
/Box
>
<
Box
>
{
currentRoleInProject
===
'Админ'
?
<
DeleteButton
onClick
=
{
deleteProjectHandler
}
/> : null
}
<
ArrowIncrementButton
onClick
=
{
onClickGoToSpecificProjectHandler
}
/
>
<
/Box
>
<
/Box
>
<
/
>
...
...
planner-front/src/components/ProjectsComponents/ProjectsWrapper/ProjectsList/ProjectsList.js
View file @
ecd467fb
...
...
@@ -4,7 +4,7 @@ import ProjectItem from "./ProjectItem/ProjectItem";
const
style
=
{
height
:
'79vh'
,
overflow
:
'auto'
,
overflowX
:
'hidden'
,
display
:
'flex'
,
flexDirection
:
'column'
,
gap
:
'10px'
}
const
ProjectsList
=
({
projects
,
onClickProjectHandler
,
onClickGoToSpecificProjectHandler
,
deleteProjectHandler
})
=>
{
const
ProjectsList
=
({
projects
,
onClickProjectHandler
,
deleteProjectHandler
})
=>
{
return
(
<
Box
sx
=
{
style
}
>
{
projects
?.
map
(
project
=>
{
...
...
@@ -13,7 +13,6 @@ const ProjectsList = ({projects, onClickProjectHandler, onClickGoToSpecificProje
members
=
{
project
.
members
}
key
=
{
project
.
id
}
onClickProjectHandler
=
{()
=>
{
onClickProjectHandler
(
project
)}}
onClickGoToSpecificProjectHandler
=
{(
e
)
=>
{
onClickGoToSpecificProjectHandler
(
e
,
project
.
id
)}}
deleteProjectHandler
=
{(
e
)
=>
{
deleteProjectHandler
(
e
,
project
.
id
)}}
/
>
})}
...
...
planner-front/src/components/ProjectsComponents/ProjectsWrapper/ProjectsWrapper.js
View file @
ecd467fb
...
...
@@ -10,7 +10,7 @@ const style = {
marginBottom
:
'10px'
,
}
const
ProjectsWrapper
=
({
onClickProjectHandler
,
projects
,
onClickGoToSpecificProjectHandler
,
handleOpen
,
deleteProjectHandler
})
=>
{
const
ProjectsWrapper
=
({
onClickProjectHandler
,
projects
,
handleOpen
,
deleteProjectHandler
})
=>
{
return
<>
...
...
@@ -23,7 +23,6 @@ const ProjectsWrapper = ({ onClickProjectHandler, projects, onClickGoToSpecificP
<
ProjectsList
projects
=
{
projects
}
onClickProjectHandler
=
{
onClickProjectHandler
}
onClickGoToSpecificProjectHandler
=
{
onClickGoToSpecificProjectHandler
}
deleteProjectHandler
=
{
deleteProjectHandler
}
/
>
<
/Grid
>
...
...
planner-front/src/containers/Projects/Projects.js
View file @
ecd467fb
...
...
@@ -31,11 +31,6 @@ const Projects = () => {
setCurrentProject
(
project
)
},
[])
const
onClickGoToSpecificProjectHandler
=
useCallback
((
e
,
projectId
)
=>
{
e
.
stopPropagation
();
navigate
(
`/projects/
${
projectId
}
`
)
},
[
navigate
])
const
createNewProjectHandler
=
useCallback
(()
=>
{
dispatch
(
createProject
({
title
:
projectTitle
,
user
:
user
.
id
},
navigate
))
},
[
dispatch
,
projectTitle
,
user
.
id
,
navigate
])
...
...
@@ -62,7 +57,6 @@ const Projects = () => {
<
ProjectsWrapper
projects
=
{
projects
}
onClickProjectHandler
=
{
onClickProjectHandler
}
onClickGoToSpecificProjectHandler
=
{
onClickGoToSpecificProjectHandler
}
handleOpen
=
{
handleOpen
}
deleteProjectHandler
=
{
deleteProjectHandler
}
/
>
...
...
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