LP#1942220: tweaks to order identifer handling
authorGalen Charlton <gmc@equinoxOLI.org>
Wed, 8 Dec 2021 23:41:04 +0000 (18:41 -0500)
committerGalen Charlton <gmc@equinoxOLI.org>
Wed, 8 Dec 2021 23:41:04 +0000 (18:41 -0500)
- sort order ident types alphabetically
- set 024 ind1 correctly when creating a brief record

Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/eg2/src/app/staff/acq/lineitem/brief-record.component.ts
Open-ILS/src/eg2/src/app/staff/acq/lineitem/lineitem-list.component.html

index fa82cec..3d5912e 100644 (file)
@@ -79,7 +79,11 @@ export class BriefRecordComponent implements OnInit {
 
             // Append fields to the document
             dfNode.setAttribute('tag', '' + tags[0]);
-            dfNode.setAttribute('ind1', ' ');
+            if (attr.code() === 'upc') {
+                dfNode.setAttribute('ind1', '1');
+            } else {
+                dfNode.setAttribute('ind1', ' ');
+            }
             dfNode.setAttribute('ind2', ' ');
             sfNode.setAttribute('code', '' + subfields[0]);
             const tNode = doc.createTextNode(value);
index 974389c..7f34a73 100644 (file)
                     title="Order Identifier Type" i18n-title [disabled]="!canEditIdent(li)"
                     [ngClass]="{'btn-warning': !selectedIdent(li)}">
                     <ng-container *ngIf="orderIdentTypes[li.id()]=='isbn'" i18n>ISBN</ng-container>
-                    <ng-container *ngIf="orderIdentTypes[li.id()]=='upc'" i18n>UPC</ng-container>
                     <ng-container *ngIf="orderIdentTypes[li.id()]=='issn'" i18n>ISSN</ng-container>
+                    <ng-container *ngIf="orderIdentTypes[li.id()]=='upc'" i18n>UPC</ng-container>
                   </button>
                   <div ngbDropdownMenu>
                     <button class="btn-sm" ngbDropdownItem
                       (click)="orderIdentTypes[li.id()]='isbn'" i18n>ISBN</button>
                     <button class="btn-sm" ngbDropdownItem
-                      (click)="orderIdentTypes[li.id()]='upc'" i18n>UPC</button>
-                    <button class="btn-sm" ngbDropdownItem
                       (click)="orderIdentTypes[li.id()]='issn'" i18n>ISSN</button>
+                    <button class="btn-sm" ngbDropdownItem
+                      (click)="orderIdentTypes[li.id()]='upc'" i18n>UPC</button>
                   </div>
                 </div>
               </div>