Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RLG Maker
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Romain DELEAU
RLG Maker
Commits
854a1a9a
Commit
854a1a9a
authored
Oct 04, 2023
by
Romain DELEAU
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Traces on tasks supplementaryrole
parent
7118507c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
3 deletions
+32
-3
app.component.html
src/app/app.component.html
+1
-1
supplementary-task.component.html
...eces/supplementary-task/supplementary-task.component.html
+1
-1
supplementary-task.component.ts
...pieces/supplementary-task/supplementary-task.component.ts
+30
-1
No files found.
src/app/app.component.html
View file @
854a1a9a
...
...
@@ -120,7 +120,7 @@
<div
class=
"container-sider-title"
>
{{getSiderTitle()}}
</div>
<div
class=
"container-sider-elements"
>
<app-role-occurence
class=
"container-sider-elements-element"
[
role
]="
pieceDetailsService
.
pieceAsRole
()"
*
ngIf=
"pieceDetailsService.pieceIsRole()"
[
scenario
]="
scenario
"
></app-role-occurence>
<app-supplementary-task
class=
"container-sider-elements-element"
[
task
]="
pieceDetailsService
.
pieceAsTask
()"
[
role
]="
pieceDetailsService
.
parentAsRole
()"
*
ngIf=
"pieceDetailsService.pieceIsTask()"
></app-supplementary-task>
<app-supplementary-task
class=
"container-sider-elements-element"
[
task
]="
pieceDetailsService
.
pieceAsTask
()"
[
role
]="
pieceDetailsService
.
parentAsRole
()"
*
ngIf=
"pieceDetailsService.pieceIsTask()"
[
scenario
]="
scenario
"
></app-supplementary-task>
<app-repeat
class=
"container-sider-elements-element"
[
task
]="
pieceDetailsService
.
pieceAsTask
()"
*
ngIf=
"pieceDetailsService.pieceIsTask()"
[
scenario
]="
scenario
"
></app-repeat>
<app-interupt
class=
"container-sider-elements-element"
[
task
]="
pieceDetailsService
.
pieceAsTask
()"
*
ngIf=
"pieceDetailsService.pieceIsTask()"
[
scenario
]="
scenario
"
></app-interupt>
<app-characters
class=
"container-sider-elements-element"
[
scenario
]="
scenario
"
[
task
]="
pieceDetailsService
.
pieceAsTask
()"
*
ngIf=
"pieceDetailsService.pieceIsTask()"
></app-characters>
...
...
src/app/sider-pieces/supplementary-task/supplementary-task.component.html
View file @
854a1a9a
...
...
@@ -13,7 +13,7 @@
œ-->
<div
class=
"piece-form-select"
>
<label>
Rôle
</label>
<select
[(
ngModel
)]="
task
.
supplementaryRole
"
>
<select
[(
ngModel
)]="
task
.
supplementaryRole
"
(
change
)="
editTrace
($
event
,'
supplementaryRole
')"
>
<option
selected
[
ngValue
]="
undefined
"
>
Aucun
</option>
<ng-container
*
ngFor=
"let supplementaryRole of role.supplementaryRoles"
>
<option
[
ngValue
]="
supplementaryRole
"
>
{{supplementaryRole.name}}
</option>
...
...
src/app/sider-pieces/supplementary-task/supplementary-task.component.ts
View file @
854a1a9a
...
...
@@ -2,6 +2,9 @@ import { Component, Input, OnInit } from '@angular/core';
import
{
Task
}
from
'src/app/class/task/task'
;
import
{
Role
}
from
'src/app/class/role/role'
;
import
{
TooltipService
}
from
'src/app/services/tooltip/tooltip.service'
;
import
{
Scenario
}
from
'src/app/class/scenario/scenario'
;
import
{
PieceDetailsService
}
from
'src/app/services/piece-details/piece-details.service'
;
import
{
Trace
}
from
'src/app/class/trace/trace'
;
@
Component
({
selector
:
'app-supplementary-task'
,
...
...
@@ -10,11 +13,37 @@ import { TooltipService } from 'src/app/services/tooltip/tooltip.service';
})
export
class
SupplementaryTaskComponent
implements
OnInit
{
@
Input
()
scenario
:
Scenario
=
new
Scenario
();
@
Input
()
task
:
Task
=
new
Task
(
'normal'
);
@
Input
()
role
:
Role
=
new
Role
();
constructor
(
protected
tooltipService
:
TooltipService
)
{
}
constructor
(
protected
tooltipService
:
TooltipService
,
private
pieceDetailsService
:
PieceDetailsService
)
{
}
ngOnInit
():
void
{
}
formatTraceTarget
():
string
{
let
res
:
string
=
''
;
if
(
this
.
pieceDetailsService
.
piece
instanceof
Task
)
{
switch
(
this
.
pieceDetailsService
.
piece
.
type
)
{
case
'normal'
:
res
=
'Task_['
+
this
.
pieceDetailsService
.
pieceIndex
+
']'
;
break
;
case
'annexe'
:
res
=
'Side_task_['
+
this
.
pieceDetailsService
.
pieceIndex
+
']'
;
break
;
case
'final'
:
res
=
'Final_task_['
+
this
.
pieceDetailsService
.
pieceIndex
+
']'
;
break
;
case
'optionnal'
:
res
=
'Opt_task_['
+
this
.
pieceDetailsService
.
pieceIndex
+
']'
;
break
;
case
'event'
:
res
=
'Event_task_['
+
this
.
pieceDetailsService
.
pieceIndex
+
']'
;
break
;
case
'repeat'
:
res
=
'Repeat_task_['
+
this
.
pieceDetailsService
.
pieceIndex
+
']'
;
break
;
}
}
return
res
;
}
editTrace
(
event
:
any
,
source
:
string
):
void
{
if
(
this
.
task
.
supplementaryRole
!=
undefined
)
{
this
.
scenario
.
traces
.
push
(
new
Trace
(
this
.
scenario
.
traces
.
length
,
'Select_secondary_task'
,
this
.
pieceDetailsService
.
missionIndex
,
this
.
pieceDetailsService
.
roleIndex
,
source
,
this
.
formatTraceTarget
(),
'#9AD5EC'
));
}
else
{
this
.
scenario
.
traces
.
push
(
new
Trace
(
this
.
scenario
.
traces
.
length
,
'Deselect_secondary_task'
,
this
.
pieceDetailsService
.
missionIndex
,
this
.
pieceDetailsService
.
roleIndex
,
source
,
this
.
formatTraceTarget
(),
'#9AD5EC'
));
}
}
}
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