2019-10-15 16:25:43 +02:00
|
|
|
<div *ngIf="form && this.visibilityRulesService.checkElementVisibility(this.form.get('id').value)" [formGroup]="form" class="dynamic-form-composite-field row">
|
2017-12-11 09:10:54 +01:00
|
|
|
|
2020-09-11 11:19:31 +02:00
|
|
|
<!-- <div *ngIf="form.get('fields').value.length === 1 && this.visibilityRulesService.checkElementVisibility(form.get('fields')['controls'][0].get('id').value)" class="col-12"> -->
|
|
|
|
<div *ngIf="form.get('fields').length === 1 && this.visibilityRulesService.checkElementVisibility(form.get('fields')['controls'][0].get('id').value)" class="col-12">
|
2018-11-29 13:26:18 +01:00
|
|
|
<div class="row">
|
2020-02-03 16:50:18 +01:00
|
|
|
<div class="col-12">
|
|
|
|
<app-form-composite-title class="row" [form]="form" [isChild]="isChild"></app-form-composite-title>
|
|
|
|
</div>
|
|
|
|
<div class="col-12">
|
|
|
|
<div class="row">
|
|
|
|
<app-form-field class="align-self-center col" [form]="form.get('fields')['controls'][0]"
|
|
|
|
[datasetProfileId]="datasetProfileId" [isChild]="isChild"></app-form-field>
|
|
|
|
<div *ngIf="showDelete" class="col-auto align-self-center">
|
|
|
|
<button mat-icon-button type="button" class="deleteBtn" (click)="deleteCompositeField();">
|
|
|
|
<mat-icon>delete</mat-icon>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-02-04 14:41:54 +01:00
|
|
|
<!-- <button mat-icon-button type="button" *ngIf="!isChild" class="deleteBtn col-auto" (click)="DeleteField();">
|
|
|
|
<mat-icon>delete</mat-icon>
|
|
|
|
</button> -->
|
|
|
|
|
2018-10-05 17:00:54 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-09-11 11:19:31 +02:00
|
|
|
<!-- <div *ngIf="form.get('fields').value.length > 1" class="col-12"> -->
|
|
|
|
<div *ngIf="form.get('fields').length > 1" class="col-12">
|
2018-11-29 13:26:18 +01:00
|
|
|
<div class="row">
|
2020-02-03 16:50:18 +01:00
|
|
|
<div class="col-12">
|
|
|
|
<app-form-composite-title class="row" [form]="form" [isChild]="isChild"></app-form-composite-title>
|
|
|
|
</div>
|
|
|
|
<div class="col align-self-center">
|
|
|
|
<div *ngFor="let fieldFormGroup of form.get('fields')['controls']; let i = index;" class="col-12 copositeField">
|
|
|
|
<!-- <div class="row">
|
|
|
|
<div class="col-12" *ngIf="(fieldFormGroup.get('multiplicity')?.value?.max - 1) > (fieldFormGroup.get('multiplicityItems')?.length)">
|
|
|
|
<a (click)="addMultipleField(i+1)" style="cursor: pointer">
|
|
|
|
Add one more field +
|
|
|
|
</a>
|
|
|
|
</div> -->
|
|
|
|
<app-form-field [form]="fieldFormGroup" class="col-12 copositeField" [datasetProfileId]="datasetProfileId"
|
|
|
|
[isChild]="true"></app-form-field>
|
|
|
|
<!-- <div *ngIf="fieldFormGroup" class="col-12">
|
|
|
|
<div *ngFor="let multipleField of fieldFormGroup.get('multiplicityItems')['controls']; let j = index" class="row">
|
|
|
|
<app-form-field class="col-12" [form]="multipleField" [datasetProfileId]="datasetProfileId" [isChild]="true"></app-form-field>
|
|
|
|
<button mat-icon-button type="button" *ngIf="isChild" class="deleteBtn col-auto" (click)="DeleteField(i);">
|
|
|
|
<mat-icon>delete</mat-icon>
|
|
|
|
</button>
|
|
|
|
</div>
|
2018-11-29 13:26:18 +01:00
|
|
|
</div>
|
2020-02-03 16:50:18 +01:00
|
|
|
</div>-->
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div *ngIf="showDelete" class="col-auto align-self-center">
|
|
|
|
<button mat-icon-button type="button" class="deleteBtn" (click)="deleteCompositeField();">
|
|
|
|
<mat-icon>delete</mat-icon>
|
|
|
|
</button>
|
2018-10-05 17:00:54 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-03-14 11:20:33 +01:00
|
|
|
</div>
|