mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-09-16 21:55:37 -05:00
Enhancement: disable-able mail rules, add toggle to overview (#7810)
This commit is contained in:
@@ -170,6 +170,21 @@ export class MailComponent
|
||||
this.editMailRule(clone, true)
|
||||
}
|
||||
|
||||
onMailRuleEnableToggled(rule: MailRule) {
|
||||
this.mailRuleService.patch(rule).subscribe({
|
||||
next: () => {
|
||||
this.toastService.showInfo(
|
||||
rule.enabled
|
||||
? $localize`Rule "${rule.name}" enabled.`
|
||||
: $localize`Rule "${rule.name}" disabled.`
|
||||
)
|
||||
},
|
||||
error: (e) => {
|
||||
this.toastService.showError($localize`Error toggling rule.`, e)
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
deleteMailRule(rule: MailRule) {
|
||||
const modal = this.modalService.open(ConfirmDialogComponent, {
|
||||
backdrop: 'static',
|
||||
|
Reference in New Issue
Block a user