]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Tweak: add name to management toasts
authorshamoon <4887959+shamoon@users.noreply.github.com>
Fri, 7 Feb 2025 07:24:23 +0000 (23:24 -0800)
committershamoon <4887959+shamoon@users.noreply.github.com>
Fri, 7 Feb 2025 07:24:23 +0000 (23:24 -0800)
src-ui/messages.xlf
src-ui/src/app/components/manage/management-list/management-list.component.ts

index b0d6025c7ddd5b3ac9903a61f85b14c90417d88e..1072e89c6e713424fef64598783871787e36325e 100644 (file)
           <context context-type="linenumber">183</context>
         </context-group>
       </trans-unit>
-      <trans-unit id="2541368547549828690" datatype="html">
-        <source>Successfully updated <x id="PH" equiv-text="this.typeName"/>.</source>
+      <trans-unit id="4835942264662718903" datatype="html">
+        <source>Successfully updated <x id="PH" equiv-text="this.typeName"/> &quot;<x id="PH_1" equiv-text="object.name"/>&quot;.</source>
         <context-group purpose="location">
           <context context-type="sourcefile">src/app/components/manage/management-list/management-list.component.ts</context>
           <context context-type="linenumber">198</context>
index ecb3e25191d539286742f42a17ab0ebe5c1c3c28..7f7721485b48d954842629a32088d2d031fbd953 100644 (file)
@@ -21,7 +21,6 @@ import {
   MATCHING_ALGORITHMS,
   MatchingModel,
 } from 'src/app/data/matching-model'
-import { ObjectWithId } from 'src/app/data/object-with-id'
 import { ObjectWithPermissions } from 'src/app/data/object-with-permissions'
 import {
   SortableDirective,
@@ -56,7 +55,7 @@ export interface ManagementListColumn {
 }
 
 @Directive()
-export abstract class ManagementListComponent<T extends ObjectWithId>
+export abstract class ManagementListComponent<T extends MatchingModel>
   extends LoadingComponentWithPermissions
   implements OnInit, OnDestroy
 {
@@ -195,7 +194,7 @@ export abstract class ManagementListComponent<T extends ObjectWithId>
     activeModal.componentInstance.succeeded.subscribe(() => {
       this.reloadData()
       this.toastService.showInfo(
-        $localize`Successfully updated ${this.typeName}.`
+        $localize`Successfully updated ${this.typeName} "${object.name}".`
       )
     })
     activeModal.componentInstance.failed.subscribe((e) => {
@@ -208,7 +207,7 @@ export abstract class ManagementListComponent<T extends ObjectWithId>
 
   abstract getDeleteMessage(object: T)
 
-  filterDocuments(object: ObjectWithId) {
+  filterDocuments(object: MatchingModel) {
     this.documentListViewService.quickFilter([
       { rule_type: this.filterRuleType, value: object.id.toString() },
     ])