2022-11-24 20:28:18 +01:00
|
|
|
<div *ngIf="form && this.visibilityRulesService.checkElementVisibility(this.form.get('id').value) && !tableRow" [formGroup]="form" class="dynamic-form-composite-field row">
|
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">
|
2022-11-24 20:28:18 +01:00
|
|
|
<div *ngIf="showTitle" class="col-12">
|
2021-03-09 09:04:50 +01:00
|
|
|
<app-form-composite-title [tocentry]="tocentry" class="row" [form]="form" [isChild]="isChild"></app-form-composite-title>
|
2020-02-03 16:50:18 +01:00
|
|
|
</div>
|
|
|
|
<div class="col-12">
|
|
|
|
<div class="row">
|
|
|
|
<app-form-field class="align-self-center col" [form]="form.get('fields')['controls'][0]"
|
2022-11-24 20:28:18 +01:00
|
|
|
[datasetProfileId]="datasetProfileId" [isChild]="isChild"></app-form-field>
|
|
|
|
<div *ngIf="showDelete" class="col-auto align-self-center">
|
2023-06-16 13:36:24 +02:00
|
|
|
<button mat-icon-button type="button" class="deleteBtn" (click)="deleteCompositeField();" [disabled]="form.get('fields')['controls'][0].disabled">
|
2022-11-24 20:28:18 +01:00
|
|
|
<mat-icon>delete</mat-icon>
|
|
|
|
</button>
|
|
|
|
</div>
|
2020-02-03 16:50:18 +01:00
|
|
|
</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">
|
2022-11-24 20:28:18 +01:00
|
|
|
<div *ngIf="showTitle" class="col-12">
|
2021-03-09 09:04:50 +01:00
|
|
|
<app-form-composite-title [tocentry]="tocentry" class="row" [form]="form" [isChild]="isChild"></app-form-composite-title>
|
2020-02-03 16:50:18 +01:00
|
|
|
</div>
|
|
|
|
<div class="col align-self-center">
|
2020-10-07 12:14:19 +02:00
|
|
|
<div *ngFor="let fieldFormGroup of form.get('fields')['controls']; let i = index;" class="col-12 compositeField">
|
2020-02-03 16:50:18 +01:00
|
|
|
<!-- <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> -->
|
2022-11-24 20:28:18 +01:00
|
|
|
<div class="row">
|
2023-01-10 12:08:56 +01:00
|
|
|
<h5 *ngIf="placeholderTitle && this.visibilityRulesService.checkElementVisibility(this.fieldFormGroup.get('id').value)" class="col-auto font-weight-bold">{{this.fieldFormGroup.get('data').value.label}}</h5>
|
2022-11-24 20:28:18 +01:00
|
|
|
</div>
|
2020-10-07 17:28:53 +02:00
|
|
|
<app-form-field *ngIf="this.visibilityRulesService.checkElementVisibility(this.fieldFormGroup.get('id').value)" [form]="fieldFormGroup" class="col-12 compositeField" [datasetProfileId]="datasetProfileId" [isChild]="true"></app-form-field>
|
2020-02-03 16:50:18 +01:00
|
|
|
<!-- <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">
|
2023-10-05 16:47:00 +02:00
|
|
|
<button mat-icon-button type="button" class="deleteBtn" (click)="deleteCompositeField();" [disabled]="form.disabled">
|
2020-02-03 16:50:18 +01:00
|
|
|
<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>
|
2022-11-24 20:28:18 +01:00
|
|
|
<ng-container *ngIf="form && this.visibilityRulesService.checkElementVisibility(this.form.get('id').value) && tableRow">
|
2023-01-10 12:08:56 +01:00
|
|
|
<ng-container *ngFor="let fieldFormGroup of form.get('fields')['controls'];">
|
|
|
|
<td *ngIf="this.visibilityRulesService.checkElementVisibility(this.fieldFormGroup.get('id').value)" class="text-wrap">{{fieldFormGroup.getRawValue() | fieldValue | translate}}</td>
|
|
|
|
</ng-container>
|
2022-11-24 20:28:18 +01:00
|
|
|
<td class="actions">
|
2023-06-16 13:36:24 +02:00
|
|
|
<button mat-icon-button type="button" class="deleteBtn btn-sm" (click)="editCompositeFieldInDialog()" [disabled]="form.disabled">
|
2022-11-24 20:28:18 +01:00
|
|
|
<mat-icon>edit</mat-icon>
|
|
|
|
</button>
|
2023-06-16 13:36:24 +02:00
|
|
|
<button *ngIf="showDelete" mat-icon-button type="button" class="deleteBtn" (click)="deleteCompositeField();" [disabled]="form.disabled">
|
2022-11-24 20:28:18 +01:00
|
|
|
<mat-icon>delete</mat-icon>
|
|
|
|
</button>
|
|
|
|
</td>
|
|
|
|
</ng-container>
|