mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-18 17:11:21 +00:00
Document popover previews
This commit is contained in:
@@ -12,6 +12,7 @@ import { SavedViewService } from 'src/app/services/rest/saved-view.service';
|
||||
import { Toast, ToastService } from 'src/app/services/toast.service';
|
||||
import { FilterEditorComponent } from './filter-editor/filter-editor.component';
|
||||
import { SaveViewConfigDialogComponent } from './save-view-config-dialog/save-view-config-dialog.component';
|
||||
import { DocumentCardSmallComponent } from './document-card-small/document-card-small.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-document-list',
|
||||
@@ -41,6 +42,8 @@ export class DocumentListComponent implements OnInit, OnDestroy {
|
||||
|
||||
private consumptionFinishedSubscription: Subscription
|
||||
|
||||
@ViewChildren(DocumentCardSmallComponent) smallCards: QueryList<DocumentCardSmallComponent>
|
||||
|
||||
get isFiltered() {
|
||||
return this.list.filterRules?.length > 0
|
||||
}
|
||||
@@ -204,4 +207,10 @@ export class DocumentListComponent implements OnInit, OnDestroy {
|
||||
trackByDocumentId(index, item: PaperlessDocument) {
|
||||
return item.id
|
||||
}
|
||||
|
||||
closeAllPopovers(cardOpening: DocumentCardSmallComponent) {
|
||||
this.smallCards.forEach(card => {
|
||||
if (card !== cardOpening) card.popover.close()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user