RED-9131: user can customize add/remove dialog defaults.

This commit is contained in:
Nicoleta Panaghiu 2024-05-15 15:54:01 +03:00
parent 0d5a05e9da
commit 0e8c7ec7a8
18 changed files with 795 additions and 184 deletions

View File

@ -9,9 +9,10 @@ import { TranslateModule } from '@ngx-translate/core';
import { IconButtonComponent, IqserAllowDirective, IqserHelpModeModule } from '@iqser/common-ui';
import { PreferencesComponent } from './screens/preferences/preferences.component';
import { SideNavComponent } from '@iqser/common-ui/lib/shared';
import { DialogDefaultsComponent } from './screens/preferences/dialog-defaults/dialog-defaults.component';
@NgModule({
declarations: [AccountSideNavComponent, BaseAccountScreenComponent, PreferencesComponent],
declarations: [AccountSideNavComponent, BaseAccountScreenComponent, PreferencesComponent, DialogDefaultsComponent],
imports: [
CommonModule,
SharedModule,

View File

@ -0,0 +1,77 @@
<form [formGroup]="form">
<div class="dialog-content">
<h1>{{ 'dialog-defaults-form.title' | translate }}</h1>
<h2>{{ 'dialog-defaults-form.redaction.title' | translate }}</h2>
<div class="iqser-input-group w-450">
<label translate="dialog-defaults-form.redaction.add-dialog"></label>
<mat-form-field>
<mat-select formControlName="addRedaction">
<mat-option *ngFor="let option of redactionAddOptions" [value]="option.value">{{
option.label | translate
}}</mat-option>
</mat-select>
</mat-form-field>
<mat-checkbox *ngIf="displayExtraOptionAddRedaction" formControlName="addRedactionApplyToAll">{{
'dialog-defaults-form.extra-option-label' | translate
}}</mat-checkbox>
</div>
<div class="iqser-input-group w-450">
<label translate="dialog-defaults-form.redaction.remove-dialog"></label>
<mat-form-field>
<mat-select formControlName="removeRedaction">
<mat-option *ngFor="let option of redactionRemoveOptions" [value]="option.value">{{
option.label | translate
}}</mat-option>
</mat-select>
</mat-form-field>
<mat-checkbox *ngIf="displayExtraOptionRemoveRedaction" formControlName="removeRedactionApplyToAll">{{
'dialog-defaults-form.extra-option-label' | translate
}}</mat-checkbox>
</div>
<h2>{{ 'dialog-defaults-form.recommendation.title' | translate }}</h2>
<div class="iqser-input-group w-450">
<label translate="dialog-defaults-form.recommendation.remove-dialog"></label>
<mat-form-field>
<mat-select formControlName="removeRecommendation">
<mat-option *ngFor="let option of recommendationRemoveOptions" [value]="option.value">{{
option.label | translate
}}</mat-option>
</mat-select>
</mat-form-field>
<mat-checkbox *ngIf="displayExtraOptionRemoveRecommendation" formControlName="removeRecommendationApplyToAll">{{
'dialog-defaults-form.extra-option-label' | translate
}}</mat-checkbox>
</div>
<h2>{{ 'dialog-defaults-form.hint.title' | translate }}</h2>
<div class="iqser-input-group w-450">
<label translate="dialog-defaults-form.hint.add-dialog"></label>
<mat-form-field>
<mat-select formControlName="addHint">
<mat-option *ngFor="let option of hintAddOptions" [value]="option.value">{{ option.label | translate }}</mat-option>
</mat-select>
</mat-form-field>
<mat-checkbox *ngIf="displayExtraOptionAddHint" formControlName="addHintApplyToAll">{{
'dialog-defaults-form.extra-option-label' | translate
}}</mat-checkbox>
</div>
<div class="iqser-input-group w-450">
<label translate="dialog-defaults-form.hint.remove-dialog"></label>
<mat-form-field>
<mat-select formControlName="removeHint">
<mat-option *ngFor="let option of removeOptions" [value]="option.value">{{ option.label | translate }}</mat-option>
</mat-select>
</mat-form-field>
<mat-checkbox *ngIf="displayExtraOptionRemoveHint" formControlName="removeHintApplyToAll">{{
'dialog-defaults-form.extra-option-label' | translate
}}</mat-checkbox>
</div>
</div>
<div class="dialog-actions">
<iqser-icon-button
(action)="save()"
[disabled]="!valid || !changed"
[label]="'preferences-screen.actions.save' | translate"
[type]="iconButtonTypes.primary"
></iqser-icon-button>
</div>
</form>

View File

@ -0,0 +1,3 @@
mat-checkbox {
margin: 8px 0 0 8px;
}

View File

@ -0,0 +1,172 @@
import { ChangeDetectorRef, Component, inject } from '@angular/core';
import { BaseFormComponent } from '@common-ui/form';
import { FormBuilder, FormGroup } from '@angular/forms';
import {
RedactOrHintOption,
RedactOrHintOptions,
RemoveRedactionOption,
RemoveRedactionOptions,
} from '../../../../file-preview/utils/dialog-options';
import { PreferencesKeys, UserPreferenceService } from '@users/user-preference.service';
import { AsControl } from '@common-ui/utils';
import {
hintAddOptions,
recommendationRemoveOptions,
redactionAddOptions,
redactionRemoveOptions,
removeOptions,
SystemDefaultType,
} from '../../../utils/dialog-defaults';
interface DefaultOptionsForm {
addRedaction: RedactOrHintOption | SystemDefaultType;
addHint: RedactOrHintOption | SystemDefaultType;
removeRedaction: RemoveRedactionOption | SystemDefaultType;
removeRecommendation: RemoveRedactionOption | SystemDefaultType;
removeHint: RemoveRedactionOption | SystemDefaultType;
addRedactionApplyToAll: boolean;
removeRedactionApplyToAll: boolean;
removeRecommendationApplyToAll: boolean;
addHintApplyToAll: boolean;
removeHintApplyToAll: boolean;
}
@Component({
selector: 'redaction-dialog-defaults',
templateUrl: './dialog-defaults.component.html',
styleUrl: './dialog-defaults.component.scss',
})
export class DialogDefaultsComponent extends BaseFormComponent {
readonly #formBuilder = inject(FormBuilder);
readonly #userPreferences = inject(UserPreferenceService);
readonly #changeDetectorRef = inject(ChangeDetectorRef);
form: FormGroup<AsControl<DefaultOptionsForm>> = this.#formBuilder.group({
addRedaction: this.#userPreferences.getAddRedactionDefaultOption(),
addHint: this.#userPreferences.getAddHintDefaultOption(),
removeRedaction: this.#userPreferences.getRemoveRedactionDefaultOption(),
removeRecommendation: this.#userPreferences.getRemoveRecommendationDefaultOption(),
removeHint: this.#userPreferences.getRemoveHintDefaultOption(),
addRedactionApplyToAll: this.#userPreferences.getBool(PreferencesKeys.addRedactionDefaultExtraOption),
removeRedactionApplyToAll: this.#userPreferences.getBool(PreferencesKeys.removeRedactionDefaultExtraOption),
removeRecommendationApplyToAll: this.#userPreferences.getBool(PreferencesKeys.removeRecommendationDefaultExtraOption),
addHintApplyToAll: this.#userPreferences.getBool(PreferencesKeys.addHintDefaultExtraOption),
removeHintApplyToAll: this.#userPreferences.getBool(PreferencesKeys.removeHintDefaultExtraOption),
});
initialFormValue = this.form.getRawValue();
readonly redactionAddOptions = redactionAddOptions;
readonly hintAddOptions = hintAddOptions;
readonly removeOptions = removeOptions;
readonly redactionRemoveOptions = redactionRemoveOptions;
readonly recommendationRemoveOptions = recommendationRemoveOptions;
get displayExtraOptionAddRedaction() {
return RedactOrHintOptions.IN_DOSSIER === this.form.controls.addRedaction.value;
}
get displayExtraOptionAddHint() {
return RedactOrHintOptions.IN_DOSSIER === this.form.controls.addHint.value;
}
get displayExtraOptionRemoveRedaction() {
return (
[RemoveRedactionOptions.IN_DOSSIER, RemoveRedactionOptions.FALSE_POSITIVE] as Partial<
RemoveRedactionOption | SystemDefaultType
>[]
).includes(this.form.controls.removeRedaction.value);
}
get displayExtraOptionRemoveHint() {
return RemoveRedactionOptions.IN_DOSSIER === this.form.controls.removeHint.value;
}
get displayExtraOptionRemoveRecommendation() {
return RemoveRedactionOptions.DO_NOT_RECOMMEND === this.form.controls.removeRecommendation.value;
}
constructor() {
super();
}
async save(): Promise<any> {
const formValue = this.form.value;
if (this.initialFormValue.addRedaction !== this.form.controls.addRedaction.value) {
await this.#userPreferences.saveAddRedactionDefaultOption(this.form.controls.addRedaction.value);
}
if (this.initialFormValue.addHint !== this.form.controls.addHint.value) {
await this.#userPreferences.saveAddHintDefaultOption(this.form.controls.addHint.value);
}
if (this.initialFormValue.removeRedaction !== this.form.controls.removeRedaction.value) {
await this.#userPreferences.saveRemoveRedactionDefaultOption(this.form.controls.removeRedaction.value);
}
if (this.initialFormValue.removeRecommendation !== this.form.controls.removeRecommendation.value) {
await this.#userPreferences.saveRemoveRecommendationDefaultOption(this.form.controls.removeRecommendation.value);
}
if (this.initialFormValue.removeHint !== this.form.controls.removeHint.value) {
await this.#userPreferences.saveRemoveHintDefaultOption(this.form.controls.removeHint.value);
}
if (this.displayExtraOptionAddRedaction) {
if (this.initialFormValue.addRedactionApplyToAll !== this.form.controls.addRedactionApplyToAll.value) {
await this.#userPreferences.saveAddRedactionDefaultExtraOption(this.form.controls.addRedactionApplyToAll.value);
}
} else {
await this.#userPreferences.saveAddRedactionDefaultExtraOption('undefined');
}
if (this.displayExtraOptionAddHint) {
if (this.initialFormValue.addHintApplyToAll !== this.form.controls.addHintApplyToAll.value) {
await this.#userPreferences.saveAddHintDefaultExtraOption(this.form.controls.addHintApplyToAll.value);
}
} else {
await this.#userPreferences.saveAddHintDefaultExtraOption('undefined');
}
if (this.displayExtraOptionRemoveRedaction) {
if (this.initialFormValue.removeRedactionApplyToAll !== this.form.controls.removeRedactionApplyToAll.value) {
await this.#userPreferences.saveRemoveRedactionDefaultExtraOption(this.form.controls.removeRedactionApplyToAll.value);
}
} else {
await this.#userPreferences.saveRemoveRedactionDefaultExtraOption('undefined');
}
if (this.displayExtraOptionRemoveHint) {
if (this.initialFormValue.removeHintApplyToAll !== this.form.controls.removeHintApplyToAll.value) {
await this.#userPreferences.saveRemoveHintDefaultExtraOption(this.form.controls.removeHintApplyToAll.value);
}
} else {
await this.#userPreferences.saveRemoveHintDefaultExtraOption('undefined');
}
if (this.displayExtraOptionRemoveRecommendation) {
if (this.initialFormValue.removeRecommendationApplyToAll !== this.form.controls.removeRecommendationApplyToAll.value) {
await this.#userPreferences.saveRemoveRecommendationDefaultExtraOption(
this.form.controls.removeRecommendationApplyToAll.value,
);
}
} else {
await this.#userPreferences.saveRemoveRecommendationDefaultExtraOption('undefined');
}
await this.#userPreferences.reload();
this.#patchValues();
this.initialFormValue = this.form.getRawValue();
this.#changeDetectorRef.markForCheck();
}
#patchValues() {
this.form.patchValue({
addRedaction: this.#userPreferences.getAddRedactionDefaultOption(),
addHint: this.#userPreferences.getAddHintDefaultOption(),
removeRedaction: this.#userPreferences.getRemoveRedactionDefaultOption(),
removeRecommendation: this.#userPreferences.getRemoveRecommendationDefaultOption(),
removeHint: this.#userPreferences.getRemoveHintDefaultOption(),
addRedactionApplyToAll: this.#userPreferences.getBool(PreferencesKeys.addRedactionDefaultExtraOption),
removeRedactionApplyToAll: this.#userPreferences.getBool(PreferencesKeys.removeRedactionDefaultExtraOption),
removeRecommendationApplyToAll: this.#userPreferences.getBool(PreferencesKeys.removeRecommendationDefaultExtraOption),
addHintApplyToAll: this.#userPreferences.getBool(PreferencesKeys.addHintDefaultExtraOption),
removeHintApplyToAll: this.#userPreferences.getBool(PreferencesKeys.removeHintDefaultExtraOption),
});
}
}

View File

@ -1,6 +1,7 @@
<redaction-dialog-defaults *ngIf="currentScreen === screens.WARNING_PREFERENCES && !config.IS_DOCUMINE"></redaction-dialog-defaults>
<form [formGroup]="form">
<div class="dialog-content">
<div *ngIf="currentScreen === screens.WARNING_PREFERENCES" class="content-delimiter"></div>
<div class="dialog-content-left">
<ng-container *ngIf="currentScreen === screens.PREFERENCES">
<div class="iqser-input-group">
@ -22,7 +23,7 @@
</ng-container>
<ng-container *ngIf="currentScreen === screens.WARNING_PREFERENCES">
<p class="warnings-subtitle">{{ 'preferences-screen.warnings-subtitle' | translate }}</p>
<h1>{{ 'preferences-screen.warnings-subtitle' | translate }}</h1>
<p class="warnings-description">{{ 'preferences-screen.warnings-description' | translate }}</p>
<div class="iqser-input-group">

View File

@ -5,12 +5,6 @@
margin-bottom: 15px;
}
.warnings-subtitle {
font-size: var(--iqser-font-size);
color: var(--iqser-text);
font-weight: 600;
}
.warnings-description {
width: 105%;
}

View File

@ -0,0 +1,84 @@
import { redactTextTranslations } from '@translations/redact-text-translations';
import { RedactOrHintOptions, RemoveRedactionOptions } from '../../file-preview/utils/dialog-options';
import { removeRedactionTranslations } from '@translations/remove-redaction-translations';
import { addHintTranslations } from '@translations/add-hint-translations';
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
export const SystemDefaults = {
ADD_REDACTION_DEFAULT: RedactOrHintOptions.IN_DOSSIER,
ADD_HINT_DEFAULT: RedactOrHintOptions.IN_DOSSIER,
REMOVE_REDACTION_DEFAULT: RemoveRedactionOptions.ONLY_HERE,
REMOVE_HINT_DEFAULT: RemoveRedactionOptions.ONLY_HERE,
REMOVE_RECOMMENDATION_DEFAULT: RemoveRedactionOptions.DO_NOT_RECOMMEND,
} as const;
export const SystemDefaultOption = {
SYSTEM_DEFAULT: 'SYSTEM_DEFAULT',
label: _('dialog-defaults-form.system-default'),
} as const;
export type SystemDefaultType = typeof SystemDefaultOption.SYSTEM_DEFAULT;
export const redactionAddOptions = [
{
label: SystemDefaultOption.label,
value: SystemDefaultOption.SYSTEM_DEFAULT,
},
{
label: redactTextTranslations.onlyHere.label,
value: RedactOrHintOptions.ONLY_HERE,
},
{
label: redactTextTranslations.inDossier.label,
value: RedactOrHintOptions.IN_DOSSIER,
},
];
export const hintAddOptions = [
{
label: SystemDefaultOption.label,
value: SystemDefaultOption.SYSTEM_DEFAULT,
},
{
label: addHintTranslations.onlyHere.label,
value: RedactOrHintOptions.ONLY_HERE,
},
{
label: addHintTranslations.inDossier.label,
value: RedactOrHintOptions.IN_DOSSIER,
},
];
export const removeOptions = [
{
label: SystemDefaultOption.label,
value: SystemDefaultOption.SYSTEM_DEFAULT,
},
{
label: removeRedactionTranslations.ONLY_HERE.label,
value: RemoveRedactionOptions.ONLY_HERE,
},
{
label: removeRedactionTranslations.IN_DOSSIER.label,
value: RemoveRedactionOptions.IN_DOSSIER,
},
];
export const redactionRemoveOptions = [
...removeOptions,
{
label: removeRedactionTranslations.FALSE_POSITIVE.label,
value: RemoveRedactionOptions.FALSE_POSITIVE,
},
];
export const recommendationRemoveOptions = [
{
label: SystemDefaultOption.label,
value: SystemDefaultOption.SYSTEM_DEFAULT,
},
{
label: removeRedactionTranslations.DO_NOT_RECOMMEND.label,
value: RemoveRedactionOptions.DO_NOT_RECOMMEND,
},
];

View File

@ -9,6 +9,9 @@ import { Roles } from '@users/roles';
import { tap } from 'rxjs/operators';
import { getRedactOrHintOptions, RedactOrHintOption, RedactOrHintOptions } from '../../utils/dialog-options';
import { AddHintData, AddHintResult } from '../../utils/dialog-types';
import { UserPreferenceService } from '@users/user-preference.service';
import { SystemDefaultOption, SystemDefaults } from '../../../account/utils/dialog-defaults';
import { stringToBoolean } from '@utils/functions';
@Component({
templateUrl: './add-hint-dialog.component.html',
@ -30,10 +33,11 @@ export class AddHintDialogComponent extends IqserDialogComponent<AddHintDialogCo
private readonly _dictionaryService: DictionaryService,
private readonly _iqserPermissionsService: IqserPermissionsService,
private readonly _formBuilder: FormBuilder,
private readonly _userPreferences: UserPreferenceService,
) {
super();
this.#dossier = _activeDossiersService.find(this.data.dossierId);
this.#applyToAllDossiers = this.data.applyToAllDossiers ?? true;
this.#applyToAllDossiers = this.applyToAll;
this.options = getRedactOrHintOptions(
this.#dossier,
this.#applyToAllDossiers,
@ -67,6 +71,28 @@ export class AddHintDialogComponent extends IqserDialogComponent<AddHintDialogCo
return null;
}
get applyToAll() {
return this.isSystemDefault || this._userPreferences.getAddHintDefaultExtraOption() === 'undefined'
? this.data.applyToAllDossiers ?? true
: stringToBoolean(this._userPreferences.getAddHintDefaultExtraOption());
}
get isSystemDefault(): boolean {
return this._userPreferences.getAddHintDefaultOption() === SystemDefaultOption.SYSTEM_DEFAULT;
}
get defaultOption() {
const defaultOption = this.isSystemDefault
? this.#getOption(SystemDefaults.ADD_HINT_DEFAULT)
: this.#getOption(this._userPreferences.getAddHintDefaultOption() as RedactOrHintOption);
this.dictionaryRequest = defaultOption.value === RedactOrHintOptions.IN_DOSSIER;
if (this.dictionaryRequest) {
this.#setDictionaries();
return defaultOption;
}
return defaultOption ?? this.options[0];
}
get disabled() {
return this.#isRss || !this.form.get('dictionary').value;
}
@ -119,7 +145,7 @@ export class AddHintDialogComponent extends IqserDialogComponent<AddHintDialogCo
selectedText: this.data?.manualRedactionEntryWrapper?.manualRedactionEntry?.value,
comment: [null],
dictionary: [null],
option: [this.options[0]],
option: [this.defaultOption],
});
}
@ -138,10 +164,14 @@ export class AddHintDialogComponent extends IqserDialogComponent<AddHintDialogCo
}
#resetValues() {
this.#applyToAllDossiers = this.data.applyToAllDossiers ?? true;
this.#applyToAllDossiers = this.applyToAll;
if (!this.#isRss) {
this.options[1].extraOption.checked = this.#applyToAllDossiers;
}
this.form.get('dictionary').setValue(null);
}
#getOption(option: RedactOrHintOption): DetailsRadioOption<RedactOrHintOption> {
return this.options.find(o => o.value === option);
}
}

View File

@ -30,7 +30,7 @@ export class RemoveAnnotationDialogComponent extends IqserDialogComponent<
constructor(private readonly _formBuilder: FormBuilder) {
super();
this.options = getRemoveRedactionOptions(this.data, true);
this.options = getRemoveRedactionOptions(this.data, this.data.applyToAllDossiers, true);
this.redactedTexts = this.data.redactions.map(annotation => annotation.value);
this.form = this.#getForm();
}

View File

@ -7,12 +7,14 @@ import { ActiveDossiersService } from '@services/dossiers/active-dossiers.servic
import { DictionaryService } from '@services/entity-services/dictionary.service';
import { JustificationsService } from '@services/entity-services/justifications.service';
import { Roles } from '@users/roles';
import { calcTextWidthInPixels } from '@utils/functions';
import { calcTextWidthInPixels, stringToBoolean } from '@utils/functions';
import { firstValueFrom, Observable } from 'rxjs';
import { map, tap } from 'rxjs/operators';
import { getRedactOrHintOptions, RedactOrHintOption, RedactOrHintOptions } from '../../utils/dialog-options';
import { RedactTextData, RedactTextResult } from '../../utils/dialog-types';
import { LegalBasisOption } from '../manual-redaction-dialog/manual-annotation-dialog.component';
import { UserPreferenceService } from '@users/user-preference.service';
import { SystemDefaultOption, SystemDefaults } from '../../../account/utils/dialog-defaults';
const MAXIMUM_TEXT_AREA_WIDTH = 421;
@ -38,29 +40,41 @@ export class RedactTextDialogComponent
readonly displayedDictionaryLabel$: Observable<string>;
readonly #dossier = inject(ActiveDossiersService).find(this.data.dossierId);
readonly #manualRedactionTypeExists = inject(DictionaryService).hasManualType(this.#dossier.dossierTemplateId);
#applyToAllDossiers = this.data.applyToAllDossiers ?? true;
#applyToAllDossiers = this.applyToAll;
readonly maximumTextAreaWidth = MAXIMUM_TEXT_AREA_WIDTH;
readonly maximumSelectedTextWidth = 567;
textWidth: number;
get isSystemDefault(): boolean {
return this._userPreferences.getAddRedactionDefaultOption() === SystemDefaultOption.SYSTEM_DEFAULT;
}
get defaultOption() {
const inDossierOption = this.options.find(option => option.value === RedactOrHintOptions.IN_DOSSIER);
this.dictionaryRequest = !!inDossierOption && !inDossierOption.disabled;
const defaultOption = this.isSystemDefault
? this.#getOption(SystemDefaults.ADD_REDACTION_DEFAULT)
: this.#getOption(this._userPreferences.getAddRedactionDefaultOption() as RedactOrHintOption);
this.dictionaryRequest = defaultOption.value === RedactOrHintOptions.IN_DOSSIER;
if (this.dictionaryRequest) {
this.#setDictionaries();
return inDossierOption;
return defaultOption;
}
return this.options[0];
return defaultOption ?? this.options[0];
}
get applyToAll() {
return this.isSystemDefault || this._userPreferences.getAddRedactionDefaultExtraOption() === 'undefined'
? this.data.applyToAllDossiers ?? true
: stringToBoolean(this._userPreferences.getAddRedactionDefaultExtraOption());
}
constructor(
private readonly _justificationsService: JustificationsService,
private readonly _dictionaryService: DictionaryService,
private readonly _formBuilder: FormBuilder,
private readonly _userPreferences: UserPreferenceService,
) {
super();
this.options = getRedactOrHintOptions(this.#dossier, this.#applyToAllDossiers, this.data.isApprover, this.data.isPageExcluded);
this.form = this.#getForm();
this.#setupValidators(this.dictionaryRequest ? RedactOrHintOptions.IN_DOSSIER : RedactOrHintOptions.ONLY_HERE);
@ -208,7 +222,7 @@ export class RedactTextDialogComponent
}
#resetValues() {
this.#applyToAllDossiers = this.data.applyToAllDossiers ?? true;
this.#applyToAllDossiers = this.applyToAll;
this.options[1].extraOption.checked = this.#applyToAllDossiers;
if (this.dictionaryRequest) {
this.form.controls.reason.setValue(null);
@ -218,5 +232,7 @@ export class RedactTextDialogComponent
this.form.controls.dictionary.setValue(this.#manualRedactionTypeExists ? SuperTypes.ManualRedaction : null);
}
protected readonly window = window;
#getOption(option: RedactOrHintOption): DetailsRadioOption<RedactOrHintOption> {
return this.options.find(o => o.value === option);
}
}

View File

@ -8,6 +8,9 @@ import { DialogHelpModeKeys } from '../../utils/constants';
import { toSignal } from '@angular/core/rxjs-interop';
import { map } from 'rxjs/operators';
import { ValueColumn } from '../../components/selected-annotations-table/selected-annotations-table.component';
import { UserPreferenceService } from '@users/user-preference.service';
import { SystemDefaultOption, SystemDefaults } from '../../../account/utils/dialog-defaults';
import { stringToBoolean } from '@utils/functions';
@Component({
templateUrl: './remove-redaction-dialog.component.html',
@ -19,9 +22,54 @@ export class RemoveRedactionDialogComponent extends IqserDialogComponent<
RemoveRedactionResult
> {
readonly iconButtonTypes = IconButtonTypes;
readonly options: DetailsRadioOption<RemoveRedactionOption>[] = getRemoveRedactionOptions(this.data);
readonly recommendation = this.data.redactions.every(redaction => redaction.isRecommendation);
readonly hint = this.data.redactions[0].HINT;
readonly hint = this.data.redactions.every(redaction => redaction.isHint);
readonly annotationsType = this.hint ? 'hint' : this.recommendation ? 'recommendation' : 'redaction';
readonly optionByType = {
recommendation: {
main: this._userPreferences.getRemoveRecommendationDefaultOption(),
extra: this._userPreferences.getRemoveRecommendationDefaultExtraOption(),
},
hint: {
main: this._userPreferences.getRemoveHintDefaultOption(),
extra: this._userPreferences.getRemoveHintDefaultExtraOption(),
},
redaction: {
main: this._userPreferences.getRemoveRedactionDefaultOption(),
extra: this._userPreferences.getRemoveRedactionDefaultExtraOption(),
},
};
readonly systemDefaultByType = {
recommendation: {
main: SystemDefaults.REMOVE_RECOMMENDATION_DEFAULT,
extra: this.data.applyToAllDossiers,
},
hint: {
main: SystemDefaults.REMOVE_HINT_DEFAULT,
extra: this.data.applyToAllDossiers,
},
redaction: {
main: SystemDefaults.REMOVE_REDACTION_DEFAULT,
extra: false,
},
};
readonly isSystemDefault = this.optionByType[this.annotationsType].main === SystemDefaultOption.SYSTEM_DEFAULT;
readonly isExtraOptionSystemDefault = this.optionByType[this.annotationsType].extra === 'undefined';
readonly defaultOptionPreference = this.isSystemDefault
? this.systemDefaultByType[this.annotationsType].main
: this.optionByType[this.annotationsType].main;
readonly extraOptionPreference = stringToBoolean(this.optionByType[this.annotationsType].extra);
readonly #applyToAllDossiers = this.systemDefaultByType[this.annotationsType].extra;
readonly options: DetailsRadioOption<RemoveRedactionOption>[] = getRemoveRedactionOptions(
this.data,
this.isSystemDefault || this.isExtraOptionSystemDefault ? this.#applyToAllDossiers : this.extraOptionPreference,
);
readonly skipped = this.data.redactions.some(annotation => annotation.isSkipped);
readonly redactedTexts = this.data.redactions.map(annotation => annotation.value);
@ -56,7 +104,10 @@ export class RemoveRedactionDialogComponent extends IqserDialogComponent<
]),
);
constructor(private readonly _formBuilder: FormBuilder) {
constructor(
private readonly _formBuilder: FormBuilder,
private readonly _userPreferences: UserPreferenceService,
) {
super();
}
@ -78,13 +129,13 @@ export class RemoveRedactionDialogComponent extends IqserDialogComponent<
}
get defaultOption() {
const removeHereOption = this.options.find(option => option.value === RemoveRedactionOptions.ONLY_HERE);
if (!!removeHereOption && !removeHereOption.disabled) return removeHereOption;
const removeDefaultOption = this.#getOption(this.defaultOptionPreference as RemoveRedactionOption);
if (!!removeDefaultOption && !removeDefaultOption.disabled) return removeDefaultOption;
return this.options[0];
}
get typeTranslationArg() {
return { type: this.hint ? 'hint' : this.recommendation ? 'recommendation' : 'redaction' };
return { type: this.annotationsType };
}
get isBulk() {
@ -102,4 +153,8 @@ export class RemoveRedactionDialogComponent extends IqserDialogComponent<
save(): void {
this.close(this.form.getRawValue());
}
#getOption(option: RemoveRedactionOption): DetailsRadioOption<RemoveRedactionOption> {
return this.options.find(o => o.value === option);
}
}

View File

@ -150,10 +150,11 @@ export const getResizeRedactionOptions = (
export const getRemoveRedactionOptions = (
data: RemoveRedactionData,
applyToAllDossiers: boolean,
isDocumine: boolean = false,
): DetailsRadioOption<RemoveRedactionOption>[] => {
const translations = isDocumine ? removeAnnotationTranslations : removeRedactionTranslations;
const { permissions, redactions, applyToAllDossiers, isApprover, falsePositiveContext } = data;
const { permissions, redactions, isApprover, falsePositiveContext } = data;
const isBulk = redactions.length > 1;
const options: DetailsRadioOption<RemoveRedactionOption>[] = [];
@ -179,7 +180,7 @@ export const getRemoveRedactionOptions = (
extraOption: !isDocumine
? {
label: translations.IN_DOSSIER.extraOptionLabel,
checked: redactions[0].isRecommendation && applyToAllDossiers,
checked: applyToAllDossiers,
hidden: !isApprover,
}
: null,
@ -219,7 +220,7 @@ export const getRemoveRedactionOptions = (
extraOption: !isDocumine
? {
label: translations.FALSE_POSITIVE.extraOptionLabel,
checked: false,
checked: applyToAllDossiers,
hidden: !isApprover,
description: translations.FALSE_POSITIVE.extraOptionDescription,
}

View File

@ -1,5 +1,7 @@
import { Injectable } from '@angular/core';
import { IqserUserPreferenceService, ListingMode } from '@iqser/common-ui';
import { RedactOrHintOption, RemoveRedactionOption } from '../modules/file-preview/utils/dialog-options';
import { SystemDefaultOption, SystemDefaultType } from '../modules/account/utils/dialog-defaults';
export const PreferencesKeys = {
dossierRecent: 'Dossier-Recent',
@ -10,6 +12,16 @@ export const PreferencesKeys = {
loadAllAnnotationsWarning: 'Load-All-Annotations-Warning',
openScmDialogByDefault: 'Open-Structured-Component-Management-By-Default',
tableExtractionType: 'Table-Extraction-Type',
addRedactionDefaultOption: 'Add-Redaction-Default',
addHintDefaultOption: 'Add-Hint-Default',
removeRedactionDefaultOption: 'Remove-Redaction-Default',
removeRecommendationDefaultOption: 'Remove-Recommendation-Default',
removeHintDefaultOption: 'Remove-Hint-Default',
addRedactionDefaultExtraOption: 'Add-Redaction-Default-Extra',
addHintDefaultExtraOption: 'Add-Hint-Default-Extra',
removeRedactionDefaultExtraOption: 'Remove-Redaction-Default-Extra',
removeRecommendationDefaultExtraOption: 'Remove-Recommendation-Default-Extra',
removeHintDefaultExtraOption: 'Remove-Hint-Default-Extra',
} as const;
@Injectable({
@ -77,4 +89,94 @@ export class UserPreferenceService extends IqserUserPreferenceService {
getTableExtractionType() {
return this._getAttribute(PreferencesKeys.tableExtractionType, 'EXPERIMENTAL_IF_MISSING');
}
getAddRedactionDefaultOption(): RedactOrHintOption | SystemDefaultType {
return this._getAttribute(PreferencesKeys.addRedactionDefaultOption, SystemDefaultOption.SYSTEM_DEFAULT) as
| RedactOrHintOption
| SystemDefaultType;
}
async saveAddRedactionDefaultOption(defaultOption: RedactOrHintOption | SystemDefaultType): Promise<void> {
await this.save(PreferencesKeys.addRedactionDefaultOption, defaultOption.toString());
}
getAddHintDefaultOption(): RedactOrHintOption | SystemDefaultType {
return this._getAttribute(PreferencesKeys.addHintDefaultOption, SystemDefaultOption.SYSTEM_DEFAULT) as
| RedactOrHintOption
| SystemDefaultType;
}
async saveAddHintDefaultOption(defaultOption: RedactOrHintOption | SystemDefaultType): Promise<void> {
await this.save(PreferencesKeys.addHintDefaultOption, defaultOption.toString());
}
getRemoveRedactionDefaultOption(): RemoveRedactionOption | SystemDefaultType {
return this._getAttribute(PreferencesKeys.removeRedactionDefaultOption, SystemDefaultOption.SYSTEM_DEFAULT) as
| RemoveRedactionOption
| SystemDefaultType;
}
async saveRemoveRedactionDefaultOption(defaultOption: RemoveRedactionOption | SystemDefaultType): Promise<void> {
await this.save(PreferencesKeys.removeRedactionDefaultOption, defaultOption.toString());
}
getRemoveRecommendationDefaultOption(): RemoveRedactionOption | SystemDefaultType {
return this._getAttribute(PreferencesKeys.removeRecommendationDefaultOption, SystemDefaultOption.SYSTEM_DEFAULT) as
| RemoveRedactionOption
| SystemDefaultType;
}
async saveRemoveRecommendationDefaultOption(defaultOption: RemoveRedactionOption | SystemDefaultType): Promise<void> {
await this.save(PreferencesKeys.removeRecommendationDefaultOption, defaultOption.toString());
}
getRemoveHintDefaultOption(): RemoveRedactionOption | SystemDefaultType {
return this._getAttribute(PreferencesKeys.removeHintDefaultOption, SystemDefaultOption.SYSTEM_DEFAULT) as
| RemoveRedactionOption
| SystemDefaultType;
}
async saveRemoveHintDefaultOption(defaultOption: RemoveRedactionOption | SystemDefaultType): Promise<void> {
await this.save(PreferencesKeys.removeHintDefaultOption, defaultOption.toString());
}
getAddRedactionDefaultExtraOption(): string {
return this._getAttribute(PreferencesKeys.addRedactionDefaultExtraOption, 'undefined');
}
async saveAddRedactionDefaultExtraOption(defaultOption: boolean | string): Promise<void> {
await this.save(PreferencesKeys.addRedactionDefaultExtraOption, defaultOption.toString());
}
getAddHintDefaultExtraOption(): string {
return this._getAttribute(PreferencesKeys.addHintDefaultExtraOption, 'undefined');
}
async saveAddHintDefaultExtraOption(defaultOption: boolean | string): Promise<void> {
await this.save(PreferencesKeys.addHintDefaultExtraOption, defaultOption.toString());
}
getRemoveRedactionDefaultExtraOption(): string {
return this._getAttribute(PreferencesKeys.removeRedactionDefaultExtraOption, 'undefined');
}
async saveRemoveRedactionDefaultExtraOption(defaultOption: boolean | string): Promise<void> {
await this.save(PreferencesKeys.removeRedactionDefaultExtraOption, defaultOption.toString());
}
getRemoveHintDefaultExtraOption(): string {
return this._getAttribute(PreferencesKeys.removeHintDefaultExtraOption, 'undefined');
}
async saveRemoveHintDefaultExtraOption(defaultOption: boolean | string): Promise<void> {
await this.save(PreferencesKeys.removeHintDefaultExtraOption, defaultOption.toString());
}
getRemoveRecommendationDefaultExtraOption(): string {
return this._getAttribute(PreferencesKeys.removeRecommendationDefaultExtraOption, 'undefined');
}
async saveRemoveRecommendationDefaultExtraOption(defaultOption: boolean | string): Promise<void> {
await this.save(PreferencesKeys.removeRecommendationDefaultExtraOption, defaultOption.toString());
}
}

View File

@ -134,7 +134,6 @@ export function calcTextWidthInPixels(text: string): number {
return width;
}
export function addPaddingToArray<T>(array: T[], emptyElement: T) {
array.push(emptyElement);
array.splice(0, 0, emptyElement);
export function stringToBoolean(str: string): boolean {
return str === 'true';
}

View File

@ -250,9 +250,6 @@
"watermarks": "Watermarks"
},
"analysis-disabled": "",
"annotation": {
"pending": "(Pending analysis)"
},
"annotation-actions": {
"accept-recommendation": {
"label": "Empfehlung annehmen"
@ -307,14 +304,14 @@
"error": "Rekategorisierung des Bildes gescheitert: {error}",
"success": "Bild wurde einer neuen Kategorie zugeordnet."
},
"remove": {
"error": "Fehler beim Entfernen der Schwärzung: {error}",
"success": "Schwärzung entfernt!"
},
"remove-hint": {
"error": "Failed to remove hint: {error}",
"success": "Hint removed!"
},
"remove": {
"error": "Fehler beim Entfernen der Schwärzung: {error}",
"success": "Schwärzung entfernt!"
},
"undo": {
"error": "Die Aktion konnte nicht rückgängig gemacht werden. Fehler: {error}",
"success": "erfolgreich Rückgängig gemacht"
@ -327,15 +324,15 @@
"remove-highlights": {
"label": "Remove selected earmarks"
},
"resize": {
"label": "Größe ändern"
},
"resize-accept": {
"label": "Größe speichern"
},
"resize-cancel": {
"label": "Größenänderung abbrechen"
},
"resize": {
"label": "Größe ändern"
},
"see-references": {
"label": "See references"
},
@ -367,6 +364,9 @@
"skipped": "Übersprungen",
"text-highlight": "Earmark"
},
"annotation": {
"pending": "(Pending analysis)"
},
"archived-dossiers-listing": {
"no-data": {
"title": "No archived dossiers."
@ -572,18 +572,14 @@
"warning": "Achtung: Diese Aktion kann nicht rückgängig gemacht werden!"
},
"confirmation-dialog": {
"approve-file": {
"question": "Dieses Dokument enthält ungesehene Änderungen. Möchten Sie es trotzdem genehmigen?",
"title": "Warnung!"
},
"approve-file-without-analysis": {
"confirmationText": "Approve without analysis",
"denyText": "Cancel",
"question": "Analysis required to detect new redactions.",
"title": "Warning!"
},
"approve-multiple-files": {
"question": "Mindestens eine der ausgewählten Dateien enthält ungesehene Änderungen. Möchten Sie sie trotzdem genehmigen?",
"approve-file": {
"question": "Dieses Dokument enthält ungesehene Änderungen. Möchten Sie es trotzdem genehmigen?",
"title": "Warnung!"
},
"approve-multiple-files-without-analysis": {
@ -592,6 +588,10 @@
"question": "Analysis required to detect new redactions for at least one file.",
"title": "Warning"
},
"approve-multiple-files": {
"question": "Mindestens eine der ausgewählten Dateien enthält ungesehene Änderungen. Möchten Sie sie trotzdem genehmigen?",
"title": "Warnung!"
},
"assign-file-to-me": {
"question": {
"multiple": "Dieses Dokument wird gerade von einer anderen Person geprüft. Möchten Sie Reviewer werden und sich selbst dem Dokument zuweisen?",
@ -681,6 +681,25 @@
}
},
"dev-mode": "DEV",
"dialog-defaults-form": {
"extra-option-label": "",
"hint": {
"add-dialog": "",
"remove-dialog": "",
"title": ""
},
"recommendation": {
"remove-dialog": "",
"title": ""
},
"redaction": {
"add-dialog": "",
"remove-dialog": "",
"title": ""
},
"system-default": "",
"title": ""
},
"dictionary": "Wörterbuch",
"dictionary-overview": {
"compare": {
@ -936,13 +955,13 @@
"recent": "Neu ({hours} h)",
"unassigned": "Niemandem zugewiesen"
},
"reanalyse": {
"action": "Datei analysieren"
},
"reanalyse-dossier": {
"error": "Die Dateien konnten nicht für eine Reanalyse eingeplant werden. Bitte versuchen Sie es erneut.",
"success": "Dateien für Reanalyse vorgesehen."
},
"reanalyse": {
"action": "Datei analysieren"
},
"start-auto-analysis": "Enable auto-analysis",
"stop-auto-analysis": "Stop auto-analysis",
"table-col-names": {
@ -1011,14 +1030,6 @@
"total-documents": "Anzahl der Dokumente",
"total-people": "<strong>{count}</strong> {count, plural, one{user} other {users}}"
},
"dossier-templates": {
"label": "Dossier-Vorlagen",
"status": {
"active": "Active",
"inactive": "Inactive",
"incomplete": "Incomplete"
}
},
"dossier-templates-listing": {
"action": {
"clone": "Clone template",
@ -1054,6 +1065,14 @@
"title": "{length} {length, plural, one{Dossier-Vorlage} other{Dossier-Vorlagen}}"
}
},
"dossier-templates": {
"label": "Dossier-Vorlagen",
"status": {
"active": "Active",
"inactive": "Inactive",
"incomplete": "Incomplete"
}
},
"dossier-watermark-selector": {
"heading": "Watermarks on documents",
"no-watermark": "There is no watermark defined for the dossier template.<br>Contact your app admin to define one.",
@ -1249,15 +1268,6 @@
"title": "{length} {length, plural, one{Wörterbuch} other{Wörterbücher}}"
}
},
"entity": {
"info": {
"actions": {
"revert": "Revert",
"save": "Save changes"
},
"heading": "Edit entity"
}
},
"entity-rules-screen": {
"error": {
"generic": "Something went wrong... Entity rules update failed!"
@ -1272,19 +1282,28 @@
"warning-text": "Warning: experimental feature!",
"warnings-found": "{warnings, plural, one{A warning} other{{warnings} warnings}} found in rules"
},
"entity": {
"info": {
"actions": {
"revert": "Revert",
"save": "Save changes"
},
"heading": "Edit entity"
}
},
"error": {
"deleted-entity": {
"dossier": {
"action": "Zurück zur Übersicht",
"label": "Dieses Dossier wurde gelöscht!"
},
"file": {
"action": "Zurück zum Dossier",
"label": "Diese Datei wurde gelöscht!"
},
"file-dossier": {
"action": "Zurück zur Übersicht",
"label": "Das Dossier dieser Datei wurde gelöscht!"
},
"file": {
"action": "Zurück zum Dossier",
"label": "Diese Datei wurde gelöscht!"
}
},
"file-preview": {
@ -1302,12 +1321,6 @@
},
"exact-date": "{day} {month} {year} um {hour}:{minute} Uhr",
"file": "Datei",
"file-attribute": {
"update": {
"error": "Failed to update file attribute value!",
"success": "File attribute value has been updated successfully!"
}
},
"file-attribute-encoding-types": {
"ascii": "ASCII",
"iso": "ISO-8859-1",
@ -1318,6 +1331,12 @@
"number": "Nummer",
"text": "Freier Text"
},
"file-attribute": {
"update": {
"error": "Failed to update file attribute value!",
"success": "File attribute value has been updated successfully!"
}
},
"file-attributes-configurations": {
"cancel": "Cancel",
"form": {
@ -1536,15 +1555,6 @@
"csv": "File attributes were imported successfully from uploaded CSV file."
}
},
"filter": {
"analysis": "Analyse erforderlich",
"comment": "Kommentare",
"hint": "Nut Hinweise",
"image": "Bilder",
"none": "Keine Anmerkungen",
"redaction": "Geschwärzt",
"updated": "Aktualisiert"
},
"filter-menu": {
"filter-options": "Filteroptionen",
"filter-types": "Filter",
@ -1554,6 +1564,15 @@
"unseen-pages": "Nur Anmerkungen auf unsichtbaren Seiten",
"with-comments": "Nur Anmerkungen mit Kommentaren"
},
"filter": {
"analysis": "Analyse erforderlich",
"comment": "Kommentare",
"hint": "Nut Hinweise",
"image": "Bilder",
"none": "Keine Anmerkungen",
"redaction": "Geschwärzt",
"updated": "Aktualisiert"
},
"filters": {
"assigned-people": "Beauftragt",
"documents-status": "Documents state",
@ -1824,13 +1843,6 @@
"user-promoted-to-approver": "<b>{user}</b> wurde im Dossier <b>{dossierHref, select, null{{dossierName}} other{<a href=\"{dossierHref}\" target=\"_blank\">{dossierName}</a>}}</b> zum Genehmiger ernannt!",
"user-removed-as-dossier-member": "<b>{user}</b> wurde als Mitglied von: <b>{dossierHref, select, null{{dossierName}} other{<a href=\"{dossierHref}\" target=\"_blank\">{dossierName}</a>}}</b> entfernt!"
},
"notifications": {
"button-text": "Notifications",
"deleted-dossier": "Deleted dossier",
"label": "Benachrichtigungen",
"mark-all-as-read": "Alle als gelesen markieren",
"mark-as": "Mark as {type, select, read{read} unread{unread} other{}}"
},
"notifications-screen": {
"category": {
"email-notifications": "E-Mail Benachrichtigungen",
@ -1844,6 +1856,7 @@
"dossier": "Dossierbezogene Benachrichtigungen",
"other": "Andere Benachrichtigungen"
},
"options-title": "Wählen Sie aus, in welcher Kategorie Sie benachrichtigt werden möchten",
"options": {
"ASSIGN_APPROVER": "Wenn ich einem Dokument als Genehmiger zugewiesen bin",
"ASSIGN_REVIEWER": "Wenn ich einem Dokument als Überprüfer zugewiesen bin",
@ -1861,7 +1874,6 @@
"USER_PROMOTED_TO_APPROVER": "Wenn ich Genehmiger in einem Dossier werde",
"USER_REMOVED_AS_DOSSIER_MEMBER": "Wenn ich die Dossier-Mitgliedschaft verliere"
},
"options-title": "Wählen Sie aus, in welcher Kategorie Sie benachrichtigt werden möchten",
"schedule": {
"daily": "Tägliche Zusammenfassung",
"instant": "Sofortig",
@ -1869,6 +1881,13 @@
},
"title": "Benachrichtigungseinstellungen"
},
"notifications": {
"button-text": "Notifications",
"deleted-dossier": "Deleted dossier",
"label": "Benachrichtigungen",
"mark-all-as-read": "Alle als gelesen markieren",
"mark-as": "Mark as {type, select, read{read} unread{unread} other{}}"
},
"ocr": {
"confirmation-dialog": {
"cancel": "Cancel",
@ -1960,16 +1979,16 @@
"warnings-subtitle": "Do not show again options",
"warnings-title": "Prompts and dialogs settings"
},
"processing": {
"basic": "Processing",
"ocr": "OCR"
},
"processing-status": {
"ocr": "OCR",
"pending": "Pending",
"processed": "processed",
"processing": "Processing"
},
"processing": {
"basic": "Processing",
"ocr": "OCR"
},
"readonly": "Lesemodus",
"readonly-archived": "Read only (archived)",
"redact-text": {
@ -2193,12 +2212,6 @@
"red-user-admin": "Benutzer-Admin",
"regular": "Regulär"
},
"search": {
"active-dossiers": "ganze Plattform",
"all-dossiers": "all documents",
"placeholder": "Nach Dokumenten oder Dokumenteninhalt suchen",
"this-dossier": "in diesem Dossier"
},
"search-screen": {
"cols": {
"assignee": "Bevollmächtigter",
@ -2222,6 +2235,12 @@
"no-match": "Keine Dokumente entsprechen Ihren aktuellen Filtern.",
"table-header": "{length} {length, plural, one{Suchergebnis} other{Suchergebnisse}}"
},
"search": {
"active-dossiers": "ganze Plattform",
"all-dossiers": "all documents",
"placeholder": "Nach Dokumenten oder Dokumenteninhalt suchen",
"this-dossier": "in diesem Dossier"
},
"seconds": "seconds",
"size": "Size",
"smtp-auth-config": {
@ -2473,4 +2492,4 @@
}
},
"yesterday": "Gestern"
}
}

View File

@ -681,6 +681,25 @@
}
},
"dev-mode": "DEV",
"dialog-defaults-form": {
"extra-option-label": "Apply to all active and future dossiers",
"hint": {
"add-dialog": "Add hint",
"remove-dialog": "Remove hint",
"title": "Hint"
},
"recommendation": {
"remove-dialog": "Remove recommendation",
"title": "Recommendation"
},
"redaction": {
"add-dialog": "Redact text",
"remove-dialog": "Remove redaction",
"title": "Redaction"
},
"system-default": "Use system default",
"title": "Dialog defaults"
},
"dictionary": "Type",
"dictionary-overview": {
"compare": {
@ -2473,4 +2492,4 @@
}
},
"yesterday": "Yesterday"
}
}

View File

@ -250,9 +250,6 @@
"watermarks": "Watermarks"
},
"analysis-disabled": "Analysis disabled",
"annotation": {
"pending": "(Pending analysis)"
},
"annotation-actions": {
"accept-recommendation": {
"label": "Empfehlung annehmen"
@ -307,14 +304,14 @@
"error": "Rekategorisierung des Bildes gescheitert: {error}",
"success": "Bild wurde einer neuen Kategorie zugeordnet."
},
"remove": {
"error": "Fehler beim Entfernen der Schwärzung: {error}",
"success": "Schwärzung entfernt!"
},
"remove-hint": {
"error": "Failed to remove hint: {error}",
"success": "Hint removed!"
},
"remove": {
"error": "Fehler beim Entfernen der Schwärzung: {error}",
"success": "Schwärzung entfernt!"
},
"undo": {
"error": "Die Aktion konnte nicht rückgängig gemacht werden. Fehler: {error}",
"success": "erfolgreich Rückgängig gemacht"
@ -327,15 +324,15 @@
"remove-highlights": {
"label": "Remove selected earmarks"
},
"resize": {
"label": "Größe ändern"
},
"resize-accept": {
"label": "Größe speichern"
},
"resize-cancel": {
"label": "Größenänderung abbrechen"
},
"resize": {
"label": "Größe ändern"
},
"see-references": {
"label": "See references"
},
@ -367,6 +364,9 @@
"skipped": "Übersprungen",
"text-highlight": "Earmark"
},
"annotation": {
"pending": "(Pending analysis)"
},
"archived-dossiers-listing": {
"no-data": {
"title": "No archived dossiers."
@ -572,18 +572,14 @@
"warning": "Achtung: Diese Aktion kann nicht rückgängig gemacht werden!"
},
"confirmation-dialog": {
"approve-file": {
"question": "Dieses Dokument enthält ungesehene Änderungen. Möchten Sie es trotzdem genehmigen?",
"title": "Warnung!"
},
"approve-file-without-analysis": {
"confirmationText": "Approve without analysis",
"denyText": "Cancel",
"question": "Analysis required to detect new components.",
"title": "Warning!"
},
"approve-multiple-files": {
"question": "Mindestens eine der ausgewählten Dateien enthält ungesehene Änderungen. Möchten Sie sie trotzdem genehmigen?",
"approve-file": {
"question": "Dieses Dokument enthält ungesehene Änderungen. Möchten Sie es trotzdem genehmigen?",
"title": "Warnung!"
},
"approve-multiple-files-without-analysis": {
@ -592,6 +588,10 @@
"question": "Analysis required to detect new components for at least one file.",
"title": "Warning"
},
"approve-multiple-files": {
"question": "Mindestens eine der ausgewählten Dateien enthält ungesehene Änderungen. Möchten Sie sie trotzdem genehmigen?",
"title": "Warnung!"
},
"assign-file-to-me": {
"question": {
"multiple": "Dieses Dokument wird gerade von einer anderen Person geprüft. Möchten Sie Reviewer werden und sich selbst dem Dokument zuweisen?",
@ -681,6 +681,25 @@
}
},
"dev-mode": "DEV",
"dialog-defaults-form": {
"extra-option-label": "",
"hint": {
"add-dialog": "",
"remove-dialog": "",
"title": ""
},
"recommendation": {
"remove-dialog": "",
"title": ""
},
"redaction": {
"add-dialog": "",
"remove-dialog": "",
"title": ""
},
"system-default": "",
"title": ""
},
"dictionary": "Wörterbuch",
"dictionary-overview": {
"compare": {
@ -936,13 +955,13 @@
"recent": "Neu ({hours} h)",
"unassigned": "Niemandem zugewiesen"
},
"reanalyse": {
"action": "Datei analysieren"
},
"reanalyse-dossier": {
"error": "Die Dateien konnten nicht für eine Reanalyse eingeplant werden. Bitte versuchen Sie es erneut.",
"success": "Dateien für Reanalyse vorgesehen."
},
"reanalyse": {
"action": "Datei analysieren"
},
"start-auto-analysis": "Enable auto-analysis",
"stop-auto-analysis": "Stop auto-analysis",
"table-col-names": {
@ -1011,14 +1030,6 @@
"total-documents": "Anzahl der Dokumente",
"total-people": "<strong>{count}</strong> {count, plural, one{user} other {users}}"
},
"dossier-templates": {
"label": "Dossier-Vorlagen",
"status": {
"active": "Active",
"inactive": "Inactive",
"incomplete": "Incomplete"
}
},
"dossier-templates-listing": {
"action": {
"clone": "Clone template",
@ -1054,6 +1065,14 @@
"title": "{length} dossier {length, plural, one{template} other{templates}}"
}
},
"dossier-templates": {
"label": "Dossier-Vorlagen",
"status": {
"active": "Active",
"inactive": "Inactive",
"incomplete": "Incomplete"
}
},
"dossier-watermark-selector": {
"heading": "Watermarks on documents",
"no-watermark": "There is no watermark defined for the dossier template.<br>Contact your app admin to define one.",
@ -1249,15 +1268,6 @@
"title": "{length} {length, plural, one{entity} other{entities}}"
}
},
"entity": {
"info": {
"actions": {
"revert": "Revert",
"save": "Save changes"
},
"heading": "Edit entity"
}
},
"entity-rules-screen": {
"error": {
"generic": "Something went wrong... Entity rules update failed!"
@ -1272,19 +1282,28 @@
"warning-text": "Warning: experimental feature!",
"warnings-found": "{warnings, plural, one{A warning} other{{warnings} warnings}} found in rules"
},
"entity": {
"info": {
"actions": {
"revert": "Revert",
"save": "Save changes"
},
"heading": "Edit entity"
}
},
"error": {
"deleted-entity": {
"dossier": {
"action": "Zurück zur Übersicht",
"label": "Dieses Dossier wurde gelöscht!"
},
"file": {
"action": "Zurück zum Dossier",
"label": "Diese Datei wurde gelöscht!"
},
"file-dossier": {
"action": "Zurück zur Übersicht",
"label": "Das Dossier dieser Datei wurde gelöscht!"
},
"file": {
"action": "Zurück zum Dossier",
"label": "Diese Datei wurde gelöscht!"
}
},
"file-preview": {
@ -1302,12 +1321,6 @@
},
"exact-date": "{day} {month} {year} um {hour}:{minute} Uhr",
"file": "Datei",
"file-attribute": {
"update": {
"error": "Failed to update file attribute value!",
"success": "File attribute value has been updated successfully!"
}
},
"file-attribute-encoding-types": {
"ascii": "ASCII",
"iso": "ISO-8859-1",
@ -1318,6 +1331,12 @@
"number": "Nummer",
"text": "Freier Text"
},
"file-attribute": {
"update": {
"error": "Failed to update file attribute value!",
"success": "File attribute value has been updated successfully!"
}
},
"file-attributes-configurations": {
"cancel": "Cancel",
"form": {
@ -1536,15 +1555,6 @@
"csv": "File attributes were imported successfully from uploaded CSV file."
}
},
"filter": {
"analysis": "Analyse erforderlich",
"comment": "Kommentare",
"hint": "Nut Hinweise",
"image": "Bilder",
"none": "Keine Anmerkungen",
"redaction": "Geschwärzt",
"updated": "Aktualisiert"
},
"filter-menu": {
"filter-options": "Filteroptionen",
"filter-types": "Filter",
@ -1554,6 +1564,15 @@
"unseen-pages": "Nur Anmerkungen auf unsichtbaren Seiten",
"with-comments": "Nur Anmerkungen mit Kommentaren"
},
"filter": {
"analysis": "Analyse erforderlich",
"comment": "Kommentare",
"hint": "Nut Hinweise",
"image": "Bilder",
"none": "Keine Anmerkungen",
"redaction": "Geschwärzt",
"updated": "Aktualisiert"
},
"filters": {
"assigned-people": "Beauftragt",
"documents-status": "Documents state",
@ -1824,13 +1843,6 @@
"user-promoted-to-approver": "<b>{user}</b> wurde im Dossier <b>{dossierHref, select, null{{dossierName}} other{<a href=\"{dossierHref}\" target=\"_blank\">{dossierName}</a>}}</b> zum Genehmiger ernannt!",
"user-removed-as-dossier-member": "<b>{user}</b> wurde als Mitglied von: <b>{dossierHref, select, null{{dossierName}} other{<a href=\"{dossierHref}\" target=\"_blank\">{dossierName}</a>}}</b> entfernt!"
},
"notifications": {
"button-text": "Notifications",
"deleted-dossier": "Deleted dossier",
"label": "Benachrichtigungen",
"mark-all-as-read": "Alle als gelesen markieren",
"mark-as": "Mark as {type, select, read{read} unread{unread} other{}}"
},
"notifications-screen": {
"category": {
"email-notifications": "E-Mail Benachrichtigungen",
@ -1844,6 +1856,7 @@
"dossier": "Dossierbezogene Benachrichtigungen",
"other": "Andere Benachrichtigungen"
},
"options-title": "Wählen Sie aus, in welcher Kategorie Sie benachrichtigt werden möchten",
"options": {
"ASSIGN_APPROVER": "Wenn ich einem Dokument als Genehmiger zugewiesen bin",
"ASSIGN_REVIEWER": "Wenn ich einem Dokument als Überprüfer zugewiesen bin",
@ -1861,7 +1874,6 @@
"USER_PROMOTED_TO_APPROVER": "Wenn ich Genehmiger in einem Dossier werde",
"USER_REMOVED_AS_DOSSIER_MEMBER": "Wenn ich die Dossier-Mitgliedschaft verliere"
},
"options-title": "Wählen Sie aus, in welcher Kategorie Sie benachrichtigt werden möchten",
"schedule": {
"daily": "Tägliche Zusammenfassung",
"instant": "Sofortig",
@ -1869,6 +1881,13 @@
},
"title": "Benachrichtigungseinstellungen"
},
"notifications": {
"button-text": "Notifications",
"deleted-dossier": "Deleted dossier",
"label": "Benachrichtigungen",
"mark-all-as-read": "Alle als gelesen markieren",
"mark-as": "Mark as {type, select, read{read} unread{unread} other{}}"
},
"ocr": {
"confirmation-dialog": {
"cancel": "Cancel",
@ -1960,16 +1979,16 @@
"warnings-subtitle": "Do not show again options",
"warnings-title": "Prompts and dialogs settings"
},
"processing": {
"basic": "Processing",
"ocr": "OCR"
},
"processing-status": {
"ocr": "OCR",
"pending": "Pending",
"processed": "Processed",
"processing": "Processing"
},
"processing": {
"basic": "Processing",
"ocr": "OCR"
},
"readonly": "Lesemodus",
"readonly-archived": "Read only (archived)",
"redact-text": {
@ -2193,12 +2212,6 @@
"red-user-admin": "Benutzer-Admin",
"regular": "Regulär"
},
"search": {
"active-dossiers": "ganze Plattform",
"all-dossiers": "all documents",
"placeholder": "Nach Dokumenten oder Dokumenteninhalt suchen",
"this-dossier": "in diesem Dossier"
},
"search-screen": {
"cols": {
"assignee": "Bevollmächtigter",
@ -2222,6 +2235,12 @@
"no-match": "Keine Dokumente entsprechen Ihren aktuellen Filtern.",
"table-header": "{length} search {length, plural, one{result} other{results}}"
},
"search": {
"active-dossiers": "ganze Plattform",
"all-dossiers": "all documents",
"placeholder": "Nach Dokumenten oder Dokumenteninhalt suchen",
"this-dossier": "in diesem Dossier"
},
"seconds": "seconds",
"size": "Size",
"smtp-auth-config": {
@ -2473,4 +2492,4 @@
}
},
"yesterday": "Gestern"
}
}

View File

@ -681,6 +681,25 @@
}
},
"dev-mode": "DEV",
"dialog-defaults-form": {
"extra-option-label": "",
"hint": {
"add-dialog": "",
"remove-dialog": "",
"title": ""
},
"recommendation": {
"remove-dialog": "",
"title": ""
},
"redaction": {
"add-dialog": "",
"remove-dialog": "",
"title": ""
},
"system-default": "",
"title": ""
},
"dictionary": "Type",
"dictionary-overview": {
"compare": {
@ -2473,4 +2492,4 @@
}
},
"yesterday": "Yesterday"
}
}