From f1540d1e556f3d26ec3ba47411680cc1055015b7 Mon Sep 17 00:00:00 2001 From: Timo Bejan Date: Fri, 6 Nov 2020 11:21:56 +0200 Subject: [PATCH] solved some issues --- .../components/sorting/sorting.component.ts | 8 ++++++- .../app/screens/file/model/file-data.model.ts | 2 +- .../screens/file/model/file-status.wrapper.ts | 2 +- .../project-listing-screen.component.html | 22 ++++++++++++++++--- .../project-listing-screen.component.ts | 4 ++++ .../project-details.component.html | 4 ++-- .../project-details.component.ts | 4 ++++ .../project-overview-screen.component.html | 10 ++++++--- .../project-overview-screen.component.ts | 2 -- .../red-ui/src/app/state/app-state.service.ts | 4 ++++ .../upload-status-overlay.component.scss | 2 +- .../upload-status-overlay.component.ts | 22 ++++++++++++++++++- apps/red-ui/src/assets/i18n/en.json | 7 ++++-- apps/red-ui/src/assets/styles/red-tables.scss | 10 ++++----- 14 files changed, 81 insertions(+), 22 deletions(-) diff --git a/apps/red-ui/src/app/components/sorting/sorting.component.ts b/apps/red-ui/src/app/components/sorting/sorting.component.ts index 6bf21e1a3..e7a5526b0 100644 --- a/apps/red-ui/src/app/components/sorting/sorting.component.ts +++ b/apps/red-ui/src/app/components/sorting/sorting.component.ts @@ -25,6 +25,8 @@ const SORTING_OPTIONS: { [key: string]: SortingOption[] } = { styleUrls: ['./sorting.component.scss'] }) export class SortingComponent implements OnInit { + @Input() initialOption: SortingOption; + @Input() private type: 'project-overview' | 'project-listing'; @@ -36,7 +38,11 @@ export class SortingComponent implements OnInit { constructor() {} - public ngOnInit(): void {} + public ngOnInit(): void { + if (this.initialOption) { + this.setOption(this.initialOption); + } + } private _addCustomOption(option: Partial) { const customOption = { diff --git a/apps/red-ui/src/app/screens/file/model/file-data.model.ts b/apps/red-ui/src/app/screens/file/model/file-data.model.ts index fbd6afdfe..c46c6b456 100644 --- a/apps/red-ui/src/app/screens/file/model/file-data.model.ts +++ b/apps/red-ui/src/app/screens/file/model/file-data.model.ts @@ -21,7 +21,7 @@ export class FileDataModel { (e) => e.status !== 'DECLINED' && !this.redactionLog.redactionLogEntry.find((r) => r.id === e.id) && - new Date(e.processedDate).getTime() > + new Date(e.processedDate).getTime() < new Date(this.fileStatus.lastProcessed).getTime() ); } diff --git a/apps/red-ui/src/app/screens/file/model/file-status.wrapper.ts b/apps/red-ui/src/app/screens/file/model/file-status.wrapper.ts index 1995a80b9..0149d7a7e 100644 --- a/apps/red-ui/src/app/screens/file/model/file-status.wrapper.ts +++ b/apps/red-ui/src/app/screens/file/model/file-status.wrapper.ts @@ -64,7 +64,7 @@ export class FileStatusWrapper { } get status() { - return this.fileStatus.status; + return this.fileStatus.status === 'REPROCESS' ? 'PROCESSING' : this.fileStatus.status; } get numberOfPages() { diff --git a/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.html b/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.html index eaff2adb0..905660c4d 100644 --- a/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.html +++ b/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.html @@ -106,7 +106,7 @@
+ + +
-
+
-
+