Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WIE_202021_CSBillero11
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bernard Roland (Student Com20)
WIE_202021_CSBillero11
Commits
f2a5bec3
Commit
f2a5bec3
authored
3 years ago
by
Planoetscher Daniel (Student Com20)
Browse files
Options
Downloads
Patches
Plain Diff
bugfixes
parent
9208d83a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
client/src/components/forms/TaskForm/index.tsx
+4
-4
4 additions, 4 deletions
client/src/components/forms/TaskForm/index.tsx
client/src/pages/Tasks/TaskEdit/index.tsx
+1
-2
1 addition, 2 deletions
client/src/pages/Tasks/TaskEdit/index.tsx
with
5 additions
and
6 deletions
client/src/components/forms/TaskForm/index.tsx
+
4
−
4
View file @
f2a5bec3
...
...
@@ -13,7 +13,7 @@ import Button from 'components/ui/Button';
interface
Props
{
task
?:
Task
;
onSubmit
:
(
name
:
string
,
text
:
string
,
icon
:
string
,
priority
:
Priority
,
dependencies
:
string
[],
requirements
:
TaskRequirement
[],
assignees
:
TaskAssignment
[])
=>
void
;
onSubmit
:
(
name
:
string
,
text
:
string
,
icon
:
string
,
priority
:
Priority
,
dependencies
:
string
[],
requirements
:
TaskRequirement
[],
assignees
:
TaskAssignment
[]
,
status
?:
Status
)
=>
void
;
project
:
Project
;
}
...
...
@@ -111,11 +111,11 @@ export default function TaskForm({ task, onSubmit, project }: Props) {
validateIcon
(
icon
??
''
)
===
null
&&
validatePriority
(
priority
??
''
)
===
null
)
{
onSubmit
?.(
name
??
''
,
text
??
''
,
icon
??
''
,
priority
??
Priority
.
LOW
,
tasks
??
[],
requirements
,
assignees
);
onSubmit
?.(
name
??
''
,
text
??
''
,
icon
??
''
,
priority
??
Priority
.
LOW
,
tasks
??
[],
requirements
,
assignees
,
status
);
}
else
{
setError
(
'
Please fill in the mandatory fields.
'
);
}
},
[
onSubmit
,
setError
,
name
,
text
,
priority
,
icon
,
tasks
,
assignees
,
requirements
]);
},
[
onSubmit
,
setError
,
name
,
text
,
priority
,
icon
,
tasks
,
assignees
,
requirements
,
status
]);
return
(
<
form
className
=
"task-form"
onSubmit
=
{
handleSubmit
}
>
...
...
@@ -152,7 +152,7 @@ export default function TaskForm({ task, onSubmit, project }: Props) {
status
&&
(
<
select
defaultValue
=
{
status
}
onChange
=
{
(
e
)
=>
{
let
currentStatus
=
Object
.
values
(
Status
).
find
(
s
=>
s
===
e
.
target
.
value
)
??
undefined
;
setStatus
(
currentStatus
);
setStatus
(
currentStatus
);
}
}
>
<
option
value
=
{
''
}
>
Please choose a status
</
option
>
{
...
...
This diff is collapsed.
Click to expand it.
client/src/pages/Tasks/TaskEdit/index.tsx
+
1
−
2
View file @
f2a5bec3
...
...
@@ -12,7 +12,6 @@ export default function TaskEdit() {
const
{
taskId
}
=
useParams
<
Params
>
();
const
[
task
,
setTask
]
=
useState
<
Task
>
();
const
[
project
,
setProject
]
=
useState
<
Project
>
();
const
[
error
,
setError
]
=
useState
(
''
);
const
history
=
useHistory
();
useEffect
(()
=>
{
...
...
@@ -42,7 +41,7 @@ export default function TaskEdit() {
let
removedAssigneesTemp
:
TaskAssignment
[]
=
task
?.
assigned
??
[];
removedAssigneesTemp
.
filter
((
assignee
)
=>
assignees
.
indexOf
(
assignee
)
===
-
1
);
let
removedAssignees
:
string
[]
=
removedAssigneesTemp
.
map
((
assignee
)
=>
assignee
.
user
);
await
updateTask
(
taskId
,
{
name
,
text
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment