Pull request #111: RED-1037: Show Updated and Image Flag for File List
Merge in RED/ui from RED-1037 to master * commit '2a92b1b0ecf53f28c0cb82c747271fc3b697f7bc': Show Updated and Image Flag for File List
This commit is contained in:
commit
486a73ae5d
@ -133,6 +133,12 @@ export const annotationFilterChecker = (input: FileStatusWrapper | ProjectWrappe
|
||||
case 'none': {
|
||||
return input.hasNone;
|
||||
}
|
||||
case 'updated': {
|
||||
return input instanceof FileStatusWrapper && input.hasUpdates;
|
||||
}
|
||||
case 'image': {
|
||||
return input instanceof FileStatusWrapper && input.hasImages;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -3,4 +3,6 @@
|
||||
<redaction-annotation-icon *ngIf="needsWorkInput.hasRedactions" type="square" label="R" color="#283241"></redaction-annotation-icon>
|
||||
<redaction-annotation-icon *ngIf="needsWorkInput.hintsOnly" type="circle" label="H" color="#9398a0"></redaction-annotation-icon>
|
||||
<redaction-annotation-icon *ngIf="needsWorkInput.hasRequests" type="rhombus" label="S" [color]="suggestionColor"></redaction-annotation-icon>
|
||||
<redaction-annotation-icon *ngIf="hasUpdates" type="square" label="U" color="#fdbd00"></redaction-annotation-icon>
|
||||
<redaction-annotation-icon *ngIf="hasImages" type="square" label="G" [color]="imageColor"></redaction-annotation-icon>
|
||||
</div>
|
||||
|
||||
@ -25,11 +25,27 @@ export class NeedsWorkBadgeComponent implements OnInit {
|
||||
}
|
||||
|
||||
get suggestionColor() {
|
||||
return this._getDictionaryColor('suggestion');
|
||||
}
|
||||
|
||||
get imageColor() {
|
||||
return this._getDictionaryColor('image');
|
||||
}
|
||||
|
||||
get hasImages() {
|
||||
return this.needsWorkInput instanceof FileStatusWrapper && this.needsWorkInput.hasImages;
|
||||
}
|
||||
|
||||
get hasUpdates() {
|
||||
return this.needsWorkInput instanceof FileStatusWrapper && this.needsWorkInput.hasUpdates;
|
||||
}
|
||||
|
||||
private _getDictionaryColor(type: string) {
|
||||
let ruleSetId = null;
|
||||
if (this.needsWorkInput instanceof ProjectWrapper) {
|
||||
ruleSetId = this.needsWorkInput.ruleSetId;
|
||||
}
|
||||
|
||||
return this.appStateService.getDictionaryColor('suggestion', ruleSetId);
|
||||
return this.appStateService.getDictionaryColor(type, ruleSetId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -29,4 +29,8 @@
|
||||
<redaction-annotation-icon *ngIf="filter.key === 'declined-suggestion'" type="rhombus" label="S" [color]="dictionaryColor"></redaction-annotation-icon>
|
||||
|
||||
<redaction-annotation-icon *ngIf="filter.key === 'none'" label="-" color="transparent" type="none"></redaction-annotation-icon>
|
||||
|
||||
<redaction-annotation-icon *ngIf="filter.key === 'updated'" type="square" label="U" color="#fdbd00"></redaction-annotation-icon>
|
||||
|
||||
<redaction-annotation-icon *ngIf="filter.key === 'image'" type="square" label="G" [color]="dictionaryColor"></redaction-annotation-icon>
|
||||
{{ filter.label | translate }}
|
||||
|
||||
@ -55,7 +55,6 @@
|
||||
class="breadcrumb"
|
||||
[routerLink]="'/ui/projects/' + appStateService.activeProjectId + '/file/' + appStateService.activeFile.fileId"
|
||||
routerLinkActive="active"
|
||||
[routerLinkActiveOptions]="{ exact: true }"
|
||||
>
|
||||
{{ appStateService.activeFile.filename }}
|
||||
</a>
|
||||
|
||||
@ -268,6 +268,8 @@ export class ProjectOverviewScreenComponent implements OnInit, OnDestroy {
|
||||
if (file.hasRedactions) allDistinctNeedsWork.add('redaction');
|
||||
if (file.hasRequests) allDistinctNeedsWork.add('suggestion');
|
||||
if (file.hasNone) allDistinctNeedsWork.add('none');
|
||||
if (file.hasUpdates) allDistinctNeedsWork.add('updated');
|
||||
if (file.hasImages) allDistinctNeedsWork.add('image');
|
||||
});
|
||||
|
||||
const statusFilters = [];
|
||||
|
||||
@ -451,7 +451,9 @@
|
||||
"redaction": "Redacted",
|
||||
"suggestion": "Suggested Redaction",
|
||||
"analysis": "Analysis required",
|
||||
"none": "No Annotations"
|
||||
"none": "No Annotations",
|
||||
"updated": "Updated",
|
||||
"image": "Images"
|
||||
},
|
||||
"filter-menu": {
|
||||
"label": "Filter",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user