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
Hide 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,12 +216,11 @@ router.get('/my',auth, async (req: Request, res: Response):Promise<Response>=>{
...
@@ -216,12 +216,11 @@ router.get('/my',auth, async (req: Request, res: Response):Promise<Response>=>{
)
)
const
projectsList
=
projectsRawId
.
map
(
project
=>
{
return
project
.
id
})
const
projectsList
=
projectsRawId
.
map
(
project
=>
{
return
project
.
id
})
const
tasks
=
await
dataSource
const
tasks
=
await
dataSource
.
getRepository
(
Task
)
.
getRepository
(
Task
)
.
find
(
.
find
(
{
relations
:{
{
relations
:{
author
:
true
,
author
:
true
,
executor
:
true
,
executor
:
true
,
project
:
true
project
:
true
},
},
...
@@ -229,6 +228,9 @@ router.get('/my',auth, async (req: Request, res: Response):Promise<Response>=>{
...
@@ -229,6 +228,9 @@ router.get('/my',auth, async (req: Request, res: Response):Promise<Response>=>{
executor
:{
executor
:{
id
:
user
.
id
id
:
user
.
id
},
},
project
:{
id
:
In
(
projectsList
)
}
}
}
}
}
)
)
...
...
planner-front/src/components/MyTasksCompoments/CustomTableCell.js
View file @
05718ad8
...
@@ -25,6 +25,15 @@ const CustomTableCell = ({
...
@@ -25,6 +25,15 @@ const CustomTableCell = ({
flexDirection
:
"column"
,
flexDirection
:
"column"
,
fontSize
:
"12px"
,
fontSize
:
"12px"
,
};
};
if
(
name
===
'dateTimeDeadLine'
){
console
.
log
(
'dateTimeDeadLine '
,
name
,
' '
,
value
)
}
const
divTwoStyle
=
{
display
:
"flex"
,
flexDirection
:
"row"
,
fontSize
:
"12px"
,
};
const
duration
=
moment
.
duration
(
const
duration
=
moment
.
duration
(
moment
(
task
?.
dateTimeTasks
[
0
]?.
dateTimeDue
).
diff
(
moment
(
task
?.
dateTimeTasks
[
0
]?.
dateTimeDue
).
diff
(
...
@@ -36,7 +45,7 @@ const CustomTableCell = ({
...
@@ -36,7 +45,7 @@ const CustomTableCell = ({
if
(
task
)
{
if
(
task
)
{
return
(
return
(
<>
<>
<
TableCell
<
TableCell
onClick
=
{(
e
)
=>
(
onModalOpen
?
onModalOpen
(
e
,
task
)
:
null
)}
onClick
=
{(
e
)
=>
(
onModalOpen
?
onModalOpen
(
e
,
task
)
:
null
)}
align
=
"left"
align
=
"left"
style
=
{
styles
}
style
=
{
styles
}
...
@@ -55,10 +64,17 @@ const CustomTableCell = ({
...
@@ -55,10 +64,17 @@ const CustomTableCell = ({
/
>
/
>
)
:
name
!==
"dateTimeStart"
?
(
)
:
name
!==
"dateTimeStart"
?
(
<
span
>
{
value
}
<
/span
>
<
span
>
{
value
}
<
/span
>
)
:
(
)
:
name
===
"dateTimeDeadLine"
&&
value
===
'Invalid date'
?
<
span
>
''
<
/span
>
:(
<
div
style
=
{
divStyle
}
>
<
div
style
=
{
divStyle
}
>
<
span
>
{
value
}
<
/span
>
<
div
style
=
{
divTwoStyle
}
>
<
span
>
{
value2
}
<
/span
>
<
span
title
=
{
moment
(
task
.
dateTimeTasks
[
0
]?.
dateTimeStart
)
.
utc
()
.
format
(
"DD/MM/YY"
)}
>
{
value
}
<
/span> <span> </
span
>
<
span
>
({
value2
})
<
/span></
div
>
<
span
>
часы
:{
hours
}
<
/span
>
<
span
>
часы
:{
hours
}
<
/span
>
<
/div
>
<
/div
>
)}
)}
...
...
planner-front/src/components/MyTasksCompoments/NewTaskForm.js
View file @
05718ad8
...
@@ -13,7 +13,7 @@ import {
...
@@ -13,7 +13,7 @@ import {
}
from
"@mui/material"
;
}
from
"@mui/material"
;
import
{
useState
}
from
"react"
;
import
{
useState
}
from
"react"
;
import
{
useDispatch
,
useSelector
}
from
"react-redux"
;
import
{
useDispatch
,
useSelector
}
from
"react-redux"
;
import
{
AddBox
}
from
"@mui/icons-material"
;
import
{
AddBox
,
Luggage
}
from
"@mui/icons-material"
;
import
moment
from
"moment"
;
import
moment
from
"moment"
;
import
CustomTableCell
from
"./CustomTableCell"
;
import
CustomTableCell
from
"./CustomTableCell"
;
import
MaterialUIPickers
from
"./DateTimePicker/DateTimePicker"
;
import
MaterialUIPickers
from
"./DateTimePicker/DateTimePicker"
;
...
@@ -39,8 +39,8 @@ export default function NewTaskForm({ projects, setAddTaskForm }) {
...
@@ -39,8 +39,8 @@ export default function NewTaskForm({ projects, setAddTaskForm }) {
accomplish
:
"opened"
,
accomplish
:
"opened"
,
priority
:
"B"
,
priority
:
"B"
,
author
:
{
id
:
user
.
id
},
author
:
{
id
:
user
.
id
},
authorDisplayName
:
user
.
displayName
,
//
authorDisplayName: user.displayName,
executor
s
:
[]
,
executor
:
null
,
isEditMode
:
true
,
isEditMode
:
true
,
});
});
...
@@ -71,6 +71,7 @@ export default function NewTaskForm({ projects, setAddTaskForm }) {
...
@@ -71,6 +71,7 @@ export default function NewTaskForm({ projects, setAddTaskForm }) {
};
};
const
onDateChange
=
(
id
,
value
,
property
)
=>
{
const
onDateChange
=
(
id
,
value
,
property
)
=>
{
console
.
log
(
'value '
,
value
,
'property '
,
property
)
const
newTask
=
{
const
newTask
=
{
...
task
,
...
task
,
[
property
]:
moment
.
parseZone
(
value
,
"DD/MM/YYYY"
,
true
).
format
(),
[
property
]:
moment
.
parseZone
(
value
,
"DD/MM/YYYY"
,
true
).
format
(),
...
...
planner-front/src/components/MyTasksCompoments/TableRowTask/TableRowTask.js
View file @
05718ad8
...
@@ -191,19 +191,19 @@ const TableRowTask= ({
...
@@ -191,19 +191,19 @@ const TableRowTask= ({
<
/TableCell
>
<
/TableCell
>
:
:
<
CustomTableCell
<
CustomTableCell
{...{
{...{
task
,
task
,
name
:
"dateTimeStart"
,
name
:
"dateTimeStart"
,
value
:
moment
(
task
.
dateTimeTasks
[
0
]?.
dateTimeStart
)
value
:
moment
(
task
.
dateTimeTasks
[
0
]?.
dateTimeStart
)
.
utc
()
.
utc
()
.
format
(
"DD
-MM-YY
"
),
.
format
(
"DD
/MM
"
),
value2
:
moment
(
task
.
dateTimeTasks
[
0
]?.
dateTimeStart
)
value2
:
moment
(
task
.
dateTimeTasks
[
0
]?.
dateTimeStart
)
.
utc
()
.
utc
()
.
format
(
"kk:
mm
"
)
+
" - "
+
.
format
(
"kk:
00
"
)
+
" - "
+
moment
(
task
.
dateTimeTasks
[
0
]?.
dateTimeDue
)
moment
(
task
.
dateTimeTasks
[
0
]?.
dateTimeDue
)
.
utc
()
.
utc
()
.
format
(
"kk:
mm
"
),
.
format
(
"kk:
00
"
),
user
:
user
user
:
user
}}
>
}}
>
<
/CustomTableCell
>
<
/CustomTableCell
>
...
@@ -228,7 +228,7 @@ const TableRowTask= ({
...
@@ -228,7 +228,7 @@ const TableRowTask= ({
value
:
moment
(
task
.
dateTimeDeadLine
value
:
moment
(
task
.
dateTimeDeadLine
)
)
.
utc
()
.
utc
()
.
format
(
"DD
-MM-YY
kk:mm"
),
.
format
(
"DD
/MM
kk:mm"
),
user
:
user
user
:
user
}}
}}
/
>
/
>
...
...
planner-front/src/containers/MyTasks/MyTasks.js
View file @
05718ad8
...
@@ -211,7 +211,7 @@ export default function EnhancedTable() {
...
@@ -211,7 +211,7 @@ export default function EnhancedTable() {
)
:
null
}
)
:
null
}
<
TableContainer
>
<
TableContainer
>
<
Table
sx
=
{{
minWidth
:
600
}}
aria
-
labelledby
=
"tableTitle"
>
<
Table
sx
=
{{
minWidth
:
600
}}
aria
-
labelledby
=
"tableTitle"
size
=
'small'
>
<
EnhancedTableHead
<
EnhancedTableHead
order
=
{
order
}
order
=
{
order
}
orderBy
=
{
orderBy
}
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