74 lines
3.9 KiB
HTML
74 lines
3.9 KiB
HTML
<div *ngIf="form && this.visibilityRulesService.checkElementVisibility(this.form.get('id').value) && !tableRow" [formGroup]="form" class="dynamic-form-composite-field row">
|
|
<!-- <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">
|
|
<div class="row">
|
|
<div *ngIf="showTitle" class="col-12">
|
|
<app-form-composite-title [tocentry]="tocentry" 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>
|
|
<!-- <button mat-icon-button type="button" *ngIf="!isChild" class="deleteBtn col-auto" (click)="DeleteField();">
|
|
<mat-icon>delete</mat-icon>
|
|
</button> -->
|
|
|
|
</div>
|
|
</div>
|
|
<!-- <div *ngIf="form.get('fields').value.length > 1" class="col-12"> -->
|
|
<div *ngIf="form.get('fields').length > 1" class="col-12">
|
|
<div class="row">
|
|
<div *ngIf="showTitle" class="col-12">
|
|
<app-form-composite-title [tocentry]="tocentry" 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 compositeField">
|
|
<!-- <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> -->
|
|
<div class="row">
|
|
<h5 *ngIf="placeholderTitle" class="col-auto font-weight-bold">{{this.fieldFormGroup.get('data').value.label}}</h5>
|
|
</div>
|
|
<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>
|
|
<!-- <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>
|
|
</div>
|
|
</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>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<ng-container *ngIf="form && this.visibilityRulesService.checkElementVisibility(this.form.get('id').value) && tableRow">
|
|
<td *ngFor="let fieldFormGroup of form.get('fields')['controls'];" class="text-truncate"
|
|
[matTooltip]="fieldFormGroup.getRawValue() | fieldValue | translate">{{fieldFormGroup.getRawValue() | fieldValue | translate}}</td>
|
|
<td class="actions">
|
|
<button mat-icon-button type="button" class="deleteBtn btn-sm" (click)="editCompositeFieldInDialog()">
|
|
<mat-icon>edit</mat-icon>
|
|
</button>
|
|
<button *ngIf="showDelete" mat-icon-button type="button" class="deleteBtn" (click)="deleteCompositeField();">
|
|
<mat-icon>delete</mat-icon>
|
|
</button>
|
|
</td>
|
|
</ng-container>
|