Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sebastian Gottschalk
bmdl-expert-modeler
Commits
9214e717
Commit
9214e717
authored
Nov 22, 2021
by
Alexander Philipp Nowosad
Browse files
Add calculate step selection directly on form
parent
74ba04e4
Pipeline
#139865
passed with stages
in 8 minutes
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/app/development-processes/development-method-artifact-mapping/development-method-artifact-mapping.component.html
View file @
9214e717
...
...
@@ -12,7 +12,8 @@
<select
id=
"inputStep"
class=
"form-control"
formControlName=
"step"
>
<ng-container
*ngFor=
"
let step of developmentMethod.executionSteps;
let step of executionStepsFormValue ??
developmentMethod.executionSteps;
let index = index
"
>
...
...
src/app/development-processes/development-method-artifact-mapping/development-method-artifact-mapping.component.ts
View file @
9214e717
...
...
@@ -11,9 +11,10 @@ import {
import
{
FormControl
,
FormGroup
,
FormGroupDirective
}
from
'
@angular/forms
'
;
import
{
Subscription
}
from
'
rxjs
'
;
import
{
tap
}
from
'
rxjs/operators
'
;
import
{
ModuleService
}
from
'
../../development-process-registry/module-api/module.service
'
;
import
{
ArtifactMappingFormService
}
from
'
../shared/artifact-mapping-form.service
'
;
import
{
DevelopmentMethod
}
from
'
../../development-process-registry/development-method/development-method
'
;
import
{
ExecutionStepsFormValue
}
from
'
../shared/execution-steps-form.service
'
;
import
{
ModuleService
}
from
'
../../development-process-registry/module-api/module.service
'
;
@
Component
({
selector
:
'
app-development-method-artifact-mapping
'
,
...
...
@@ -23,6 +24,7 @@ import { DevelopmentMethod } from '../../development-process-registry/developmen
export
class
DevelopmentMethodArtifactMappingComponent
implements
OnInit
,
OnChanges
,
OnDestroy
{
@
Input
()
executionStepsFormValue
?:
ExecutionStepsFormValue
[];
@
Input
()
developmentMethod
:
DevelopmentMethod
;
@
Input
()
metaModel
:
{
name
:
string
;
metaModelType
:
any
};
@
Input
()
stepNumber
:
number
=
null
;
...
...
@@ -57,6 +59,12 @@ export class DevelopmentMethodArtifactMappingComponent
ngOnChanges
(
changes
:
SimpleChanges
):
void
{
if
(
changes
.
developmentMethod
)
{
this
.
updateSubscriptions
();
}
else
if
(
changes
.
executionStepsFormValue
&&
!
this
.
outputControl
.
value
&&
this
.
stepControl
.
value
!=
null
)
{
this
.
updateStepArtifacts
(
this
.
stepControl
.
value
);
}
}
...
...
@@ -112,11 +120,18 @@ export class DevelopmentMethodArtifactMappingComponent
}
updateStepArtifacts
(
stepNumber
:
number
):
void
{
const
step
=
this
.
developmentMethod
.
executionSteps
[
stepNumber
];
this
.
artifacts
=
this
.
moduleService
.
getModuleMethod
(
step
.
module
,
step
.
method
).
input
;
if
(
this
.
executionStepsFormValue
!=
null
)
{
const
method
=
this
.
executionStepsFormValue
[
stepNumber
].
method
;
if
(
method
!=
null
)
{
this
.
artifacts
=
method
.
input
;
}
}
else
{
const
step
=
this
.
developmentMethod
.
executionSteps
[
stepNumber
];
this
.
artifacts
=
this
.
moduleService
.
getModuleMethod
(
step
.
module
,
step
.
method
).
input
;
}
}
get
formGroup
():
FormGroup
{
...
...
src/app/development-processes/development-method-artifact-mappings/development-method-artifact-mappings.component.html
View file @
9214e717
...
...
@@ -3,6 +3,7 @@
[formGroup]=
"$any(control)"
>
<app-development-method-artifact-mapping
[executionStepsFormValue]=
"executionStepsFormValue"
[developmentMethod]=
"developmentMethod"
[metaModel]=
"metaModel"
[stepNumber]=
"stepNumber"
...
...
src/app/development-processes/development-method-artifact-mappings/development-method-artifact-mappings.component.ts
View file @
9214e717
...
...
@@ -2,6 +2,7 @@ import { Component, Input } from '@angular/core';
import
{
DevelopmentMethod
}
from
'
../../development-process-registry/development-method/development-method
'
;
import
{
FormArray
,
FormArrayName
}
from
'
@angular/forms
'
;
import
{
ArtifactMappingFormService
}
from
'
../shared/artifact-mapping-form.service
'
;
import
{
ExecutionStepsFormValue
}
from
'
../shared/execution-steps-form.service
'
;
@
Component
({
selector
:
'
app-development-method-artifact-mappings
'
,
...
...
@@ -9,6 +10,7 @@ import { ArtifactMappingFormService } from '../shared/artifact-mapping-form.serv
styleUrls
:
[
'
./development-method-artifact-mappings.component.css
'
],
})
export
class
DevelopmentMethodArtifactMappingsComponent
{
@
Input
()
executionStepsFormValue
?:
ExecutionStepsFormValue
[];
@
Input
()
developmentMethod
:
DevelopmentMethod
;
@
Input
()
metaModel
:
{
name
:
string
;
metaModelType
:
any
};
@
Input
()
stepNumber
:
number
=
null
;
...
...
src/app/development-processes/development-method-select-execution-step/development-method-select-execution-step.component.html
View file @
9214e717
...
...
@@ -78,6 +78,7 @@
>
<b>
{{ output.name }}
</b>
<app-development-method-artifact-mappings
[executionStepsFormValue]=
"executionStepsFormValue"
[developmentMethod]=
"developmentMethod"
formArrayName=
"{{ index }}"
[metaModel]=
"output"
...
...
src/app/development-processes/development-method-select-execution-step/development-method-select-execution-step.component.ts
View file @
9214e717
...
...
@@ -26,7 +26,10 @@ import { DevelopmentMethod } from '../../development-process-registry/developmen
import
{
ConfigurationFormPlaceholderDirective
}
from
'
../configuration-form-placeholder.directive
'
;
import
{
ModuleMethod
}
from
'
../../development-process-registry/module-api/module-method
'
;
import
{
ConfigurationFormComponent
}
from
'
../../development-process-registry/module-api/configuration-form-component
'
;
import
{
ExecutionStepsFormService
}
from
'
../shared/execution-steps-form.service
'
;
import
{
ExecutionStepsFormService
,
ExecutionStepsFormValue
,
}
from
'
../shared/execution-steps-form.service
'
;
@
Component
({
selector
:
'
app-development-method-select-execution-step
'
,
...
...
@@ -36,6 +39,7 @@ import { ExecutionStepsFormService } from '../shared/execution-steps-form.servic
export
class
DevelopmentMethodSelectExecutionStepComponent
implements
OnInit
,
OnChanges
,
OnDestroy
{
@
Input
()
executionStepsFormValue
?:
ExecutionStepsFormValue
[];
@
Input
()
developmentMethod
:
DevelopmentMethod
;
@
Input
()
stepNumber
:
number
;
...
...
src/app/development-processes/development-method-select-execution-steps/development-method-select-execution-steps.component.html
View file @
9214e717
...
...
@@ -6,6 +6,7 @@
>
<h5>
Step #{{ index + 1 }}
</h5>
<app-development-method-select-execution-step
[executionStepsFormValue]=
"formArray.value"
[formGroup]=
"$any(control)"
[developmentMethod]=
"developmentMethod"
[stepNumber]=
"index"
...
...
Write
Preview
Supports
Markdown
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