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
670af832
Commit
670af832
authored
Aug 30, 2023
by
Romain DELEAU
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Message in prerequire antecedent when there are no possible antecedents
parent
b2e39105
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
115 additions
and
30 deletions
+115
-30
annexe-task.component.html
src/app/pieces/tasks/annexe-task/annexe-task.component.html
+10
-6
annexe-task.component.ts
src/app/pieces/tasks/annexe-task/annexe-task.component.ts
+13
-0
final-task.component.html
src/app/pieces/tasks/final-task/final-task.component.html
+10
-6
final-task.component.ts
src/app/pieces/tasks/final-task/final-task.component.ts
+13
-0
optionnal-task.component.html
...pieces/tasks/optionnal-task/optionnal-task.component.html
+10
-6
optionnal-task.component.ts
...p/pieces/tasks/optionnal-task/optionnal-task.component.ts
+13
-0
random-event.component.html
...app/pieces/tasks/random-event/random-event.component.html
+10
-6
random-event.component.ts
src/app/pieces/tasks/random-event/random-event.component.ts
+13
-0
task.component.html
src/app/pieces/tasks/task/task.component.html
+10
-6
task.component.ts
src/app/pieces/tasks/task/task.component.ts
+13
-0
No files found.
src/app/pieces/tasks/annexe-task/annexe-task.component.html
View file @
670af832
...
...
@@ -55,14 +55,18 @@
<div
class=
"piece-prerequires-prerequires"
>
<label
class=
"piece-prerequires-title"
>
Antécédents
</label>
<div
class=
"piece-prerequires-form"
>
<ng-container
*
ngFor=
"let inlineTask of role.tasks"
>
<ng-container
*
ngFor=
"let element of inlineTask; let index = index"
>
<div
class=
"piece-prerequires-prerequires-element"
*
ngIf=
"element?.identifier && (task.identifier != element?.identifier) && index < j"
>
<input
name=
"antecedent"
type=
"checkbox"
[
checked
]="
isCheckedTask
(
element
)"
(
change
)="
checkboxChangedTask
($
event
,
element
)"
/>
<label
for=
"antecedent"
>
{{element?.identifier}}
</label>
</div>
<div
style=
"text-align: center;"
*
ngIf=
"j == 0"
>
La première tâche de la ligne ne peut pas avoir d'antécédent
</div>
<ng-container
*
ngIf=
"hasPossibleAntecedents()"
>
<ng-container
*
ngFor=
"let inlineTask of role.tasks"
>
<ng-container
*
ngFor=
"let element of inlineTask; let index = index"
>
<div
class=
"piece-prerequires-prerequires-element"
*
ngIf=
"element?.identifier && (task.identifier != element?.identifier) && index < j"
>
<input
name=
"antecedent"
type=
"checkbox"
[
checked
]="
isCheckedTask
(
element
)"
(
change
)="
checkboxChangedTask
($
event
,
element
)"
/>
<label
for=
"antecedent"
>
{{element?.identifier}}
</label>
</div>
</ng-container>
</ng-container>
</ng-container>
<div
style=
"text-align: center;"
*
ngIf=
"!hasPossibleAntecedents() && j != 0"
>
Veuillez d'abords entrer des identifiants aux tâches précédentes
</div>
</div>
</div>
<div
class=
"piece-prerequires-ressources"
>
...
...
src/app/pieces/tasks/annexe-task/annexe-task.component.ts
View file @
670af832
...
...
@@ -33,6 +33,7 @@ export class AnnexeTaskComponent implements OnInit {
@
Input
()
j
!
:
number
;
urlIcon
:
string
=
'url("../../../../assets/background-images/annexe.png")'
;
antecedent
:
boolean
=
false
;
constructor
(
protected
pieceDetailsService
:
PieceDetailsService
,
protected
tooltipService
:
TooltipService
,
public
dialog
:
MatDialog
)
{
}
...
...
@@ -287,4 +288,16 @@ export class AnnexeTaskComponent implements OnInit {
let
i
:
number
=
this
.
task
.
prerequireRessources
.
findIndex
(
element
=>
ressource
==
element
.
ressource
);
return
this
.
task
.
prerequireRessources
[
i
];
}
hasPossibleAntecedents
():
boolean
{
let
res
=
false
;
this
.
role
.
tasks
.
forEach
(
inlineTask
=>
{
for
(
let
i
=
0
;
i
<
this
.
j
;
i
++
)
{
if
(
inlineTask
[
i
]?.
identifier
&&
(
this
.
task
.
identifier
!=
inlineTask
[
i
]?.
identifier
))
{
res
=
true
;
}
}
});
return
res
;
}
}
src/app/pieces/tasks/final-task/final-task.component.html
View file @
670af832
...
...
@@ -83,14 +83,18 @@
<div
class=
"piece-prerequires-prerequires"
>
<label
class=
"piece-prerequires-title"
>
Antécédents
</label>
<div
class=
"piece-prerequires-form"
>
<ng-container
*
ngFor=
"let inlineTask of role.tasks"
>
<ng-container
*
ngFor=
"let element of inlineTask; let index = index"
>
<div
class=
"piece-prerequires-prerequires-element"
*
ngIf=
"element?.identifier && (task.identifier != element?.identifier) && index < j"
>
<input
name=
"antecedent"
type=
"checkbox"
[
checked
]="
isCheckedTask
(
element
)"
(
change
)="
checkboxChangedTask
($
event
,
element
)"
/>
<label
for=
"antecedent"
>
{{element?.identifier}}
</label>
</div>
<div
style=
"text-align: center;"
*
ngIf=
"j == 0"
>
La première tâche de la ligne ne peut pas avoir d'antécédent
</div>
<ng-container
*
ngIf=
"hasPossibleAntecedents()"
>
<ng-container
*
ngFor=
"let inlineTask of role.tasks"
>
<ng-container
*
ngFor=
"let element of inlineTask; let index = index"
>
<div
class=
"piece-prerequires-prerequires-element"
*
ngIf=
"element?.identifier && (task.identifier != element?.identifier) && index < j"
>
<input
name=
"antecedent"
type=
"checkbox"
[
checked
]="
isCheckedTask
(
element
)"
(
change
)="
checkboxChangedTask
($
event
,
element
)"
/>
<label
for=
"antecedent"
>
{{element?.identifier}}
</label>
</div>
</ng-container>
</ng-container>
</ng-container>
<div
style=
"text-align: center;"
*
ngIf=
"!hasPossibleAntecedents() && j != 0"
>
Veuillez d'abords entrer des identifiants aux tâches précédentes
</div>
</div>
</div>
<div
class=
"piece-prerequires-ressources"
>
...
...
src/app/pieces/tasks/final-task/final-task.component.ts
View file @
670af832
...
...
@@ -33,6 +33,7 @@ export class FinalTaskComponent implements OnInit {
@
Input
()
j
!
:
number
;
urlIcon
:
string
=
'url("../../../../assets/background-images/final.png")'
;
antecedent
:
boolean
=
false
;
constructor
(
protected
pieceDetailsService
:
PieceDetailsService
,
protected
tooltipService
:
TooltipService
,
public
dialog
:
MatDialog
)
{
}
...
...
@@ -289,4 +290,16 @@ export class FinalTaskComponent implements OnInit {
let
i
:
number
=
this
.
task
.
prerequireRessources
.
findIndex
(
element
=>
ressource
==
element
.
ressource
);
return
this
.
task
.
prerequireRessources
[
i
];
}
hasPossibleAntecedents
():
boolean
{
let
res
=
false
;
this
.
role
.
tasks
.
forEach
(
inlineTask
=>
{
for
(
let
i
=
0
;
i
<
this
.
j
;
i
++
)
{
if
(
inlineTask
[
i
]?.
identifier
&&
(
this
.
task
.
identifier
!=
inlineTask
[
i
]?.
identifier
))
{
res
=
true
;
}
}
});
return
res
;
}
}
src/app/pieces/tasks/optionnal-task/optionnal-task.component.html
View file @
670af832
...
...
@@ -84,14 +84,18 @@
<div
class=
"piece-prerequires-prerequires"
>
<label
class=
"piece-prerequires-title"
>
Antécédents
</label>
<div
class=
"piece-prerequires-form"
>
<ng-container
*
ngFor=
"let inlineTask of role.tasks"
>
<ng-container
*
ngFor=
"let element of inlineTask; let index = index"
>
<div
class=
"piece-prerequires-prerequires-element"
*
ngIf=
"element?.identifier && (task.identifier != element?.identifier) && index < j"
>
<input
name=
"antecedent"
type=
"checkbox"
[
checked
]="
isCheckedTask
(
element
)"
(
change
)="
checkboxChangedTask
($
event
,
element
)"
/>
<label
for=
"antecedent"
>
{{element?.identifier}}
</label>
</div>
<div
style=
"text-align: center;"
*
ngIf=
"j == 0"
>
La première tâche de la ligne ne peut pas avoir d'antécédent
</div>
<ng-container
*
ngIf=
"hasPossibleAntecedents()"
>
<ng-container
*
ngFor=
"let inlineTask of role.tasks"
>
<ng-container
*
ngFor=
"let element of inlineTask; let index = index"
>
<div
class=
"piece-prerequires-prerequires-element"
*
ngIf=
"element?.identifier && (task.identifier != element?.identifier) && index < j"
>
<input
name=
"antecedent"
type=
"checkbox"
[
checked
]="
isCheckedTask
(
element
)"
(
change
)="
checkboxChangedTask
($
event
,
element
)"
/>
<label
for=
"antecedent"
>
{{element?.identifier}}
</label>
</div>
</ng-container>
</ng-container>
</ng-container>
<div
style=
"text-align: center;"
*
ngIf=
"!hasPossibleAntecedents() && j != 0"
>
Veuillez d'abords entrer des identifiants aux tâches précédentes
</div>
</div>
</div>
<div
class=
"piece-prerequires-ressources"
>
...
...
src/app/pieces/tasks/optionnal-task/optionnal-task.component.ts
View file @
670af832
...
...
@@ -33,6 +33,7 @@ export class OptionnalTaskComponent implements OnInit {
@
Input
()
j
!
:
number
;
urlIcon
:
string
=
'url("../../../../assets/background-images/optionnal.png")'
;
antecedent
:
boolean
=
false
;
constructor
(
protected
pieceDetailsService
:
PieceDetailsService
,
protected
tooltipService
:
TooltipService
,
public
dialog
:
MatDialog
)
{
}
...
...
@@ -306,4 +307,16 @@ export class OptionnalTaskComponent implements OnInit {
let
i
:
number
=
this
.
task
.
prerequireRessources
.
findIndex
(
element
=>
ressource
==
element
.
ressource
);
return
this
.
task
.
prerequireRessources
[
i
];
}
hasPossibleAntecedents
():
boolean
{
let
res
=
false
;
this
.
role
.
tasks
.
forEach
(
inlineTask
=>
{
for
(
let
i
=
0
;
i
<
this
.
j
;
i
++
)
{
if
(
inlineTask
[
i
]?.
identifier
&&
(
this
.
task
.
identifier
!=
inlineTask
[
i
]?.
identifier
))
{
res
=
true
;
}
}
});
return
res
;
}
}
src/app/pieces/tasks/random-event/random-event.component.html
View file @
670af832
...
...
@@ -72,14 +72,18 @@
<div
class=
"piece-prerequires-prerequires"
>
<label
class=
"piece-prerequires-title"
>
Antécédents
</label>
<div
class=
"piece-prerequires-form"
>
<ng-container
*
ngFor=
"let inlineTask of role.tasks"
>
<ng-container
*
ngFor=
"let element of inlineTask; let index = index"
>
<div
class=
"piece-prerequires-prerequires-element"
*
ngIf=
"element?.identifier && (task.identifier != element?.identifier) && index < j"
>
<input
name=
"antecedent"
type=
"checkbox"
[
checked
]="
isCheckedTask
(
element
)"
(
change
)="
checkboxChangedTask
($
event
,
element
)"
/>
<label
for=
"antecedent"
>
{{element?.identifier}}
</label>
</div>
<div
style=
"text-align: center;"
*
ngIf=
"j == 0"
>
La première tâche de la ligne ne peut pas avoir d'antécédent
</div>
<ng-container
*
ngIf=
"hasPossibleAntecedents()"
>
<ng-container
*
ngFor=
"let inlineTask of role.tasks"
>
<ng-container
*
ngFor=
"let element of inlineTask; let index = index"
>
<div
class=
"piece-prerequires-prerequires-element"
*
ngIf=
"element?.identifier && (task.identifier != element?.identifier) && index < j"
>
<input
name=
"antecedent"
type=
"checkbox"
[
checked
]="
isCheckedTask
(
element
)"
(
change
)="
checkboxChangedTask
($
event
,
element
)"
/>
<label
for=
"antecedent"
>
{{element?.identifier}}
</label>
</div>
</ng-container>
</ng-container>
</ng-container>
<div
style=
"text-align: center;"
*
ngIf=
"!hasPossibleAntecedents() && j != 0"
>
Veuillez d'abords entrer des identifiants aux tâches précédentes
</div>
</div>
</div>
<div
class=
"piece-prerequires-ressources"
>
...
...
src/app/pieces/tasks/random-event/random-event.component.ts
View file @
670af832
...
...
@@ -33,6 +33,7 @@ export class RandomEventComponent implements OnInit {
@
Input
()
j
!
:
number
;
urlIcon
:
string
=
'url("../../../../assets/background-images/event.png")'
;
antecedent
:
boolean
=
false
;
constructor
(
protected
pieceDetailsService
:
PieceDetailsService
,
protected
tooltipService
:
TooltipService
,
public
dialog
:
MatDialog
)
{
}
...
...
@@ -284,4 +285,16 @@ export class RandomEventComponent implements OnInit {
let
i
:
number
=
this
.
task
.
prerequireRessources
.
findIndex
(
element
=>
ressource
==
element
.
ressource
);
return
this
.
task
.
prerequireRessources
[
i
];
}
hasPossibleAntecedents
():
boolean
{
let
res
=
false
;
this
.
role
.
tasks
.
forEach
(
inlineTask
=>
{
for
(
let
i
=
0
;
i
<
this
.
j
;
i
++
)
{
if
(
inlineTask
[
i
]?.
identifier
&&
(
this
.
task
.
identifier
!=
inlineTask
[
i
]?.
identifier
))
{
res
=
true
;
}
}
});
return
res
;
}
}
src/app/pieces/tasks/task/task.component.html
View file @
670af832
...
...
@@ -82,14 +82,18 @@
<div
class=
"piece-prerequires-prerequires"
>
<label
class=
"piece-prerequires-title"
>
Antécédents
</label>
<div
class=
"piece-prerequires-form"
>
<ng-container
*
ngFor=
"let inlineTask of role.tasks"
>
<ng-container
*
ngFor=
"let element of inlineTask; let index = index"
>
<div
class=
"piece-prerequires-prerequires-element"
*
ngIf=
"element?.identifier && (task.identifier != element?.identifier) && index < j"
>
<input
name=
"antecedent"
type=
"checkbox"
[
checked
]="
isCheckedTask
(
element
)"
(
change
)="
checkboxChangedTask
($
event
,
element
)"
/>
<label
for=
"antecedent"
>
{{element?.identifier}}
</label>
</div>
<div
style=
"text-align: center;"
*
ngIf=
"j == 0"
>
La première tâche de la ligne ne peut pas avoir d'antécédent
</div>
<ng-container
*
ngIf=
"hasPossibleAntecedents()"
>
<ng-container
*
ngFor=
"let inlineTask of role.tasks"
>
<ng-container
*
ngFor=
"let element of inlineTask; let index = index"
>
<div
class=
"piece-prerequires-prerequires-element"
*
ngIf=
"element?.identifier && (task.identifier != element?.identifier) && index < j"
>
<input
name=
"antecedent"
type=
"checkbox"
[
checked
]="
isCheckedTask
(
element
)"
(
change
)="
checkboxChangedTask
($
event
,
element
)"
/>
<label
for=
"antecedent"
>
{{element?.identifier}}
</label>
</div>
</ng-container>
</ng-container>
</ng-container>
<div
style=
"text-align: center;"
*
ngIf=
"!hasPossibleAntecedents() && j != 0"
>
Veuillez d'abords entrer des identifiants aux tâches précédentes
</div>
</div>
</div>
<div
class=
"piece-prerequires-ressources"
>
...
...
src/app/pieces/tasks/task/task.component.ts
View file @
670af832
...
...
@@ -33,6 +33,7 @@ export class TaskComponent implements OnInit {
@
Input
()
j
!
:
number
;
urlIcon
:
string
=
'url("../../../../assets/background-images/tache.png")'
;
antecedent
:
boolean
=
false
;
constructor
(
protected
pieceDetailsService
:
PieceDetailsService
,
protected
tooltipService
:
TooltipService
,
public
dialog
:
MatDialog
)
{
}
...
...
@@ -317,4 +318,16 @@ export class TaskComponent implements OnInit {
let
i
:
number
=
this
.
task
.
prerequireRessources
.
findIndex
(
element
=>
ressource
==
element
.
ressource
);
return
this
.
task
.
prerequireRessources
[
i
];
}
hasPossibleAntecedents
():
boolean
{
let
res
=
false
;
this
.
role
.
tasks
.
forEach
(
inlineTask
=>
{
for
(
let
i
=
0
;
i
<
this
.
j
;
i
++
)
{
if
(
inlineTask
[
i
]?.
identifier
&&
(
this
.
task
.
identifier
!=
inlineTask
[
i
]?.
identifier
))
{
res
=
true
;
}
}
});
return
res
;
}
}
\ No newline at end of file
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