add filter for redactions with reason changes

This commit is contained in:
Dan Percic 2021-06-28 17:22:59 +03:00
parent 14837d5316
commit 2a16675bdf
7 changed files with 39 additions and 31 deletions

View File

@ -39,6 +39,7 @@ export class AnnotationWrapper {
positions: Rectangle[];
recommendationType: string;
legalBasis: string;
legalBasisChangeValue?: string;
image?: boolean;
force?: boolean;
@ -234,6 +235,7 @@ export class AnnotationWrapper {
annotationWrapper.dictionaryOperation = redactionLogEntry.dictionaryEntry;
annotationWrapper.userId = redactionLogEntry.userId;
annotationWrapper.image = redactionLogEntry.image;
annotationWrapper.legalBasisChangeValue = redactionLogEntry.legalBasisChangeValue;
annotationWrapper.comments = redactionLogEntry.comments || [];
annotationWrapper.legalBasis = redactionLogEntry.legalBasis;
AnnotationWrapper._createContent(annotationWrapper, redactionLogEntry);

View File

@ -28,6 +28,7 @@ export interface RedactionLogEntryWrapper {
actionPendingReanalysis?: boolean;
hidden?: boolean;
legalBasisChangeValue?: string;
userId?: string;
comments?: Comment[];

View File

@ -74,6 +74,18 @@ export class FileWorkloadComponent {
private _multiSelectActive = false;
get isProcessing(): boolean {
return this.fileData?.fileStatus?.isProcessing;
}
get activeAnnotationsLength(): number | undefined {
return this.displayedAnnotations[this.activeViewerPage]?.annotations?.length;
}
get isReadOnly(): boolean {
return !this._permissionsService.canPerformAnnotationActions();
}
get multiSelectActive(): boolean {
return this._multiSelectActive;
}

View File

@ -19,12 +19,13 @@ export class AnnotationProcessingService {
},
{
key: 'with-reason-changes',
icon: 'red:comment',
icon: 'red:reason',
label: 'filter-menu.with-reason-changes',
checked: false,
topLevelFilter: true,
filters: [],
checker: (annotation: AnnotationWrapper) => annotation?.comments?.length > 0
checker: (annotation: AnnotationWrapper) =>
annotation?.legalBasisChangeValue?.length > 0
}
];
}

View File

@ -66,6 +66,7 @@ export class IconsModule {
'radio-selected',
'read-only',
'ready-for-approval',
'reason',
'refresh',
'remove-from-dict',
'report',

View File

@ -37,13 +37,11 @@
</div>
<div *ngFor="let filter of primaryFilters">
<ng-template
*ngTemplateOutlet="
defaultFilterTemplate;
context: {
filter: filter,
atLeastOneIsExpandable: atLeastOneFilterIsExpandable
}
"
[ngTemplateOutlet]="defaultFilterTemplate"
[ngTemplateOutletContext]="{
filter: filter,
atLeastOneIsExpandable: atLeastOneFilterIsExpandable
}"
></ng-template>
</div>
<div *ngIf="secondaryFilters?.length > 0" class="filter-options">
@ -52,13 +50,11 @@
</div>
<div *ngFor="let filter of secondaryFilters">
<ng-template
*ngTemplateOutlet="
defaultFilterTemplate;
context: {
filter: filter,
atLeastOneIsExpandable: atLeastOneSecondaryFilterIsExpandable
}
"
[ngTemplateOutlet]="defaultFilterTemplate"
[ngTemplateOutletContext]="{
filter: filter,
atLeastOneIsExpandable: atLeastOneSecondaryFilterIsExpandable
}"
></ng-template>
</div>
</div>
@ -93,17 +89,13 @@
class="filter-menu-checkbox"
>
<ng-template
*ngTemplateOutlet="
filterTemplate ? filterTemplate : defaultFilterLabelTemplate;
context: { filter: filter }
"
[ngTemplateOutlet]="filterTemplate ? filterTemplate : defaultFilterLabelTemplate"
[ngTemplateOutletContext]="{ filter: filter }"
></ng-template>
</mat-checkbox>
<ng-template
*ngTemplateOutlet="
actionsTemplate ? actionsTemplate : null;
context: { filter: filter }
"
[ngTemplateOutlet]="actionsTemplate ? actionsTemplate : null"
[ngTemplateOutletContext]="{ filter: filter }"
></ng-template>
</div>
<div *ngIf="_(filter).filters?.length && _(filter).expanded">
@ -117,17 +109,15 @@
[checked]="subFilter.checked"
>
<ng-template
*ngTemplateOutlet="
filterTemplate ? filterTemplate : defaultFilterLabelTemplate;
context: { filter: subFilter }
[ngTemplateOutlet]="
filterTemplate ? filterTemplate : defaultFilterLabelTemplate
"
[ngTemplateOutletContext]="{ filter: subFilter }"
></ng-template>
</mat-checkbox>
<ng-template
*ngTemplateOutlet="
actionsTemplate ? actionsTemplate : null;
context: { filter: subFilter }
"
[ngTemplateOutlet]="actionsTemplate ? actionsTemplate : null"
[ngTemplateOutletContext]="{ filter: subFilter }"
></ng-template>
</div>
</div>

View 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