mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
Fix: dont display trashed docs in doc links
This commit is contained in:
@@ -18,9 +18,11 @@
|
||||
@case (CustomFieldDataType.DocumentLink) {
|
||||
<div [ngbTooltip]="nameTooltip" class="d-flex gap-1 flex-wrap">
|
||||
@for (docId of value; track docId) {
|
||||
<a routerLink="/documents/{{docId}}" class="badge bg-body text-primary" title="View" i18n-title>
|
||||
<i-bs width="0.9em" height="0.9em" name="file-text"></i-bs> <span>{{ getDocumentTitle(docId) }}</span>
|
||||
</a>
|
||||
@if (getDocumentTitle(docId)) {
|
||||
<a routerLink="/documents/{{docId}}" class="badge bg-body text-primary" title="View" i18n-title>
|
||||
<i-bs width="0.9em" height="0.9em" name="file-text"></i-bs> <span>{{ getDocumentTitle(docId) }}</span>
|
||||
</a>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
@@ -71,9 +71,9 @@ export class DocumentLinkComponent
|
||||
.pipe(takeUntil(this.unsubscribeNotifier))
|
||||
.subscribe((documentResults) => {
|
||||
this.loading = false
|
||||
this.selectedDocuments = documentIDs.map((id) =>
|
||||
documentResults.results.find((d) => d.id === id)
|
||||
)
|
||||
this.selectedDocuments = documentIDs
|
||||
.map((id) => documentResults.results.find((d) => d.id === id))
|
||||
.filter((d) => d)
|
||||
super.writeValue(documentIDs)
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user