RED-6973: Cleanup
This commit is contained in:
parent
bf83962d05
commit
302b760195
@ -2,7 +2,7 @@ import { Component, computed, effect, HostListener, Input, OnDestroy } from '@an
|
||||
import { Dossier, File, FileAttributeConfigTypes, IFileAttributeConfig } from '@red/domain';
|
||||
import { BaseFormComponent, HelpModeService, ListingService, Toaster } from '@iqser/common-ui';
|
||||
import { PermissionsService } from '@services/permissions.service';
|
||||
import { FormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
||||
import { FormBuilder, UntypedFormGroup } from '@angular/forms';
|
||||
import { FileAttributesService } from '@services/entity-services/file-attributes.service';
|
||||
import { firstValueFrom, Subscription } from 'rxjs';
|
||||
import { FilesService } from '@services/files/files.service';
|
||||
@ -149,11 +149,7 @@ export class FileAttributeComponent extends BaseFormComponent implements OnDestr
|
||||
});
|
||||
return this._formBuilder.group(config, {
|
||||
validators: control =>
|
||||
control.get(this.fileAttribute.id).value &&
|
||||
!control.get(this.fileAttribute.id).value.trim().length &&
|
||||
!this.fileAttributeValue
|
||||
? { emptyString: true }
|
||||
: null,
|
||||
!control.get(this.fileAttribute.id).value?.trim().length && !this.fileAttributeValue ? { emptyString: true } : null,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user