Show Updated and Image Flag for File List

This commit is contained in:
Adina Țeudan 2021-02-05 21:55:23 +02:00
parent 8a9f68b9dd
commit 2a92b1b0ec
7 changed files with 34 additions and 3 deletions

View File

@ -133,6 +133,12 @@ export const annotationFilterChecker = (input: FileStatusWrapper | ProjectWrappe
case 'none': { case 'none': {
return input.hasNone; return input.hasNone;
} }
case 'updated': {
return input instanceof FileStatusWrapper && input.hasUpdates;
}
case 'image': {
return input instanceof FileStatusWrapper && input.hasImages;
}
} }
}; };

View File

@ -3,4 +3,6 @@
<redaction-annotation-icon *ngIf="needsWorkInput.hasRedactions" type="square" label="R" color="#283241"></redaction-annotation-icon> <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.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="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> </div>

View File

@ -25,11 +25,27 @@ export class NeedsWorkBadgeComponent implements OnInit {
} }
get suggestionColor() { 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; let ruleSetId = null;
if (this.needsWorkInput instanceof ProjectWrapper) { if (this.needsWorkInput instanceof ProjectWrapper) {
ruleSetId = this.needsWorkInput.ruleSetId; ruleSetId = this.needsWorkInput.ruleSetId;
} }
return this.appStateService.getDictionaryColor('suggestion', ruleSetId); return this.appStateService.getDictionaryColor(type, ruleSetId);
} }
} }

View File

@ -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 === '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 === '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 }} {{ filter.label | translate }}

View File

@ -55,7 +55,6 @@
class="breadcrumb" class="breadcrumb"
[routerLink]="'/ui/projects/' + appStateService.activeProjectId + '/file/' + appStateService.activeFile.fileId" [routerLink]="'/ui/projects/' + appStateService.activeProjectId + '/file/' + appStateService.activeFile.fileId"
routerLinkActive="active" routerLinkActive="active"
[routerLinkActiveOptions]="{ exact: true }"
> >
{{ appStateService.activeFile.filename }} {{ appStateService.activeFile.filename }}
</a> </a>

View File

@ -268,6 +268,8 @@ export class ProjectOverviewScreenComponent implements OnInit, OnDestroy {
if (file.hasRedactions) allDistinctNeedsWork.add('redaction'); if (file.hasRedactions) allDistinctNeedsWork.add('redaction');
if (file.hasRequests) allDistinctNeedsWork.add('suggestion'); if (file.hasRequests) allDistinctNeedsWork.add('suggestion');
if (file.hasNone) allDistinctNeedsWork.add('none'); if (file.hasNone) allDistinctNeedsWork.add('none');
if (file.hasUpdates) allDistinctNeedsWork.add('updated');
if (file.hasImages) allDistinctNeedsWork.add('image');
}); });
const statusFilters = []; const statusFilters = [];

View File

@ -449,7 +449,9 @@
"redaction": "Redacted", "redaction": "Redacted",
"suggestion": "Suggested Redaction", "suggestion": "Suggested Redaction",
"analysis": "Analysis required", "analysis": "Analysis required",
"none": "No Annotations" "none": "No Annotations",
"updated": "Updated",
"image": "Images"
}, },
"filter-menu": { "filter-menu": {
"label": "Filter", "label": "Filter",