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
f45ef93f
Commit
f45ef93f
authored
Jan 10, 2023
by
Евгений Положенцев
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#136
solved select projects bug when create new task in Mytask tbl
parent
e3590830
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
tasks.ts
planner-api/src/routers/tasks.ts
+0
-6
NewTaskForm.js
...ner-front/src/components/MyTasksCompoments/NewTaskForm.js
+8
-4
No files found.
planner-api/src/routers/tasks.ts
View file @
f45ef93f
...
...
@@ -35,7 +35,6 @@ router.post('/', auth, async(req:Request, res:Response):Promise<Response>=>{
dateTimeDueFinal
=
dateTimeDeadLine
dateTimeStartFinal
=
subtractHours
(
dateTimeDueFinal
,
1
)
}
console
.
log
(
'datTeimeDeadLine '
,
dateTimeDeadLine
)
const
newTask
=
new
Task
();
newTask
.
title
=
title
;
...
...
@@ -199,7 +198,6 @@ router.get('/user/:userId', async (req: Request, res: Response):Promise<Response
router
.
get
(
'/my'
,
auth
,
async
(
req
:
Request
,
res
:
Response
):
Promise
<
Response
>=>
{
let
projectsRawId
=
[]
try
{
const
user
=
req
.
body
.
user
projectsRawId
=
await
dataSource
.
getRepository
(
Project
)
...
...
@@ -207,7 +205,6 @@ router.get('/my',auth, async (req: Request, res: Response):Promise<Response>=>{
select
:{
id
:
true
},
where
:{
title
:
Not
(
Equal
(
"Не определено"
)),
members
:{
...
...
@@ -249,13 +246,10 @@ router.get('/my',auth, async (req: Request, res: Response):Promise<Response>=>{
id
:
In
(
projectsList
)
}
})
return
res
.
send
({
tasks
,
projects
})
}
catch
(
e
){
return
res
.
status
(
502
).
send
({
message
:(
e
as
Error
).
message
})
}
})
...
...
planner-front/src/components/MyTasksCompoments/NewTaskForm.js
View file @
f45ef93f
...
...
@@ -13,15 +13,17 @@ import {
}
from
"@mui/material"
;
import
{
useState
}
from
"react"
;
import
{
useDispatch
,
useSelector
}
from
"react-redux"
;
import
{
AddBox
,
Luggage
}
from
"@mui/icons-material"
;
import
{
AddBox
// , Luggage
}
from
"@mui/icons-material"
;
import
moment
from
"moment"
;
import
CustomTableCell
from
"./CustomTableCell"
;
import
MaterialUIPickers
from
"./DateTimePicker/DateTimePicker"
;
import
BasicSelect
from
"../UI/Select/Select"
;
import
{
addTask
}
from
"../../store/actions/tasksActions"
;
import
TaskModal
from
"./TaskModal/TaskModal"
;
import
{
dateToISOLikeButLocal
}
from
'../../helpers/CalendarHelpers'
;
import
DateTimePicker
from
"../Calendars/UI/DateTimePicker/DateTimePicker"
;
//
import {dateToISOLikeButLocal} from '../../helpers/CalendarHelpers';
//
import DateTimePicker from "../Calendars/UI/DateTimePicker/DateTimePicker";
export
default
function
NewTaskForm
({
projects
,
setAddTaskForm
})
{
console
.
log
(
'new task form'
)
...
...
@@ -38,7 +40,7 @@ export default function NewTaskForm({ projects, setAddTaskForm }) {
dateTimeDeadLine
:
null
,
dateTimeTasks
:
[],
dateTimeDue
:
null
,
project
:
null
,
project
:
projects
?
projects
.
find
(
project
=>
project
.
title
===
"Личные дела"
):
null
,
accomplish
:
"opened"
,
priority
:
"B"
,
author
:
{
id
:
user
.
id
},
...
...
@@ -54,6 +56,8 @@ export default function NewTaskForm({ projects, setAddTaskForm }) {
setModal
(
true
);
};
console
.
log
(
'task '
,
task
)
const
handleClose
=
()
=>
{
setModal
(
false
);
};
...
...
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