mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-10-22 07:48:13 +00:00
Enhancement: notifications improvements (#14500)
This commit is contained in:
1 parent
c657fceea5
commit
98fb7c3b63
77 files changed
+1535
-627
No files matched your search
+2
-2
@@ -107,7 +107,7 @@ describe('CustomFieldsComponent', () => {
|
||||
let modal: NgbModalRef
|
||||
modalService.activeInstances.subscribe((m) => (modal = m[m.length - 1]))
|
||||
const toastErrorSpy = jest.spyOn(toastService, 'showError')
|
||||
const toastInfoSpy = jest.spyOn(toastService, 'showInfo')
|
||||
const toastInfoSpy = jest.spyOn(toastService, 'showSuccess')
|
||||
const reloadSpy = jest.spyOn(component, 'reload')
|
||||
|
||||
component.editField()
|
||||
@@ -131,7 +131,7 @@ describe('CustomFieldsComponent', () => {
|
||||
let modal: NgbModalRef
|
||||
modalService.activeInstances.subscribe((m) => (modal = m[m.length - 1]))
|
||||
const toastErrorSpy = jest.spyOn(toastService, 'showError')
|
||||
const toastInfoSpy = jest.spyOn(toastService, 'showInfo')
|
||||
const toastInfoSpy = jest.spyOn(toastService, 'showSuccess')
|
||||
const reloadSpy = jest.spyOn(component, 'reload')
|
||||
|
||||
const editButton = fixture.debugElement
|
||||
|
||||
+6
-2
@@ -82,7 +82,9 @@ export class CustomFieldsComponent
|
||||
modal.componentInstance.succeeded
|
||||
.pipe(takeUntil(this.unsubscribeNotifier))
|
||||
.subscribe((newField) => {
|
||||
this.toastService.showInfo($localize`Saved field "${newField.name}".`)
|
||||
this.toastService.showSuccess(
|
||||
$localize`Saved field "${newField.name}".`
|
||||
)
|
||||
this.customFieldsService.clearCache()
|
||||
this.settingsService.initializeDisplayFields()
|
||||
this.documentService.reload()
|
||||
@@ -109,7 +111,9 @@ export class CustomFieldsComponent
|
||||
this.customFieldsService.delete(field).subscribe({
|
||||
next: () => {
|
||||
modal.close()
|
||||
this.toastService.showInfo($localize`Deleted field "${field.name}"`)
|
||||
this.toastService.showSuccess(
|
||||
$localize`Deleted field "${field.name}"`
|
||||
)
|
||||
this.customFieldsService.clearCache()
|
||||
this.settingsService.initializeDisplayFields()
|
||||
this.documentService.reload()
|
||||
|
||||
Reference in new issue
Block a user