added link to deleted files & trash icon

This commit is contained in:
Edi Cziszter 2021-10-29 18:58:15 +03:00
parent 29b0241c33
commit 1f4bda6deb
7 changed files with 24 additions and 8 deletions

View File

@ -295,7 +295,7 @@ export class PdfViewerComponent implements OnInit, OnChanges {
}
private _setSelectionMode(): void {
const textTool = (<unknown>this.instance.Core.Tools.TextTool) as TextTool;
const textTool = (<unknown> this.instance.Core.Tools.TextTool) as TextTool;
textTool.SELECTION_MODE = this._configService.values.SELECTION_MODE;
}

View File

@ -43,6 +43,12 @@
<mat-icon svgIcon="red:dictionary"></mat-icon>
<span>{{ 'dossier-overview.dossier-details.dictionary' | translate }} </span>
</div>
<div (click)="openEditDossierAttributesDialog(dossier, 'deletedDocuments')" class="link-property">
<mat-icon (click)="butonel(dossier)" svgIcon="iqser:trash"></mat-icon>\
<ng-container *ngIf="filesService.getDeletedFilesFor(dossier.id) | async as files">
<span>{{ files.length }} {{ 'dossier-overview.dossier-details.deleted' | translate }}</span>
</ng-container>
</div>
<ng-container *ngIf="dossierAttributes?.length">
<div (click)="attributesExpanded = true" *ngIf="!attributesExpanded" class="all-caps-label show-attributes">
@ -50,7 +56,11 @@
</div>
<ng-container *ngIf="attributesExpanded">
<div (click)="openEditDossierAttributesDialog(dossier)" *ngFor="let attr of dossierAttributes" class="link-property">
<div
(click)="openEditDossierAttributesDialog(dossier, 'dossierAttributes')"
*ngFor="let attr of dossierAttributes"
class="link-property"
>
<mat-icon svgIcon="red:attribute"></mat-icon>
<span *ngIf="!attr.value"> {{ attr.label + ': -' }}</span>
<span *ngIf="attr.value && attr.type === 'DATE'"> {{ attr.label + ': ' + (attr.value | date: 'd MMM. yyyy') }}</span>

View File

@ -1,9 +1,10 @@
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { AppStateService } from '@state/app-state.service';
import { Dossier, DossierAttributeWithValue, DossierTemplate } from '@red/domain';
import { Dossier, DossierAttributeWithValue, DossierTemplate, FileStatuses } from '@red/domain';
import { DossiersDialogService } from '../../../../services/dossiers-dialog.service';
import { DossiersService } from '@services/entity-services/dossiers.service';
import { DossierTemplatesService } from '@services/entity-services/dossier-templates.service';
import { FilesService } from '../../../../../../services/entity-services/files.service';
@Component({
selector: 'redaction-dossier-details-stats',
@ -19,6 +20,7 @@ export class DossierDetailsStatsComponent {
private readonly _appStateService: AppStateService,
private readonly _dossierTemplatesService: DossierTemplatesService,
private readonly _dialogService: DossiersDialogService,
readonly filesService: FilesService,
readonly dossiersService: DossiersService,
) {}
@ -26,10 +28,13 @@ export class DossierDetailsStatsComponent {
return this._dossierTemplatesService.find(dossier.dossierTemplateId);
}
openEditDossierAttributesDialog(dossier: Dossier) {
openEditDossierAttributesDialog(dossier: Dossier, section: string) {
this._dialogService.openDialog('editDossier', null, {
dossier,
section: 'dossierAttributes',
section: section,
});
}
butonel(dossier: Dossier): void {
this.filesService.getDeletedFilesFor(dossier.id).subscribe(res => console.log(res.length));
}
}

View File

@ -38,8 +38,7 @@ import { DossiersService } from '@services/entity-services/dossiers.service';
})
export class DossiersListingScreenComponent
extends ListingComponent<Dossier>
implements OnInit, AfterViewInit, OnDestroy, OnAttach, OnDetach
{
implements OnInit, AfterViewInit, OnDestroy, OnAttach, OnDetach {
readonly currentUser = this._userService.currentUser;
readonly tableColumnConfigs = this._configService.tableConfig;
readonly tableHeaderLabel = _('dossier-listing.table-header.title');

View File

@ -45,7 +45,7 @@ export class NeedsWorkBadgeComponent {
}
get hasAnnotationComments(): boolean {
return this.needsWorkInput instanceof File && (<any>this.needsWorkInput).hasAnnotationComments;
return this.needsWorkInput instanceof File && (<any> this.needsWorkInput).hasAnnotationComments;
}
reanalysisRequired() {

View File

@ -613,6 +613,7 @@
},
"description": "Beschreibung",
"dictionary": "",
"deleted": "",
"stats": {
"analysed-pages": "{count} Seiten",
"created-on": "Erstellt am {date}",

View File

@ -678,6 +678,7 @@
},
"description": "Description",
"dictionary": "Dossier Dictionary",
"deleted": "deleted files",
"stats": {
"analysed-pages": "{count} {count, plural, one{page} other{pages}}",
"created-on": "Created on {date}",