RED-7790: Added tooltip and a fix
This commit is contained in:
parent
3356cbe4e0
commit
c7e284e649
@ -6,7 +6,7 @@
|
||||
class="file-attribute"
|
||||
>
|
||||
<div [ngClass]="{ 'workflow-value': mode === 'workflow' }" class="value">
|
||||
<mat-icon *ngIf="!fileAttribute.editable" svgIcon="red:read-only"></mat-icon>
|
||||
<mat-icon *ngIf="!fileAttribute.editable" [matTooltip]="'readonly' | translate" svgIcon="red:read-only"></mat-icon>
|
||||
<div>
|
||||
<b *ngIf="mode === 'workflow' && !isInEditMode"> {{ fileAttribute.label }}: </b>
|
||||
<span
|
||||
|
||||
@ -22,9 +22,10 @@ import { Debounce } from '@iqser/common-ui/lib/utils';
|
||||
import { AsyncPipe, DatePipe, NgClass, NgIf, NgTemplateOutlet } from '@angular/common';
|
||||
import { MatTooltipModule } from '@angular/material/tooltip';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-file-attribute [fileAttribute] [file] [dossier]',
|
||||
selector: 'redaction-file-attribute',
|
||||
templateUrl: './file-attribute.component.html',
|
||||
styleUrls: ['./file-attribute.component.scss'],
|
||||
standalone: true,
|
||||
@ -40,14 +41,15 @@ import { MatIconModule } from '@angular/material/icon';
|
||||
DynamicInputComponent,
|
||||
CircleButtonComponent,
|
||||
NgTemplateOutlet,
|
||||
TranslateModule,
|
||||
],
|
||||
})
|
||||
export class FileAttributeComponent extends BaseFormComponent implements OnDestroy {
|
||||
isInEditMode = false;
|
||||
closedDatepicker = true;
|
||||
@Input() fileAttribute!: IFileAttributeConfig;
|
||||
@Input() file!: File;
|
||||
@Input() dossier!: Dossier;
|
||||
@Input({ required: true }) fileAttribute!: IFileAttributeConfig;
|
||||
@Input({ required: true }) file!: File;
|
||||
@Input({ required: true }) dossier!: Dossier;
|
||||
@Input() fileNameColumn = false;
|
||||
readonlyAttrs: string[] = [];
|
||||
readonly #subscriptions = new Subscription();
|
||||
@ -133,6 +135,7 @@ export class FileAttributeComponent extends BaseFormComponent implements OnDestr
|
||||
if (
|
||||
!this.file.isInitialProcessing &&
|
||||
this.permissionsService.canEditFileAttributes(this.file, this.dossier) &&
|
||||
this.fileAttribute.editable &&
|
||||
!this.isInEditMode
|
||||
) {
|
||||
$event.stopPropagation();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user