2018-09-06 14:50:38 +02:00
|
|
|
<div class="panel-group" style="margin-top:10px;">
|
2018-09-18 14:41:24 +02:00
|
|
|
<mat-accordion>
|
|
|
|
<mat-expansion-panel expanded=true>
|
|
|
|
<mat-expansion-panel-header>
|
|
|
|
<mat-panel-title>
|
|
|
|
{{path}} {{section.title}}
|
|
|
|
</mat-panel-title>
|
|
|
|
<mat-panel-description>
|
|
|
|
<h3 *ngIf="section.description">{{section.description}}</h3>
|
|
|
|
<!-- <h4 *ngIf="section.extendedDescription">{{section.extendedDescription}}</h4> -->
|
|
|
|
</mat-panel-description>
|
|
|
|
</mat-expansion-panel-header>
|
2018-01-11 17:14:23 +01:00
|
|
|
|
2018-09-18 14:41:24 +02:00
|
|
|
<div *ngFor="let compositeField of section.compositeFields; let i = index; trackBy: trackByFn">
|
|
|
|
<div *ngIf="isElementVisible(compositeField)">
|
|
|
|
<div *ngIf="(compositeField?.multiplicity?.max - 1) > (compositeField?.multiplicityItems?.length)">
|
|
|
|
<a (click)="addMultipleField(i)" style="cursor: pointer">
|
|
|
|
Add one more fieldset +
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<df-composite-field [compositeField]="compositeField" [path]="path" [pathName]="pathName+'.compositeFields.'+i"></df-composite-field>
|
|
|
|
<div *ngIf="compositeField">
|
|
|
|
<div *ngFor="let multipleCompositeField of compositeField.multiplicityItems; let j = index; trackBy: trackByFn">
|
|
|
|
<df-composite-field [compositeField]="multipleCompositeField" [pathName]="pathName+'.compositeFields.'+i+'.multiplicityItems.'+j"></df-composite-field>
|
2017-12-22 17:37:43 +01:00
|
|
|
</div>
|
2018-09-18 14:41:24 +02:00
|
|
|
<div *ngIf="compositeField.hasCommentField" [formGroup]="form.get('compositeFields').get(''+i)">
|
|
|
|
<mat-form-field>
|
|
|
|
<input matInput formControlName="commentFieldValue" placeholder="comment">
|
|
|
|
</mat-form-field>
|
2017-12-22 17:37:43 +01:00
|
|
|
</div>
|
2018-09-18 14:41:24 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div *ngIf="section?.sections">
|
|
|
|
<div *ngFor="let itemsection of section.sections; let j = index;">
|
|
|
|
<df-section [section]="itemsection" [path]="path+'.'+(j+1)" [pathName]="pathName+'.sections.'+j"></df-section>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</mat-expansion-panel>
|
|
|
|
</mat-accordion>
|
2018-09-06 14:50:38 +02:00
|
|
|
</div>
|