Pull request #343: RED-3294
Merge in RED/ui from RED-3294 to master * commit 'b94884a09dc437bcf6b4210d3dba2f385a2f2ab7': fixed .find of undefined manualRedaction updated text
This commit is contained in:
commit
5d3d23e71b
@ -67,6 +67,7 @@ export class AnnotationWrapper {
|
||||
hasBeenForcedHint: boolean;
|
||||
hasBeenForcedRedaction: boolean;
|
||||
hasBeenRemovedByManualOverride: boolean;
|
||||
redactionLogEntry: any;
|
||||
|
||||
get isChangeLogRemoved() {
|
||||
return this.changeLogType === 'REMOVED';
|
||||
@ -232,7 +233,7 @@ export class AnnotationWrapper {
|
||||
get legalBasis() {
|
||||
return this.legalBasisChangeValue || this.legalBasisValue;
|
||||
}
|
||||
redactionLogEntry: any;
|
||||
|
||||
static fromData(redactionLogEntry?: RedactionLogEntry) {
|
||||
const annotationWrapper = new AnnotationWrapper();
|
||||
|
||||
@ -257,22 +258,22 @@ export class AnnotationWrapper {
|
||||
annotationWrapper.section = redactionLogEntry.section;
|
||||
annotationWrapper.reference = redactionLogEntry.reference || [];
|
||||
annotationWrapper.rectangle = redactionLogEntry.rectangle;
|
||||
annotationWrapper.hasBeenResized = !!redactionLogEntry.manualChanges.find(
|
||||
annotationWrapper.hasBeenResized = !!redactionLogEntry.manualChanges?.find(
|
||||
c => c.manualRedactionType === ManualRedactionType.RESIZE && c.annotationStatus === LogEntryStatus.APPROVED,
|
||||
);
|
||||
annotationWrapper.hasBeenRecategorized = !!redactionLogEntry.manualChanges.find(
|
||||
annotationWrapper.hasBeenRecategorized = !!redactionLogEntry.manualChanges?.find(
|
||||
c => c.manualRedactionType === ManualRedactionType.RECATEGORIZE && c.annotationStatus === LogEntryStatus.APPROVED,
|
||||
);
|
||||
annotationWrapper.hasLegalBasisChanged = !!redactionLogEntry.manualChanges.find(
|
||||
annotationWrapper.hasLegalBasisChanged = !!redactionLogEntry.manualChanges?.find(
|
||||
c => c.manualRedactionType === ManualRedactionType.LEGAL_BASIS_CHANGE && c.annotationStatus === LogEntryStatus.APPROVED,
|
||||
);
|
||||
annotationWrapper.hasBeenForcedHint = !!redactionLogEntry.manualChanges.find(
|
||||
annotationWrapper.hasBeenForcedHint = !!redactionLogEntry.manualChanges?.find(
|
||||
c => c.manualRedactionType === ManualRedactionType.FORCE_HINT && c.annotationStatus === LogEntryStatus.APPROVED,
|
||||
);
|
||||
annotationWrapper.hasBeenForcedRedaction = !!redactionLogEntry.manualChanges.find(
|
||||
annotationWrapper.hasBeenForcedRedaction = !!redactionLogEntry.manualChanges?.find(
|
||||
c => c.manualRedactionType === ManualRedactionType.FORCE_REDACT && c.annotationStatus === LogEntryStatus.APPROVED,
|
||||
);
|
||||
annotationWrapper.hasBeenRemovedByManualOverride = !!redactionLogEntry.manualChanges.find(
|
||||
annotationWrapper.hasBeenRemovedByManualOverride = !!redactionLogEntry.manualChanges?.find(
|
||||
c => c.manualRedactionType === ManualRedactionType.REMOVE_LOCALLY && c.annotationStatus === LogEntryStatus.APPROVED,
|
||||
);
|
||||
|
||||
@ -297,7 +298,7 @@ export class AnnotationWrapper {
|
||||
return;
|
||||
}
|
||||
|
||||
if (redactionLogEntryWrapper.manualChanges.length) {
|
||||
if (redactionLogEntryWrapper.manualChanges?.length) {
|
||||
const lastManualChange = redactionLogEntryWrapper.manualChanges[redactionLogEntryWrapper.manualChanges.length - 1];
|
||||
|
||||
annotationWrapper.pending = !lastManualChange.processed;
|
||||
@ -375,6 +376,7 @@ export class AnnotationWrapper {
|
||||
case LogEntryStatus.REQUESTED:
|
||||
return 'suggestion-add';
|
||||
}
|
||||
break;
|
||||
case ManualRedactionType.ADD_TO_DICTIONARY:
|
||||
switch (lastManualChange.annotationStatus) {
|
||||
case LogEntryStatus.APPROVED:
|
||||
|
||||
@ -105,7 +105,7 @@ export class FileDataModel {
|
||||
);
|
||||
|
||||
if (
|
||||
redactionLogEntry.manualChanges.find(
|
||||
redactionLogEntry.manualChanges?.find(
|
||||
mc =>
|
||||
mc.manualRedactionType === ManualRedactionType.ADD_TO_DICTIONARY &&
|
||||
(mc.annotationStatus === LogEntryStatus.APPROVED || mc.annotationStatus === LogEntryStatus.REQUESTED),
|
||||
|
||||
@ -1117,7 +1117,7 @@
|
||||
"fullscreen": "Full Screen (F)",
|
||||
"last-reviewer": "Last Reviewed by:",
|
||||
"no-data": {
|
||||
"title": "There are no annotations on this page."
|
||||
"title": "There have been no changes to this page."
|
||||
},
|
||||
"quick-nav": {
|
||||
"jump-first": "Jump to first page",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user