Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Prettier code cleanup for PR #273

Michael Shamoone41d75c3742a
diff --git a/src-ui/src/app/components/document-detail/document-detail.component.ts b/src-ui/src/app/components/document-detail/document-detail.component.ts
index dcafa6925..88f77160a 100644
--- a/src-ui/src/app/components/document-detail/document-detail.component.ts
+++ b/src-ui/src/app/components/document-detail/document-detail.component.ts
@@ -433,15 +433,19 @@ export class DocumentDetailComponent
}
nextDoc() {
- this.documentListViewService.getNext(this.document.id).subscribe((nextDocId: number) => {
- this.router.navigate(['documents', nextDocId])
- })
+ this.documentListViewService
+ .getNext(this.document.id)
+ .subscribe((nextDocId: number) => {
+ this.router.navigate(['documents', nextDocId])
+ })
}
-
- previousDoc () {
- this.documentListViewService.getPrevious(this.document.id).subscribe((prevDocId: number) => {
- this.router.navigate(['documents', prevDocId])
- })
+
+ previousDoc() {
+ this.documentListViewService
+ .getPrevious(this.document.id)
+ .subscribe((prevDocId: number) => {
+ this.router.navigate(['documents', prevDocId])
+ })
}
pdfPreviewLoaded(pdf: PDFDocumentProxy) {
diff --git a/src-ui/src/app/services/document-list-view.service.ts b/src-ui/src/app/services/document-list-view.service.ts
index a8b7c3d9e..a77ce2509 100644
--- a/src-ui/src/app/services/document-list-view.service.ts
+++ b/src-ui/src/app/services/document-list-view.service.ts
@@ -282,7 +282,7 @@ export class DocumentListViewService {
hasPrevious(doc: number) {
if (this.documents) {
- let index = this.documents.findIndex(d => d.id == doc)
+ let index = this.documents.findIndex((d) => d.id == doc)
return index != -1 && !(index == 0 && this.currentPage == 1)
}
}
@@ -311,13 +311,12 @@ export class DocumentListViewService {
}
getPrevious(currentDocId: number): Observable<number> {
- return new Observable(prevDocId => {
+ return new Observable((prevDocId) => {
if (this.documents != null) {
-
- let index = this.documents.findIndex(d => d.id == currentDocId)
+ let index = this.documents.findIndex((d) => d.id == currentDocId)
if (index != 0) {
- prevDocId.next(this.documents[index-1].id)
+ prevDocId.next(this.documents[index - 1].id)
prevDocId.complete()
} else if (this.currentPage > 1) {
this.currentPage -= 1