Pull request #226: RED-1624
Merge in RED/ui from RED-1624 to master * commit 'c154ae57fc7853631753cbc8475a5e9530ec5a1f': fix rebase errors add filter for redactions with reason changes wip second filter option
This commit is contained in:
commit
30cbde3129
@ -39,6 +39,7 @@ export class AnnotationWrapper {
|
|||||||
positions: Rectangle[];
|
positions: Rectangle[];
|
||||||
recommendationType: string;
|
recommendationType: string;
|
||||||
legalBasis: string;
|
legalBasis: string;
|
||||||
|
legalBasisChangeValue?: string;
|
||||||
|
|
||||||
image?: boolean;
|
image?: boolean;
|
||||||
force?: boolean;
|
force?: boolean;
|
||||||
@ -234,6 +235,7 @@ export class AnnotationWrapper {
|
|||||||
annotationWrapper.dictionaryOperation = redactionLogEntry.dictionaryEntry;
|
annotationWrapper.dictionaryOperation = redactionLogEntry.dictionaryEntry;
|
||||||
annotationWrapper.userId = redactionLogEntry.userId;
|
annotationWrapper.userId = redactionLogEntry.userId;
|
||||||
annotationWrapper.image = redactionLogEntry.image;
|
annotationWrapper.image = redactionLogEntry.image;
|
||||||
|
annotationWrapper.legalBasisChangeValue = redactionLogEntry.legalBasisChangeValue;
|
||||||
annotationWrapper.comments = redactionLogEntry.comments || [];
|
annotationWrapper.comments = redactionLogEntry.comments || [];
|
||||||
annotationWrapper.legalBasis = redactionLogEntry.legalBasis;
|
annotationWrapper.legalBasis = redactionLogEntry.legalBasis;
|
||||||
AnnotationWrapper._createContent(annotationWrapper, redactionLogEntry);
|
AnnotationWrapper._createContent(annotationWrapper, redactionLogEntry);
|
||||||
|
|||||||
@ -312,64 +312,56 @@ export class FileWorkloadComponent {
|
|||||||
!this._firstSelectedAnnotation ||
|
!this._firstSelectedAnnotation ||
|
||||||
this.activeViewerPage !== this._firstSelectedAnnotation.pageNumber
|
this.activeViewerPage !== this._firstSelectedAnnotation.pageNumber
|
||||||
) {
|
) {
|
||||||
const pageIdx = this.displayedPages.indexOf(this.activeViewerPage);
|
if (this.displayedPages.indexOf(this.activeViewerPage) !== -1) {
|
||||||
if (pageIdx !== -1) {
|
|
||||||
// Displayed page has annotations
|
// Displayed page has annotations
|
||||||
this.selectAnnotations.emit([
|
return this.selectAnnotations.emit([
|
||||||
this.displayedAnnotations[this.activeViewerPage].annotations[0]
|
this.displayedAnnotations[this.activeViewerPage].annotations[0]
|
||||||
]);
|
]);
|
||||||
} else {
|
|
||||||
// Displayed page doesn't have annotations
|
|
||||||
if ($event.key === 'ArrowDown') {
|
|
||||||
const nextPage = this._nextPageWithAnnotations();
|
|
||||||
this.shouldDeselectAnnotationsOnPageChange = false;
|
|
||||||
this.shouldDeselectAnnotationsOnPageChangeChange.emit(false);
|
|
||||||
this.selectAnnotations.emit([
|
|
||||||
this.displayedAnnotations[nextPage].annotations[0]
|
|
||||||
]);
|
|
||||||
} else {
|
|
||||||
const prevPage = this._prevPageWithAnnotations();
|
|
||||||
this.shouldDeselectAnnotationsOnPageChange = false;
|
|
||||||
this.shouldDeselectAnnotationsOnPageChangeChange.emit(false);
|
|
||||||
const prevPageAnnotations = this.displayedAnnotations[prevPage].annotations;
|
|
||||||
this.selectAnnotations.emit([
|
|
||||||
prevPageAnnotations[prevPageAnnotations.length - 1]
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
// Displayed page doesn't have annotations
|
||||||
const page = this._firstSelectedAnnotation.pageNumber;
|
|
||||||
const pageIdx = this.displayedPages.indexOf(page);
|
|
||||||
const annotationsOnPage = this.displayedAnnotations[page].annotations;
|
|
||||||
const idx = annotationsOnPage.findIndex(a => a.id === this._firstSelectedAnnotation.id);
|
|
||||||
|
|
||||||
if ($event.key === 'ArrowDown') {
|
if ($event.key === 'ArrowDown') {
|
||||||
if (idx + 1 !== annotationsOnPage.length) {
|
const nextPage = this._nextPageWithAnnotations();
|
||||||
// If not last item in page
|
this.shouldDeselectAnnotationsOnPageChange = false;
|
||||||
this.selectAnnotations.emit([annotationsOnPage[idx + 1]]);
|
this.shouldDeselectAnnotationsOnPageChangeChange.emit(false);
|
||||||
} else if (pageIdx + 1 < this.displayedPages.length) {
|
this.selectAnnotations.emit([this.displayedAnnotations[nextPage].annotations[0]]);
|
||||||
// If not last page
|
return;
|
||||||
const nextPageAnnotations =
|
|
||||||
this.displayedAnnotations[this.displayedPages[pageIdx + 1]].annotations;
|
|
||||||
this.shouldDeselectAnnotationsOnPageChange = false;
|
|
||||||
this.shouldDeselectAnnotationsOnPageChangeChange.emit(false);
|
|
||||||
this.selectAnnotations.emit([nextPageAnnotations[0]]);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (idx !== 0) {
|
|
||||||
// If not first item in page
|
|
||||||
this.selectAnnotations.emit([annotationsOnPage[idx - 1]]);
|
|
||||||
} else if (pageIdx) {
|
|
||||||
// If not first page
|
|
||||||
const prevPageAnnotations =
|
|
||||||
this.displayedAnnotations[this.displayedPages[pageIdx - 1]].annotations;
|
|
||||||
this.shouldDeselectAnnotationsOnPageChange = false;
|
|
||||||
this.shouldDeselectAnnotationsOnPageChangeChange.emit(false);
|
|
||||||
this.selectAnnotations.emit([
|
|
||||||
prevPageAnnotations[prevPageAnnotations.length - 1]
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const prevPage = this._prevPageWithAnnotations();
|
||||||
|
this.shouldDeselectAnnotationsOnPageChange = false;
|
||||||
|
this.shouldDeselectAnnotationsOnPageChangeChange.emit(false);
|
||||||
|
const prevPageAnnotations = this.displayedAnnotations[prevPage].annotations;
|
||||||
|
this.selectAnnotations.emit([prevPageAnnotations[prevPageAnnotations.length - 1]]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const page = this._firstSelectedAnnotation.pageNumber;
|
||||||
|
const pageIdx = this.displayedPages.indexOf(page);
|
||||||
|
const annotationsOnPage = this.displayedAnnotations[page].annotations;
|
||||||
|
const idx = annotationsOnPage.findIndex(a => a.id === this._firstSelectedAnnotation.id);
|
||||||
|
|
||||||
|
if ($event.key === 'ArrowDown') {
|
||||||
|
if (idx + 1 !== annotationsOnPage.length) {
|
||||||
|
// If not last item in page
|
||||||
|
this.selectAnnotations.emit([annotationsOnPage[idx + 1]]);
|
||||||
|
} else if (pageIdx + 1 < this.displayedPages.length) {
|
||||||
|
// If not last page
|
||||||
|
const nextPageAnnotations =
|
||||||
|
this.displayedAnnotations[this.displayedPages[pageIdx + 1]].annotations;
|
||||||
|
this.shouldDeselectAnnotationsOnPageChange = false;
|
||||||
|
this.shouldDeselectAnnotationsOnPageChangeChange.emit(false);
|
||||||
|
this.selectAnnotations.emit([nextPageAnnotations[0]]);
|
||||||
|
}
|
||||||
|
} else if (idx !== 0) {
|
||||||
|
// If not first item in page
|
||||||
|
this.selectAnnotations.emit([annotationsOnPage[idx - 1]]);
|
||||||
|
} else if (pageIdx) {
|
||||||
|
// If not first page
|
||||||
|
const prevPageAnnotations =
|
||||||
|
this.displayedAnnotations[this.displayedPages[pageIdx - 1]].annotations;
|
||||||
|
this.shouldDeselectAnnotationsOnPageChange = false;
|
||||||
|
this.shouldDeselectAnnotationsOnPageChangeChange.emit(false);
|
||||||
|
this.selectAnnotations.emit([prevPageAnnotations[prevPageAnnotations.length - 1]]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -460,7 +460,6 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy, OnAttach,
|
|||||||
}
|
}
|
||||||
|
|
||||||
async annotationsChangedByReviewAction(annotation: AnnotationWrapper) {
|
async annotationsChangedByReviewAction(annotation: AnnotationWrapper) {
|
||||||
console.log(annotation);
|
|
||||||
await this._cleanupAndRedrawManualAnnotationsForEntirePage(annotation.pageNumber);
|
await this._cleanupAndRedrawManualAnnotationsForEntirePage(annotation.pageNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -16,6 +16,16 @@ export class AnnotationProcessingService {
|
|||||||
topLevelFilter: true,
|
topLevelFilter: true,
|
||||||
filters: [],
|
filters: [],
|
||||||
checker: (annotation: AnnotationWrapper) => annotation?.comments?.length > 0
|
checker: (annotation: AnnotationWrapper) => annotation?.comments?.length > 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'with-reason-changes',
|
||||||
|
icon: 'red:reason',
|
||||||
|
label: 'filter-menu.with-reason-changes',
|
||||||
|
checked: false,
|
||||||
|
topLevelFilter: true,
|
||||||
|
filters: [],
|
||||||
|
checker: (annotation: AnnotationWrapper) =>
|
||||||
|
annotation?.legalBasisChangeValue?.length > 0
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -66,6 +66,7 @@ export class IconsModule {
|
|||||||
'radio-selected',
|
'radio-selected',
|
||||||
'read-only',
|
'read-only',
|
||||||
'ready-for-approval',
|
'ready-for-approval',
|
||||||
|
'reason',
|
||||||
'refresh',
|
'refresh',
|
||||||
'remove-from-dict',
|
'remove-from-dict',
|
||||||
'report',
|
'report',
|
||||||
|
|||||||
@ -37,13 +37,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div *ngFor="let filter of primaryFilters">
|
<div *ngFor="let filter of primaryFilters">
|
||||||
<ng-template
|
<ng-template
|
||||||
*ngTemplateOutlet="
|
[ngTemplateOutlet]="defaultFilterTemplate"
|
||||||
defaultFilterTemplate;
|
[ngTemplateOutletContext]="{
|
||||||
context: {
|
filter: filter,
|
||||||
filter: filter,
|
atLeastOneIsExpandable: atLeastOneFilterIsExpandable
|
||||||
atLeastOneIsExpandable: atLeastOneFilterIsExpandable
|
}"
|
||||||
}
|
|
||||||
"
|
|
||||||
></ng-template>
|
></ng-template>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="secondaryFilters?.length > 0" class="filter-options">
|
<div *ngIf="secondaryFilters?.length > 0" class="filter-options">
|
||||||
@ -52,13 +50,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div *ngFor="let filter of secondaryFilters">
|
<div *ngFor="let filter of secondaryFilters">
|
||||||
<ng-template
|
<ng-template
|
||||||
*ngTemplateOutlet="
|
[ngTemplateOutlet]="defaultFilterTemplate"
|
||||||
defaultFilterTemplate;
|
[ngTemplateOutletContext]="{
|
||||||
context: {
|
filter: filter,
|
||||||
filter: filter,
|
atLeastOneIsExpandable: atLeastOneSecondaryFilterIsExpandable
|
||||||
atLeastOneIsExpandable: atLeastOneSecondaryFilterIsExpandable
|
}"
|
||||||
}
|
|
||||||
"
|
|
||||||
></ng-template>
|
></ng-template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -93,17 +89,13 @@
|
|||||||
class="filter-menu-checkbox"
|
class="filter-menu-checkbox"
|
||||||
>
|
>
|
||||||
<ng-template
|
<ng-template
|
||||||
*ngTemplateOutlet="
|
[ngTemplateOutlet]="filterTemplate ? filterTemplate : defaultFilterLabelTemplate"
|
||||||
filterTemplate ? filterTemplate : defaultFilterLabelTemplate;
|
[ngTemplateOutletContext]="{ filter: filter }"
|
||||||
context: { filter: filter }
|
|
||||||
"
|
|
||||||
></ng-template>
|
></ng-template>
|
||||||
</mat-checkbox>
|
</mat-checkbox>
|
||||||
<ng-template
|
<ng-template
|
||||||
*ngTemplateOutlet="
|
[ngTemplateOutlet]="actionsTemplate ? actionsTemplate : null"
|
||||||
actionsTemplate ? actionsTemplate : null;
|
[ngTemplateOutletContext]="{ filter: filter }"
|
||||||
context: { filter: filter }
|
|
||||||
"
|
|
||||||
></ng-template>
|
></ng-template>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="_(filter).filters?.length && _(filter).expanded">
|
<div *ngIf="_(filter).filters?.length && _(filter).expanded">
|
||||||
@ -117,17 +109,15 @@
|
|||||||
[checked]="subFilter.checked"
|
[checked]="subFilter.checked"
|
||||||
>
|
>
|
||||||
<ng-template
|
<ng-template
|
||||||
*ngTemplateOutlet="
|
[ngTemplateOutlet]="
|
||||||
filterTemplate ? filterTemplate : defaultFilterLabelTemplate;
|
filterTemplate ? filterTemplate : defaultFilterLabelTemplate
|
||||||
context: { filter: subFilter }
|
|
||||||
"
|
"
|
||||||
|
[ngTemplateOutletContext]="{ filter: subFilter }"
|
||||||
></ng-template>
|
></ng-template>
|
||||||
</mat-checkbox>
|
</mat-checkbox>
|
||||||
<ng-template
|
<ng-template
|
||||||
*ngTemplateOutlet="
|
[ngTemplateOutlet]="actionsTemplate ? actionsTemplate : null"
|
||||||
actionsTemplate ? actionsTemplate : null;
|
[ngTemplateOutletContext]="{ filter: subFilter }"
|
||||||
context: { filter: subFilter }
|
|
||||||
"
|
|
||||||
></ng-template>
|
></ng-template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -606,7 +606,8 @@
|
|||||||
"label": "Filter",
|
"label": "Filter",
|
||||||
"filter-types": "Filter types",
|
"filter-types": "Filter types",
|
||||||
"filter-options": "Filter options",
|
"filter-options": "Filter options",
|
||||||
"with-comments": "Show only annotations with comments"
|
"with-comments": "Only annotations with comments",
|
||||||
|
"with-reason-changes": "Only redactions with reason changes"
|
||||||
},
|
},
|
||||||
"sorting": {
|
"sorting": {
|
||||||
"recent": "Recent",
|
"recent": "Recent",
|
||||||
|
|||||||
1
apps/red-ui/src/assets/icons/general/reason.svg
Normal file
1
apps/red-ui/src/assets/icons/general/reason.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><g><rect fill="none" height="24" width="24"/></g><g><g><path d="M15.82,7.22l-1,0.4c-0.21-0.16-0.43-0.29-0.67-0.39L14,6.17C13.98,6.07,13.9,6,13.8,6h-1.6c-0.1,0-0.18,0.07-0.19,0.17 l-0.15,1.06c-0.24,0.1-0.47,0.23-0.67,0.39l-1-0.4c-0.09-0.03-0.2,0-0.24,0.09l-0.8,1.38c-0.05,0.09-0.03,0.2,0.05,0.26l0.85,0.66 C10.02,9.73,10,9.87,10,10c0,0.13,0.01,0.26,0.03,0.39l-0.84,0.66c-0.08,0.06-0.1,0.17-0.05,0.25l0.8,1.39 c0.05,0.09,0.15,0.12,0.25,0.09l0.99-0.4c0.21,0.16,0.43,0.29,0.68,0.39L12,13.83c0.02,0.1,0.1,0.17,0.2,0.17h1.6 c0.1,0,0.18-0.07,0.2-0.17l0.15-1.06c0.24-0.1,0.47-0.23,0.67-0.39l0.99,0.4c0.09,0.04,0.2,0,0.24-0.09l0.8-1.39 c0.05-0.09,0.03-0.19-0.05-0.25l-0.83-0.66C15.99,10.26,16,10.13,16,10c0-0.14-0.01-0.27-0.03-0.39l0.85-0.66 c0.08-0.06,0.1-0.17,0.05-0.26l-0.8-1.38C16.02,7.22,15.91,7.19,15.82,7.22z M13,11.43c-0.79,0-1.43-0.64-1.43-1.43 S12.21,8.57,13,8.57s1.43,0.64,1.43,1.43S13.79,11.43,13,11.43z"/><path d="M19.94,9.06c-0.43-3.27-3.23-5.86-6.53-6.05C13.27,3,13.14,3,13,3C9.47,3,6.57,5.61,6.08,9l-1.93,3.48 C3.74,13.14,4.22,14,5,14h1v2c0,1.1,0.9,2,2,2h1v3h7v-4.68C18.62,15.07,20.35,12.24,19.94,9.06z M14.89,14.63L14,15.05V19h-3v-3H8 v-4H6.7l1.33-2.33C8.21,7.06,10.35,5,13,5c2.76,0,5,2.24,5,5C18,12.09,16.71,13.88,14.89,14.63z"/></g></g></svg>
|
||||||
|
After Width: | Height: | Size: 1.4 KiB |
Loading…
x
Reference in New Issue
Block a user