2021-03-30 16:47:35 +02:00
|
|
|
<ng-container *ngIf="form">
|
|
|
|
<div *ngFor="let compositeFieldFormGroup of form.get('compositeFields')['controls']; let i = index;" class="col-12">
|
2021-03-29 17:42:55 +02:00
|
|
|
|
2021-03-30 16:47:35 +02:00
|
|
|
<div class="row" *ngIf="this.visibilityRulesService.checkElementVisibility(compositeFieldFormGroup.get('id').value) && this.visibilityRulesService.scanIfChildsOfCompositeFieldHasVisibleItems(compositeFieldFormGroup)">
|
|
|
|
|
|
|
|
<div class="col-12">
|
|
|
|
<div class="row">
|
|
|
|
<app-form-composite-field class="align-self-center col" [form]="compositeFieldFormGroup" [datasetProfileId]="datasetProfileId"
|
|
|
|
[isChild]="false" [showDelete]="(compositeFieldFormGroup.get('multiplicityItems').length) > 0"></app-form-composite-field>
|
|
|
|
</div>
|
2021-03-29 17:42:55 +02:00
|
|
|
</div>
|
2021-03-30 16:47:35 +02:00
|
|
|
|
|
|
|
<div *ngIf="compositeFieldFormGroup" class="col-12">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-12" *ngFor="let multipleCompositeFieldFormGroup of compositeFieldFormGroup.get('multiplicityItems')['controls']; let j = index">
|
|
|
|
<div class="row">
|
|
|
|
<app-form-composite-field class=" align-self-center col" [form]="multipleCompositeFieldFormGroup" [datasetProfileId]="datasetProfileId"
|
|
|
|
[isChild]="true" [showDelete]="true"></app-form-composite-field>
|
|
|
|
</div>
|
2021-03-29 17:42:55 +02:00
|
|
|
</div>
|
2021-03-30 16:47:35 +02:00
|
|
|
<div *ngIf="(compositeFieldFormGroup.get('multiplicity').value.max - 1) > (compositeFieldFormGroup.get('multiplicityItems').length)"
|
|
|
|
class="col-12 ml-0 mr-0 addOneFieldButton">
|
|
|
|
<button mat-icon-button color="primary" (click)="addMultipleField(i)" [disabled]="compositeFieldFormGroup.disabled" matTooltip="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.COMPOSITE-FIELD.FIELDS.MULTIPLICITY-ADD-ONE-FIELD' | translate}}">
|
|
|
|
<mat-icon>add_circle</mat-icon>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<mat-form-field *ngIf="compositeFieldFormGroup.get('hasCommentField').value" class="col-12 mb-2" [formGroup]="compositeFieldFormGroup">
|
|
|
|
<input matInput formControlName="commentFieldValue" placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.COMPOSITE-FIELD.FIELDS.COMMENT-PLACEHOLDER' | translate}}">
|
|
|
|
<mat-hint>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.COMPOSITE-FIELD.FIELDS.COMMENT-HINT' | translate}}</mat-hint>
|
|
|
|
</mat-form-field>
|
|
|
|
<!-- <div class="col"></div>
|
|
|
|
<button class="col-auto" mat-icon-button type="button" (click)="next(compositeField)">
|
|
|
|
<mat-icon>expand_more</mat-icon>
|
|
|
|
</button> -->
|
2021-03-29 17:42:55 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-03-30 16:47:35 +02:00
|
|
|
</ng-container>
|