From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue, 26 Aug 2025 20:30:16 +0000 (-0700) Subject: Merge branch 'dev' into feature-ai X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Ffeature-ai;p=thirdparty%2Fpaperless-ngx.git Merge branch 'dev' into feature-ai --- 4076a355593a869dfd0f48715ab9a9a4f6abe4a5 diff --cc src-ui/src/app/components/document-detail/document-detail.component.ts index b5a9ffe75b,29bcf8fa89..2618662a02 --- a/src-ui/src/app/components/document-detail/document-detail.component.ts +++ b/src-ui/src/app/components/document-detail/document-detail.component.ts @@@ -665,22 -671,28 +683,15 @@@ export class DocumentDetailComponen PermissionType.Document ) ) { - this.documentsService - .getSuggestions(doc.id) - .pipe( - first(), - takeUntil(this.unsubscribeNotifier), - takeUntil(this.docChangeNotifier) - ) - .subscribe({ - next: (result) => { - this.suggestions = result - }, - error: (error) => { - this.suggestions = null - this.toastService.showError( - $localize`Error retrieving suggestions.`, - error - ) - }, - }) + this.tagService.getCachedMany(doc.tags).subscribe((tags) => { + // only show suggestions if document has inbox tags + if (tags.some((tag) => tag.is_inbox_tag)) { + this.getSuggestions() + } + }) } this.title = this.documentTitlePipe.transform(doc.title) - const docFormValues = Object.assign({}, doc) - docFormValues['permissions_form'] = { - owner: doc.owner, - set_permissions: doc.permissions, - } - - this.documentForm.patchValue(docFormValues, { emitEvent: false }) - if (!this.userCanEdit) this.documentForm.disable() + this.prepareForm(doc) } get customFieldFormFields(): FormArray {