Merge branch 'VM/RED-10256' into 'master'

RED-10256 - Bulk-local: Changes should not be filtered + Remove for...

Closes RED-10256

See merge request redactmanager/red-ui!661
This commit is contained in:
Dan Percic 2024-10-30 13:38:06 +01:00
commit c52116f4e7
3 changed files with 9 additions and 6 deletions

View File

@ -33,6 +33,7 @@ import {
LegalBasisOption, LegalBasisOption,
RectangleRedactOption, RectangleRedactOption,
RectangleRedactOptions, RectangleRedactOptions,
RedactOrHintOptions,
} from '../../utils/dialog-types'; } from '../../utils/dialog-types';
import { DetailsRadioComponent } from '@common-ui/inputs/details-radio/details-radio.component'; import { DetailsRadioComponent } from '@common-ui/inputs/details-radio/details-radio.component';
import { DetailsRadioOption } from '@common-ui/inputs/details-radio/details-radio-option'; import { DetailsRadioOption } from '@common-ui/inputs/details-radio/details-radio-option';
@ -88,7 +89,7 @@ export class EditRedactionDialogComponent
{ label: redaction.value, bold: true }, { label: redaction.value, bold: true },
{ label: redaction.typeLabel }, { label: redaction.typeLabel },
]); ]);
options = this.allRectangles ? getRectangleRedactOptions('edit') : getEditRedactionOptions(); options = this.allRectangles ? getRectangleRedactOptions('edit') : getEditRedactionOptions(this.isHint);
legalOptions: LegalBasisOption[] = []; legalOptions: LegalBasisOption[] = [];
dictionaries: Dictionary[] = []; dictionaries: Dictionary[] = [];
typeSelectOptions: TypeSelectOptions[] = []; typeSelectOptions: TypeSelectOptions[] = [];
@ -214,7 +215,7 @@ export class EditRedactionDialogComponent
const initialReason: LegalBasisOption = this.initialFormValue.reason; const initialReason: LegalBasisOption = this.initialFormValue.reason;
const initialLegalBasis = initialReason?.legalBasis ?? ''; const initialLegalBasis = initialReason?.legalBasis ?? '';
const pageNumbers = parseSelectedPageNumbers( const pageNumbers = parseSelectedPageNumbers(
this.form.get('option').value.additionalInput?.value, this.form.get('option').value?.additionalInput?.value,
this.data.file, this.data.file,
this.data.annotations[0], this.data.annotations[0],
); );
@ -226,7 +227,7 @@ export class EditRedactionDialogComponent
comment: value.comment, comment: value.comment,
type: value.type, type: value.type,
value: this.allRectangles ? value.value : null, value: this.allRectangles ? value.value : null,
option: value.option.value, option: value.option?.value ?? RedactOrHintOptions.ONLY_HERE,
position, position,
pageNumbers, pageNumbers,
}); });

View File

@ -588,8 +588,6 @@ export class AnnotationActionsService {
return { return {
value: redaction.value, value: redaction.value,
rectangle: redaction.value === NON_READABLE_CONTENT, rectangle: redaction.value === NON_READABLE_CONTENT,
originTypes: [redaction.entry.type],
originLegalBases: [redaction.legalBasis],
pageNumbers: dialogResult.pageNumbers, pageNumbers: dialogResult.pageNumbers,
position: dialogResult.position, position: dialogResult.position,
comment: dialogResult.comment, comment: dialogResult.comment,

View File

@ -30,7 +30,11 @@ const DOCUMENT_ICON = 'iqser:document';
const FOLDER_ICON = 'red:folder'; const FOLDER_ICON = 'red:folder';
const REMOVE_FROM_DICT_ICON = 'red:remove-from-dict'; const REMOVE_FROM_DICT_ICON = 'red:remove-from-dict';
export const getEditRedactionOptions = (): DetailsRadioOption<EditRedactionOption>[] => { export const getEditRedactionOptions = (hint: boolean): DetailsRadioOption<EditRedactionOption>[] => {
if (hint) {
return [];
}
return [ return [
{ {
label: editRedactionTranslations.onlyHere.label, label: editRedactionTranslations.onlyHere.label,