From: Bill Erickson Date: Thu, 14 Nov 2019 22:48:16 +0000 (-0500) Subject: LPXXX MARC enriched editor WIP X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=25b49d0d2681432941b531c24ea6dd39c39460fd;p=working%2FEvergreen.git LPXXX MARC enriched editor WIP Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/fixed-field.component.html b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/fixed-field.component.html index f8086a0888..6fd6d509af 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/fixed-field.component.html +++ b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/fixed-field.component.html @@ -1,9 +1,11 @@ -
+
- +
diff --git a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/fixed-field.component.ts b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/fixed-field.component.ts index a7c4f9003a..b3f9654dcc 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/fixed-field.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/fixed-field.component.ts @@ -37,7 +37,7 @@ export class FixedFieldComponent implements OnInit { init(): Promise { if (!this.record) { return Promise.resolve(); } - this.tagTable.getFFPosTable(this.record.recordType()) + return this.tagTable.getFFPosTable(this.record.recordType()) .then(table => { // Note the AngJS MARC editor stores the full POS table @@ -52,10 +52,14 @@ export class FixedFieldComponent implements OnInit { return; } - this.fieldSize = this.fieldMeta.length; + this.fieldSize = this.fieldMeta.length || 1; this.fieldValue = this.context.record.extractFixedField(this.fieldCode); }); } + + valueChange(newVal) { + this.context.record.setFixedField(this.fieldCode, this.fieldValue); + } } diff --git a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/fixed-fields-editor.component.html b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/fixed-fields-editor.component.html index df0f28d38a..33497e44e5 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/fixed-fields-editor.component.html +++ b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/fixed-fields-editor.component.html @@ -1,4 +1,4 @@ -
+
@@ -24,7 +24,7 @@ fieldCode="Lang" fieldLabel="Lang">
-
+
@@ -50,7 +50,7 @@ fieldCode="Ctry" fieldLabel="Ctry">
-
+
@@ -76,7 +76,7 @@ fieldCode="Alph" fieldLabel="Alph">
-
+
@@ -102,7 +102,8 @@ fieldCode="Date2" fieldLabel="Date2">
-
+
+
@@ -123,7 +124,8 @@ fieldCode="EntW" fieldLabel="EntW">
-
+
+
@@ -148,7 +150,8 @@ fieldCode="Comp" fieldLabel="Comp">
-
+
+
@@ -165,7 +168,8 @@ fieldCode="CrTp" fieldLabel="CrTp">
-
+
+
@@ -182,7 +186,8 @@ fieldCode="File" fieldLabel="File">
-
+
+
@@ -207,7 +212,8 @@ fieldCode="CatLang" fieldLabel="CatLang">
-
+
+
@@ -232,7 +238,8 @@ fieldCode="NameUse" fieldLabel="NameUse">
-
+
+
@@ -257,7 +264,8 @@ fieldCode="UpdStatus" fieldLabel="UpdStatus">
-
+
+
diff --git a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/marcrecord.ts b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/marcrecord.ts index da41ba4397..f5c120cdd4 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/marcrecord.ts +++ b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/marcrecord.ts @@ -36,8 +36,12 @@ export class MarcRecord { {marcbreaker: this.breakerText, delimiter: DELIMITER}); } - extractFixedField(fixedFieldCode: string): string { - return this.record.extractFixedField(fixedFieldCode); + extractFixedField(fieldCode: string): string { + return this.record.extractFixedField(fieldCode); + } + + setFixedField(fieldCode: string, fieldValue: string): string { + return this.record.setFixedField(fieldCode, fieldValue); } }