mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-15 10:26:42 +00:00
Couple more things for sonar
This commit is contained in:
2 files changed
+14
-11
No files matched your search
@@ -371,6 +371,12 @@ export class BulkEditorComponent
|
||||
onQueued(taskId)
|
||||
} else {
|
||||
const label = getDocumentOperationLabel(operation)
|
||||
const submittedMessage = bulk
|
||||
? $localize`Bulk operation '${label}' submitted for processing.`
|
||||
: $localize`Operation '${label}' submitted for processing.`
|
||||
const completedMessage = bulk
|
||||
? $localize`Bulk operation '${label}' completed.`
|
||||
: $localize`Operation '${label}' completed.`
|
||||
this.taskNotifications.showQueued(
|
||||
taskId,
|
||||
bulk
|
||||
@@ -378,12 +384,8 @@ export class BulkEditorComponent
|
||||
: $localize`Operation '${label}' queued.`,
|
||||
{
|
||||
content: documentOperationHasFollowUpTasks(operation)
|
||||
? bulk
|
||||
? $localize`Bulk operation '${label}' submitted for processing.`
|
||||
: $localize`Operation '${label}' submitted for processing.`
|
||||
: bulk
|
||||
? $localize`Bulk operation '${label}' completed.`
|
||||
: $localize`Operation '${label}' completed.`,
|
||||
? submittedMessage
|
||||
: completedMessage,
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
@@ -83,11 +83,12 @@ export class TaskNotificationService implements OnDestroy {
|
||||
const operation = getDocumentOperationLabel(result.operation)
|
||||
let content: string
|
||||
if (succeeded) {
|
||||
content = documentOperationHasFollowUpTasks(result.operation)
|
||||
? $localize`Operation '${operation}' submitted for processing.`
|
||||
: operation
|
||||
? $localize`Operation '${operation}' completed.`
|
||||
: $localize`Operation completed.`
|
||||
let operationText = $localize`Operation`
|
||||
if (operation) operationText += ` '${operation}'`
|
||||
const resultText = documentOperationHasFollowUpTasks(result.operation)
|
||||
? $localize`submitted for processing`
|
||||
: $localize`completed`
|
||||
content = `${operationText} ${resultText}.`
|
||||
} else if (result.status === PaperlessTaskStatus.Revoked) {
|
||||
content = operation
|
||||
? $localize`Operation '${operation}' revoked.`
|
||||
|
||||
Reference in new issue
Block a user