DM-336, rename manual comonents, update toastr texts to match, refactor add manual redaction dialog.
This commit is contained in:
parent
1d914e495a
commit
3e23306712
@ -56,6 +56,7 @@ export class RedactTextDialogComponent
|
||||
|
||||
readonly #translations = redactTextTranslations;
|
||||
readonly #dossier: Dossier;
|
||||
readonly #isRss = this._iqserPermissionsService.has(Roles.getRss);
|
||||
readonly hint: boolean;
|
||||
|
||||
constructor(
|
||||
@ -97,7 +98,7 @@ export class RedactTextDialogComponent
|
||||
}
|
||||
|
||||
get disabled() {
|
||||
if (this.dictionaryRequest || this.hint) {
|
||||
if (this.dictionaryRequest || this.hint || this.#isRss) {
|
||||
return !this.form.get('dictionary').value;
|
||||
}
|
||||
return !this.form.get('reason').value;
|
||||
@ -192,8 +193,9 @@ export class RedactTextDialogComponent
|
||||
addRedactionRequest.legalBasis = legalOption.legalBasis;
|
||||
}
|
||||
|
||||
if (this._iqserPermissionsService.has(Roles.getRss)) {
|
||||
const selectedType = this.dictionaries.find(d => d.type === addRedactionRequest.type);
|
||||
const selectedType = this.dictionaries.find(d => d.type === addRedactionRequest.type);
|
||||
|
||||
if (selectedType) {
|
||||
addRedactionRequest.addToDictionary = selectedType.hasDictionary;
|
||||
} else {
|
||||
addRedactionRequest.addToDictionary = this.dictionaryRequest && addRedactionRequest.type !== 'dossier_redaction';
|
||||
@ -220,7 +222,7 @@ export class RedactTextDialogComponent
|
||||
value: RedactTextOptions.ONLY_HERE,
|
||||
},
|
||||
];
|
||||
if (!this._iqserPermissionsService.has(Roles.getRss)) {
|
||||
if (!this.#isRss) {
|
||||
options.push({
|
||||
label: this.#translations[this.type].inDossier.label,
|
||||
description: this.#translations[this.type].inDossier.description,
|
||||
@ -239,7 +241,9 @@ export class RedactTextDialogComponent
|
||||
|
||||
#resetValues() {
|
||||
this.#applyToAllDossiers = this.data.applyToAllDossiers ?? true;
|
||||
this.options[1].extraOption.checked = this.#applyToAllDossiers;
|
||||
if (!this.#isRss) {
|
||||
this.options[1].extraOption.checked = this.#applyToAllDossiers;
|
||||
}
|
||||
if (this.dictionaryRequest || this.hint) {
|
||||
this.form.get('reason').setValue(null);
|
||||
this.form.get('dictionary').setValue(null);
|
||||
|
||||
@ -255,8 +255,8 @@
|
||||
},
|
||||
"manual-redaction": {
|
||||
"add": {
|
||||
"error": "Failed to save component: {error}",
|
||||
"success": "Component added!"
|
||||
"error": "Failed to save annotation: {error}",
|
||||
"success": "Annotation added!"
|
||||
},
|
||||
"approve": {
|
||||
"error": "Failed to approve suggestion: {error}",
|
||||
@ -287,8 +287,8 @@
|
||||
"success": "Hint removed!"
|
||||
},
|
||||
"remove": {
|
||||
"error": "Failed to remove component: {error}",
|
||||
"success": "Component removed!"
|
||||
"error": "Failed to remove annotation: {error}",
|
||||
"success": "Annotation removed!"
|
||||
},
|
||||
"request-change-legal-basis": {
|
||||
"error": "Failed to request annotation reason change: {error}",
|
||||
@ -365,7 +365,7 @@
|
||||
"hint": "Hint",
|
||||
"ignored-hint": "Ignored Hint",
|
||||
"manual-hint": "Manual Hint",
|
||||
"manual-redaction": "Manual Component",
|
||||
"manual-redaction": "Manual Annotation",
|
||||
"recommendation": "Recommendation",
|
||||
"redaction": "Annotation",
|
||||
"skipped": "Skipped",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user