Merge branch 'RED-8648' into 'master'
RED-8648: added ellipsis for attribute value in workflow mode. See merge request redactmanager/red-ui!341
This commit is contained in:
commit
1a0793af8b
@ -5,23 +5,22 @@
|
||||
[ngClass]="{ 'workflow-attribute': mode === 'workflow', 'file-name-column': fileNameColumn }"
|
||||
class="file-attribute"
|
||||
>
|
||||
<div [ngClass]="{ 'workflow-value': mode === 'workflow' }" class="value" *ngIf="!isInEditMode || !fileNameColumn">
|
||||
<div [ngClass]="{ 'workflow-value': mode === 'workflow' }" class="value" *ngIf="!isInEditMode || mode === 'workflow'">
|
||||
<mat-icon *ngIf="!fileAttribute.editable" [matTooltip]="'readonly' | translate" svgIcon="red:read-only"></mat-icon>
|
||||
<div>
|
||||
<span
|
||||
*ngIf="!isDate; else date"
|
||||
[style.max-width]="attributeValueWidth"
|
||||
[matTooltip]="fileAttributeValue"
|
||||
[ngClass]="{ hide: isInEditMode, 'clamp-3': mode !== 'workflow' }"
|
||||
>
|
||||
<b *ngIf="mode === 'workflow' && !isInEditMode"> {{ fileAttribute.label }}: </b>
|
||||
<span
|
||||
*ngIf="!isDate; else date"
|
||||
[style.max-width]="attributeValueWidth"
|
||||
[matTooltip]="fileAttributeValue"
|
||||
[ngClass]="{ hide: isInEditMode, 'clamp-3': mode !== 'workflow' }"
|
||||
>
|
||||
{{ fileAttributeValue || '-' }}</span
|
||||
>
|
||||
</div>
|
||||
{{ fileAttributeValue || '-' }}
|
||||
</span>
|
||||
<ng-template #date>
|
||||
<span [ngClass]="{ hide: isInEditMode, 'clamp-3': mode !== 'workflow' }">
|
||||
{{ fileAttributeValue ? (fileAttributeValue | date: 'd MMM yyyy') : '-' }}</span
|
||||
>
|
||||
<b *ngIf="mode === 'workflow' && !isInEditMode"> {{ fileAttribute.label }}: </b>
|
||||
{{ fileAttributeValue ? (fileAttributeValue | date: 'd MMM yyyy') : '-' }}
|
||||
</span>
|
||||
</ng-template>
|
||||
</div>
|
||||
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
|
||||
.workflow-value {
|
||||
display: flex;
|
||||
width: 90%;
|
||||
width: 95%;
|
||||
|
||||
b {
|
||||
text-transform: uppercase;
|
||||
@ -178,6 +178,8 @@
|
||||
}
|
||||
|
||||
.workflow-value {
|
||||
width: 90%;
|
||||
|
||||
b {
|
||||
white-space: nowrap;
|
||||
overflow: unset;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { ChangeDetectionStrategy, Component, computed, effect, HostListener, Input, OnDestroy } from '@angular/core';
|
||||
import { Component, computed, effect, HostListener, Input, OnDestroy } from '@angular/core';
|
||||
import { Dossier, File, FileAttributeConfigTypes, IFileAttributeConfig } from '@red/domain';
|
||||
import {
|
||||
BaseFormComponent,
|
||||
@ -43,7 +43,6 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
NgTemplateOutlet,
|
||||
TranslateModule,
|
||||
],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class FileAttributeComponent extends BaseFormComponent implements OnDestroy {
|
||||
isInEditMode = false;
|
||||
@ -163,9 +162,9 @@ export class FileAttributeComponent extends BaseFormComponent implements OnDestr
|
||||
...value,
|
||||
{ attribute: this.fileAttribute.id, file: this.file.id },
|
||||
]);
|
||||
this.#toggleEdit();
|
||||
this.fileAttributesService.setFileEdit(this.file.fileId);
|
||||
this.fileAttributesService.setOpenAttributeEdit(this.fileAttribute.id);
|
||||
this.#toggleEdit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user