44 lines
2.0 KiB
HTML
44 lines
2.0 KiB
HTML
<div class="panel-group" style="margin-top:10px;">
|
|
<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>
|
|
|
|
<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>
|
|
<app-df-composite-field [compositeField]="compositeField" [path]="path" [pathName]="pathName+'.compositeFields.'+i"></app-df-composite-field>
|
|
<div *ngIf="compositeField">
|
|
<div *ngFor="let multipleCompositeField of compositeField.multiplicityItems; let j = index; trackBy: trackByFn">
|
|
<app-df-composite-field [compositeField]="multipleCompositeField" [pathName]="pathName+'.compositeFields.'+i+'.multiplicityItems.'+j"></app-df-composite-field>
|
|
</div>
|
|
<div *ngIf="compositeField.hasCommentField" [formGroup]="form.get('compositeFields').get(''+i)">
|
|
<mat-form-field>
|
|
<input matInput formControlName="commentFieldValue" placeholder="comment">
|
|
</mat-form-field>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div *ngIf="section?.sections">
|
|
<div *ngFor="let itemsection of section.sections; let j = index;">
|
|
<app-df-section [section]="itemsection" [path]="path+'.'+(j+1)" [pathName]="pathName+'.sections.'+j"></app-df-section>
|
|
</div>
|
|
</div>
|
|
</mat-expansion-panel>
|
|
</mat-accordion>
|
|
</div>
|