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
2bceb759
Commit
2bceb759
authored
Nov 27, 2022
by
Нелли Ибрагимова
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
изменила названия колонок, вывела данные в колонку дедлайн, вывела кнопку перехода в календарь
parent
d19dd8ff
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
105 additions
and
12 deletions
+105
-12
CustomTableCell.js
...front/src/components/MyTasksCompoments/CustomTableCell.js
+30
-0
MyTasks.js
planner-front/src/containers/MyTasks/MyTasks.js
+73
-10
MyTasksHeader.js
...ont/src/containers/MyTasks/MyTasksHeader/MyTasksHeader.js
+2
-2
No files found.
planner-front/src/components/MyTasksCompoments/CustomTableCell.js
View file @
2bceb759
...
...
@@ -5,6 +5,7 @@ import Input from "@mui/material/Input";
const
CustomTableCell
=
({
task
,
name
,
value
,
value2
,
onChange
,
onModalOpen
,
placeholder
,
...
...
@@ -36,6 +37,35 @@ const CustomTableCell = ({task,
<
/
>
);
}
if
(
task
&&
name
==
"dateTimeStart"
)
{
return
(
<>
<
TableCell
onClick
=
{(
e
)
=>
(
onModalOpen
?
onModalOpen
(
e
,
task
)
:
null
)}
align
=
"left"
style
=
{
styles
}
>
{
task
.
isEditMode
&&
onChange
&&
name
==!
"author"
&&
task
.
author
.
id
==
user
.
id
?
(
<
Input
placeholder
=
{
placeholder
}
value
=
{
value
}
name
=
{
name
}
onChange
=
{(
e
)
=>
onChange
(
e
,
task
)}
style
=
{
styles
}
/
>
)
:
(
<>
<
span
>
{
value
}
<
/span
>
<
div
>
{
"valuehjlhlh"
}
<
/div
>
<
span
>
{
value2
}
<
/span
>
<
/
>
)}
<
/TableCell
>
<
/
>
);
}
};
export
default
CustomTableCell
;
planner-front/src/containers/MyTasks/MyTasks.js
View file @
2bceb759
...
...
@@ -25,7 +25,7 @@ import MaterialUIPickers from "../../components/MyTasksCompoments/DateTimePicker
import
BasicSelect
from
"../../components/UI/Select/Select"
;
import
{
fetchAllTasks
,
deleteTask
,
editTask
}
from
"../../store/actions/tasksActions"
;
import
NewTaskForm
from
"../../components/MyTasksCompoments/NewTaskForm"
;
import
CalendarMonthIcon
from
'@mui/icons-material/CalendarMonth'
;
export
default
function
EnhancedTable
()
{
...
...
@@ -221,7 +221,7 @@ useEffect(() => {
return
results
;
},
[]);
console
.
log
(
tasks
)
if
(
tasks
&&
tasks
?.
length
>
0
&&
...
...
@@ -353,26 +353,89 @@ useEffect(() => {
user
:
user
}}
/
>
<
TableCell
>
<
MaterialUIPickers
{
task
.
isEditMode
&&
task
.
author
.
id
===
user
.
id
?
(
<
TableCell
>
{
/*
<MaterialUIPickers
task={task}
name="dateTimeStart"
onChange={onDateChange}
user={user}
/
>
/> */
}
<
TableCell
>
<
Tooltip
title
=
"Перейти в календарь"
>
<
IconButton
onClick
=
{(
id
)
=>
{
deleteHandle
(
task
.
id
);}}
>
<
CalendarMonthIcon
/>
<
/IconButton
>
<
/Tooltip
>
<
/TableCell
>
<
/TableCell
>
)
:
(
<>
<
CustomTableCell
{...{
task
,
name
:
"dateTimeStart"
,
value
:
moment
(
task
.
dateTimeStart
)
.
utc
()
.
format
(
"DD-MM-YYYY hh:mm A"
),
value2
:
moment
(
task
.
dateTimeStart
)
.
utc
()
.
format
(
"hh:mm A"
)
+
"-"
+
moment
(
task
.
dateTimeDue
)
.
utc
()
.
format
(
"hh:mm A"
),
user
:
user
}}
>
<
span
>
"время заершения"
,
{
moment
(
task
.
dateTimeDue
)
.
utc
()
.
format
(
"hh:mm A"
)}
<
/span
>
<
/CustomTableCell
>
{
/* <CustomTableCell
{...{
task,
name: "dateTimeStart",
value: moment(task.dateTimeDue)
.utc()
.format("DD-MM-YYYY hh:mm A"),
user:user
}}
/> */
}
<
/
>
)}
<
TableCell
>
{
/*
<TableCell>
<MaterialUIPickers
task={task}
name="dateTimeStart"
onChange={onDateChange}
user={user}
/>
</TableCell> */
}
{
task
.
isEditMode
&&
task
.
author
.
id
===
user
.
id
?
(
<
TableCell
>
<
MaterialUIPickers
task
=
{
task
}
name
=
"dateTimeDue"
onChange
=
{
onDateChange
}
user
=
{
user
}
/
>
<
/TableCell
>
<
/TableCell
>
)
:
(
<
CustomTableCell
{...{
task
,
name
:
"dateTimeDue"
,
value
:
moment
(
task
.
dateTimeDue
)
.
utc
()
.
format
(
"DD-MM-YYYY hh:mm A"
),
user
:
user
}}
/
>
)}
{
task
.
isEditMode
?
(
<
TableCell
>
<
BasicSelect
...
...
planner-front/src/containers/MyTasks/MyTasksHeader/MyTasksHeader.js
View file @
2bceb759
...
...
@@ -49,13 +49,13 @@ const headCells = [
id
:
"dateTimeStart"
,
numeric
:
true
,
disablePadding
:
false
,
label
:
"Дата
начала
"
,
label
:
"Дата
и время выполнения
"
,
},
{
id
:
"dateTimeDue"
,
numeric
:
true
,
disablePadding
:
false
,
label
:
"Д
ата завершения
"
,
label
:
"Д
едлайн
"
,
},
{
id
:
"accomplish"
,
...
...
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