Show number of comments on cards, tab

This commit is contained in:
shamoon
2023-03-16 00:42:24 -07:00
parent e47a9b7b66
commit 992ac545b3
14 changed files with 146 additions and 74 deletions

View File

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

View File

@@ -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