From: Bill Erickson Date: Thu, 21 May 2020 16:50:13 +0000 (-0400) Subject: LPXXX MARC Batch update Angular port X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=1647352feb951b729d041598f98dad8631f48b60;p=working%2FEvergreen.git LPXXX MARC Batch update Angular port Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/eg2/src/app/staff/cat/marcbatch/marcbatch.component.html b/Open-ILS/src/eg2/src/app/staff/cat/marcbatch/marcbatch.component.html index c36cd68969..68c2bde0cd 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/marcbatch/marcbatch.component.html +++ b/Open-ILS/src/eg2/src/app/staff/cat/marcbatch/marcbatch.component.html @@ -1,10 +1,81 @@
-
+
+ +
+
+
Rule Setup
+
Data
+
Help
+
+
+
Action (Rule Type)
+
+ +
+
How to change the existing record.
+
+
+
MARC Tag
+
+ +
+
+ Three characters, no spaces, no indicators, etc. eg: 245 +
+
+
+
Subfields (optional)
+
+ +
+
No spaces, no delimiters, eg: abcnp
+
+
+
MARC Data
+
+ +
+
+ MARC-Breaker formatted data with indicators and subfield delimiters, + eg: 245 04$aThe End +
+
+
+
+
+ Advanced Matching Restriction (Optional) +
+
+
+
+
Subfield
+
+
+
+
+
Expression
+
+
+
+
-
-
+
+
+
+
Update Template Preview
+
+ +
+
+
+
Record Source:
-
+
Bucket named:
@@ -32,11 +103,11 @@
Column:
-
+
of
-
+
@@ -52,7 +123,7 @@
-
+
@@ -71,7 +142,7 @@ Use Per-Record transactions to mitigate these conflicts.
-
+
diff --git a/Open-ILS/src/eg2/src/app/staff/cat/marcbatch/marcbatch.component.ts b/Open-ILS/src/eg2/src/app/staff/cat/marcbatch/marcbatch.component.ts index 0d7863d026..b79cf104cb 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/marcbatch/marcbatch.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/cat/marcbatch/marcbatch.component.ts @@ -6,6 +6,15 @@ import {AuthService} from '@eg/core/auth.service'; import {PcrudService} from '@eg/core/pcrud.service'; import {ComboboxEntry} from '@eg/share/combobox/combobox.component'; +interface TemplateRule { + ruleType: 'replace' | 'add' | 'delete'; + marcTag?: string; + marcSubfields?: string; + marcData?: string; + advSubfield?: string; + advRegex?: string; +} + @Component({ templateUrl: 'marcbatch.component.html' }) @@ -19,6 +28,8 @@ export class MarcBatchComponent implements OnInit, AfterViewInit { csvColumn = 0; selectedFile: File; xactPerRecord = false; + templateBreaker = ''; + templateRules: TemplateRule[] = []; constructor( private router: Router, @@ -38,6 +49,7 @@ export class MarcBatchComponent implements OnInit, AfterViewInit { } load() { + this.templateRules = [{ruleType: 'replace'}]; this.getBuckets(); }