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
05718ad8
Commit
05718ad8
authored
Dec 25, 2022
by
Евгений Положенцев
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#123
setup filter from not defined title projects
parent
1ac76af3
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
15 deletions
+34
-15
tasks.ts
planner-api/src/routers/tasks.ts
+4
-2
CustomTableCell.js
...front/src/components/MyTasksCompoments/CustomTableCell.js
+20
-4
NewTaskForm.js
...ner-front/src/components/MyTasksCompoments/NewTaskForm.js
+4
-3
TableRowTask.js
...components/MyTasksCompoments/TableRowTask/TableRowTask.js
+5
-5
MyTasks.js
planner-front/src/containers/MyTasks/MyTasks.js
+1
-1
No files found.
planner-api/src/routers/tasks.ts
View file @
05718ad8
...
...
@@ -216,7 +216,6 @@ router.get('/my',auth, async (req: Request, res: Response):Promise<Response>=>{
)
const
projectsList
=
projectsRawId
.
map
(
project
=>
{
return
project
.
id
})
const
tasks
=
await
dataSource
.
getRepository
(
Task
)
.
find
(
...
...
@@ -229,6 +228,9 @@ router.get('/my',auth, async (req: Request, res: Response):Promise<Response>=>{
executor
:{
id
:
user
.
id
},
project
:{
id
:
In
(
projectsList
)
}
}
}
)
...
...
planner-front/src/components/MyTasksCompoments/CustomTableCell.js
View file @
05718ad8
...
...
@@ -25,6 +25,15 @@ const CustomTableCell = ({
flexDirection
:
"column"
,
fontSize
:
"12px"
,
};
if
(
name
===
'dateTimeDeadLine'
){
console
.
log
(
'dateTimeDeadLine '
,
name
,
' '
,
value
)
}
const
divTwoStyle
=
{
display
:
"flex"
,
flexDirection
:
"row"
,
fontSize
:
"12px"
,
};
const
duration
=
moment
.
duration
(
moment
(
task
?.
dateTimeTasks
[
0
]?.
dateTimeDue
).
diff
(
...
...
@@ -55,10 +64,17 @@ const CustomTableCell = ({
/
>
)
:
name
!==
"dateTimeStart"
?
(
<
span
>
{
value
}
<
/span
>
)
:
(
)
:
name
===
"dateTimeDeadLine"
&&
value
===
'Invalid date'
?
<
span
>
''
<
/span
>
:(
<
div
style
=
{
divStyle
}
>
<
span
>
{
value
}
<
/span
>
<
span
>
{
value2
}
<
/span
>
<
div
style
=
{
divTwoStyle
}
>
<
span
title
=
{
moment
(
task
.
dateTimeTasks
[
0
]?.
dateTimeStart
)
.
utc
()
.
format
(
"DD/MM/YY"
)}
>
{
value
}
<
/span> <span> </
span
>
<
span
>
({
value2
})
<
/span></
div
>
<
span
>
часы
:{
hours
}
<
/span
>
<
/div
>
)}
...
...
planner-front/src/components/MyTasksCompoments/NewTaskForm.js
View file @
05718ad8
...
...
@@ -13,7 +13,7 @@ import {
}
from
"@mui/material"
;
import
{
useState
}
from
"react"
;
import
{
useDispatch
,
useSelector
}
from
"react-redux"
;
import
{
AddBox
}
from
"@mui/icons-material"
;
import
{
AddBox
,
Luggage
}
from
"@mui/icons-material"
;
import
moment
from
"moment"
;
import
CustomTableCell
from
"./CustomTableCell"
;
import
MaterialUIPickers
from
"./DateTimePicker/DateTimePicker"
;
...
...
@@ -39,8 +39,8 @@ export default function NewTaskForm({ projects, setAddTaskForm }) {
accomplish
:
"opened"
,
priority
:
"B"
,
author
:
{
id
:
user
.
id
},
authorDisplayName
:
user
.
displayName
,
executor
s
:
[]
,
//
authorDisplayName: user.displayName,
executor
:
null
,
isEditMode
:
true
,
});
...
...
@@ -71,6 +71,7 @@ export default function NewTaskForm({ projects, setAddTaskForm }) {
};
const
onDateChange
=
(
id
,
value
,
property
)
=>
{
console
.
log
(
'value '
,
value
,
'property '
,
property
)
const
newTask
=
{
...
task
,
[
property
]:
moment
.
parseZone
(
value
,
"DD/MM/YYYY"
,
true
).
format
(),
...
...
planner-front/src/components/MyTasksCompoments/TableRowTask/TableRowTask.js
View file @
05718ad8
...
...
@@ -197,13 +197,13 @@ const TableRowTask= ({
name
:
"dateTimeStart"
,
value
:
moment
(
task
.
dateTimeTasks
[
0
]?.
dateTimeStart
)
.
utc
()
.
format
(
"DD
-MM-YY
"
),
.
format
(
"DD
/MM
"
),
value2
:
moment
(
task
.
dateTimeTasks
[
0
]?.
dateTimeStart
)
.
utc
()
.
format
(
"kk:
mm
"
)
+
" - "
+
.
format
(
"kk:
00
"
)
+
" - "
+
moment
(
task
.
dateTimeTasks
[
0
]?.
dateTimeDue
)
.
utc
()
.
format
(
"kk:
mm
"
),
.
format
(
"kk:
00
"
),
user
:
user
}}
>
<
/CustomTableCell
>
...
...
@@ -228,7 +228,7 @@ const TableRowTask= ({
value
:
moment
(
task
.
dateTimeDeadLine
)
.
utc
()
.
format
(
"DD
-MM-YY
kk:mm"
),
.
format
(
"DD
/MM
kk:mm"
),
user
:
user
}}
/
>
...
...
planner-front/src/containers/MyTasks/MyTasks.js
View file @
05718ad8
...
...
@@ -211,7 +211,7 @@ export default function EnhancedTable() {
)
:
null
}
<
TableContainer
>
<
Table
sx
=
{{
minWidth
:
600
}}
aria
-
labelledby
=
"tableTitle"
>
<
Table
sx
=
{{
minWidth
:
600
}}
aria
-
labelledby
=
"tableTitle"
size
=
'small'
>
<
EnhancedTableHead
order
=
{
order
}
orderBy
=
{
orderBy
}
...
...
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