diff --git a/apps/red-ui/src/app/modules/dossier-overview/components/file-attribute/file-attribute.component.html b/apps/red-ui/src/app/modules/dossier-overview/components/file-attribute/file-attribute.component.html index d830632cb..5d8798b78 100644 --- a/apps/red-ui/src/app/modules/dossier-overview/components/file-attribute/file-attribute.component.html +++ b/apps/red-ui/src/app/modules/dossier-overview/components/file-attribute/file-attribute.component.html @@ -1,6 +1,6 @@
@@ -36,6 +30,13 @@ export class FileAttributeComponent extends BaseFormComponent implements OnDestr !this.fileAttributesService.openAttributeEdits().length, ); + isInEditMode = false; + closedDatepicker = true; + + @Input() fileAttribute!: IFileAttributeConfig; + @Input() file!: File; + @Input() dossier!: Dossier; + constructor( router: Router, private readonly _toaster: Toaster, @@ -83,10 +84,8 @@ export class FileAttributeComponent extends BaseFormComponent implements OnDestr } } - handleControlClick($event: MouseEvent) { - if ($event.ctrlKey) { - $event.stopPropagation(); - } + handleClick($event: MouseEvent) { + $event.stopPropagation(); } ngOnDestroy() { @@ -158,7 +157,10 @@ export class FileAttributeComponent extends BaseFormComponent implements OnDestr }); return this._formBuilder.group(config, { validators: control => - !control.get(this.fileAttribute.id)?.value?.trim().length && !this.fileAttributeValue ? { emptyString: true } : null, + (!control.get(this.fileAttribute.id)?.value?.trim().length && !this.fileAttributeValue) || + control.get(this.fileAttribute.id)?.value === this.fileAttributeValue + ? { emptyString: true } + : null, }); } diff --git a/apps/red-ui/src/app/modules/dossier-overview/components/workflow-item/workflow-item.component.html b/apps/red-ui/src/app/modules/dossier-overview/components/workflow-item/workflow-item.component.html index 729718d36..ef0077397 100644 --- a/apps/red-ui/src/app/modules/dossier-overview/components/workflow-item/workflow-item.component.html +++ b/apps/red-ui/src/app/modules/dossier-overview/components/workflow-item/workflow-item.component.html @@ -23,7 +23,7 @@
-
+
diff --git a/apps/red-ui/src/app/modules/dossier-overview/components/workflow-item/workflow-item.component.ts b/apps/red-ui/src/app/modules/dossier-overview/components/workflow-item/workflow-item.component.ts index 08bba6b74..47d74b93c 100644 --- a/apps/red-ui/src/app/modules/dossier-overview/components/workflow-item/workflow-item.component.ts +++ b/apps/red-ui/src/app/modules/dossier-overview/components/workflow-item/workflow-item.component.ts @@ -1,7 +1,7 @@ import { ChangeDetectorRef, Component, ElementRef, Input, OnInit, Optional, ViewChild } from '@angular/core'; import { Dossier, File, IFileAttributeConfig } from '@red/domain'; import { HelpModeService } from '@iqser/common-ui'; -import { Debounce } from '@iqser/common-ui/lib/utils'; +import { Debounce, trackByFactory } from '@iqser/common-ui/lib/utils'; import { FileAttributesService } from '@services/entity-services/file-attributes.service'; @Component({ @@ -10,11 +10,14 @@ import { FileAttributesService } from '@services/entity-services/file-attributes styleUrls: ['./workflow-item.component.scss'], }) export class WorkflowItemComponent implements OnInit { + width: number; + trackBy = trackByFactory(); + @ViewChild('actionsWrapper', { static: true }) private _actionsWrapper: ElementRef; + @Input() file: File; @Input() dossier: Dossier; @Input() displayedAttributes: IFileAttributeConfig[]; - width: number; constructor( readonly fileAttributesService: FileAttributesService,