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