diff --git a/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-attribute/file-attribute.component.html b/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-attribute/file-attribute.component.html index 8e295b8c2..9cd1b42bd 100644 --- a/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-attribute/file-attribute.component.html +++ b/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-attribute/file-attribute.component.html @@ -1,20 +1,28 @@
- {{ fileAttributeValue || '-' }} - - {{ fileAttributeValue ? (fileAttributeValue | date : 'd MMM yyyy') : '-' }} - +
+ {{ fileAttributeValue || '-' }} + + {{ fileAttributeValue ? (fileAttributeValue | date : 'd MMM yyyy') : '-' }} + +
- -
- + +
+
+ +
diff --git a/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-attribute/file-attribute.component.scss b/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-attribute/file-attribute.component.scss index 5d0d3d2a4..2abd763a1 100644 --- a/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-attribute/file-attribute.component.scss +++ b/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-attribute/file-attribute.component.scss @@ -4,29 +4,32 @@ display: flex; align-items: center; - .edit-button { - position: absolute; - height: 100%; - right: 10%; - width: 90%; - background: linear-gradient(to left, var(--iqser-side-nav) 20%, rgba(244, 245, 247, 0) 60%); + .value { + z-index: 1; + } - iqser-circle-button { - position: absolute; - top: 50%; - left: 80%; - transform: translate(-50%, -50%); - } + .edit-icon { + display: none; + } + + .help-mode-button { + background-color: var(--iqser-grey-6); + width: 90%; + height: 50%; + border-radius: 4px; + position: absolute; + margin-left: -10px; } .edit-input { cursor: default; display: flex; - z-index: 1; - border: solid var(--iqser-grey-4); + z-index: 2; + border: solid var(--iqser-grey-6); border-radius: 10px; background: var(--iqser-background); box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.15); + margin-left: -10px; form { margin: 5px; @@ -43,3 +46,34 @@ } } } + +.file-attribute:hover { + .edit-button { + background-color: var(--iqser-grey-6); + width: 100%; + height: 50%; + border-radius: 4px; + position: absolute; + margin-left: -10px; + } + + .edit-icon { + z-index: 1; + background: white; + width: 23px; + height: 23px; + display: flex; + align-items: center; + justify-content: center; + position: absolute; + right: 0; + border-radius: 50%; + margin-top: -8px; + margin-right: -8px; + + mat-icon { + width: 13px; + height: 13px; + } + } +} diff --git a/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-attribute/file-attribute.component.ts b/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-attribute/file-attribute.component.ts index 26b116ae5..982983b49 100644 --- a/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-attribute/file-attribute.component.ts +++ b/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-attribute/file-attribute.component.ts @@ -1,6 +1,6 @@ import { Component, HostListener, Input, OnDestroy, OnInit } from '@angular/core'; import { Dossier, File, FileAttributeConfigTypes, IFileAttributeConfig } from '@red/domain'; -import { BaseFormComponent, ListingService, Toaster } from '@iqser/common-ui'; +import { BaseFormComponent, HelpModeService, ListingService, Toaster } from '@iqser/common-ui'; import { PermissionsService } from '@services/permissions.service'; import { FormBuilder, UntypedFormGroup } from '@angular/forms'; import { FileAttributesService } from '@services/entity-services/file-attributes.service'; @@ -33,6 +33,7 @@ export class FileAttributeComponent extends BaseFormComponent implements OnDestr readonly permissionsService: PermissionsService, private readonly _listingService: ListingService, readonly fileAttributesService: FileAttributesService, + readonly helpModeService: HelpModeService, ) { super(); const sub = router.events.pipe(filter(event => event instanceof NavigationEnd)).subscribe(() => this.close()); @@ -57,7 +58,8 @@ export class FileAttributeComponent extends BaseFormComponent implements OnDestr this.#subscriptions.unsubscribe(); } - async editFileAttribute(): Promise { + async editFileAttribute($event: MouseEvent): Promise { + $event.stopPropagation(); this.#toggleEdit(); }