From: shamoon <4887959+shamoon@users.noreply.github.com>
Date: Fri, 17 Feb 2023 03:41:10 +0000 (-0800)
Subject: Show errors on document save
X-Git-Tag: v1.14.0-beta.rc1~108^2~1
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7f841ce6d23e1be182263fb767aa86508bcf29c;p=thirdparty%2Fpaperless-ngx.git
Show errors on document save
---
diff --git a/src-ui/messages.xlf b/src-ui/messages.xlf
index 62f1443a98..37c4d54e92 100644
--- a/src-ui/messages.xlf
+++ b/src-ui/messages.xlf
@@ -1411,7 +1411,7 @@
src/app/services/toast.service.ts
- 32
+ 35
@@ -2645,11 +2645,36 @@
195
+
+ Error retrieving metadata
+
+ src/app/components/document-detail/document-detail.component.ts
+ 305
+
+
+
+ Error retrieving suggestions
+
+ src/app/components/document-detail/document-detail.component.ts
+ 319
+
+
+
+ Error saving document
+
+ src/app/components/document-detail/document-detail.component.ts
+ 432
+
+
+ src/app/components/document-detail/document-detail.component.ts
+ 476
+
+
Confirm delete
src/app/components/document-detail/document-detail.component.ts
- 489
+ 505
src/app/components/manage/management-list/management-list.component.ts
@@ -2660,35 +2685,35 @@
Do you really want to delete document ""?
src/app/components/document-detail/document-detail.component.ts
- 490
+ 506
The files for this document will be deleted permanently. This operation cannot be undone.
src/app/components/document-detail/document-detail.component.ts
- 491
+ 507
Delete document
src/app/components/document-detail/document-detail.component.ts
- 493
+ 509
Error deleting document:
src/app/components/document-detail/document-detail.component.ts
- 509
+ 525
Redo OCR confirm
src/app/components/document-detail/document-detail.component.ts
- 529
+ 545
src/app/components/document-list/bulk-editor/bulk-editor.component.ts
@@ -2699,14 +2724,14 @@
This operation will permanently redo OCR for this document.
src/app/components/document-detail/document-detail.component.ts
- 530
+ 546
This operation cannot be undone.
src/app/components/document-detail/document-detail.component.ts
- 531
+ 547
src/app/components/document-list/bulk-editor/bulk-editor.component.ts
@@ -2737,7 +2762,7 @@
Proceed
src/app/components/document-detail/document-detail.component.ts
- 533
+ 549
src/app/components/document-list/bulk-editor/bulk-editor.component.ts
@@ -2764,7 +2789,7 @@
Redo OCR operation will begin in the background. Close and re-open or reload this document after the operation has completed to see new content.
src/app/components/document-detail/document-detail.component.ts
- 541
+ 557
@@ -2773,7 +2798,7 @@
)"/>
src/app/components/document-detail/document-detail.component.ts
- 552,554
+ 568,570
@@ -4991,7 +5016,7 @@
Information
src/app/services/toast.service.ts
- 36
+ 43
diff --git a/src-ui/src/app/components/document-detail/document-detail.component.ts b/src-ui/src/app/components/document-detail/document-detail.component.ts
index 4178ccbda9..33a0d41142 100644
--- a/src-ui/src/app/components/document-detail/document-detail.component.ts
+++ b/src-ui/src/app/components/document-detail/document-detail.component.ts
@@ -301,6 +301,9 @@ export class DocumentDetailComponent
},
error: (error) => {
this.metadata = null
+ this.toastService.showError(
+ $localize`Error retrieving metadata` + ': ' + error.toString()
+ )
},
})
this.documentsService
@@ -312,6 +315,9 @@ export class DocumentDetailComponent
},
error: (error) => {
this.suggestions = null
+ this.toastService.showError(
+ $localize`Error retrieving suggestions` + ': ' + error.toString()
+ )
},
})
this.title = this.documentTitlePipe.transform(doc.title)
@@ -422,6 +428,11 @@ export class DocumentDetailComponent
error: (error) => {
this.networkActive = false
this.error = error.error
+ this.toastService.showError(
+ $localize`Error saving document` +
+ ': ' +
+ (error.message ?? error.toString())
+ )
},
})
}
@@ -461,6 +472,11 @@ export class DocumentDetailComponent
error: (error) => {
this.networkActive = false
this.error = error.error
+ this.toastService.showError(
+ $localize`Error saving document` +
+ ': ' +
+ (error.message ?? error.toString())
+ )
},
})
}