RED-7754: Fixed navigation after closing edit.

This commit is contained in:
Nicoleta Panaghiu 2023-10-13 13:16:56 +03:00
parent cb843ece0f
commit d4160074e5

View File

@ -123,7 +123,11 @@ export class FileAttributeComponent extends BaseFormComponent implements OnDestr
}
async editFileAttribute($event: MouseEvent): Promise<void> {
if (!this.file.isInitialProcessing && this.permissionsService.canEditFileAttributes(this.file, this.dossier)) {
if (
!this.file.isInitialProcessing &&
this.permissionsService.canEditFileAttributes(this.file, this.dossier) &&
!this.isInEditMode
) {
$event.stopPropagation();
this.fileAttributesService.openAttributeEdits.mutate(value =>
value.push({ attribute: this.fileAttribute.id, file: this.file.id }),