diff --git a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts
index 63d69cece..9b6ba2e0d 100644
--- a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts
+++ b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts
@@ -11,6 +11,8 @@ import { Annotations } from '@pdftron/webviewer';
import { PdfViewerComponent } from '../pdf-viewer/pdf-viewer.component';
import { AnnotationUtils } from '../../../utils/annotation-utils';
+
+
@Component({
selector: 'redaction-file-preview-screen',
templateUrl: './file-preview-screen.component.html',
diff --git a/apps/red-ui/src/app/screens/file/pdf-viewer/pdf-viewer.component.ts b/apps/red-ui/src/app/screens/file/pdf-viewer/pdf-viewer.component.ts
index bb24d6db8..39ae8678a 100644
--- a/apps/red-ui/src/app/screens/file/pdf-viewer/pdf-viewer.component.ts
+++ b/apps/red-ui/src/app/screens/file/pdf-viewer/pdf-viewer.component.ts
@@ -16,9 +16,6 @@ import {tap} from "rxjs/operators";
import WebViewer, {Annotations, WebViewerInstance} from "@pdftron/webviewer";
import {TranslateService} from "@ngx-translate/core";
import {ViewerSyncService} from "../service/viwer-sync.service";
-import { AnnotationUtils } from '../../../utils/annotation-utils';
-
-
export enum FileType {
ORIGINAL = 'ORIGINAL',
@@ -84,7 +81,7 @@ export class PdfViewerComponent implements OnInit, AfterViewInit, OnDestroy {
this._configureTextPopup();
this._configureHeader();
instance.annotManager.on('annotationChanged', (annotations, action) => {
- if(action === 'add'){
+ if (action === 'add') {
this.annotationsAdded.emit(annotations);
}
});
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 d51b30c8c..35aebac00 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
@@ -38,13 +38,20 @@
{{pw.project.projectName}}
-
{{documentCount(pw)}}
-
{{userCount(pw)}}
-
{{pw.project.date | date:'mediumDate'}}
+
+
+ {{documentCount(pw)}}
+
+
+ {{userCount(pw)}}
+
+
+ {{pw.project.date | date:'mediumDate'}}
@@ -72,9 +79,7 @@
-
-
-
+
diff --git a/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.ts b/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.ts
index 214029a0c..b8ed1fe29 100644
--- a/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.ts
+++ b/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.ts
@@ -8,6 +8,7 @@ import {NotificationService} from "../../notification/notification.service";
import {AppStateService, ProjectWrapper} from "../../state/app-state.service";
import {UserService} from "../../user/user.service";
import {ProjectDetailsDialogComponent} from "../project-overview-screen/project-details-dialog/project-details-dialog.component";
+import {DataSeries} from "../../simple-doughnut-chart/simple-doughnut-chart.component";
@Component({
selector: 'redaction-project-listing-screen',
@@ -15,6 +16,7 @@ import {ProjectDetailsDialogComponent} from "../project-overview-screen/project-
styleUrls: ['./project-listing-screen.component.scss']
})
export class ProjectListingScreenComponent implements OnInit {
+ projectsChartData: DataSeries [] = [];
constructor(
public readonly appStateService: AppStateService,
@@ -22,7 +24,7 @@ export class ProjectListingScreenComponent implements OnInit {
private readonly _projectControllerService: ProjectControllerService,
private readonly _translateService: TranslateService,
private readonly _notificationService: NotificationService,
- private readonly _dialog: MatDialog) {
+ private readonly _dialog: MatDialog) {
}
get user() {
@@ -31,6 +33,9 @@ export class ProjectListingScreenComponent implements OnInit {
ngOnInit(): void {
this.appStateService.reset();
+ this.projectsChartData = [
+ {value: this.activeProjects, color: '#DD4D50', label: 'active-projects'},
+ {value: this.inactiveProjects, color: '#f8eded', label: 'Archived'}];
}
openAddProjectDialog(project?: Project): void {
@@ -77,4 +82,12 @@ export class ProjectListingScreenComponent implements OnInit {
userCount(project: ProjectWrapper) {
return 1;
}
+
+ get activeProjects() {
+ return this.appStateService.allProjects.reduce((i, p) => i+(p.project.status === Project.StatusEnum.ACTIVE ? 1 :0), 0)
+ }
+
+ get inactiveProjects() {
+ return this.appStateService.allProjects.length - this.activeProjects;
+ }
}
diff --git a/apps/red-ui/src/app/simple-doughnut-chart/simple-doughnut-chart.component.html b/apps/red-ui/src/app/simple-doughnut-chart/simple-doughnut-chart.component.html
index a91b3ca35..78e32dad6 100644
--- a/apps/red-ui/src/app/simple-doughnut-chart/simple-doughnut-chart.component.html
+++ b/apps/red-ui/src/app/simple-doughnut-chart/simple-doughnut-chart.component.html
@@ -1,14 +1,16 @@
-