mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-20 00:56:26 +00:00
UI for matching api
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
Reference in New Issue
Block a user