diff --git a/apps/red-ui/src/app/models/file/annotation-permissions.utils.ts b/apps/red-ui/src/app/models/file/annotation-permissions.utils.ts
index cfd8afc3d..aa0830d0c 100644
--- a/apps/red-ui/src/app/models/file/annotation-permissions.utils.ts
+++ b/apps/red-ui/src/app/models/file/annotation-permissions.utils.ts
@@ -16,10 +16,7 @@ export const canForceRedaction = (annotation: AnnotationWrapper, canAddRedaction
export const canAcceptRecommendation = (annotation: AnnotationWrapper) => annotation.isRecommendation && !annotation.pending;
export const canMarkAsFalsePositive = (annotation: AnnotationWrapper, annotationEntity: Dictionary) =>
- annotation.canBeMarkedAsFalsePositive &&
- !annotation.hasBeenForcedRedaction &&
- !annotation.hasBeenResizedLocally &&
- annotationEntity?.hasDictionary;
+ annotation.canBeMarkedAsFalsePositive && !annotation.hasBeenResizedLocally && annotationEntity?.hasDictionary;
export const canRemoveOnlyHere = (annotation: AnnotationWrapper, canAddRedaction: boolean, autoAnalysisDisabled: boolean) =>
canAddRedaction &&
@@ -30,7 +27,7 @@ export const canRemoveFromDictionary = (annotation: AnnotationWrapper, autoAnaly
annotation.isModifyDictionary &&
(annotation.isRedacted || annotation.isSkipped || annotation.isHint || (annotation.isIgnoredHint && !annotation.isRuleBased)) &&
(autoAnalysisDisabled || !annotation.pending) &&
- [LogEntryEngines.DICTIONARY, LogEntryEngines.DOSSIER_DICTIONARY].some(engine => annotation.engines.includes(engine));
+ annotation.isDictBased;
export const canRemoveRedaction = (annotation: AnnotationWrapper, permissions: AnnotationPermissions) =>
(!annotation.isIgnoredHint || !annotation.isRuleBased) &&
diff --git a/apps/red-ui/src/app/models/file/annotation.wrapper.ts b/apps/red-ui/src/app/models/file/annotation.wrapper.ts
index 96c3456c3..fe01347fd 100644
--- a/apps/red-ui/src/app/models/file/annotation.wrapper.ts
+++ b/apps/red-ui/src/app/models/file/annotation.wrapper.ts
@@ -74,13 +74,17 @@ export class AnnotationWrapper implements IListable {
}
get isDictBased() {
- return this.engines.includes(LogEntryEngines.DICTIONARY);
+ return [LogEntryEngines.DICTIONARY, LogEntryEngines.DOSSIER_DICTIONARY].some(engine => this.engines.includes(engine));
}
get isRedactedImageHint() {
return this.IMAGE_HINT && this.superType === SuperTypes.Redaction;
}
+ get isSkippedImageHint() {
+ return this.IMAGE_HINT && this.superType === SuperTypes.Hint;
+ }
+
get searchKey(): string {
return this.id;
}
diff --git a/apps/red-ui/src/app/modules/admin/screens/component-mappings/add-edit-component-mapping-dialog/add-edit-component-mapping-dialog.component.ts b/apps/red-ui/src/app/modules/admin/screens/component-mappings/add-edit-component-mapping-dialog/add-edit-component-mapping-dialog.component.ts
index 28c4fd351..2542e31eb 100644
--- a/apps/red-ui/src/app/modules/admin/screens/component-mappings/add-edit-component-mapping-dialog/add-edit-component-mapping-dialog.component.ts
+++ b/apps/red-ui/src/app/modules/admin/screens/component-mappings/add-edit-component-mapping-dialog/add-edit-component-mapping-dialog.component.ts
@@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core';
-import { CircleButtonComponent, IconButtonComponent, IconButtonTypes, IqserDialogComponent, UploadFileComponent } from '@iqser/common-ui';
+import { CircleButtonComponent, IconButtonComponent, IqserDialogComponent, UploadFileComponent } from '@iqser/common-ui';
import { FileAttributeEncodingTypes, IComponentMapping } from '@red/domain';
import { FormBuilder, ReactiveFormsModule, UntypedFormGroup, Validators } from '@angular/forms';
import { TranslateModule } from '@ngx-translate/core';
@@ -22,6 +22,7 @@ interface DialogResult {
file: Blob;
encoding: string;
delimiter: string;
+ fileName?: string;
}
@Component({
@@ -63,16 +64,18 @@ export class AddEditComponentMappingDialogComponent
async ngOnInit() {
if (this.data.mapping?.fileName) {
this.activeFile = { name: this.data.mapping.fileName } as File;
- const file = await firstValueFrom(
+ const fileContent = await firstValueFrom(
this._componentMappingService.getComponentMappingFile(this.data.dossierTemplateId, this.data.mapping.id),
);
+ const file = new Blob([fileContent.body as Blob], { type: 'text/csv' });
this.form.get('file').setValue(file);
this.initialFormValue = this.form.getRawValue();
}
}
- fileChanged(file: Blob) {
+ fileChanged(file: File) {
this.form.get('file').setValue(file);
+ this.form.get('fileName').setValue(file?.name);
}
save() {
@@ -83,6 +86,7 @@ export class AddEditComponentMappingDialogComponent
return this._formBuilder.group({
name: [this.data?.mapping?.name, Validators.required],
file: [null, Validators.required],
+ fileName: [this.data?.mapping?.fileName, Validators.required],
encoding: this.encodingTypeOptions.find(e => e === this.data?.mapping?.encoding) ?? this.encodingTypeOptions[0],
delimiter: [this.data?.mapping?.delimiter ?? ',', Validators.required],
});
diff --git a/apps/red-ui/src/app/modules/admin/screens/component-mappings/component-mappings-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/component-mappings/component-mappings-screen.component.html
index 4b2923982..1ecc27038 100644
--- a/apps/red-ui/src/app/modules/admin/screens/component-mappings/component-mappings-screen.component.html
+++ b/apps/red-ui/src/app/modules/admin/screens/component-mappings/component-mappings-screen.component.html
@@ -44,6 +44,10 @@
{{ entity.numberOfLines }}
+
+ {{ entity.columnLabelsString }}
+
+
-
-
- {{ 'add-edit-clone-dossier-template.form.apply-updates-default.heading' | translate }}
-
-
-
- {{ 'add-edit-clone-dossier-template.form.apply-updates-default.description' | translate }}
-
-
-
-
-
-
{{ 'download-includes' | translate }}
-
-
-
-
-
-
- {{ 'add-edit-clone-dossier-template.form.upload-settings.heading' | translate }}
-
-
-
- {{ 'add-edit-clone-dossier-template.form.upload-settings.ocr-by-default' | translate }}
-
-
-
-
- {{ 'add-edit-clone-dossier-template.form.upload-settings.remove-watermark' | translate }}
-
-
-
-
-
-
{{ 'add-edit-clone-dossier-template.form.hidden-text.heading' | translate }}
-
-
-
diff --git a/apps/red-ui/src/app/modules/admin/screens/info/dossier-template-info-screen/dossier-template-info-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/info/dossier-template-info-screen/dossier-template-info-screen.component.ts
index 0d21402f1..a9b2ffd59 100644
--- a/apps/red-ui/src/app/modules/admin/screens/info/dossier-template-info-screen/dossier-template-info-screen.component.ts
+++ b/apps/red-ui/src/app/modules/admin/screens/info/dossier-template-info-screen/dossier-template-info-screen.component.ts
@@ -26,6 +26,7 @@ import { NgIf } from '@angular/common';
import { MatDatepickerModule } from '@angular/material/datepicker';
import { MatIcon } from '@angular/material/icon';
import { SelectComponent } from '@shared/components/select/select.component';
+import { MatSuffix } from '@angular/material/form-field';
const downloadTypes = ['ORIGINAL', 'PREVIEW', 'DELTA_PREVIEW', 'REDACTED'].map(type => ({
key: type,
@@ -47,6 +48,7 @@ const downloadTypes = ['ORIGINAL', 'PREVIEW', 'DELTA_PREVIEW', 'REDACTED'].map(t
SelectComponent,
IconButtonComponent,
MatIcon,
+ MatSuffix,
],
})
export default class DossierTemplateInfoScreenComponent extends BaseFormComponent implements OnInit {
diff --git a/apps/red-ui/src/app/modules/file-preview/components/documine-export/documine-export.component.ts b/apps/red-ui/src/app/modules/file-preview/components/documine-export/documine-export.component.ts
index 2a412ffb4..74c75e514 100644
--- a/apps/red-ui/src/app/modules/file-preview/components/documine-export/documine-export.component.ts
+++ b/apps/red-ui/src/app/modules/file-preview/components/documine-export/documine-export.component.ts
@@ -1,6 +1,6 @@
-import { Component, Input } from '@angular/core';
+import { Component, input, Input } from '@angular/core';
import { firstValueFrom } from 'rxjs';
-import { Dossier } from '@red/domain';
+import { Dossier, File } from '@red/domain';
import { ComponentLogService } from '@services/files/component-log.service';
import { MatTooltip } from '@angular/material/tooltip';
import { TranslateModule } from '@ngx-translate/core';
@@ -13,15 +13,18 @@ import { MatMenu, MatMenuItem, MatMenuTrigger } from '@angular/material/menu';
imports: [MatTooltip, TranslateModule, MatMenuTrigger, MatMenu, MatMenuItem],
})
export class DocumineExportComponent {
- @Input() dossier: Dossier;
+ readonly dossier = input
();
+ readonly file = input();
constructor(private readonly _componentLogService: ComponentLogService) {}
downloadComponentAsJSON() {
- return firstValueFrom(this._componentLogService.exportJSON(this.dossier.dossierTemplateId, this.dossier.dossierId));
+ return firstValueFrom(
+ this._componentLogService.exportJSON(this.dossier().dossierTemplateId, this.dossier().dossierId, this.file()),
+ );
}
async downloadComponentAsXML() {
- return firstValueFrom(this._componentLogService.exportXML(this.dossier.dossierTemplateId, this.dossier.dossierId));
+ return firstValueFrom(this._componentLogService.exportXML(this.dossier().dossierTemplateId, this.dossier().dossierId, this.file()));
}
}
diff --git a/apps/red-ui/src/app/modules/file-preview/components/editable-structured-component-value/editable-structured-component-value.component.html b/apps/red-ui/src/app/modules/file-preview/components/editable-structured-component-value/editable-structured-component-value.component.html
index 42be825f6..92216e66a 100644
--- a/apps/red-ui/src/app/modules/file-preview/components/editable-structured-component-value/editable-structured-component-value.component.html
+++ b/apps/red-ui/src/app/modules/file-preview/components/editable-structured-component-value/editable-structured-component-value.component.html
@@ -1,64 +1,76 @@
-
-
-
-
-
-
-
-
-
-
-
-
+ } @else {
+
+ @for (value of entry.componentValues; track value) {
+
+ }
-
-
+
+
+
+
+ @if (hasUpdatedValues && canEdit) {
+
+ }
+
+
+
+ }
+ @if (!editing) {
+
+ }
+
diff --git a/apps/red-ui/src/app/modules/file-preview/components/editable-structured-component-value/editable-structured-component-value.component.scss b/apps/red-ui/src/app/modules/file-preview/components/editable-structured-component-value/editable-structured-component-value.component.scss
index 288ed4125..3ee2c0515 100644
--- a/apps/red-ui/src/app/modules/file-preview/components/editable-structured-component-value/editable-structured-component-value.component.scss
+++ b/apps/red-ui/src/app/modules/file-preview/components/editable-structured-component-value/editable-structured-component-value.component.scss
@@ -59,7 +59,6 @@
&:not(.header):hover,
&.selected {
background-color: var(--iqser-grey-8);
- border-left: 4px solid var(--iqser-primary);
margin-left: 0;
margin-right: 0;
@@ -67,18 +66,31 @@
cursor: pointer;
}
- .component {
- margin-left: 22px;
- }
.value {
margin-right: 26px;
+ }
+ }
+ &:hover {
+ .component {
+ margin-left: 26px;
+ }
+
+ .value {
.actions {
iqser-circle-button {
visibility: visible;
}
}
}
+ }
+
+ &.selected {
+ border-left: 4px solid var(--iqser-primary);
+
+ .component {
+ margin-left: 22px;
+ }
.arrow-right {
visibility: visible;
@@ -129,6 +141,10 @@
}
}
+.hidden-button {
+ visibility: hidden;
+}
+
::ng-deep .add-value {
mat-icon {
transform: scale(2);
diff --git a/apps/red-ui/src/app/modules/file-preview/components/file-header/file-header.component.html b/apps/red-ui/src/app/modules/file-preview/components/file-header/file-header.component.html
index a18228626..f7606feb3 100644
--- a/apps/red-ui/src/app/modules/file-preview/components/file-header/file-header.component.html
+++ b/apps/red-ui/src/app/modules/file-preview/components/file-header/file-header.component.html
@@ -1,7 +1,7 @@