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
7aab4e6b
Commit
7aab4e6b
authored
Dec 05, 2022
by
Евгений Положенцев
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#89
fixing inputs on delete copytasks
parent
acc32f52
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
9 deletions
+6
-9
copyTasks.ts
planner-api/src/routers/copyTasks.ts
+5
-4
TableRowTask.js
...components/MyTasksCompoments/TableRowTask/TableRowTask.js
+1
-5
No files found.
planner-api/src/routers/copyTasks.ts
View file @
7aab4e6b
...
@@ -63,15 +63,16 @@ router.put("/change-copy", authAuthorOrExecutorOfTask, async(req:Request, res: R
...
@@ -63,15 +63,16 @@ router.put("/change-copy", authAuthorOrExecutorOfTask, async(req:Request, res: R
})
})
/**delete copyTask by dateTimeTaskId */
/**delete copyTask by dateTimeTaskId */
router
.
delete
(
'/:id'
,
authAuthorOrExecutorOfTask
,
async
(
req
:
Request
,
res
:
Response
):
Promise
<
Response
>=>
{
router
.
delete
(
'/:dateTimeTaskId'
,
async
(
req
:
Request
,
res
:
Response
):
Promise
<
Response
>=>
{
const
{
id
}
=
req
.
params
// router.delete('/:dateTimeTaskId', authAuthorOrExecutorOfTask, async(req:Request, res:Response):Promise<Response>=>{
const
{
dateTimeTaskId
}
=
req
.
params
await
myDataSource
await
myDataSource
.
createQueryBuilder
()
.
createQueryBuilder
()
.
delete
()
.
delete
()
.
from
(
DateTimeTask
)
.
from
(
DateTimeTask
)
.
where
(
"id = :
id"
,
{
i
d
})
.
where
(
"id = :
dateTimeTaskId"
,
{
dateTimeTaskI
d
})
.
execute
()
.
execute
()
return
res
.
send
({
message
:
"delete succesfully"
})
return
res
.
send
({
message
:
"
copyTask
delete succesfully"
})
}
}
)
)
...
...
planner-front/src/components/MyTasksCompoments/TableRowTask/TableRowTask.js
View file @
7aab4e6b
...
@@ -54,16 +54,12 @@ const TableRowTask= ({
...
@@ -54,16 +54,12 @@ const TableRowTask= ({
const
exp
=
roudHourUp
(
moment
.
utc
(
dateIso
)).
format
(
"HH:"
+
"00"
)
const
exp
=
roudHourUp
(
moment
.
utc
(
dateIso
)).
format
(
"HH:"
+
"00"
)
return
exp
;
return
exp
;
}
}
const
getDayOfWeek
=
(
dateIso
)
=>
{
const
getDayOfWeek
=
(
dateIso
)
=>
{
const
date
=
moment
.
utc
(
dateIso
);
const
date
=
moment
.
utc
(
dateIso
);
return
weekDays
[
date
.
day
()];
return
weekDays
[
date
.
day
()];
}
}
// const handleEditDateTimeTask =(dateTimeTask)=>{
// console.log('edit handleEditDateTimeTask')
// }
return
(
return
(
<>
<>
<
TableRow
hover
key
=
{
task
.
id
}
>
<
TableRow
hover
key
=
{
task
.
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