styling fixes on reference component

This commit is contained in:
Sofia Papacharalampous 2024-04-29 15:18:11 +03:00
parent a0e5c3931f
commit 204d593363
1 changed files with 5 additions and 7 deletions

View File

@ -10,17 +10,15 @@
</div>
<div mat-dialog-content class="row">
<div *ngFor="let field of systemFields;">
<div class="col">
<div class="col-12">
<mat-form-field class="w-100">
<mat-label>{{field}}</mat-label>
<input matInput type="text" [name]="field" [formControl]="formGroup.get(field)">
<i matSuffix class="fa fa-spinner fa-spin" *ngIf="field == systemFields[0] && formGroup.get(field).pending && !referenceExists"></i>
<mat-icon *ngIf="field == systemFields[0] && !formGroup.get(field).pending && formGroup.get(field).dirty && formGroup.get(field).valid && !referenceExists" class="text-success" matSuffix>check</mat-icon>
<mat-icon *ngIf="field == systemFields[0] && !formGroup.get(field).pending && formGroup.get(field).dirty && formGroup.get(field).invalid || referenceExists" class="text-danger" matSuffix>clear</mat-icon>
<small *ngIf="field == systemFields[0] && referenceExists" class="text-danger">{{'REFERENCE-FIELD.REFERENCE-DIALOG-EDITOR.IDENTIFIER-EXISTS' | translate}}</small>
<mat-error *ngIf="formGroup.get(field).hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
<ng-container *ngIf="field == systemFields[0]">
<i matSuffix class="fa fa-spinner fa-spin" *ngIf="formGroup.get(field).pending && !referenceExists"></i>
<mat-icon *ngIf="!formGroup.get(field).pending && formGroup.get(field).dirty && formGroup.get(field).valid && !referenceExists" class="text-success" matSuffix>check</mat-icon>
<mat-icon *ngIf="!formGroup.get(field).pending && formGroup.get(field).dirty && formGroup.get(field).invalid || referenceExists" class="text-danger" matSuffix>clear</mat-icon>
<small *ngIf="referenceExists" class="text-danger">{{'REFERENCE-FIELD.REFERENCE-DIALOG-EDITOR.IDENTIFIER-EXISTS' | translate}}</small>
</ng-container>
</mat-form-field>
</div>
</div>