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
341f950a
Commit
341f950a
authored
Dec 09, 2022
by
Ermolaev Timur
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'task-91-enhance/add_deadline' into 'development'
#91
Засунул дедлайн, подправил запросы See merge request
!67
parents
1f23241a
f09c5cc1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
8 deletions
+6
-8
MonthCalendar.js
planner-front/src/containers/MonthCalendar/MonthCalendar.js
+2
-3
tasksActions.js
planner-front/src/store/actions/tasksActions.js
+4
-4
tasksReducer.js
planner-front/src/store/reducers/tasksReducer.js
+0
-1
No files found.
planner-front/src/containers/MonthCalendar/MonthCalendar.js
View file @
341f950a
...
@@ -158,18 +158,17 @@ function MonthCalendar() {
...
@@ -158,18 +158,17 @@ function MonthCalendar() {
...
currentTask
,
...
currentTask
,
dateTimeStart
:
start
,
dateTimeStart
:
start
,
dateTimeDue
:
due
,
dateTimeDue
:
due
,
dateTimeTaskId
:
currentTask
.
id
,
taskId
:
currentTask
.
mainTaskId
taskId
:
currentTask
.
mainTaskId
}
}
delete
newTask
.
infoForCell
delete
newTask
.
infoForCell
delete
newTask
.
id
await
dispatch
(
editCalendarTask
(
newTask
,
currentTask
.
id
))
await
dispatch
(
editCalendarTask
(
newTask
))
}
else
{
}
else
{
const
newTask
=
{
const
newTask
=
{
...
currentTask
,
...
currentTask
,
dateTimeStart
:
start
,
dateTimeStart
:
start
,
dateTimeDue
:
due
,
dateTimeDue
:
due
,
executor
:
user
,
executor
:
user
,
dateTimeDeadLine
:
due
,
}
}
delete
newTask
.
infoForCell
delete
newTask
.
infoForCell
delete
newTask
.
id
delete
newTask
.
id
...
...
planner-front/src/store/actions/tasksActions.js
View file @
341f950a
...
@@ -77,7 +77,7 @@ export const addCalendarTask = (task) => {
...
@@ -77,7 +77,7 @@ export const addCalendarTask = (task) => {
return
async
(
dispatch
)
=>
{
return
async
(
dispatch
)
=>
{
dispatch
(
addTaskRequest
());
dispatch
(
addTaskRequest
());
try
{
try
{
const
response
=
await
axios
.
post
(
"/tasks"
,
task
);
await
axios
.
post
(
"/tasks"
,
task
);
dispatch
(
addTaskSuccess
())
dispatch
(
addTaskSuccess
())
dispatch
(
fetchCalendarTasks
())
dispatch
(
fetchCalendarTasks
())
}
catch
(
error
)
{
}
catch
(
error
)
{
...
@@ -90,7 +90,7 @@ export const addCopyCalendarTask = (task) => {
...
@@ -90,7 +90,7 @@ export const addCopyCalendarTask = (task) => {
return
async
(
dispatch
)
=>
{
return
async
(
dispatch
)
=>
{
dispatch
(
addTaskRequest
());
dispatch
(
addTaskRequest
());
try
{
try
{
const
response
=
await
axios
.
post
(
"/copy-tasks/make-copy"
,
task
);
await
axios
.
post
(
"/copy-tasks/make-copy"
,
task
);
dispatch
(
addTaskSuccess
())
dispatch
(
addTaskSuccess
())
dispatch
(
fetchCalendarTasks
())
dispatch
(
fetchCalendarTasks
())
}
catch
(
error
)
{
}
catch
(
error
)
{
...
@@ -137,11 +137,11 @@ export const editTask = (task) => {
...
@@ -137,11 +137,11 @@ export const editTask = (task) => {
}
}
}
}
export
const
editCalendarTask
=
(
task
)
=>
{
export
const
editCalendarTask
=
(
task
,
taskId
)
=>
{
return
async
(
dispatch
)
=>
{
return
async
(
dispatch
)
=>
{
dispatch
(
editTaskRequest
());
dispatch
(
editTaskRequest
());
try
{
try
{
await
axios
.
put
(
"/copy-tasks/change-copy"
,
task
);
await
axios
.
put
(
`/copy-tasks/change-copy/
${
taskId
}
`
,
task
);
dispatch
(
editTaskSuccess
())
dispatch
(
editTaskSuccess
())
dispatch
(
fetchCalendarTasks
())
dispatch
(
fetchCalendarTasks
())
}
catch
(
error
)
{
}
catch
(
error
)
{
...
...
planner-front/src/store/reducers/tasksReducer.js
View file @
341f950a
...
@@ -12,7 +12,6 @@ import {
...
@@ -12,7 +12,6 @@ import {
DELETE_TASK_REQUEST
,
DELETE_TASK_REQUEST
,
DELETE_TASK_FAILURE
,
DELETE_TASK_FAILURE
,
FETCH_ALL_TASKS_SUCCESS
,
FETCH_ALL_TASKS_SUCCESS
,
EDIT_CALENDAR_TASK
,
FETCH_TASKS_BY_PROJECT_REQUEST
,
FETCH_TASKS_BY_PROJECT_REQUEST
,
FETCH_TASKS_BY_PROJECT_SUCCESS
,
FETCH_TASKS_BY_PROJECT_SUCCESS
,
FETCH_TASKS_BY_PROJECT_FAILURE
,
FETCH_TASKS_BY_PROJECT_FAILURE
,
...
...
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