mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-30 18:27:45 -05:00
Show number of comments on cards, tab
This commit is contained in:
@@ -35,15 +35,16 @@ export class OpenDocumentsService {
|
||||
refreshDocument(id: number) {
|
||||
let index = this.openDocuments.findIndex((doc) => doc.id == id)
|
||||
if (index > -1) {
|
||||
this.documentService.get(id).subscribe(
|
||||
(doc) => {
|
||||
this.documentService.get(id).subscribe({
|
||||
next: (doc) => {
|
||||
this.openDocuments[index] = doc
|
||||
this.save()
|
||||
},
|
||||
(error) => {
|
||||
error: () => {
|
||||
this.openDocuments.splice(index, 1)
|
||||
this.save()
|
||||
}
|
||||
)
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -2,10 +2,8 @@ import { HttpClient, HttpParams } from '@angular/common/http'
|
||||
import { Observable } from 'rxjs'
|
||||
import { map, publishReplay, refCount } from 'rxjs/operators'
|
||||
import { ObjectWithId } from 'src/app/data/object-with-id'
|
||||
import { PaperlessUser } from 'src/app/data/paperless-user'
|
||||
import { Results } from 'src/app/data/results'
|
||||
import { environment } from 'src/environments/environment'
|
||||
import { PermissionAction, PermissionType } from '../permissions.service'
|
||||
|
||||
export abstract class AbstractPaperlessService<T extends ObjectWithId> {
|
||||
protected baseUrl: string = environment.apiBaseUrl
|
||||
|
Reference in New Issue
Block a user