Document popover previews

This commit is contained in:
Michael Shamoon
2021-02-06 00:40:18 -08:00
parent 08d96a1b76
commit 41540a3a5f
6 changed files with 99 additions and 6 deletions

View File

@@ -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()
})
}
}