From 289b42aaa0a48a66508808ace6a474ab71d06e15 Mon Sep 17 00:00:00 2001 From: Nicoleta Panaghiu Date: Fri, 8 Mar 2024 12:44:41 +0200 Subject: [PATCH 1/3] RED-8217: fixed layout grid toggle. --- .../modules/pdf-viewer/services/viewer-header.service.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/red-ui/src/app/modules/pdf-viewer/services/viewer-header.service.ts b/apps/red-ui/src/app/modules/pdf-viewer/services/viewer-header.service.ts index 1f1b9717e..78b7dee74 100644 --- a/apps/red-ui/src/app/modules/pdf-viewer/services/viewer-header.service.ts +++ b/apps/red-ui/src/app/modules/pdf-viewer/services/viewer-header.service.ts @@ -4,7 +4,7 @@ import { TranslateService } from '@ngx-translate/core'; import { IHeaderElement, RotationTypes } from '@red/domain'; import { FilesMapService } from '@services/files/files-map.service'; import { Roles } from '@users/roles'; -import { fromEvent, merge, Observable, Subject, timer } from 'rxjs'; +import { fromEvent, merge, Observable, Subject } from 'rxjs'; import { filter, map, switchMap, tap } from 'rxjs/operators'; import { HeaderElements, HeaderElementType } from '../../file-preview/utils/constants'; import { ROTATION_ACTION_BUTTONS, ROTATION_BUTTONS, ViewerEvents } from '../utils/constants'; @@ -71,11 +71,14 @@ export class ViewerHeaderService { } get layersUpdated() { - const documentListener$ = timer(1000).pipe(switchMap(() => fromEvent(this._documentViewer.document, 'layersUpdated'))); + const documentListener$ = this._documentViewer.loaded$.pipe( + filter(Boolean), + switchMap(() => fromEvent(this._documentViewer.document, 'layersUpdated')), + ); return documentListener$.pipe( tap(async () => { const layers = await this._documentViewer.document.getLayersArray(); - const layersVisible = layers.every(layer => layer.visible); + const layersVisible = layers.filter(layer => layer.name === 'Layout grid').every(layer => layer.visible); this._layersService.active.set(layersVisible); }), ); From 3856746a7f5010136b28e7dbd36656fa98f089a7 Mon Sep 17 00:00:00 2001 From: Nicoleta Panaghiu Date: Mon, 11 Mar 2024 13:46:50 +0200 Subject: [PATCH 2/3] RED-8679: added more custom ids. --- .../dossier-templates-listing-screen.component.html | 2 ++ .../components/template-stats/template-stats.component.html | 1 + 2 files changed, 3 insertions(+) diff --git a/apps/red-ui/src/app/modules/admin/screens/dossier-templates-listing/dossier-templates-listing-screen/dossier-templates-listing-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/dossier-templates-listing/dossier-templates-listing-screen/dossier-templates-listing-screen.component.html index 11f8a71be..17a7c7542 100644 --- a/apps/red-ui/src/app/modules/admin/screens/dossier-templates-listing/dossier-templates-listing-screen/dossier-templates-listing-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/dossier-templates-listing/dossier-templates-listing-screen/dossier-templates-listing-screen.component.html @@ -14,6 +14,8 @@ [noMatchText]="'dossier-templates-listing.no-match.title' | translate" [selectionEnabled]="true" [tableColumnConfigs]="tableColumnConfigs" + [rowIdPrefix]="'dossier-template'" + [namePropertyKey]="'name'" > diff --git a/apps/red-ui/src/app/modules/dashboard/components/template-stats/template-stats.component.html b/apps/red-ui/src/app/modules/dashboard/components/template-stats/template-stats.component.html index ac1b3498c..ae1e63523 100644 --- a/apps/red-ui/src/app/modules/dashboard/components/template-stats/template-stats.component.html +++ b/apps/red-ui/src/app/modules/dashboard/components/template-stats/template-stats.component.html @@ -75,6 +75,7 @@ [attr.help-mode-key]="'new_dossier'" [label]="'dashboard.empty-template.new-dossier' | translate" [type]="iconButtonTypes.primary" + [buttonId]="(dossierTemplate.name | snakeCase) + '-icon-button'" icon="iqser:plus" > From 8ca9de3c8da4f992fe315929cdb61510915f81e2 Mon Sep 17 00:00:00 2001 From: Nicoleta Panaghiu Date: Mon, 11 Mar 2024 14:20:42 +0200 Subject: [PATCH 3/3] RED-8647: added ellipsis for longer primary attributes values. --- .../file-attribute/file-attribute.component.html | 1 + .../file-attribute/file-attribute.component.scss | 9 +++++++++ .../file-attribute/file-attribute.component.ts | 4 ++++ 3 files changed, 14 insertions(+) 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 8f6faa354..9fb4e8771 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 @@ -11,6 +11,7 @@ {{ fileAttribute.label }}: diff --git a/apps/red-ui/src/app/modules/dossier-overview/components/file-attribute/file-attribute.component.scss b/apps/red-ui/src/app/modules/dossier-overview/components/file-attribute/file-attribute.component.scss index 445e41f21..3fd0b35f7 100644 --- a/apps/red-ui/src/app/modules/dossier-overview/components/file-attribute/file-attribute.component.scss +++ b/apps/red-ui/src/app/modules/dossier-overview/components/file-attribute/file-attribute.component.scss @@ -28,6 +28,15 @@ display: flex; align-items: center; gap: 6px; + width: 90%; + + span { + display: inline-block; + word-break: unset; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } mat-icon { min-width: 12px; diff --git a/apps/red-ui/src/app/modules/dossier-overview/components/file-attribute/file-attribute.component.ts b/apps/red-ui/src/app/modules/dossier-overview/components/file-attribute/file-attribute.component.ts index 20f1034bd..be9b07315 100644 --- a/apps/red-ui/src/app/modules/dossier-overview/components/file-attribute/file-attribute.component.ts +++ b/apps/red-ui/src/app/modules/dossier-overview/components/file-attribute/file-attribute.component.ts @@ -70,6 +70,10 @@ export class FileAttributeComponent extends BaseFormComponent implements OnDestr return this.width ? `${this.width * this.#widthFactor}px` : 'unset'; } + get attributeValueWidth(): string { + return this.width ? `${this.width * 0.9}px` : 'unset'; + } + get isDate(): boolean { return this.fileAttribute.type === FileAttributeConfigTypes.DATE; }