diff --git a/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-name-column/file-name-column.component.html b/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-name-column/file-name-column.component.html
deleted file mode 100644
index f6b15ff1b..000000000
--- a/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-name-column/file-name-column.component.html
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
- {{ file.filename }}
-
-
-
-
-
-
- {{ primaryAttribute }}
-
-
-
-
-
diff --git a/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-name-column/file-name-column.component.scss b/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-name-column/file-name-column.component.scss
deleted file mode 100644
index 6d6ea372d..000000000
--- a/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-name-column/file-name-column.component.scss
+++ /dev/null
@@ -1,18 +0,0 @@
-@use 'common-mixins';
-
-.table-item-title {
- max-width: 25vw;
-
- &.error {
- color: var(--iqser-red-1);
- }
-
- &.initial-processing {
- color: var(--iqser-disabled);
- }
-}
-
-.primary-attribute {
- padding-top: 6px;
- @include common-mixins.line-clamp(1);
-}
diff --git a/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-name-column/file-name-column.component.ts b/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-name-column/file-name-column.component.ts
deleted file mode 100644
index 742dfbe9f..000000000
--- a/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-name-column/file-name-column.component.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { ChangeDetectionStrategy, Component, Input, OnChanges } from '@angular/core';
-import { File } from '@red/domain';
-import { PrimaryFileAttributeService } from '@services/primary-file-attribute.service';
-
-@Component({
- selector: 'redaction-file-name-column',
- templateUrl: './file-name-column.component.html',
- styleUrls: ['./file-name-column.component.scss'],
- changeDetection: ChangeDetectionStrategy.OnPush,
-})
-export class FileNameColumnComponent implements OnChanges {
- @Input() file: File;
- @Input() dossierTemplateId: string;
- primaryAttribute: string;
-
- constructor(private readonly _primaryFileAttributeService: PrimaryFileAttributeService) {}
-
- ngOnChanges() {
- this.primaryAttribute = this._primaryFileAttributeService.getPrimaryFileAttributeValue(this.file, this.dossierTemplateId);
- }
-}
diff --git a/apps/red-ui/src/app/modules/shared/components/file-name-column/file-name-column.component.ts b/apps/red-ui/src/app/modules/shared/components/file-name-column/file-name-column.component.ts
index c2e92358e..3e25b142e 100644
--- a/apps/red-ui/src/app/modules/shared/components/file-name-column/file-name-column.component.ts
+++ b/apps/red-ui/src/app/modules/shared/components/file-name-column/file-name-column.component.ts
@@ -10,6 +10,7 @@ interface PartialFile {
readonly excludedPages: number[];
readonly lastOCRTime?: string;
readonly fileAttributes: FileAttributes;
+ readonly lastManualChangeDate?: string;
}
@Component({
diff --git a/apps/red-ui/src/app/modules/upload-download/model/file-upload.model.ts b/apps/red-ui/src/app/modules/upload-download/model/file-upload.model.ts
index 0c8d4bc9b..561e892a8 100644
--- a/apps/red-ui/src/app/modules/upload-download/model/file-upload.model.ts
+++ b/apps/red-ui/src/app/modules/upload-download/model/file-upload.model.ts
@@ -9,4 +9,5 @@ export interface FileUploadModel {
typeError: boolean;
dossierId?: string;
dossierName?: string;
+ keepManualRedactions?: boolean;
}
diff --git a/apps/red-ui/src/app/modules/upload-download/services/file-upload.service.ts b/apps/red-ui/src/app/modules/upload-download/services/file-upload.service.ts
index 27a4dc1b3..b9cb5c432 100644
--- a/apps/red-ui/src/app/modules/upload-download/services/file-upload.service.ts
+++ b/apps/red-ui/src/app/modules/upload-download/services/file-upload.service.ts
@@ -106,6 +106,14 @@ export class FileUploadService extends GenericService impleme
file.sizeError = true;
}
}
+
+ let keepManualRedactions = false;
+ const manualChangesFiles = files.filter(f => dossierFiles.find(pf => pf.filename === f.file.name && !!pf.lastManualChangeDate));
+ if (manualChangesFiles.length > 0) {
+ keepManualRedactions = await this._dialogService.keepManualRedactions();
+ manualChangesFiles.forEach(f => (f.keepManualRedactions = keepManualRedactions));
+ }
+
this.files.push(...files);
files.forEach(newFile => {
this._addFileToGroup(newFile);
@@ -139,9 +147,11 @@ export class FileUploadService extends GenericService impleme
}
@Validate()
- uploadFileForm(@RequiredParam() dossierId: string, file?: Blob) {
+ uploadFileForm(@RequiredParam() dossierId: string, keepManualRedactions = false, file?: Blob) {
const formParams = new FormData();
+ formParams.append('keepManualRedactions', keepManualRedactions.toString());
+
if (file !== undefined) {
formParams.append('file', file);
}
@@ -190,7 +200,7 @@ export class FileUploadService extends GenericService impleme
private _createSubscription(uploadFile: FileUploadModel) {
this.activeUploads++;
- const obs = this.uploadFileForm(uploadFile.dossierId, uploadFile.file);
+ const obs = this.uploadFileForm(uploadFile.dossierId, uploadFile.keepManualRedactions, uploadFile.file);
return obs.subscribe(
event => {
if (event.type === HttpEventType.UploadProgress) {
diff --git a/apps/red-ui/src/app/modules/upload-download/services/upload-download-dialog.service.ts b/apps/red-ui/src/app/modules/upload-download/services/upload-download-dialog.service.ts
index dfde1956a..ac272ac5e 100644
--- a/apps/red-ui/src/app/modules/upload-download/services/upload-download-dialog.service.ts
+++ b/apps/red-ui/src/app/modules/upload-download/services/upload-download-dialog.service.ts
@@ -2,6 +2,8 @@ import { Injectable } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { OverwriteFilesDialogComponent } from '../dialogs/overwrite-files-dialog/overwrite-files-dialog.component';
import { firstValueFrom } from 'rxjs';
+import { ConfirmationDialogComponent, ConfirmationDialogInput } from '@iqser/common-ui';
+import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
const dialogConfig = {
width: '662px',
@@ -21,4 +23,17 @@ export class UploadDownloadDialogService {
return firstValueFrom(ref.afterClosed()).then(res => res || { cancel: true });
}
+
+ keepManualRedactions(): Promise {
+ const data = new ConfirmationDialogInput({
+ title: _('confirmation-dialog.keep-manual-redactions.title'),
+ question: _('confirmation-dialog.keep-manual-redactions.question'),
+ confirmationText: _('confirmation-dialog.keep-manual-redactions.confirmation-text'),
+ denyText: _('confirmation-dialog.keep-manual-redactions.deny-text'),
+ });
+
+ const ref = this._dialog.open(ConfirmationDialogComponent, { ...dialogConfig, data });
+
+ return firstValueFrom(ref.afterClosed());
+ }
}
diff --git a/apps/red-ui/src/assets/i18n/de.json b/apps/red-ui/src/assets/i18n/de.json
index d61b6a10a..0fe59eedb 100644
--- a/apps/red-ui/src/assets/i18n/de.json
+++ b/apps/red-ui/src/assets/i18n/de.json
@@ -577,6 +577,12 @@
"title": "{count, plural, one{{justificationName}} other{ausgewählte Begründungen}} löschen"
},
"input-label": "Bitte geben Sie unten Folgendes ein, um fortzufahren",
+ "keep-manual-redactions": {
+ "confirmation-text": "",
+ "deny-text": "",
+ "question": "",
+ "title": ""
+ },
"report-template-same-name": {
"confirmation-text": "Ja. Hochladen fortsetzen",
"deny-text": "Nein. Hochladen abbrechen",
@@ -1448,11 +1454,13 @@
"labels": {
"download-cleanup-download-files-hours": "",
"download-cleanup-not-download-files-hours": "",
+ "remove-digital-signature-on-upload": "",
"soft-delete-cleanup-time": ""
},
"placeholders": {
"download-cleanup-download-files-hours": "",
"download-cleanup-not-download-files-hours": "",
+ "remove-digital-signature-on-upload": "",
"soft-delete-cleanup-time": ""
},
"title": ""
diff --git a/apps/red-ui/src/assets/i18n/en.json b/apps/red-ui/src/assets/i18n/en.json
index c459ef314..4c475d256 100644
--- a/apps/red-ui/src/assets/i18n/en.json
+++ b/apps/red-ui/src/assets/i18n/en.json
@@ -577,6 +577,12 @@
"title": "Delete {count, plural, one{{justificationName}} other{Selected Justifications}}"
},
"input-label": "To proceed please type below",
+ "keep-manual-redactions": {
+ "confirmation-text": "Keep",
+ "deny-text": "Clear",
+ "question": "At least one of the files you're overwriting has manual changes, do you wish to keep them?",
+ "title": "Keep Manual Redactions?"
+ },
"report-template-same-name": {
"confirmation-text": "Yes. Continue upload",
"deny-text": "No. Cancel Upload",
@@ -1448,14 +1454,14 @@
"labels": {
"download-cleanup-download-files-hours": "Cleanup time for downloaded files (hours)",
"download-cleanup-not-download-files-hours": "Cleanup time for not downloaded files (hours)",
- "soft-delete-cleanup-time": "Soft delete cleanup time (hours)",
- "remove-digital-signature-on-upload": "Remove Digital Signature on Upload"
+ "remove-digital-signature-on-upload": "Remove Digital Signature on Upload",
+ "soft-delete-cleanup-time": "Soft delete cleanup time (hours)"
},
"placeholders": {
"download-cleanup-download-files-hours": "(hours)",
"download-cleanup-not-download-files-hours": "(hours)",
- "soft-delete-cleanup-time": "(hours)",
- "remove-digital-signature-on-upload": "True / False"
+ "remove-digital-signature-on-upload": "True / False",
+ "soft-delete-cleanup-time": "(hours)"
},
"title": "System Preferences"
},