mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-09 00:05:21 +01:00
UI for matching api
This commit is contained in:
parent
b35e1bacd4
commit
54c47de38a
15 changed files with 111 additions and 59 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import { Directive, OnInit } from '@angular/core';
|
||||
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { MatchingModel } from 'src/app/data/matching-model';
|
||||
import { ObjectWithId } from 'src/app/data/object-with-id';
|
||||
import { AbstractPaperlessService } from 'src/app/services/rest/abstract-paperless-service';
|
||||
import { DeleteDialogComponent } from '../../common/delete-dialog/delete-dialog.component';
|
||||
|
|
@ -19,6 +20,16 @@ export abstract class GenericListComponent<T extends ObjectWithId> implements On
|
|||
|
||||
public collectionSize = 0
|
||||
|
||||
getMatching(o: MatchingModel) {
|
||||
if (o.matching_algorithm == MatchingModel.MATCH_AUTO) {
|
||||
return "Automatic"
|
||||
} else if (o.match && o.match.length > 0) {
|
||||
return `${o.match} (${MatchingModel.MATCHING_ALGORITHMS.find(a => a.id == o.matching_algorithm).name})`
|
||||
} else {
|
||||
return "-"
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.reloadData()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue