suggestions flag updates
This commit is contained in:
parent
f4dcabea29
commit
c6d2f91602
@ -27,7 +27,6 @@ export class FileStatusWrapper implements FileStatus {
|
||||
readonly hasHints = this.fileStatus.hasHints;
|
||||
readonly hasImages = this.fileStatus.hasImages;
|
||||
readonly hasRedactions = this.fileStatus.hasRedactions;
|
||||
readonly hasRequests = this.fileStatus.hasRequests;
|
||||
readonly hasUpdates = this.fileStatus.hasUpdates;
|
||||
readonly lastOCRTime = this.fileStatus.lastOCRTime;
|
||||
readonly lastProcessed = this.fileStatus.lastProcessed;
|
||||
@ -41,6 +40,7 @@ export class FileStatusWrapper implements FileStatus {
|
||||
readonly status = this._status;
|
||||
readonly uploader = this.fileStatus.uploader;
|
||||
readonly excludedPages = this.fileStatus.excludedPages;
|
||||
readonly hasSuggestions = this.fileStatus.hasSuggestions;
|
||||
|
||||
primaryAttribute: string;
|
||||
|
||||
@ -64,9 +64,8 @@ export class FileStatusWrapper implements FileStatus {
|
||||
readonly pages = this._pages;
|
||||
readonly cacheIdentifier = btoa(this.lastUploaded + this.lastOCRTime);
|
||||
|
||||
readonly hasUnappliedSuggestions = !this.allManualRedactionsApplied;
|
||||
readonly hintsOnly = this.hasHints && !this.hasRedactions;
|
||||
readonly hasNone = !this.hasRedactions && !this.hasHints && !this.hasRequests;
|
||||
readonly hasNone = !this.hasRedactions && !this.hasHints && !this.hasSuggestions;
|
||||
|
||||
readonly isError = this.status === FileStatus.StatusEnum.ERROR;
|
||||
readonly isProcessing = processingStatuses.includes(this.status);
|
||||
@ -74,7 +73,7 @@ export class FileStatusWrapper implements FileStatus {
|
||||
readonly isPending = this.status === FileStatus.StatusEnum.UNPROCESSED;
|
||||
readonly isUnderReview = this.status === FileStatus.StatusEnum.UNDERREVIEW;
|
||||
readonly isUnderApproval = this.status === FileStatus.StatusEnum.UNDERAPPROVAL;
|
||||
readonly canBeApproved = !this.analysisRequired && !this.hasRequests;
|
||||
readonly canBeApproved = !this.analysisRequired && !this.hasSuggestions;
|
||||
readonly canBeOpened = !this.isError && !this.isPending;
|
||||
readonly isWorkable = !this.isProcessing && this.canBeOpened;
|
||||
readonly canBeOCRed = !this.excluded && !this.lastOCRTime && ['UNASSIGNED', 'UNDER_REVIEW', 'UNDER_APPROVAL'].includes(this.status);
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
<redaction-annotation-icon *ngIf="hasImages" [color]="imageColor" label="I" type="square"></redaction-annotation-icon>
|
||||
<redaction-annotation-icon *ngIf="needsWorkInput.hintsOnly" [color]="hintColor" label="H" type="circle"></redaction-annotation-icon>
|
||||
<redaction-annotation-icon
|
||||
*ngIf="needsWorkInput.hasRequests"
|
||||
*ngIf="needsWorkInput.hasSuggestions"
|
||||
[color]="suggestionColor"
|
||||
label="S"
|
||||
type="rhombus"
|
||||
|
||||
@ -206,7 +206,7 @@ export class DossierListingScreenComponent
|
||||
if (file.analysisRequired) allDistinctNeedsWork.add('analysis');
|
||||
if (entry.dossier.hintsOnly) allDistinctNeedsWork.add('hint');
|
||||
if (entry.dossier.hasRedactions) allDistinctNeedsWork.add('redaction');
|
||||
if (entry.dossier.hasRequests) allDistinctNeedsWork.add('suggestion');
|
||||
if (entry.dossier.hasSuggestions) allDistinctNeedsWork.add('suggestion');
|
||||
if (entry.dossier.hasNone) allDistinctNeedsWork.add('none');
|
||||
});
|
||||
|
||||
|
||||
@ -275,7 +275,7 @@ export class DossierOverviewScreenComponent extends ListingComponent<FileStatusW
|
||||
if (file.analysisRequired) allDistinctNeedsWork.add('analysis');
|
||||
if (file.hintsOnly) allDistinctNeedsWork.add('hint');
|
||||
if (file.hasRedactions) allDistinctNeedsWork.add('redaction');
|
||||
if (file.hasRequests) allDistinctNeedsWork.add('suggestion');
|
||||
if (file.hasSuggestions) allDistinctNeedsWork.add('suggestion');
|
||||
if (file.hasUpdates) allDistinctNeedsWork.add('updated');
|
||||
if (file.hasImages) allDistinctNeedsWork.add('image');
|
||||
if (file.hasNone) allDistinctNeedsWork.add('none');
|
||||
|
||||
@ -55,7 +55,7 @@ export const annotationFilterChecker = (input: FileStatusWrapper | DossierWrappe
|
||||
}
|
||||
}
|
||||
case 'suggestion': {
|
||||
return input.hasRequests;
|
||||
return input.hasSuggestions;
|
||||
}
|
||||
case 'redaction': {
|
||||
return input.hasRedactions;
|
||||
|
||||
@ -31,7 +31,7 @@ export class DossierWrapper implements Dossier {
|
||||
totalNumberOfPages?: number;
|
||||
hintsOnly?: boolean;
|
||||
hasRedactions?: boolean;
|
||||
hasRequests?: boolean;
|
||||
hasSuggestions?: boolean;
|
||||
hasNone?: boolean;
|
||||
hasPendingOrProcessing?: boolean;
|
||||
|
||||
@ -66,7 +66,7 @@ export class DossierWrapper implements Dossier {
|
||||
private _recomputeFileStatus() {
|
||||
this.hintsOnly = false;
|
||||
this.hasRedactions = false;
|
||||
this.hasRequests = false;
|
||||
this.hasSuggestions = false;
|
||||
this.hasNone = false;
|
||||
this.allFilesApproved = true;
|
||||
this.totalNumberOfPages = 0;
|
||||
@ -74,12 +74,12 @@ export class DossierWrapper implements Dossier {
|
||||
this._files.forEach(f => {
|
||||
this.hintsOnly = this.hintsOnly || f.hintsOnly;
|
||||
this.hasRedactions = this.hasRedactions || f.hasRedactions;
|
||||
this.hasRequests = this.hasRequests || f.hasRequests;
|
||||
this.hasSuggestions = this.hasSuggestions || f.hasSuggestions;
|
||||
this.allFilesApproved = this.allFilesApproved && f.isApproved;
|
||||
this.totalNumberOfPages += f.numberOfPages;
|
||||
this.hasPendingOrProcessing = this.hasPendingOrProcessing || f.isPending || f.isProcessing;
|
||||
});
|
||||
this.hasNone = !this.hasRequests && !this.hasRedactions && !this.hintsOnly;
|
||||
this.hasNone = !this.hasSuggestions && !this.hasRedactions && !this.hintsOnly;
|
||||
this.hasFiles = this._files.length > 0;
|
||||
this.filesLength = this._files.length;
|
||||
this.reanalysisRequired = this._files.some(file => file.analysisRequired);
|
||||
|
||||
@ -84,10 +84,6 @@ export interface FileStatus {
|
||||
* Shows if any redactions were found during the analysis.
|
||||
*/
|
||||
hasRedactions?: boolean;
|
||||
/**
|
||||
* Shows if any requests were found during the analysis.
|
||||
*/
|
||||
hasRequests?: boolean;
|
||||
/**
|
||||
* Shows if there is any change between the previous and current analysis.
|
||||
*/
|
||||
@ -140,6 +136,8 @@ export interface FileStatus {
|
||||
* The list of excluded pages.
|
||||
*/
|
||||
excludedPages?: number[];
|
||||
|
||||
hasSuggestions?: boolean;
|
||||
}
|
||||
|
||||
export namespace FileStatus {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user