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