mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Clickable tags in dashboard widgets
This commit is contained in:
		| @@ -13,7 +13,7 @@ | ||||
|     <tbody> | ||||
|       <tr *ngFor="let doc of documents" routerLink="/documents/{{doc.id}}"> | ||||
|         <td>{{doc.created | customDate}}</td> | ||||
|         <td>{{doc.title | documentTitle}}<app-tag [tag]="t" *ngFor="let t of doc.tags$ | async" class="ms-1"></app-tag></td> | ||||
|         <td>{{doc.title | documentTitle}}<app-tag [tag]="t" *ngFor="let t of doc.tags$ | async" class="ms-1" (click)="clickTag(t); $event.stopPropagation();"></app-tag></td> | ||||
|       </tr> | ||||
|     </tbody> | ||||
|   </table> | ||||
|   | ||||
| @@ -6,6 +6,8 @@ import { PaperlessSavedView } from 'src/app/data/paperless-saved-view' | ||||
| import { DocumentListViewService } from 'src/app/services/document-list-view.service' | ||||
| import { ConsumerStatusService } from 'src/app/services/consumer-status.service' | ||||
| import { DocumentService } from 'src/app/services/rest/document.service' | ||||
| import { PaperlessTag } from 'src/app/data/paperless-tag' | ||||
| import { FILTER_HAS_TAGS_ALL } from 'src/app/data/filter-rule-type' | ||||
|  | ||||
| @Component({ | ||||
|   selector: 'app-saved-view-widget', | ||||
| @@ -62,4 +64,10 @@ export class SavedViewWidgetComponent implements OnInit, OnDestroy { | ||||
|       this.router.navigate(['documents']) | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   clickTag(tag: PaperlessTag) { | ||||
|     this.list.quickFilter([ | ||||
|       { rule_type: FILTER_HAS_TAGS_ALL, value: tag.id.toString() }, | ||||
|     ]) | ||||
|   } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Michael Shamoon
					Michael Shamoon