additional rework on some existing types
This commit is contained in:
parent
4a30d9b3f3
commit
d8399d8e32
@ -4,9 +4,6 @@ import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { IComment, IPoint, IRectangle } from '@red/domain';
|
||||
|
||||
export type AnnotationSuperType =
|
||||
| 'add-dictionary'
|
||||
| 'remove-only-here'
|
||||
| 'change-legal-basis'
|
||||
| 'suggestion-change-legal-basis'
|
||||
| 'suggestion-recategorize-image'
|
||||
| 'suggestion-add-dictionary'
|
||||
@ -121,7 +118,7 @@ export class AnnotationWrapper {
|
||||
}
|
||||
|
||||
get isReadyForAnalysis() {
|
||||
return this.superType === 'add-dictionary' || this.superType === 'remove-only-here' || this.superType === 'change-legal-basis';
|
||||
return false;
|
||||
}
|
||||
|
||||
get isApproved() {
|
||||
@ -165,7 +162,7 @@ export class AnnotationWrapper {
|
||||
}
|
||||
|
||||
get isConvertedRecommendation() {
|
||||
return this.isRecommendation && (this.superType === 'suggestion-add-dictionary' || this.superType === 'add-dictionary');
|
||||
return this.isRecommendation && this.superType === 'suggestion-add-dictionary';
|
||||
}
|
||||
|
||||
get isRecommendation() {
|
||||
@ -264,10 +261,6 @@ export class AnnotationWrapper {
|
||||
annotationWrapper.superType = 'suggestion-add-dictionary';
|
||||
return;
|
||||
}
|
||||
if (redactionLogEntryWrapper.status === 'APPROVED') {
|
||||
annotationWrapper.superType = 'add-dictionary';
|
||||
return;
|
||||
}
|
||||
if (redactionLogEntryWrapper.status === 'DECLINED') {
|
||||
annotationWrapper.superType = 'declined-suggestion';
|
||||
return;
|
||||
@ -319,10 +312,6 @@ export class AnnotationWrapper {
|
||||
annotationWrapper.superType = 'suggestion-add-dictionary';
|
||||
return;
|
||||
}
|
||||
if (redactionLogEntryWrapper.status === 'APPROVED') {
|
||||
annotationWrapper.superType = 'add-dictionary';
|
||||
return;
|
||||
}
|
||||
if (redactionLogEntryWrapper.status === 'DECLINED') {
|
||||
annotationWrapper.superType = 'declined-suggestion';
|
||||
return;
|
||||
@ -370,17 +359,16 @@ export class AnnotationWrapper {
|
||||
|
||||
if (redactionLogEntryWrapper.status === 'APPROVED') {
|
||||
if (redactionLogEntryWrapper.dictionaryEntry) {
|
||||
annotationWrapper.superType = annotationWrapper.redaction ? 'redaction' : annotationWrapper.hint ? 'hint' : 'skipped';
|
||||
} else {
|
||||
annotationWrapper.superType =
|
||||
redactionLogEntryWrapper.manualRedactionType === 'ADD'
|
||||
? 'add-dictionary'
|
||||
? 'manual-redaction'
|
||||
: annotationWrapper.redaction
|
||||
? 'redaction'
|
||||
: annotationWrapper.hint
|
||||
? 'hint'
|
||||
: 'skipped';
|
||||
} else {
|
||||
annotationWrapper.superType =
|
||||
redactionLogEntryWrapper.manualRedactionType === 'ADD' ? 'manual-redaction' : 'remove-only-here';
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@ -339,15 +339,6 @@ export class AppStateService {
|
||||
true,
|
||||
);
|
||||
|
||||
// dictionary actions
|
||||
dictionaryData['add-dictionary'] = new Dictionary(
|
||||
{
|
||||
hexColor: colors.analysisColor || FALLBACK_COLOR,
|
||||
type: 'add-dictionary',
|
||||
},
|
||||
true,
|
||||
);
|
||||
|
||||
dictionaryData['remove-only-here'] = new Dictionary(
|
||||
{
|
||||
hexColor: colors.analysisColor || FALLBACK_COLOR,
|
||||
@ -453,14 +444,6 @@ export class AppStateService {
|
||||
true,
|
||||
);
|
||||
|
||||
dictionaryData['change-legal-basis'] = new Dictionary(
|
||||
{
|
||||
hexColor: colors.analysisColor || FALLBACK_COLOR,
|
||||
type: 'analysis',
|
||||
},
|
||||
true,
|
||||
);
|
||||
|
||||
dictionaryData['hint'] = new Dictionary(
|
||||
{
|
||||
hexColor: '#fa98f7',
|
||||
|
||||
@ -2,14 +2,11 @@ import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { AnnotationSuperType } from '../models/file/annotation.wrapper';
|
||||
|
||||
export const annotationTypesTranslations: { [key in AnnotationSuperType]: string } = {
|
||||
'add-dictionary': _('annotation-type.add-dictionary'),
|
||||
'change-legal-basis': _('annotation-type.change-legal-basis'),
|
||||
'declined-suggestion': _('annotation-type.declined-suggestion'),
|
||||
hint: _('annotation-type.hint'),
|
||||
'manual-redaction': _('annotation-type.manual-redaction'),
|
||||
recommendation: _('annotation-type.recommendation'),
|
||||
redaction: _('annotation-type.redaction'),
|
||||
'remove-only-here': _('annotation-type.remove-only-here'),
|
||||
skipped: _('annotation-type.skipped'),
|
||||
'suggestion-add': _('annotation-type.suggestion-add'),
|
||||
'suggestion-add-dictionary': _('annotation-type.suggestion-add-dictionary'),
|
||||
|
||||
@ -6,9 +6,6 @@ export const SuperTypeSorter: { [key in AnnotationSuperType]: number } = {
|
||||
'suggestion-recategorize-image': 16,
|
||||
'suggestion-resize': 18,
|
||||
recommendation: 7,
|
||||
'add-dictionary': 2,
|
||||
'change-legal-basis': 5,
|
||||
'remove-only-here': 6,
|
||||
'suggestion-add-dictionary': 12,
|
||||
'suggestion-remove-dictionary': 13,
|
||||
'suggestion-add': 10,
|
||||
|
||||
@ -273,7 +273,6 @@
|
||||
"rule": "Schwärzung basierend auf Regel {rule}"
|
||||
},
|
||||
"annotation-type": {
|
||||
"add-dictionary": "Ausstehende Ergänzung zum Wörterbuch",
|
||||
"change-legal-basis": "Änderung der Rechtsgrundlage ausstehend",
|
||||
"declined-suggestion": "Abgelehnter Vorschlag",
|
||||
"hint": "Hinweis",
|
||||
|
||||
@ -264,8 +264,6 @@
|
||||
},
|
||||
"annotation-type": {
|
||||
"suggestion-resize": "Suggested Resize",
|
||||
"add-dictionary": "Pending add to dictionary",
|
||||
"change-legal-basis": "Pending Change of Legal Basis",
|
||||
"declined-suggestion": "Declined Suggestion",
|
||||
"hint": "Hint",
|
||||
"manual-redaction": "Manual Redaction",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user