diff --git a/apps/red-ui/src/app/models/file/manual-redaction-entry.wrapper.ts b/apps/red-ui/src/app/models/file/manual-redaction-entry.wrapper.ts index b197144fe..ceb44ba60 100644 --- a/apps/red-ui/src/app/models/file/manual-redaction-entry.wrapper.ts +++ b/apps/red-ui/src/app/models/file/manual-redaction-entry.wrapper.ts @@ -2,6 +2,8 @@ import { IManualRedactionEntry } from '@red/domain'; export const ManualRedactionEntryTypes = { DICTIONARY: 'DICTIONARY', + REDACT: 'REDACT', + HINT: 'HINT', REDACTION: 'REDACTION', FALSE_POSITIVE: 'FALSE_POSITIVE', } as const; diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.html b/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.html new file mode 100644 index 000000000..92af9cacc --- /dev/null +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.html @@ -0,0 +1,87 @@ +
+
+
+ +
+
+ + {{ form.get('selectedText').value }} +
+ + + + +
+ + + + + {{ option.label }} + + + +
+ +
+ + +
+
+ + +
+ + + + + {{ displayedDictionaryLabel }} + + {{ dictionary.label }} + + + +
+
+ +
+ + +
+
+ +
+ + + +
+
+
+ + +
diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.scss b/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.scss new file mode 100644 index 000000000..84db58094 --- /dev/null +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.scss @@ -0,0 +1,4 @@ +label { + font-weight: bold; + padding-bottom: 8px; +} diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.ts b/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.ts new file mode 100644 index 000000000..83e36d099 --- /dev/null +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.ts @@ -0,0 +1,163 @@ +import { Component, Inject, OnInit } from '@angular/core'; +import { BaseDialogComponent, DetailsRadioOption, IqserPermissionsService } from '@iqser/common-ui'; +import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { Dictionary, Dossier, File, IAddRedactionRequest } from '@red/domain'; +import { UntypedFormGroup, Validators } from '@angular/forms'; +import { Roles } from '@users/roles'; +import { firstValueFrom } from 'rxjs'; +import { JustificationsService } from '@services/entity-services/justifications.service'; +import { ActiveDossiersService } from '@services/dossiers/active-dossiers.service'; +import { LegalBasisOption } from '../manual-redaction-dialog/manual-annotation-dialog.component'; +import { DictionaryService } from '@services/entity-services/dictionary.service'; +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; +import { ManualRedactionEntryType, ManualRedactionEntryWrapper } from '@models/file/manual-redaction-entry.wrapper'; +import { redactTextTranslations } from '@translations/redact-text-translations'; +import { RedactTextOption, RedactTextOptions } from './redact-text-options'; + +const PIN_ICON = 'red:push-pin'; +const FOLDER_ICON = 'red:folder'; + +@Component({ + templateUrl: './redact-text-dialog.component.html', + styleUrls: ['./redact-text-dialog.component.scss'], +}) +export class RedactTextDialogComponent extends BaseDialogComponent implements OnInit { + readonly roles = Roles; + readonly options: DetailsRadioOption[]; + dictionaryRequest = false; + legalOptions: LegalBasisOption[] = []; + dictionaries: Dictionary[] = []; + + readonly #translations = redactTextTranslations; + readonly #dossier: Dossier; + readonly #type: ManualRedactionEntryType; + + constructor( + private _justificationsService: JustificationsService, + private _activeDossiersService: ActiveDossiersService, + private _dictionaryService: DictionaryService, + private _iqserPermissionsService: IqserPermissionsService, + protected readonly _dialogRef: MatDialogRef, + @Inject(MAT_DIALOG_DATA) readonly data: { manualRedactionEntryWrapper: ManualRedactionEntryWrapper; dossierId: string; file: File }, + ) { + super(_dialogRef); + + this.#dossier = _activeDossiersService.find(this.data.dossierId); + this.#type = this.data.manualRedactionEntryWrapper.type; + this.options = this.#options(); + + this.form = this.#getForm(); + this.initialFormValue = this.form.getRawValue(); + } + + async ngOnInit(): Promise { + this.dictionaries = await this._dictionaryService.getDictionariesOptions(this.#dossier.dossierTemplateId, this.#dossier.id); + + const data = await firstValueFrom(this._justificationsService.getForDossierTemplate(this.#dossier.dossierTemplateId)); + this.legalOptions = data.map(lbm => ({ + legalBasis: lbm.reason, + description: lbm.description, + label: lbm.name, + })); + + this.#selectReason(); + this.#formatSelectedTextValue(); + } + + get displayedDictionaryLabel() { + const dictType = this.form.get('dictionary').value; + if (dictType) { + return this.dictionaries.find(d => d.type === dictType).label; + } + return null; + } + + save(): void { + this.#enhanceManualRedaction(this.data.manualRedactionEntryWrapper.manualRedactionEntry); + try { + const annotation = this.data.manualRedactionEntryWrapper.manualRedactionEntry; + this._dialogRef.close({ + annotation, + dictionary: this.dictionaries.find(d => d.type === this.form.get('dictionary').value), + }); + } catch (e) { + this._toaster.error(_('manual-annotation.dialog.error')); + } + } + + // toggleType() { + // console.log('test'); + // this.dictionaryRequest = this.form.get('option').value === RedactTextOptions.IN_DOSSIER; + // } + + #getForm(): UntypedFormGroup { + return this._formBuilder.group({ + selectedText: this.data?.manualRedactionEntryWrapper?.manualRedactionEntry?.value, + reason: [null], + comment: [null], + dictionary: [null, Validators.required], + classification: '', + multiplePages: '', + option: [this.options[0], Validators.required], + }); + } + + #formatSelectedTextValue(): void { + this.data.manualRedactionEntryWrapper.manualRedactionEntry.value = + this.data.manualRedactionEntryWrapper.manualRedactionEntry.value.replace( + // eslint-disable-next-line no-control-regex,max-len + /([^\s\d-]{2,})[-\u00AD]\u000D\u000A|[\u000A\u000B\u000C\u000D\u0085\u2028\u2029]/gi, + '$1', + ); + } + + #selectReason() { + if (this.legalOptions.length === 1) { + this.form.get('reason').setValue(this.legalOptions[0]); + } + } + + #enhanceManualRedaction(addRedactionRequest: IAddRedactionRequest) { + const legalOption: LegalBasisOption = this.form.get('reason').value; + addRedactionRequest.type = this.form.get('dictionary').value; + if (legalOption) { + addRedactionRequest.reason = legalOption.description; + addRedactionRequest.legalBasis = legalOption.legalBasis; + } + + if (this._iqserPermissionsService.has(Roles.getRss)) { + const selectedType = this.dictionaries.find(d => d.type === addRedactionRequest.type); + addRedactionRequest.addToDictionary = selectedType.hasDictionary; + } else { + addRedactionRequest.addToDictionary = this.dictionaryRequest && addRedactionRequest.type !== 'dossier_redaction'; + addRedactionRequest.addToDossierDictionary = this.dictionaryRequest && addRedactionRequest.type === 'dossier_redaction'; + } + + if (!addRedactionRequest.reason) { + addRedactionRequest.reason = 'Dictionary Request'; + } + const commentValue = this.form.get('comment').value; + addRedactionRequest.comment = commentValue ? { text: commentValue } : null; + addRedactionRequest.section = this.form.get('section').value; + addRedactionRequest.value = addRedactionRequest.rectangle + ? this.form.get('classification').value + : this.form.get('selectedText').value; + } + + #options() { + return [ + { + label: this.#translations[this.#type].onlyHere.label, + description: this.#translations[this.#type].onlyHere.description, + icon: PIN_ICON, + value: RedactTextOptions.ONLY_HERE, + }, + { + label: this.#translations[this.#type].inDossier.label, + description: this.#translations[this.#type].inDossier.description, + icon: FOLDER_ICON, + value: RedactTextOptions.IN_DOSSIER, + }, + ]; + } +} diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-options.ts b/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-options.ts new file mode 100644 index 000000000..05a42de28 --- /dev/null +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-options.ts @@ -0,0 +1,6 @@ +export const RedactTextOptions = { + ONLY_HERE: 'ONLY_HERE', + IN_DOSSIER: 'IN_DOSSIER', +} as const; + +export type RedactTextOption = keyof typeof RedactTextOptions; diff --git a/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts b/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts index 9f4cd17c7..e5a86f45b 100644 --- a/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts @@ -40,7 +40,7 @@ import { ManualRedactionEntryWrapper } from '@models/file/manual-redaction-entry import { AnnotationWrapper } from '@models/file/annotation.wrapper'; import { AnnotationDrawService } from '../pdf-viewer/services/annotation-draw.service'; import { AnnotationProcessingService } from './services/annotation-processing.service'; -import { Dictionary, File, ViewModes } from '@red/domain'; +import { Dictionary, File, IManualRedactionEntry, ViewModes } from '@red/domain'; import { PermissionsService } from '@services/permissions.service'; import { combineLatest, firstValueFrom, of, pairwise } from 'rxjs'; import { PreferencesKeys, UserPreferenceService } from '@users/user-preference.service'; @@ -165,15 +165,15 @@ export class FilePreviewScreenComponent }); effect(() => { - const selectedText = this._documentViewer.selectedText(); - const canPerformActions = this.pdfProxyService.canPerformActions(); - const isCurrentPageExcluded = this.state.file().isPageExcluded(this.pdf.currentPage()); - - if ((selectedText.length > 2 || this._isJapaneseString(selectedText)) && canPerformActions && !isCurrentPageExcluded) { - this.pdf.enable(textActions); - } else { - this.pdf.disable(textActions); - } + // const selectedText = this._documentViewer.selectedText(); + // const canPerformActions = this.pdfProxyService.canPerformActions(); + // const isCurrentPageExcluded = this.state.file().isPageExcluded(this.pdf.currentPage()); + // + // if ((selectedText.length > 2 || this._isJapaneseString(selectedText)) && canPerformActions && !isCurrentPageExcluded) { + // this.pdf.enable(textActions); + // } else { + // this.pdf.disable(textActions); + // } }); } @@ -364,6 +364,34 @@ export class FilePreviewScreenComponent }); } + openRedactTextDialog(manualRedactionEntryWrapper: ManualRedactionEntryWrapper) { + return this._ngZone.run(() => { + const file = this.state.file(); + + manualRedactionEntryWrapper.manualRedactionEntry.value = 'This is selected text'; + this._dialogService.openDialog( + 'redactText', + { manualRedactionEntryWrapper, dossierId: this.dossierId, file }, + (result: { annotation: IManualRedactionEntry; dictionary?: Dictionary }) => { + const selectedAnnotations = this._annotationManager.selected; + if (selectedAnnotations.length > 0) { + this._annotationManager.delete([selectedAnnotations[0].Id]); + } + + const add$ = this._manualRedactionService.addAnnotation( + [result.annotation], + this.dossierId, + this.fileId, + result.dictionary?.label, + ); + + const addAndReload$ = add$.pipe(switchMap(() => this._filesService.reload(this.dossierId, file))); + return firstValueFrom(addAndReload$.pipe(catchError(() => of(undefined)))); + }, + ); + }); + } + toggleFullScreen() { this.fullScreen = !this.fullScreen; if (this.fullScreen) { @@ -623,6 +651,10 @@ export class FilePreviewScreenComponent this.openManualAnnotationDialog($event); }); + this.addActiveScreenSubscription = this.pdfProxyService.redactTextRequested$.subscribe($event => { + this.openRedactTextDialog($event); + }); + this.addActiveScreenSubscription = this.pdfProxyService.pageChanged$.subscribe(page => this._ngZone.run(() => this.#updateQueryParamsPage(page)), ); 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 922f8700c..32efb144e 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 @@ -65,6 +65,7 @@ import { PagesComponent } from './components/pages/pages.component'; import { SharedModule } from '@shared/shared.module'; import { SharedDossiersModule } from '../shared-dossiers/shared-dossiers.module'; import { FalsePositiveDialogComponent } from './dialogs/false-positive-dialog/false-positive-dialog.component'; +import { RedactTextDialogComponent } from './dialogs/redact-text-dialog/redact-text-dialog.component'; const routes: IqserRoutes = [ { @@ -89,6 +90,7 @@ const dialogs = [ ImportRedactionsDialogComponent, RssDialogComponent, FalsePositiveDialogComponent, + RedactTextDialogComponent, ]; const components = [ diff --git a/apps/red-ui/src/app/modules/file-preview/services/file-preview-dialog.service.ts b/apps/red-ui/src/app/modules/file-preview/services/file-preview-dialog.service.ts index e8abdb76b..b848da12c 100644 --- a/apps/red-ui/src/app/modules/file-preview/services/file-preview-dialog.service.ts +++ b/apps/red-ui/src/app/modules/file-preview/services/file-preview-dialog.service.ts @@ -11,6 +11,7 @@ import { ResizeAnnotationDialogComponent } from '../dialogs/resize-annotation-di import { HighlightActionDialogComponent } from '../dialogs/highlight-action-dialog/highlight-action-dialog.component'; import { RssDialogComponent } from '../dialogs/rss-dialog/rss-dialog.component'; import { FalsePositiveDialogComponent } from '../dialogs/false-positive-dialog/false-positive-dialog.component'; +import { RedactTextDialogComponent } from '../dialogs/redact-text-dialog/redact-text-dialog.component'; type DialogType = | 'confirm' @@ -23,7 +24,8 @@ type DialogType = | 'forceAnnotation' | 'manualAnnotation' | 'highlightAction' - | 'falsePositive'; + | 'falsePositive' + | 'redactText'; @Injectable() export class FilePreviewDialogService extends DialogService { @@ -65,6 +67,9 @@ export class FilePreviewDialogService extends DialogService { falsePositive: { component: FalsePositiveDialogComponent, }, + redactText: { + component: RedactTextDialogComponent, + }, }; constructor(protected readonly _dialog: MatDialog) { diff --git a/apps/red-ui/src/app/modules/file-preview/services/pdf-proxy.service.ts b/apps/red-ui/src/app/modules/file-preview/services/pdf-proxy.service.ts index 9ebd6f7ac..5fc9b1fe1 100644 --- a/apps/red-ui/src/app/modules/file-preview/services/pdf-proxy.service.ts +++ b/apps/red-ui/src/app/modules/file-preview/services/pdf-proxy.service.ts @@ -42,6 +42,7 @@ import Quad = Core.Math.Quad; export class PdfProxyService { readonly annotationSelected$ = this.#annotationSelected$; readonly manualAnnotationRequested$ = new Subject(); + readonly redactTextRequested$ = new Subject(); readonly pageChanged$ = this._pdf.pageChanged$.pipe( tap(() => this._handleCustomActions()), tap(() => this._pdf.resetAnnotationActions()), @@ -60,6 +61,7 @@ export class PdfProxyService { ? this._convertPath('/assets/icons/general/pdftron-action-add-component.svg') : this._convertPath('/assets/icons/general/pdftron-action-add-redaction.svg'); readonly #addDictIcon = this._convertPath('/assets/icons/general/pdftron-action-add-dict.svg'); + readonly #addHintIcon = this._convertPath('/assets/icons/general/pdftron-action-add-hint.svg'); constructor( private readonly _translateService: TranslateService, @@ -157,6 +159,19 @@ export class PdfProxyService { } if (this._iqserPermissionsService.has(Roles.redactions.write) || this._iqserPermissionsService.has(Roles.redactions.request)) { + popups.push({ + type: 'actionButton', + dataElement: TextPopups.REDACT_TEXT, + img: this.#addRedactionIcon, + onClick: () => this._ngZone.run(() => this._redactText(ManualRedactionEntryTypes.REDACT)), + }); + popups.push({ + type: 'actionButton', + dataElement: TextPopups.ADD_HINT, + img: this.#addHintIcon, + onClick: () => this._ngZone.run(() => this._redactText(ManualRedactionEntryTypes.HINT)), + }); + popups.push({ type: 'actionButton', dataElement: TextPopups.ADD_REDACTION, @@ -189,6 +204,13 @@ export class PdfProxyService { this.manualAnnotationRequested$.next({ manualRedactionEntry, type }); } + private _redactText(type: ManualRedactionEntryType) { + const selectedQuads: Record = this._pdf.documentViewer.getSelectedTextQuads(); + const text = this._documentViewer.selectedText(); + const manualRedactionEntry = this._getManualRedaction(selectedQuads, text, true); + this.redactTextRequested$.next({ manualRedactionEntry, type }); + } + private _handleCustomActions() { const isCurrentPageExcluded = this._state.file().isPageExcluded(this._pdf.currentPage()); @@ -208,7 +230,7 @@ export class PdfProxyService { this._pdf.enable(TEXT_POPUPS_TO_TOGGLE); this._viewerHeaderService.enable(HEADER_ITEMS_TO_TOGGLE); - if (this._documentViewer.selectedText().length > 2) { + if (this._documentViewer.selectedText()?.length > 2) { this._pdf.enable([TextPopups.ADD_DICTIONARY, TextPopups.ADD_FALSE_POSITIVE]); } } else { diff --git a/apps/red-ui/src/app/modules/file-preview/utils/constants.ts b/apps/red-ui/src/app/modules/file-preview/utils/constants.ts index 63376f5f0..e8b3d7878 100644 --- a/apps/red-ui/src/app/modules/file-preview/utils/constants.ts +++ b/apps/red-ui/src/app/modules/file-preview/utils/constants.ts @@ -29,6 +29,8 @@ export const HeaderElements = { export type HeaderElementType = ValuesOf; export const TextPopups = { + REDACT_TEXT: 'redact-text', + ADD_HINT: 'add-hint', ADD_REDACTION: 'add-redaction', ADD_DICTIONARY: 'add-dictionary', ADD_RECTANGLE: 'add-rectangle', diff --git a/apps/red-ui/src/app/modules/icons/icons.module.ts b/apps/red-ui/src/app/modules/icons/icons.module.ts index 6ae4652ec..54c90a5a9 100644 --- a/apps/red-ui/src/app/modules/icons/icons.module.ts +++ b/apps/red-ui/src/app/modules/icons/icons.module.ts @@ -63,6 +63,7 @@ export class IconsModule { 'padding-top-bottom', 'page', 'preview', + 'push-pin', 'put-back', 'read-only', 'ready-for-approval', diff --git a/apps/red-ui/src/app/modules/pdf-viewer/services/document-viewer.service.ts b/apps/red-ui/src/app/modules/pdf-viewer/services/document-viewer.service.ts index 2f16097a2..42db40a8d 100644 --- a/apps/red-ui/src/app/modules/pdf-viewer/services/document-viewer.service.ts +++ b/apps/red-ui/src/app/modules/pdf-viewer/services/document-viewer.service.ts @@ -144,12 +144,12 @@ export class REDDocumentViewer { } #listenForDocEvents() { - this.#document.addEventListener('textSelected', ([, selectedText, pageNumber]: [Quad, string, number]) => { - this.#ngZone.run(() => { - this.#disableTextPopupIfCompareMode(pageNumber); - this.#selectedText.set(selectedText); - }); - }); + // this.#document.addEventListener('textSelected', ([, selectedText, pageNumber]: [Quad, string, number]) => { + // this.#ngZone.run(() => { + // this.#disableTextPopupIfCompareMode(pageNumber); + // this.#selectedText.set(selectedText); + // }); + // }); this.#document.addEventListener('pageComplete', event => { this.#ngZone.run(() => { diff --git a/apps/red-ui/src/app/translations/redact-text-translations.ts b/apps/red-ui/src/app/translations/redact-text-translations.ts new file mode 100644 index 000000000..4eb6f883c --- /dev/null +++ b/apps/red-ui/src/app/translations/redact-text-translations.ts @@ -0,0 +1,29 @@ +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; + +interface Option { + label: string; + description: string; +} + +export const redactTextTranslations: Record<'REDACT' | 'HINT', Record<'onlyHere' | 'inDossier', Option>> = { + REDACT: { + onlyHere: { + label: _('redact-text.dialog.content.options.redact.only-here.label'), + description: _('redact-text.dialog.content.options.redact.only-here.description'), + }, + inDossier: { + label: _('redact-text.dialog.content.options.redact.in-dossier.label'), + description: _('redact-text.dialog.content.options.redact.in-dossier.description'), + }, + }, + HINT: { + onlyHere: { + label: _('redact-text.dialog.content.options.hint.only-here.label'), + description: _('redact-text.dialog.content.options.hint.only-here.description'), + }, + inDossier: { + label: _('redact-text.dialog.content.options.hint.in-dossier.label'), + description: _('redact-text.dialog.content.options.hint.in-dossier.description'), + }, + }, +} as const; diff --git a/apps/red-ui/src/assets/i18n/redact/de.json b/apps/red-ui/src/assets/i18n/redact/de.json index c470bf8ca..2d621be68 100644 --- a/apps/red-ui/src/assets/i18n/redact/de.json +++ b/apps/red-ui/src/assets/i18n/redact/de.json @@ -1900,6 +1900,47 @@ }, "header": "Bildtypen bearbeiten" }, + "redact-text": { + "dialog": { + "actions": { + "cancel": "", + "save": "" + }, + "content": { + "comment": "", + "comment-placeholder": "", + "legal-basis": "", + "options": { + "hint": { + "in-dossier": { + "description": "", + "label": "" + }, + "only-here": { + "description": "", + "label": "" + } + }, + "redact": { + "in-dossier": { + "description": "", + "label": "" + }, + "only-here": { + "description": "", + "label": "" + } + } + }, + "reason": "", + "reason-placeholder": "", + "selected-text": "", + "type": "", + "type-placeholder": "" + }, + "title": "" + } + }, "redaction-abbreviation": "R", "references": "", "remove-annotations-dialog": { diff --git a/apps/red-ui/src/assets/i18n/redact/en.json b/apps/red-ui/src/assets/i18n/redact/en.json index 6af3171a7..0446bd7a9 100644 --- a/apps/red-ui/src/assets/i18n/redact/en.json +++ b/apps/red-ui/src/assets/i18n/redact/en.json @@ -1900,6 +1900,47 @@ }, "header": "Edit Image Type" }, + "redact-text": { + "dialog": { + "actions": { + "cancel": "Cancel", + "save": "Save" + }, + "content": { + "comment": "Comment", + "comment-placeholder": "Add remarks or mentions ...", + "legal-basis": "Legal Basis", + "options": { + "hint": { + "in-dossier": { + "description": "Add hint in every document in Dossier Alpha.", + "label": "Add hint in dossier" + }, + "only-here": { + "description": "Add hint only at this position in this document.", + "label": "Add hint only here" + } + }, + "redact": { + "in-dossier": { + "description": "Add redaction in every document in Dossier Alpha.", + "label": "Redact in dossier" + }, + "only-here": { + "description": "Add redaction only at this position in this document.", + "label": "Redact only here" + } + } + }, + "reason": "Reason", + "reason-placeholder": "Select a reason ...", + "selected-text": "Selected text:", + "type": "Type", + "type-placeholder": "Select type ..." + }, + "title": "Redact text" + } + }, "redaction-abbreviation": "R", "references": "{count} {count, plural, one{reference} other{references}}", "remove-annotations-dialog": { diff --git a/apps/red-ui/src/assets/i18n/scm/de.json b/apps/red-ui/src/assets/i18n/scm/de.json index 9de02d917..6cdc7d44e 100644 --- a/apps/red-ui/src/assets/i18n/scm/de.json +++ b/apps/red-ui/src/assets/i18n/scm/de.json @@ -1900,6 +1900,47 @@ }, "header": "Bildtypen bearbeiten" }, + "redact-text": { + "dialog": { + "actions": { + "cancel": "", + "save": "" + }, + "content": { + "comment": "", + "comment-placeholder": "", + "legal-basis": "", + "options": { + "hint": { + "in-dossier": { + "description": "", + "label": "" + }, + "only-here": { + "description": "", + "label": "" + } + }, + "redact": { + "in-dossier": { + "description": "", + "label": "" + }, + "only-here": { + "description": "", + "label": "" + } + } + }, + "reason": "", + "reason-placeholder": "", + "selected-text": "", + "type": "", + "type-placeholder": "" + }, + "title": "" + } + }, "redaction-abbreviation": "C", "references": "", "remove-annotations-dialog": { diff --git a/apps/red-ui/src/assets/i18n/scm/en.json b/apps/red-ui/src/assets/i18n/scm/en.json index 9f266d4fc..349592572 100644 --- a/apps/red-ui/src/assets/i18n/scm/en.json +++ b/apps/red-ui/src/assets/i18n/scm/en.json @@ -1900,6 +1900,47 @@ }, "header": "Edit Image Type" }, + "redact-text": { + "dialog": { + "actions": { + "cancel": "Cancel", + "save": "Save" + }, + "content": { + "comment": "Comment", + "comment-placeholder": "Add remarks or mentions ...", + "legal-basis": "Legal Basis", + "options": { + "hint": { + "in-dossier": { + "description": "Add hint in every document in Dossier Alpha.", + "label": "Add hint in dossier" + }, + "only-here": { + "description": "Add hint only at this position in this document.", + "label": "Add hint only here" + } + }, + "redact": { + "in-dossier": { + "description": "Add redaction in every document in Dossier Alpha.", + "label": "Redact in dossier" + }, + "only-here": { + "description": "Add redaction only at this position in this document.", + "label": "Redact only here" + } + } + }, + "reason": "Reason", + "reason-placeholder": "Select a reason ...", + "selected-text": "Selected text:", + "type": "Type", + "type-placeholder": "Select type ..." + }, + "title": "Redact text" + } + }, "redaction-abbreviation": "C", "references": "{count} {count, plural, one{reference} other{references}}", "remove-annotations-dialog": { diff --git a/apps/red-ui/src/assets/icons/general/pdftron-action-add-hint.svg b/apps/red-ui/src/assets/icons/general/pdftron-action-add-hint.svg new file mode 100644 index 000000000..1fe57ac1b --- /dev/null +++ b/apps/red-ui/src/assets/icons/general/pdftron-action-add-hint.svg @@ -0,0 +1,11 @@ + + + + + + H + + + diff --git a/apps/red-ui/src/assets/icons/general/pdftron-action-add-redaction.svg b/apps/red-ui/src/assets/icons/general/pdftron-action-add-redaction.svg index 8e984bddf..584946975 100644 --- a/apps/red-ui/src/assets/icons/general/pdftron-action-add-redaction.svg +++ b/apps/red-ui/src/assets/icons/general/pdftron-action-add-redaction.svg @@ -3,7 +3,7 @@ xmlns="http://www.w3.org/2000/svg"> - R diff --git a/apps/red-ui/src/assets/icons/general/push-pin.svg b/apps/red-ui/src/assets/icons/general/push-pin.svg new file mode 100644 index 000000000..1b0667a76 --- /dev/null +++ b/apps/red-ui/src/assets/icons/general/push-pin.svg @@ -0,0 +1,3 @@ + + +