mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-10-12 11:07:13 +00:00
Fix suggestions dropdown counts and empty state
This commit is contained in:
3 files changed
+62
-8
No files matched your search
+10
-1
@@ -128,7 +128,15 @@ export class SuggestionsDropdownComponent {
|
||||
}
|
||||
|
||||
get totalSuggestions(): number {
|
||||
return this.novelSuggestions + this.reusableSuggestions
|
||||
return this.novelSuggestions + this.fieldSuggestions
|
||||
}
|
||||
|
||||
get fieldSuggestions(): number {
|
||||
return (
|
||||
this.reusableSuggestions +
|
||||
(this.suggestions()?.title ? 1 : 0) +
|
||||
(this.suggestions()?.dates?.length ?? 0)
|
||||
)
|
||||
}
|
||||
|
||||
private countUnapplied(suggested: number[], applied: number[]): number {
|
||||
@@ -139,6 +147,7 @@ export class SuggestionsDropdownComponent {
|
||||
get noSuggestions(): boolean {
|
||||
const suggestions = this.suggestions()
|
||||
return (
|
||||
!this.loading() &&
|
||||
suggestions != null &&
|
||||
!suggestions.title &&
|
||||
!suggestions.tags?.length &&
|
||||
|
||||
Reference in new issue
Block a user