diff --git a/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.scss b/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.scss
index 855230586..1dbcf5afe 100644
--- a/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.scss
+++ b/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.scss
@@ -4,44 +4,6 @@
display: contents;
}
-.banner {
- padding: 13px 16px;
- color: var(--iqser-white);
- justify-content: space-between;
-
- .read-only-text,
- .disabled-auto-analysis-text {
- font-size: 11px;
- font-weight: 600;
- line-height: 14px;
- text-align: center;
- text-transform: uppercase;
- }
-
- mat-icon {
- height: 14px;
- width: 14px;
-
- &.primary-white {
- padding-right: 8px;
- }
- }
-
- .ocr-indicator {
- display: flex;
- flex: 1;
- align-items: center;
- }
-
- &.justify-center {
- justify-content: center !important;
- }
-}
-
-.read-only {
- background-color: var(--iqser-primary);
-}
-
.disabled-auto-analysis {
background-color: var(--iqser-yellow-2);
}
diff --git a/apps/red-ui/src/app/modules/file-preview/components/readonly-banner/readonly-banner.component.html b/apps/red-ui/src/app/modules/file-preview/components/readonly-banner/readonly-banner.component.html
new file mode 100644
index 000000000..0e68deff6
--- /dev/null
+++ b/apps/red-ui/src/app/modules/file-preview/components/readonly-banner/readonly-banner.component.html
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/red-ui/src/app/modules/file-preview/components/readonly-banner/readonly-banner.component.scss b/apps/red-ui/src/app/modules/file-preview/components/readonly-banner/readonly-banner.component.scss
new file mode 100644
index 000000000..10bda726e
--- /dev/null
+++ b/apps/red-ui/src/app/modules/file-preview/components/readonly-banner/readonly-banner.component.scss
@@ -0,0 +1,36 @@
+.banner {
+ padding: 13px 16px;
+ color: var(--iqser-white);
+ justify-content: space-between;
+
+ .read-only-text {
+ font-size: 11px;
+ font-weight: 600;
+ line-height: 14px;
+ text-align: center;
+ text-transform: uppercase;
+ }
+
+ mat-icon {
+ height: 14px;
+ width: 14px;
+
+ &.primary-white {
+ padding-right: 8px;
+ }
+ }
+
+ .ocr-indicator {
+ display: flex;
+ flex: 1;
+ align-items: center;
+ }
+
+ &.justify-center {
+ justify-content: center !important;
+ }
+}
+
+.read-only {
+ background-color: var(--iqser-primary);
+}
diff --git a/apps/red-ui/src/app/modules/file-preview/components/readonly-banner/readonly-banner.component.ts b/apps/red-ui/src/app/modules/file-preview/components/readonly-banner/readonly-banner.component.ts
new file mode 100644
index 000000000..075839a18
--- /dev/null
+++ b/apps/red-ui/src/app/modules/file-preview/components/readonly-banner/readonly-banner.component.ts
@@ -0,0 +1,13 @@
+import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
+import { File } from '@red/domain';
+
+@Component({
+ selector: 'redaction-readonly-banner',
+ templateUrl: './readonly-banner.component.html',
+ styleUrls: ['./readonly-banner.component.scss'],
+ changeDetection: ChangeDetectionStrategy.OnPush,
+})
+export class ReadonlyBannerComponent {
+ @Input() file: File;
+ @Input() isDossierActive: boolean;
+}
diff --git a/apps/red-ui/src/app/modules/file-preview/file-preview.module.ts b/apps/red-ui/src/app/modules/file-preview/file-preview.module.ts
index 464a6937e..e9dd2ce2c 100644
--- a/apps/red-ui/src/app/modules/file-preview/file-preview.module.ts
+++ b/apps/red-ui/src/app/modules/file-preview/file-preview.module.ts
@@ -51,6 +51,7 @@ import { ImportRedactionsDialogComponent } from './dialogs/import-redactions-dia
import { DocumentUnloadedGuard } from './services/document-unloaded.guard';
import { FilePreviewRightContainerComponent } from './components/right-container/file-preview-right-container.component';
import { RssDialogComponent } from './dialogs/rss-dialog/rss-dialog.component';
+import { ReadonlyBannerComponent } from './components/readonly-banner/readonly-banner.component';
const routes: Routes = [
{
@@ -95,6 +96,7 @@ const components = [
AnnotationReferenceComponent,
FilePreviewScreenComponent,
FilePreviewRightContainerComponent,
+ ReadonlyBannerComponent,
];
@NgModule({
diff --git a/libs/red-domain/src/lib/files/file.model.ts b/libs/red-domain/src/lib/files/file.model.ts
index 7d3886e83..516a3705a 100644
--- a/libs/red-domain/src/lib/files/file.model.ts
+++ b/libs/red-domain/src/lib/files/file.model.ts
@@ -59,6 +59,8 @@ export class File extends Entity
implements IFile {
readonly hasHighlights: boolean;
readonly dossierArchived: boolean;
readonly dossierTemplateId: string;
+ readonly numberOfPagesToOCR: number;
+ readonly numberOfOCRedPages: number;
readonly statusSort: number;
readonly cacheIdentifier?: string;
@@ -127,6 +129,8 @@ export class File extends Entity implements IFile {
this.hasHighlights = file.hasHighlights;
this.dossierArchived = file.dossierArchived;
this.dossierTemplateId = file.dossierTemplateId;
+ this.numberOfPagesToOCR = file.numberOfPagesToOCR;
+ this.numberOfOCRedPages = file.numberOfOCRedPages;
this.statusSort = StatusSorter[this.workflowStatus];
this.cacheIdentifier = btoa(this.fileManipulationDate ?? '');
diff --git a/libs/red-domain/src/lib/files/file.ts b/libs/red-domain/src/lib/files/file.ts
index 157f9922e..fe862c441 100644
--- a/libs/red-domain/src/lib/files/file.ts
+++ b/libs/red-domain/src/lib/files/file.ts
@@ -77,11 +77,11 @@ export interface IFile {
/**
* Number of pages that require OCR.
*/
- readonly numberOfPagesToOCR?: number;
+ readonly numberOfPagesToOCR: number;
/**
* Number of pages already OCR-ed.
*/
- readonly numberOfOCRedPages?: number;
+ readonly numberOfOCRedPages: number;
/**
* OCR end Time.
*/