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
d0dc6458
Commit
d0dc6458
authored
Jan 11, 2023
by
Ermolaev Timur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#148
Убрал приоритеты
parent
6e67312d
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
8 additions
and
159 deletions
+8
-159
CalendarTask.js
...thCalendar/MonthCalendarBody/CalendarTask/CalendarTask.js
+2
-2
WeekCalendarHeader.js
...ars/WeekCalendar/WeekCalendarHeader/WeekCalendarHeader.js
+1
-13
WeekCalendarHeaderInfo.js
...arHeader/WeekCalendarHeaderInfo/WeekCalendarHeaderInfo.js
+1
-1
WeekGoal.js
...dars/WeekCalendar/WeekCalendarHeader/WeekGoal/WeekGoal.js
+0
-43
WeekPriorities.js
...endar/WeekCalendarHeader/WeekPriorities/WeekPriorities.js
+0
-34
WeekPriority.js
...alendarHeader/WeekPriorities/WeekPriority/WeekPriority.js
+0
-40
ProjectItem.js
...s/ProjectsWrapper/ProjectsList/ProjectItem/ProjectItem.js
+1
-1
ProjectsWrapper.js
...nts/ProjectsComponents/ProjectsWrapper/ProjectsWrapper.js
+1
-1
WeekCalendar.js
planner-front/src/containers/WeekCalendar/WeekCalendar.js
+1
-23
projectsActions.js
planner-front/src/store/actions/projectsActions.js
+1
-1
No files found.
planner-front/src/components/Calendars/MonthCalendar/MonthCalendarBody/CalendarTask/CalendarTask.js
View file @
d0dc6458
...
...
@@ -57,12 +57,12 @@ const CalendarTask = ({ setCurrentTask, handleOpen, task, setCopyTask, width, le
const
dragStartHandler
=
useCallback
((
e
,
task
)
=>
{
setCurrentTask
(
task
);
setCopyTask
(
task
)
},[
setCurrentTask
])
},[
setCurrentTask
,
setCopyTask
])
const
dragEndHandler
=
useCallback
((
e
)
=>
{
e
.
target
.
style
.
boxShadow
=
'none'
setCopyTask
(
null
)
},[])
},[
setCopyTask
])
const
onClickCopyIconHandler
=
useCallback
((
e
)
=>
{
e
.
stopPropagation
();
...
...
planner-front/src/components/Calendars/WeekCalendar/WeekCalendarHeader/WeekCalendarHeader.js
View file @
d0dc6458
...
...
@@ -4,13 +4,11 @@ import { memo } from 'react';
import
ButtonSwapCalendar
from
'../../UI/ButtonSwapCalendar/ButtonSwapCalendar'
;
import
CalendarUserDisplayName
from
'../../UI/CalendarUserDisplayName/CalendarUserDisplayName'
;
import
WeekCalendarHeaderInfo
from
'./WeekCalendarHeaderInfo/WeekCalendarHeaderInfo'
;
import
WeekGoal
from
'./WeekGoal/WeekGoal'
;
import
WeekPriorities
from
'./WeekPriorities/WeekPriorities'
;
function
WeekCalendarHeader
({
decrementWeek
,
incrementWeek
,
weekInfo
,
weekGoal
,
onChangeWeekGoalHandler
,
weekPriorities
,
onChangeWeekPriorities
Handler
,
handleOpen
,
currentCalendarDisplayName
,
user
,
userId
})
{
function
WeekCalendarHeader
({
decrementWeek
,
incrementWeek
,
weekInfo
,
onChangeWeekGoal
Handler
,
handleOpen
,
currentCalendarDisplayName
,
user
,
userId
})
{
return
(
<>
...
...
@@ -22,21 +20,11 @@ function WeekCalendarHeader({ decrementWeek, incrementWeek, weekInfo, weekGoal,
<
CalendarUserDisplayName
currentCalendarDisplayName
=
{
currentCalendarDisplayName
}
/
>
<
WeekGoal
weekGoal
=
{
weekGoal
}
onChangeWeekGoalHandler
=
{
onChangeWeekGoalHandler
}
/
>
<
WeekPriorities
weekPriorities
=
{
weekPriorities
}
onChangeWeekPrioritiesHandler
=
{
onChangeWeekPrioritiesHandler
}
/
>
<
WeekCalendarHeaderInfo
decrementWeek
=
{
decrementWeek
}
incrementWeek
=
{
incrementWeek
}
weekInfo
=
{
weekInfo
}
weekGoal
=
{
weekGoal
}
onChangeWeekGoalHandler
=
{
onChangeWeekGoalHandler
}
/
>
...
...
planner-front/src/components/Calendars/WeekCalendar/WeekCalendarHeader/WeekCalendarHeaderInfo/WeekCalendarHeaderInfo.js
View file @
d0dc6458
...
...
@@ -9,7 +9,7 @@ import { memo, } from 'react';
function
WeekCalendarHeaderInfo
({
decrementWeek
,
incrementWeek
,
weekInfo
})
{
return
(
<>
<
Box
sx
=
{{
width
:
'
80%
'
,
marginBottom
:
'15px'
}}
>
<
Box
sx
=
{{
width
:
'
400px
'
,
marginBottom
:
'15px'
}}
>
<
Box
sx
=
{{
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
ArrowDecrementButton
...
...
planner-front/src/components/Calendars/WeekCalendar/WeekCalendarHeader/WeekGoal/WeekGoal.js
deleted
100644 → 0
View file @
6e67312d
import
{
Box
}
from
'@mui/system'
;
import
{
TextField
,
Typography
}
from
'@mui/material'
;
import
{
memo
,
useCallback
,
useState
}
from
'react'
;
function
WeekGoal
({
weekGoal
,
onChangeWeekGoalHandler
})
{
const
[
goalEditCheck
,
setGoalEditCheck
]
=
useState
(
false
)
const
onClickGoalHandler
=
useCallback
(()
=>
{
setGoalEditCheck
(
true
)
},
[])
return
(
<>
<
Box
sx
=
{{
display
:
'flex'
,
alignItems
:
'center'
,
gap
:
'10px'
}}
>
{
goalEditCheck
?
<>
<
Typography
variant
=
'h5'
sx
=
{{
marginTop
:
'20px'
}}
>
Цель
недели
:
<
/Typography
>
<
TextField
id
=
"week-gaol"
value
=
{
weekGoal
}
variant
=
"standard"
sx
=
{{
input
:
{
color
:
'white'
,
fontSize
:
'22px'
,
fontWeight
:
'400'
,
paddingTop
:
'25px'
}
}}
InputProps
=
{{
disableUnderline
:
true
,
}}
name
=
'weekGoal'
autoFocus
onBlur
=
{()
=>
{
setGoalEditCheck
(
false
)
}}
onChange
=
{(
e
)
=>
{
onChangeWeekGoalHandler
(
e
)
}}
/
>
<
/
>
:
<
Typography
variant
=
'h5'
onClick
=
{()
=>
{
onClickGoalHandler
()
}}
sx
=
{{
marginTop
:
'20px'
}}
>
Цель
недели
:
{
weekGoal
}
<
/Typography
>
}
<
/Box
>
<
/
>
);
}
export
default
memo
(
WeekGoal
);
\ No newline at end of file
planner-front/src/components/Calendars/WeekCalendar/WeekCalendarHeader/WeekPriorities/WeekPriorities.js
deleted
100644 → 0
View file @
6e67312d
import
{
Box
}
from
'@mui/system'
;
import
{
Typography
}
from
'@mui/material'
;
import
{
memo
}
from
'react'
;
import
WeekPriority
from
'./WeekPriority/WeekPriority'
;
function
WeekPriorities
({
weekPriorities
,
onChangeWeekPrioritiesHandler
})
{
return
(
<>
<
Box
>
<
Typography
variant
=
'h5'
sx
=
{{
display
:
'flex'
,
flexDirection
:
'column'
}}
>
Приоритеты
:
{
Object
.
values
(
weekPriorities
).
map
((
priority
,
i
)
=>
{
return
(
<
WeekPriority
key
=
{
i
}
onChangeWeekPrioritiesHandler
=
{(
e
)
=>
{
onChangeWeekPrioritiesHandler
(
e
)}}
priorityName
=
{
Object
.
keys
(
weekPriorities
)[
i
]}
priority
=
{
priority
}
number
=
{
i
+
1
}
/
>
)
})}
<
/Typography
>
<
/Box
>
<
/
>
);
}
export
default
memo
(
WeekPriorities
);
\ No newline at end of file
planner-front/src/components/Calendars/WeekCalendar/WeekCalendarHeader/WeekPriorities/WeekPriority/WeekPriority.js
deleted
100644 → 0
View file @
6e67312d
import
{
Box
}
from
'@mui/system'
;
import
{
TextField
,
Typography
}
from
'@mui/material'
;
import
{
memo
,
useCallback
,
useState
}
from
'react'
;
function
WeekPriority
({
number
,
priority
,
onChangeWeekPrioritiesHandler
,
priorityName
})
{
const
[
priorityEditCheck
,
setPriorityEditCheck
]
=
useState
(
false
)
const
onClickPriorityHandler
=
useCallback
(()
=>
{
setPriorityEditCheck
(
true
)
},
[])
return
(
<>
<
Box
sx
=
{{
display
:
'flex'
,
alignItems
:
'center'
,
gap
:
'10px'
}}
>
{
priorityEditCheck
?
<>
<
Typography
variant
=
'string'
>
{
number
}.
<
/Typography
>
<
TextField
id
=
{
priorityName
}
value
=
{
priority
}
variant
=
"standard"
sx
=
{{
input
:
{
color
:
'white'
,
fontSize
:
'22px'
,
fontWeight
:
'400'
}
}}
InputProps
=
{{
disableUnderline
:
true
,
}}
name
=
{
priorityName
}
autoFocus
onBlur
=
{()
=>
{
setPriorityEditCheck
(
false
)
}}
onChange
=
{(
e
)
=>
{
onChangeWeekPrioritiesHandler
(
e
)
}}
/
>
<
/
>
:
<
Typography
variant
=
'string'
onClick
=
{()
=>
{
onClickPriorityHandler
()
}}
>
{
number
}.
{
priority
}
<
/Typography
>
}
<
/Box
>
<
/
>
);
}
export
default
memo
(
WeekPriority
);
\ No newline at end of file
planner-front/src/components/ProjectsComponents/ProjectsWrapper/ProjectsList/ProjectItem/ProjectItem.js
View file @
d0dc6458
import
{
Box
,
Grid
,
Typography
}
from
"@mui/material"
;
import
{
Box
,
Typography
}
from
"@mui/material"
;
import
{
useSelector
}
from
"react-redux"
;
import
{
memo
,
useMemo
}
from
"react"
;
import
DeleteButton
from
"../../../../UI/DeleteButton/DeleteButton"
;
...
...
planner-front/src/components/ProjectsComponents/ProjectsWrapper/ProjectsWrapper.js
View file @
d0dc6458
import
{
Grid
,
Typography
,
Button
,
Card
,
CardContent
}
from
"@mui/material"
;
import
{
Grid
,
Typography
,
Button
}
from
"@mui/material"
;
import
{
memo
}
from
"react"
;
import
ProjectsList
from
"./ProjectsList/ProjectsList"
;
...
...
planner-front/src/containers/WeekCalendar/WeekCalendar.js
View file @
d0dc6458
...
...
@@ -21,8 +21,6 @@ function WeekCalendar() {
const
{
user
,
currentCalendarDisplayName
}
=
useSelector
(
state
=>
state
.
users
);
const
{
allUserProjects
}
=
useSelector
(
state
=>
state
.
projects
)
const
[
weekGoal
,
setWeekGoal
]
=
useState
(
'Наладить режим сна'
)
const
[
weekPriorities
,
setWeekPriorities
]
=
useState
({
priorityOne
:
'Один'
,
priorityTwo
:
'Два'
,
priorityThree
:
'Три'
})
const
[
workerInfo
,
setWorkerInfo
]
=
useState
({
project
:
''
,
worker
:
''
});
const
[
dateNow
,
setDateNow
]
=
useState
({
year
:
''
,
month
:
''
,
currentDay
:
''
})
const
[
currentTask
,
setCurrentTask
]
=
useState
({
title
:
''
,
description
:
''
,
priority
:
null
,
infoForCell
:
{
startHour
:
null
,
endHour
:
null
}
})
...
...
@@ -96,23 +94,6 @@ function WeekCalendar() {
setWorkerInfo
((
prevState
)
=>
{
return
{
...
prevState
,
worker
:
value
}
});
},
[]);
const
onChangeWeekGoalHandler
=
useCallback
((
e
)
=>
{
setWeekGoal
((
prevState
)
=>
{
return
e
.
target
.
value
})
},
[])
const
onChangeWeekPrioritiesHandler
=
useCallback
((
e
)
=>
{
const
{
name
,
value
}
=
e
.
target
;
setWeekPriorities
((
prevState
)
=>
{
return
{
...
prevState
,
[
name
]:
value
}
})
},
[])
const
onChangeCurrentTaskHandler
=
useCallback
((
e
)
=>
{
const
{
name
,
value
}
=
e
.
target
;
if
(
name
===
'startHour'
||
name
===
'endHour'
)
{
...
...
@@ -311,15 +292,12 @@ function WeekCalendar() {
incrementWeek
=
{
incrementWeek
}
decrementWeek
=
{
decrementWeek
}
weekInfo
=
{
weekInfo
}
weekGoal
=
{
weekGoal
}
onChangeWeekGoalHandler
=
{
onChangeWeekGoalHandler
}
weekPriorities
=
{
weekPriorities
}
onChangeWeekPrioritiesHandler
=
{
onChangeWeekPrioritiesHandler
}
handleOpen
=
{
handleOpen
}
currentCalendarDisplayName
=
{
currentCalendarDisplayName
}
user
=
{
user
}
userId
=
{
userId
}
/
>
<
WeekCalendarBody
deleteTaskHandler
=
{
deleteTaskHandler
}
sendNewTaskHandler
=
{
sendNewTaskHandler
}
...
...
planner-front/src/store/actions/projectsActions.js
View file @
d0dc6458
...
...
@@ -64,7 +64,7 @@ export const deleteProject = (projectId) => {
return
async
(
dispatch
)
=>
{
dispatch
(
deleteProjectRequest
());
try
{
const
response
=
await
axios
.
delete
(
'/projects'
,
{
data
:
{
projectId
:
projectId
}
});
await
axios
.
delete
(
'/projects'
,
{
data
:
{
projectId
:
projectId
}
});
dispatch
(
deleteProjectSuccess
())
dispatch
(
fetchProjects
())
}
catch
(
error
)
{
...
...
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