A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
change default matching algo to auto and move to constant
Nico Fricke36158609f099
diff --git a/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.ts b/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.tsindex cba0a922a..86be7414d 100644--- a/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.ts+++ b/src-ui/src/app/components/common/edit-dialog/correspondent-edit-dialog/correspondent-edit-dialog.component.ts@@ -2,6 +2,7 @@ import { Component } from '@angular/core'import { FormControl, FormGroup } from '@angular/forms'import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'import { EditDialogComponent } from 'src/app/components/common/edit-dialog/edit-dialog.component'+import { DEFAULT_MATCHING_ALGORITHM } from 'src/app/data/matching-model'import { PaperlessCorrespondent } from 'src/app/data/paperless-correspondent'import { CorrespondentService } from 'src/app/services/rest/correspondent.service'import { ToastService } from 'src/app/services/toast.service'@@ -31,7 +32,7 @@ export class CorrespondentEditDialogComponent extends EditDialogComponent<PaperlgetForm(): FormGroup {return new FormGroup({name: new FormControl(''),- matching_algorithm: new FormControl(1),+ matching_algorithm: new FormControl(DEFAULT_MATCHING_ALGORITHM),match: new FormControl(''),is_insensitive: new FormControl(true),})diff --git a/src-ui/src/app/components/common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component.ts b/src-ui/src/app/components/common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component.tsindex 05d207f35..bcd2363fd 100644--- a/src-ui/src/app/components/common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component.ts+++ b/src-ui/src/app/components/common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component.ts@@ -2,6 +2,7 @@ import { Component } from '@angular/core'import { FormControl, FormGroup } from '@angular/forms'import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'import { EditDialogComponent } from 'src/app/components/common/edit-dialog/edit-dialog.component'+import { DEFAULT_MATCHING_ALGORITHM } from 'src/app/data/matching-model'import { PaperlessDocumentType } from 'src/app/data/paperless-document-type'import { DocumentTypeService } from 'src/app/services/rest/document-type.service'import { ToastService } from 'src/app/services/toast.service'@@ -31,7 +32,7 @@ export class DocumentTypeEditDialogComponent extends EditDialogComponent<PaperlegetForm(): FormGroup {return new FormGroup({name: new FormControl(''),- matching_algorithm: new FormControl(1),+ matching_algorithm: new FormControl(DEFAULT_MATCHING_ALGORITHM),match: new FormControl(''),is_insensitive: new FormControl(true),})diff --git a/src-ui/src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.ts b/src-ui/src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.tsindex 2ec0821e6..54a91cb88 100644--- a/src-ui/src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.ts+++ b/src-ui/src/app/components/common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component.ts@@ -2,6 +2,7 @@ import { Component } from '@angular/core'import { FormControl, FormGroup } from '@angular/forms'import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'import { EditDialogComponent } from 'src/app/components/common/edit-dialog/edit-dialog.component'+import { DEFAULT_MATCHING_ALGORITHM } from 'src/app/data/matching-model'import { PaperlessStoragePath } from 'src/app/data/paperless-storage-path'import { StoragePathService } from 'src/app/services/rest/storage-path.service'import { ToastService } from 'src/app/services/toast.service'@@ -42,7 +43,7 @@ export class StoragePathEditDialogComponent extends EditDialogComponent<Paperlesreturn new FormGroup({name: new FormControl(''),path: new FormControl(''),- matching_algorithm: new FormControl(1),+ matching_algorithm: new FormControl(DEFAULT_MATCHING_ALGORITHM),match: new FormControl(''),is_insensitive: new FormControl(true),})diff --git a/src-ui/src/app/components/common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component.ts b/src-ui/src/app/components/common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component.tsindex 7b5b7abf7..c4f10d0b7 100644--- a/src-ui/src/app/components/common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component.ts+++ b/src-ui/src/app/components/common/edit-dialog/tag-edit-dialog/tag-edit-dialog.component.ts@@ -6,6 +6,7 @@ import { PaperlessTag } from 'src/app/data/paperless-tag'import { TagService } from 'src/app/services/rest/tag.service'import { ToastService } from 'src/app/services/toast.service'import { randomColor } from 'src/app/utils/color'+import {DEFAULT_MATCHING_ALGORITHM} from "../../../../data/matching-model";@Component({selector: 'app-tag-edit-dialog',@@ -34,7 +35,7 @@ export class TagEditDialogComponent extends EditDialogComponent<PaperlessTag> {name: new FormControl(''),color: new FormControl(randomColor()),is_inbox_tag: new FormControl(false),- matching_algorithm: new FormControl(1),+ matching_algorithm: new FormControl(DEFAULT_MATCHING_ALGORITHM),match: new FormControl(''),is_insensitive: new FormControl(true),})diff --git a/src-ui/src/app/data/matching-model.ts b/src-ui/src/app/data/matching-model.tsindex e228893d6..8ce05528e 100644--- a/src-ui/src/app/data/matching-model.ts+++ b/src-ui/src/app/data/matching-model.ts@@ -6,6 +6,7 @@ export const MATCH_LITERAL = 3export const MATCH_REGEX = 4export const MATCH_FUZZY = 5export const MATCH_AUTO = 6+export const DEFAULT_MATCHING_ALGORITHM = MATCH_AUTOexport const MATCHING_ALGORITHMS = [{