diff --git a/apps/red-ui/src/app/modules/projects/components/disabled-for-redaction/disabled-for-redaction.component.scss b/apps/red-ui/src/app/modules/projects/components/disabled-for-redaction/disabled-for-redaction.component.scss new file mode 100644 index 000000000..2c2b5c84c --- /dev/null +++ b/apps/red-ui/src/app/modules/projects/components/disabled-for-redaction/disabled-for-redaction.component.scss @@ -0,0 +1,34 @@ +@import '../../../../../assets/styles/red-mixins'; + +:host { + display: block; + position: absolute; + height: 100%; + background: white; + z-index: 1; + width: 100%; + @include inset-shadow; +} + +.section { + padding: 40px; + + flex-direction: column; + + &:not(:last-child) { + border-bottom: 1px solid $separator; + } +} + +p { + height: 48px; + width: 234px; + text-align: center; + color: #9398a0; +} + +mat-icon { + width: 60px; + height: 60px; + opacity: 10%; +} diff --git a/apps/red-ui/src/app/modules/projects/components/disabled-for-redaction/disabled-for-redaction.component.ts b/apps/red-ui/src/app/modules/projects/components/disabled-for-redaction/disabled-for-redaction.component.ts new file mode 100644 index 000000000..9904c1acf --- /dev/null +++ b/apps/red-ui/src/app/modules/projects/components/disabled-for-redaction/disabled-for-redaction.component.ts @@ -0,0 +1,12 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'redaction-disabled-for-redaction', + template: + "
\n" + + ' \n' + + "

Redaction is disabled for this document.

\n" + + '
', + styleUrls: ['./disabled-for-redaction.component.scss'] +}) +export class DisabledForRedactionComponent {} diff --git a/apps/red-ui/src/app/modules/projects/components/file-actions/file-actions.component.html b/apps/red-ui/src/app/modules/projects/components/file-actions/file-actions.component.html index 319c28c56..99b1c2098 100644 --- a/apps/red-ui/src/app/modules/projects/components/file-actions/file-actions.component.html +++ b/apps/red-ui/src/app/modules/projects/components/file-actions/file-actions.component.html @@ -135,5 +135,15 @@ type="dark-bg" > + + +
+ + +
diff --git a/apps/red-ui/src/app/modules/projects/components/file-actions/file-actions.component.scss b/apps/red-ui/src/app/modules/projects/components/file-actions/file-actions.component.scss index e42b0242b..f83dc26db 100644 --- a/apps/red-ui/src/app/modules/projects/components/file-actions/file-actions.component.scss +++ b/apps/red-ui/src/app/modules/projects/components/file-actions/file-actions.component.scss @@ -20,3 +20,9 @@ redaction-status-bar { margin-left: 2px; } + +mat-slide-toggle { + height: 34px; + width: 34px; + line-height: 33px; +} diff --git a/apps/red-ui/src/app/modules/projects/components/file-actions/file-actions.component.ts b/apps/red-ui/src/app/modules/projects/components/file-actions/file-actions.component.ts index 569fbb1d6..a8622f009 100644 --- a/apps/red-ui/src/app/modules/projects/components/file-actions/file-actions.component.ts +++ b/apps/red-ui/src/app/modules/projects/components/file-actions/file-actions.component.ts @@ -103,4 +103,10 @@ export class FileActionsComponent implements OnInit { this.actionPerformed.emit(action); }); } + + async toggleAnalysis($event: MouseEvent) { + $event.stopPropagation(); + await this._fileActionService.toggleAnalysis(this.fileStatus).toPromise(); + await this.appStateService.getFiles(); + } } diff --git a/apps/red-ui/src/app/modules/projects/projects.module.ts b/apps/red-ui/src/app/modules/projects/projects.module.ts index 818b553ed..d19aefa73 100644 --- a/apps/red-ui/src/app/modules/projects/projects.module.ts +++ b/apps/red-ui/src/app/modules/projects/projects.module.ts @@ -35,6 +35,7 @@ import { PdfViewerDataService } from './services/pdf-viewer-data.service'; import { ManualAnnotationService } from './services/manual-annotation.service'; import { AnnotationDrawService } from './services/annotation-draw.service'; import { AnnotationProcessingService } from './services/annotation-processing.service'; +import { DisabledForRedactionComponent } from './components/disabled-for-redaction/disabled-for-redaction.component'; const screens = [ProjectListingScreenComponent, ProjectOverviewScreenComponent, FilePreviewScreenComponent]; @@ -66,6 +67,7 @@ const components = [ ProjectListingActionsComponent, DocumentInfoComponent, FileWorkloadComponent, + DisabledForRedactionComponent, ...screens, ...dialogs diff --git a/apps/red-ui/src/app/modules/projects/screens/file-preview-screen/file-preview-screen.component.html b/apps/red-ui/src/app/modules/projects/screens/file-preview-screen/file-preview-screen.component.html index 60dd47c3d..bb82703bd 100644 --- a/apps/red-ui/src/app/modules/projects/screens/file-preview-screen/file-preview-screen.component.html +++ b/apps/red-ui/src/app/modules/projects/screens/file-preview-screen/file-preview-screen.component.html @@ -204,6 +204,11 @@
+ + +
diff --git a/apps/red-ui/src/app/modules/projects/screens/project-overview-screen/project-overview-screen.component.scss b/apps/red-ui/src/app/modules/projects/screens/project-overview-screen/project-overview-screen.component.scss index aaf1aa8b1..860ecf149 100644 --- a/apps/red-ui/src/app/modules/projects/screens/project-overview-screen/project-overview-screen.component.scss +++ b/apps/red-ui/src/app/modules/projects/screens/project-overview-screen/project-overview-screen.component.scss @@ -110,3 +110,8 @@ cdk-virtual-scroll-viewport { .mr-4 { margin-right: 4px; } + +.disabled { + background-color: #F4F5F7; + color: #9398A0; +} diff --git a/apps/red-ui/src/app/modules/projects/services/file-action.service.ts b/apps/red-ui/src/app/modules/projects/services/file-action.service.ts index 12d818e77..f58f1452e 100644 --- a/apps/red-ui/src/app/modules/projects/services/file-action.service.ts +++ b/apps/red-ui/src/app/modules/projects/services/file-action.service.ts @@ -25,6 +25,13 @@ export class FileActionService { return this._reanalysisControllerService.reanalyzeFile(this._appStateService.activeProject.project.projectId, fileStatusWrapper.fileId, priority); } + public toggleAnalysis(fileStatusWrapper?: FileStatusWrapper) { + if (!fileStatusWrapper) { + fileStatusWrapper = this._appStateService.activeFile; + } + return this._reanalysisControllerService.toggleAnalysis(fileStatusWrapper.projectId, fileStatusWrapper.fileId, fileStatusWrapper.isExcluded); + } + public async assignProjectReviewerFromOverview(file?: FileStatusWrapper, callback?: Function) { if (this._permissionsService.isManagerAndOwner()) { this._openAssignReviewerDialog(file, callback); diff --git a/apps/red-ui/src/assets/styles/red-page-layout.scss b/apps/red-ui/src/assets/styles/red-page-layout.scss index 030b1072c..22e97057e 100644 --- a/apps/red-ui/src/assets/styles/red-page-layout.scss +++ b/apps/red-ui/src/assets/styles/red-page-layout.scss @@ -190,6 +190,11 @@ body { justify-content: center; } +.flex-align-items-center { + display: flex; + align-items: center; +} + .flex-1 { flex: 1; }