Commit a0319b27 authored by Alexander Philipp Nowosad's avatar Alexander Philipp Nowosad
Browse files

Add show description to example select pattern

parent 363db8cc
Pipeline #139857 passed with stages
in 9 minutes and 16 seconds
......@@ -336,13 +336,26 @@
<div class="col-sm-8">
<select id="pattern" formControlName="pattern" class="form-control">
<ng-container *ngFor="let instance of expertModel.getPatterns()">
<option [ngValue]="instance.id">
<option [ngValue]="instance">
{{ instance.name }}
</option>
</ng-container>
</select>
</div>
</div>
<div
*ngIf="
(selectPatternForm.valid || patternInstance != null) &&
selectedPattern != null &&
selectedPattern.description
"
class="form-group form-row"
>
<label class="col-sm-4 col-form-label">Description</label>
<div class="col-sm-8">
{{ selectedPattern.description }}
</div>
</div>
<div class="form-group form-row">
<div class="col-sm-12">
<button
......
......@@ -183,8 +183,7 @@ export class ExampleComponent implements OnInit {
showPattern(): void {
this.uncheckConformance();
this.clearCompare();
const id = this.selectPatternForm.value.pattern;
this.patternInstance = this.expertModel.getInstance(id);
this.patternInstance = this.selectPatternForm.value.pattern;
this.selectPatternForm.get('pattern').disable();
}
......@@ -208,6 +207,10 @@ export class ExampleComponent implements OnInit {
this.usedPatterns = null;
}
get selectedPattern(): Instance | undefined {
return this.selectPatternForm.value.pattern;
}
private initConformanceOptionsForm(activeId: string): void {
if (activeId === 'stepHints') {
this.conformanceOptionsForm.setValue({
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment