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
d2e030a8
Commit
d2e030a8
authored
Jan 11, 2023
by
Ermolaev Timur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#148
Пофиксил баг с дедлайном, он не возникает при создание задачи в календарях
parent
eb22fe70
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
tasks.ts
planner-api/src/routers/tasks.ts
+2
-2
MonthCalendar.js
planner-front/src/containers/MonthCalendar/MonthCalendar.js
+1
-1
WeekCalendar.js
planner-front/src/containers/WeekCalendar/WeekCalendar.js
+3
-3
No files found.
planner-api/src/routers/tasks.ts
View file @
d2e030a8
...
...
@@ -27,7 +27,7 @@ router.get('/', async(req:Request, res:Response):Promise<Response> => {
/**create new task for table MyTask*/
router
.
post
(
'/'
,
auth
,
async
(
req
:
Request
,
res
:
Response
):
Promise
<
Response
>=>
{
const
{
user
,
title
,
description
,
project
,
executor
,
dateTimeStart
,
dateTimeDue
,
dateTimeDeadLine
,
priority
}
=
req
.
body
;
const
{
user
,
title
,
description
,
project
,
executor
,
dateTimeStart
,
dateTimeDue
,
dateTimeDeadLine
,
priority
,
calendar
}
=
req
.
body
;
console
.
log
(
'dateTimeStart
\
n'
,
dateTimeStart
,
"dateTimeDue
\n
"
,
dateTimeDue
,
'dateTimeDeadLine
\
n '
,
dateTimeDeadLine
)
let
dateTimeDueFinal
=
dateTimeDue
let
dateTimeStartFinal
=
dateTimeStart
...
...
@@ -96,7 +96,7 @@ router.post('/', auth, async(req:Request, res:Response):Promise<Response>=>{
}
newTask
.
priority
=
priority
;
await
newTask
.
save
();
if
(
dateTimeDeadlineFinal
)
{
if
(
calendar
)
{
const
newDateTimeTask
=
new
DateTimeTask
();
newDateTimeTask
.
dateTimeStart
=
dateTimeStartFinal
newDateTimeTask
.
dateTimeDue
=
dateTimeDueFinal
...
...
planner-front/src/containers/MonthCalendar/MonthCalendar.js
View file @
d2e030a8
...
...
@@ -198,7 +198,7 @@ function MonthCalendar() {
dateTimeDue
:
due
,
executor
:
userId
,
author
:
user
.
id
,
dateTimeDeadLine
:
d
ue
,
calendar
:
tr
ue
,
}
delete
newTask
.
infoForCell
delete
newTask
.
id
...
...
planner-front/src/containers/WeekCalendar/WeekCalendar.js
View file @
d2e030a8
...
...
@@ -20,7 +20,7 @@ function WeekCalendar() {
const
{
calendarTasks
,
copyMode
}
=
useSelector
(
state
=>
state
.
tasks
);
const
{
user
,
currentCalendarDisplayName
}
=
useSelector
(
state
=>
state
.
users
);
const
{
allUserProjects
}
=
useSelector
(
state
=>
state
.
projects
)
console
.
log
(
copyMode
)
const
[
weekGoal
,
setWeekGoal
]
=
useState
(
'Наладить режим сна'
)
const
[
weekPriorities
,
setWeekPriorities
]
=
useState
({
priorityOne
:
'Один'
,
priorityTwo
:
'Два'
,
priorityThree
:
'Три'
})
const
[
workerInfo
,
setWorkerInfo
]
=
useState
({
project
:
''
,
worker
:
''
});
...
...
@@ -31,7 +31,7 @@ function WeekCalendar() {
const
[
userCalendarId
,
setUserCalendarId
]
=
useState
(
null
)
const
[
modal
,
setModal
]
=
useState
(
false
)
const
[
userId
,
setUserId
]
=
useState
(
''
)
console
.
log
(
copyTask
)
useEffect
(()
=>
{
const
year
=
new
Date
().
getFullYear
()
const
month
=
new
Date
().
getMonth
()
...
...
@@ -196,7 +196,7 @@ function WeekCalendar() {
dateTimeDue
:
due
,
executor
:
userId
,
author
:
user
.
id
,
dateTimeDeadLine
:
d
ue
,
calendar
:
tr
ue
,
}
delete
newTask
.
infoForCell
delete
newTask
.
id
...
...
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