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