RED-9788 - remove active listing entity service
This commit is contained in:
parent
221948411a
commit
b623449efb
@ -1,7 +1,6 @@
|
||||
<div
|
||||
(mousedown)="fileAttributesService.resetEdit()"
|
||||
[class.help-mode-active]="helpModeService?.isHelpModeActive$ | async"
|
||||
[class.active-entity]="activeEntity()"
|
||||
class="workflow-item"
|
||||
>
|
||||
<div class="details-wrapper">
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
}
|
||||
|
||||
&:hover,
|
||||
&.active-entity,
|
||||
&:has(iqser-circle-button[aria-expanded='true']),
|
||||
&.help-mode-active {
|
||||
redaction-file-actions {
|
||||
display: initial;
|
||||
|
||||
@ -12,7 +12,6 @@ import { FileWorkloadComponent } from '../table-item/file-workload/file-workload
|
||||
import { ProcessingIndicatorComponent } from '@shared/components/processing-indicator/processing-indicator.component';
|
||||
import { FileActionsComponent } from '../../../shared-dossiers/components/file-actions/file-actions.component';
|
||||
import { AsyncPipe, NgForOf, NgIf } from '@angular/common';
|
||||
import { ActiveListingEntityService } from '@common-ui/listing/services/active-listing-entity.service';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-workflow-item',
|
||||
@ -39,14 +38,12 @@ export class WorkflowItemComponent implements OnInit {
|
||||
@ViewChild('actionsWrapper', { static: true }) private _actionsWrapper: ElementRef;
|
||||
width: number;
|
||||
readonly trackBy = trackByFactory();
|
||||
readonly activeEntity = computed(() => this._activeListingEntityService.activeEntity() === this.file?.id);
|
||||
@Input({ required: true }) file: File;
|
||||
@Input({ required: true }) dossier: Dossier;
|
||||
@Input({ required: true }) displayedAttributes: IFileAttributeConfig[];
|
||||
|
||||
constructor(
|
||||
readonly fileAttributesService: FileAttributesService,
|
||||
readonly _activeListingEntityService: ActiveListingEntityService,
|
||||
private readonly _changeRef: ChangeDetectorRef,
|
||||
@Optional() readonly helpModeService: HelpModeService,
|
||||
) {}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
@if (dropdownButton()) {
|
||||
<iqser-circle-button
|
||||
(click)="setActiveListingEntity($event)"
|
||||
(click)="$event.stopImmediatePropagation()"
|
||||
[matMenuTriggerFor]="downloadMenu"
|
||||
[tooltipClass]="tooltipClass()"
|
||||
[tooltipPosition]="tooltipPosition()"
|
||||
@ -24,7 +24,7 @@
|
||||
></iqser-circle-button>
|
||||
}
|
||||
|
||||
<mat-menu #downloadMenu="matMenu" (closed)="onDownloadMenuClosed()">
|
||||
<mat-menu #downloadMenu="matMenu">
|
||||
<button (click)="downloadComponentAsJSON($event)" [innerHTML]="'component-download.json' | translate" mat-menu-item></button>
|
||||
<button (click)="downloadComponentAsXML($event)" [innerHTML]="'component-download.xml' | translate" mat-menu-item></button>
|
||||
<button (click)="downloadFiles($event)" [innerHTML]="'component-download.report' | translate" mat-menu-item></button>
|
||||
|
||||
@ -10,7 +10,6 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
import { MatMenu, MatMenuItem, MatMenuTrigger } from '@angular/material/menu';
|
||||
import { firstValueFrom } from 'rxjs';
|
||||
import { ComponentLogService } from '@services/files/component-log.service';
|
||||
import { ActiveListingEntityService } from '@common-ui/listing/services/active-listing-entity.service';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-file-download-btn',
|
||||
@ -40,7 +39,6 @@ export class FileDownloadBtnComponent implements OnChanges {
|
||||
private readonly _permissionsService: PermissionsService,
|
||||
private readonly _fileDownloadService: FileDownloadService,
|
||||
private readonly _componentLogService: ComponentLogService,
|
||||
private readonly _activeListingEntity: ActiveListingEntityService,
|
||||
private readonly _dialog: IqserDialog,
|
||||
private readonly _toaster: Toaster,
|
||||
) {}
|
||||
@ -85,18 +83,6 @@ export class FileDownloadBtnComponent implements OnChanges {
|
||||
.catch(() => this._toaster.error(_('download-status.error')));
|
||||
}
|
||||
|
||||
onDownloadMenuClosed() {
|
||||
this._activeListingEntity.updateEntity();
|
||||
}
|
||||
|
||||
setActiveListingEntity($event: MouseEvent) {
|
||||
$event.stopImmediatePropagation();
|
||||
if (this.dropdownButton()) {
|
||||
const entityId = this.dossierDownload() ? this.dossier().id : this.files()[0].id;
|
||||
this._activeListingEntity.updateEntity(entityId);
|
||||
}
|
||||
}
|
||||
|
||||
downloadComponentAsJSON($event: MouseEvent) {
|
||||
$event.stopImmediatePropagation();
|
||||
this.menuTrigger?.closeMenu();
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit 7f8336a64f3e3bed6e4751be3c0624a98b4aa727
|
||||
Subproject commit 00b1b40a3112dc168046ca3bc261dd8dbbc02538
|
||||
Loading…
x
Reference in New Issue
Block a user