A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
more fixes regarding empty titles
jonaswinkler8e339789faea
diff --git a/src-ui/src/app/app.module.ts b/src-ui/src/app/app.module.tsindex f935b7701..3c00cd0b7 100644--- a/src-ui/src/app/app.module.ts+++ b/src-ui/src/app/app.module.ts@@ -119,7 +119,8 @@ import { MetadataCollapseComponent } from './components/document-detail/metadatauseClass: CsrfInterceptor,multi: true},- FilterPipe+ FilterPipe,+ DocumentTitlePipe],bootstrap: [AppComponent]})diff --git a/src-ui/src/app/components/app-frame/app-frame.component.html b/src-ui/src/app/components/app-frame/app-frame.component.htmlindex 3d315ec32..2458005f4 100644--- a/src-ui/src/app/components/app-frame/app-frame.component.html+++ b/src-ui/src/app/components/app-frame/app-frame.component.html@@ -65,7 +65,7 @@<svg class="sidebaricon" fill="currentColor"><use xlink:href="assets/bootstrap-icons.svg#file-text"/></svg>- {{d.title}}+ {{d.title | documentTitle}}</a></li><li class="nav-item w-100" *ngIf="openDocuments.length > 1">diff --git a/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html b/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.htmlindex 194497d39..f50708af3 100644--- a/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html+++ b/src-ui/src/app/components/dashboard/widgets/saved-view-widget/saved-view-widget.component.html@@ -13,7 +13,7 @@<tbody><tr *ngFor="let doc of documents" routerLink="/documents/{{doc.id}}"><td>{{doc.created | date}}</td>- <td>{{doc.title}}<app-tag [tag]="t" *ngFor="let t of doc.tags$ | async" class="ml-1"></app-tag>+ <td>{{doc.title | documentTitle}}<app-tag [tag]="t" *ngFor="let t of doc.tags$ | async" class="ml-1"></app-tag></tr></tbody></table>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.tsindex 5fe9f9250..b4005b920 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@@ -6,6 +6,7 @@ import { PaperlessCorrespondent } from 'src/app/data/paperless-correspondent';import { PaperlessDocument } from 'src/app/data/paperless-document';import { PaperlessDocumentMetadata } from 'src/app/data/paperless-document-metadata';import { PaperlessDocumentType } from 'src/app/data/paperless-document-type';+import { DocumentTitlePipe } from 'src/app/pipes/document-title.pipe';import { DocumentListViewService } from 'src/app/services/document-list-view.service';import { OpenDocumentsService } from 'src/app/services/open-documents.service';import { CorrespondentService } from 'src/app/services/rest/correspondent.service';@@ -54,7 +55,8 @@ export class DocumentDetailComponent implements OnInit {private router: Router,private modalService: NgbModal,private openDocumentService: OpenDocumentsService,- private documentListViewService: DocumentListViewService) { }+ private documentListViewService: DocumentListViewService,+ private documentTitlePipe: DocumentTitlePipe) { }getContentType() {return this.metadata?.has_archive_version ? 'application/pdf' : this.metadata?.original_mime_type@@ -90,7 +92,7 @@ export class DocumentDetailComponent implements OnInit {this.documentsService.getMetadata(doc.id).subscribe(result => {this.metadata = result})- this.title = doc.title+ this.title = this.documentTitlePipe.transform(doc.title)this.documentForm.patchValue(doc)}diff --git a/src-ui/src/app/pipes/document-title.pipe.ts b/src-ui/src/app/pipes/document-title.pipe.tsindex 09445f595..621562d39 100644--- a/src-ui/src/app/pipes/document-title.pipe.ts+++ b/src-ui/src/app/pipes/document-title.pipe.ts@@ -5,7 +5,7 @@ import { Pipe, PipeTransform } from '@angular/core';})export class DocumentTitlePipe implements PipeTransform {- transform(value: string): unknown {+ transform(value: string): string {if (value) {return value} else {