From: Galen Charlton Date: Mon, 8 Mar 2021 15:21:13 +0000 (-0500) Subject: proof of concept: MARC record checks for bib records X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fuser%2Fgmcharlt%2Fmarc-lint;p=working%2FEvergreen.git proof of concept: MARC record checks for bib records This adds a new method to pass a MARC bib record through MARC::Lint and MARC::Errorchecks and return a list of warnings. A new "Lint" button in the Enhanced MARC Editor displays the results. Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/lint-dialog.component.html b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/lint-dialog.component.html new file mode 100644 index 0000000000..30bbc295ee --- /dev/null +++ b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/lint-dialog.component.html @@ -0,0 +1,29 @@ + + + + + diff --git a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/lint-dialog.component.ts b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/lint-dialog.component.ts new file mode 100644 index 0000000000..2009e4eb22 --- /dev/null +++ b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/lint-dialog.component.ts @@ -0,0 +1,25 @@ +import {Component, OnInit, Input, ViewChild} from '@angular/core'; +import {DialogComponent} from '@eg/share/dialog/dialog.component'; +import {NgbModal} from '@ng-bootstrap/ng-bootstrap'; + +/** + * Dialog for merging authority records. + */ + +@Component({ + selector: 'eg-marc-record-lint-dialog', + templateUrl: 'lint-dialog.component.html' +}) + +export class MarcRecordLintDialogComponent + extends DialogComponent implements OnInit { + + // lint warnings + @Input() warnings: any[] = []; + + constructor( + private modal: NgbModal // required for passing to parent + ) { + super(modal); // required for subclassing + } +} diff --git a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/marc-edit.module.ts b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/marc-edit.module.ts index 4f2a39f341..a4ebc1b74c 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/marc-edit.module.ts +++ b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/marc-edit.module.ts @@ -12,6 +12,7 @@ import {AuthorityLinkingDialogComponent} from './authority-linking-dialog.compon import {MarcEditorDialogComponent} from './editor-dialog.component'; import {PhysCharDialogComponent} from './phys-char-dialog.component'; import {HoldingsModule} from '@eg/staff/share/holdings/holdings.module'; +import {MarcRecordLintDialogComponent} from './lint-dialog.component'; @NgModule({ declarations: [ @@ -23,7 +24,8 @@ import {HoldingsModule} from '@eg/staff/share/holdings/holdings.module'; EditableContentComponent, MarcEditorDialogComponent, PhysCharDialogComponent, - AuthorityLinkingDialogComponent + AuthorityLinkingDialogComponent, + MarcRecordLintDialogComponent ], imports: [ StaffCommonModule, diff --git a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/rich-editor.component.html b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/rich-editor.component.html index e42517a22b..a0e11d8e6b 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/rich-editor.component.html +++ b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/rich-editor.component.html @@ -63,6 +63,9 @@ + + +
@@ -74,8 +77,12 @@
-
+
+ + +