RED-10405: check if file isError, indent pending type, remove unknown.

This commit is contained in:
Nicoleta Panaghiu 2024-11-13 15:06:34 +02:00
parent d883472ed3
commit 2de02e95c8
9 changed files with 12 additions and 20 deletions

View File

@ -61,6 +61,7 @@
*ngFor="let config of statusConfig" *ngFor="let config of statusConfig"
[attr.help-mode-key]="'dashboard_in_dossier'" [attr.help-mode-key]="'dashboard_in_dossier'"
[config]="config" [config]="config"
[class.indent]="!!PendingTypes[config.id]"
[filterKey]="PendingTypes[config.id] ? 'pendingTypeFilters' : 'processingTypeFilters'" [filterKey]="PendingTypes[config.id] ? 'pendingTypeFilters' : 'processingTypeFilters'"
></iqser-progress-bar> ></iqser-progress-bar>
</div> </div>

View File

@ -45,3 +45,7 @@
iqser-progress-bar:not(:last-child) { iqser-progress-bar:not(:last-child) {
margin-bottom: 10px; margin-bottom: 10px;
} }
.indent {
margin-left: 32px;
}

View File

@ -159,7 +159,6 @@ export class DossierDetailsComponent extends ContextComponent<DossierDetailsCont
const files = this._filesMapService.get(this.#dossierId); const files = this._filesMapService.get(this.#dossierId);
const numberOfRulesLockedFiles = files.filter(file => file.errorCode === FileErrorCodes.LOCKED_RULES).length; const numberOfRulesLockedFiles = files.filter(file => file.errorCode === FileErrorCodes.LOCKED_RULES).length;
const numberOfTimeoutFiles = files.filter(file => file.errorCode === FileErrorCodes.RULES_EXECUTION_TIMEOUT).length; const numberOfTimeoutFiles = files.filter(file => file.errorCode === FileErrorCodes.RULES_EXECUTION_TIMEOUT).length;
const numberOfUnknownErrorFiles = stats.processingStats.pending - numberOfRulesLockedFiles - numberOfTimeoutFiles;
return [ return [
{ {
id: ProcessingTypes.pending, id: ProcessingTypes.pending,
@ -182,13 +181,6 @@ export class DossierDetailsComponent extends ContextComponent<DossierDetailsCont
count: numberOfTimeoutFiles, count: numberOfTimeoutFiles,
icon: 'red:reanalyse', icon: 'red:reanalyse',
}, },
{
id: PendingTypes.unknown,
label: _('processing-status.pending-unknown'),
total: stats.numberOfFiles,
count: numberOfUnknownErrorFiles,
icon: 'red:reanalyse',
},
{ {
id: ProcessingTypes.ocr, id: ProcessingTypes.ocr,
label: _('processing-status.ocr'), label: _('processing-status.ocr'),

View File

@ -989,7 +989,7 @@
"download-file-disabled": "Download: Sie müssen Genehmiger im Dossier sein und die initiale Verarbeitung {count, plural, one{der Datei} other{der Dateien}} muss abgeschlossen sein.", "download-file-disabled": "Download: Sie müssen Genehmiger im Dossier sein und die initiale Verarbeitung {count, plural, one{der Datei} other{der Dateien}} muss abgeschlossen sein.",
"file-listing": { "file-listing": {
"file-entry": { "file-entry": {
"file-error": "Reanalyse erforderlich ({errorCode, select, RULES_EXECUTION_TIMEOUT{Zeitlimit für Regeln} LOCKED_RULES{Regeln gesperrt} other{unbekannt}})", "file-error": "Reanalyse erforderlich {errorCode, select, RULES_EXECUTION_TIMEOUT{(Zeitlimit für Regeln)} LOCKED_RULES{(Regeln gesperrt)} other{}}",
"file-pending": "Ausstehend ..." "file-pending": "Ausstehend ..."
} }
}, },
@ -2060,7 +2060,6 @@
"pending": "Ausstehend", "pending": "Ausstehend",
"pending-locked-rules": "Ausstehend (Regeln gesperrt)", "pending-locked-rules": "Ausstehend (Regeln gesperrt)",
"pending-timeout": "Ausstehend (Zeitlimit für Regeln)", "pending-timeout": "Ausstehend (Zeitlimit für Regeln)",
"pending-unknown": "Ausstehend (unbekannt)",
"processed": "Verarbeitet", "processed": "Verarbeitet",
"processing": "Verarbeitung läuft" "processing": "Verarbeitung läuft"
}, },

View File

@ -989,7 +989,7 @@
"download-file-disabled": "To download, ensure you are an approver in the dossier, and the {count, plural, one{file has undergone} other{files have undergone}} initial processing.", "download-file-disabled": "To download, ensure you are an approver in the dossier, and the {count, plural, one{file has undergone} other{files have undergone}} initial processing.",
"file-listing": { "file-listing": {
"file-entry": { "file-entry": {
"file-error": "Re-processing required ({errorCode, select, RULES_EXECUTION_TIMEOUT{Rules timeout} LOCKED_RULES{Rules locked} other{unknown}})", "file-error": "Re-processing required {errorCode, select, RULES_EXECUTION_TIMEOUT{(Rules timeout)} LOCKED_RULES{(Rules locked)} other{}}",
"file-pending": "Pending..." "file-pending": "Pending..."
} }
}, },
@ -2060,7 +2060,6 @@
"pending": "Pending", "pending": "Pending",
"pending-locked-rules": "Pending (Rules locked)", "pending-locked-rules": "Pending (Rules locked)",
"pending-timeout": "Pending (Rules timeout)", "pending-timeout": "Pending (Rules timeout)",
"pending-unknown": "Pending (unknown)",
"processed": "Processed", "processed": "Processed",
"processing": "Processing" "processing": "Processing"
}, },

View File

@ -989,7 +989,7 @@
"download-file-disabled": "You need to be approver in the dossier and the {count, plural, one{file needs} other{files need}} to be initially processed in order to download.", "download-file-disabled": "You need to be approver in the dossier and the {count, plural, one{file needs} other{files need}} to be initially processed in order to download.",
"file-listing": { "file-listing": {
"file-entry": { "file-entry": {
"file-error": "Reanalyse erforderlich ({errorCode, select, RULES_EXECUTION_TIMEOUT{Zeitlimit für Regeln} LOCKED_RULES{Regeln gesperrt} other{unbekannt}})", "file-error": "Reanalyse erforderlich {errorCode, select, RULES_EXECUTION_TIMEOUT{(Zeitlimit für Regeln)} LOCKED_RULES{(Regeln gesperrt)} other{}}",
"file-pending": "Ausstehend ..." "file-pending": "Ausstehend ..."
} }
}, },
@ -2060,7 +2060,6 @@
"pending": "Ausstehend", "pending": "Ausstehend",
"pending-locked-rules": "Ausstehend (Regeln gesperrt)", "pending-locked-rules": "Ausstehend (Regeln gesperrt)",
"pending-timeout": "Ausstehend (Zeitlimit für Regeln)", "pending-timeout": "Ausstehend (Zeitlimit für Regeln)",
"pending-unknown": "Ausstehend (unbekannt)",
"processed": "Verarbeitet", "processed": "Verarbeitet",
"processing": "Verarbeitung läuft" "processing": "Verarbeitung läuft"
}, },

View File

@ -989,7 +989,7 @@
"download-file-disabled": "You need to be approver in the dossier and the {count, plural, one{file needs} other{files need}} to be initially processed in order to download.", "download-file-disabled": "You need to be approver in the dossier and the {count, plural, one{file needs} other{files need}} to be initially processed in order to download.",
"file-listing": { "file-listing": {
"file-entry": { "file-entry": {
"file-error": "Re-processing required ({errorCode, select, RULES_EXECUTION_TIMEOUT{Rules timeout} LOCKED_RULES{Rules locked} other{unknown}})", "file-error": "Re-processing required {errorCode, select, RULES_EXECUTION_TIMEOUT{(Rules timeout)} LOCKED_RULES{(Rules locked)} other{}}",
"file-pending": "Pending..." "file-pending": "Pending..."
} }
}, },
@ -2060,7 +2060,6 @@
"pending": "Pending", "pending": "Pending",
"pending-locked-rules": "Pending (Rules locked)", "pending-locked-rules": "Pending (Rules locked)",
"pending-timeout": "Pending (Rules timeout)", "pending-timeout": "Pending (Rules timeout)",
"pending-unknown": "Pending (unknown)",
"processed": "Processed", "processed": "Processed",
"processing": "Processing" "processing": "Processing"
}, },

View File

@ -15,7 +15,6 @@ export type ProcessingType = keyof typeof ProcessingTypes;
export const PendingTypes = { export const PendingTypes = {
lockedRules: 'lockedRules', lockedRules: 'lockedRules',
timeout: 'timeout', timeout: 'timeout',
unknown: 'unknown',
} as const; } as const;
export type PendingType = keyof typeof PendingTypes; export type PendingType = keyof typeof PendingTypes;

View File

@ -161,7 +161,7 @@ export class File extends Entity<IFile> implements IFile {
file.fileAttributes && file.fileAttributes.attributeIdToValue ? file.fileAttributes : { attributeIdToValue: {} }; file.fileAttributes && file.fileAttributes.attributeIdToValue ? file.fileAttributes : { attributeIdToValue: {} };
this.processingType = this.#processingType; this.processingType = this.#processingType;
this.errorCode = file.fileErrorInfo?.errorCode; this.errorCode = this.isError ? file.fileErrorInfo?.errorCode : undefined;
this.pendingType = this.processingType === ProcessingTypes.pending ? this.#pendingType : undefined; this.pendingType = this.processingType === ProcessingTypes.pending ? this.#pendingType : undefined;
} }
@ -195,14 +195,14 @@ export class File extends Entity<IFile> implements IFile {
return ProcessingTypes.processed; return ProcessingTypes.processed;
} }
get #pendingType(): PendingType { get #pendingType(): PendingType | undefined {
if (this.errorCode === FileErrorCodes.LOCKED_RULES) { if (this.errorCode === FileErrorCodes.LOCKED_RULES) {
return PendingTypes.lockedRules; return PendingTypes.lockedRules;
} }
if (this.errorCode === FileErrorCodes.RULES_EXECUTION_TIMEOUT) { if (this.errorCode === FileErrorCodes.RULES_EXECUTION_TIMEOUT) {
return PendingTypes.timeout; return PendingTypes.timeout;
} }
return PendingTypes.unknown; return undefined;
} }
isPageExcluded(page: number): boolean { isPageExcluded(page: number): boolean {