From 7cb8fc58542c732cfa26832c3e6913a1c2a89056 Mon Sep 17 00:00:00 2001 From: Dan Percic Date: Sat, 2 Oct 2021 00:32:59 +0300 Subject: [PATCH] fix some rebase errors --- ...dossier-overview-bulk-actions.component.ts | 25 ++++++------------- .../dossier-details-stats.component.html | 4 +-- .../dossier-details-stats.component.ts | 19 +++++++------- .../dossier-details.component.ts | 2 +- .../table-item/table-item.component.ts | 2 -- .../dossier-overview/config.service.ts | 6 +++-- .../dossier-overview-screen.component.ts | 18 +++++++------ .../dossiers-listing-details.component.ts | 2 +- .../table-item/table-item.component.ts | 4 +-- .../dossiers-listing-screen.component.ts | 21 ++++++++-------- .../file-actions/file-actions.component.ts | 4 ++- .../shared/services/file-action.service.ts | 18 +++++++------ .../type-filter/type-filter.component.ts | 2 +- 13 files changed, 62 insertions(+), 65 deletions(-) diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/bulk-actions/dossier-overview-bulk-actions.component.ts b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/bulk-actions/dossier-overview-bulk-actions.component.ts index 8f2b6f6eb..aeeb3d51c 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/bulk-actions/dossier-overview-bulk-actions.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/bulk-actions/dossier-overview-bulk-actions.component.ts @@ -1,4 +1,4 @@ -import { Component, EventEmitter, Output } from '@angular/core'; +import { Component, EventEmitter, Input, Output } from '@angular/core'; import { AppStateService } from '../../../../../../state/app-state.service'; import { FileManagementControllerService, ReanalysisControllerService } from '@redaction/red-ui-http'; import { PermissionsService } from '../../../../../../services/permissions.service'; @@ -10,6 +10,7 @@ import { CircleButtonTypes, EntitiesService, LoadingService } from '@iqser/commo import { ConfirmationDialogInput } from '../../../../../shared/dialogs/confirmation-dialog/confirmation-dialog.component'; import { TranslateService } from '@ngx-translate/core'; import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; +import { Dossier } from '@state/model/dossier'; @Component({ selector: 'redaction-dossier-overview-bulk-actions', @@ -19,6 +20,7 @@ import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; export class DossierOverviewBulkActionsComponent { readonly circleButtonTypes = CircleButtonTypes; + @Input() dossier: Dossier; @Output() readonly reload = new EventEmitter(); constructor( @@ -33,19 +35,12 @@ export class DossierOverviewBulkActionsComponent { private readonly _entitiesService: EntitiesService ) {} - get dossier() { - return this._appStateService?.activeDossier; - } - get selectedFiles(): File[] { return this._entitiesService.selected; } get areAllFilesSelected() { - return ( - this._appStateService.activeDossier.files.length !== 0 && - this.selectedFiles.length === this._appStateService.activeDossier.files.length - ); + return this.dossier.files.length !== 0 && this.selectedFiles.length === this.dossier.files.length; } get areSomeFilesSelected() { @@ -134,7 +129,7 @@ export class DossierOverviewBulkActionsComponent { await this._fileManagementControllerService .deleteFiles( this.selectedFiles.map(item => item.fileId), - this._appStateService.activeDossierId + this.dossier.dossierId ) .toPromise(); await this._appStateService.reloadActiveDossierFiles(); @@ -147,20 +142,16 @@ export class DossierOverviewBulkActionsComponent { setToUnderApproval() { // If more than 1 approver - show dialog and ask who to assign - if (this._appStateService.activeDossier.approverIds.length > 1) { + if (this.dossier.approverIds.length > 1) { this._assignFiles('approver', true); } else { - this._performBulkAction( - this._fileActionService.setFilesUnderApproval(this.selectedFiles, this._appStateService.activeDossier.approverIds[0]) - ); + this._performBulkAction(this._fileActionService.setFilesUnderApproval(this.selectedFiles, this.dossier.approverIds[0])); } } async reanalyse() { const fileIds = this.selectedFiles.filter(file => file.analysisRequired).map(file => file.fileId); - this._performBulkAction( - this._reanalysisControllerService.reanalyzeFilesForDossier(fileIds, this._appStateService.activeDossier.id) - ); + this._performBulkAction(this._reanalysisControllerService.reanalyzeFilesForDossier(fileIds, this.dossier.id)); } ocr() { diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/dossier-details-stats/dossier-details-stats.component.html b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/dossier-details-stats/dossier-details-stats.component.html index 3d7189521..5201a21e5 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/dossier-details-stats/dossier-details-stats.component.html +++ b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/dossier-details-stats/dossier-details-stats.component.html @@ -1,4 +1,4 @@ - +
{{ 'dossier-overview.dossier-details.stats.documents' | translate: { count: dossier.files.length } }} @@ -37,7 +37,7 @@
- {{ dossierTemplate?.name }} + {{ dossierTemplate(dossier).name }}