Associate Materials Updates
authorKyle Huckins <khuckins@catalyte.io>
Sun, 8 Dec 2019 04:37:47 +0000 (04:37 +0000)
committerJane Sandberg <sandbej@linnbenton.edu>
Sun, 19 Jul 2020 16:27:19 +0000 (09:27 -0700)
- Ensure Shelving Location input checkbox
ticks when selecting a value.
- Ensure temporary value inputs are not
cleared when entering a new item.
- Fully select contents of Barcode input
field when selected.
- Clear bBarcode input upon hitting enter.

Signed-off-by: Kyle Huckins <khuckins@catalyte.io>
 Changes to be committed:
modified:   Open-ILS/src/eg2/src/app/staff/admin/local/course-reserves/course-associate-material.component.html
modified:   Open-ILS/src/eg2/src/app/staff/admin/local/course-reserves/course-associate-material.component.ts

Open-ILS/src/eg2/src/app/staff/admin/local/course-reserves/course-associate-material.component.html
Open-ILS/src/eg2/src/app/staff/admin/local/course-reserves/course-associate-material.component.ts

index 488eea7..65dfb71 100644 (file)
@@ -19,7 +19,9 @@
           <div class="input-group-prepend">
             <span class="input-group-text" i18n>Barcode</span>
           </div>
-          <input type="text" [(ngModel)]="barcodeInput" />
+          <input type="text" [(ngModel)]="barcodeInput" 
+            (click)="$event.target.select()"
+            (keyup.enter)="associateItem(barcodeInput, relationshipInput)" />
         </div>
       </div>
       <div class="col-md-5">
             </div>
           </div>
           <eg-item-location-select permFilter="MANAGE_RESERVES"
-            [(ngModel)]="tempLocation" (oninput)="isModifyingLocation = true">
+            [(ngModel)]="tempLocation" (oninput)="isModifyingLocation = true"
+            (valueChange)="isModifyingLocation = true">
           </eg-item-location-select>
           <div class="input-group-append">
             <div class="input-group-text">
index a6c1971..404451a 100644 (file)
@@ -100,12 +100,12 @@ export class CourseAssociateMaterialComponent extends DialogComponent {
                 tempStatus: this.tempStatus,
                 currentCourse: this.currentCourse
             }
+            this.barcodeInput = null;
             
-            this.pcrud.search('acp', {barcode: barcode}, {
+            this.pcrud.search('acp', {barcode: args.barcode}, {
                 flesh: 3, flesh_fields: {acp: ['call_number']}
             }).subscribe(item => {
                 let associatedMaterial = this.courseSvc.associateMaterials(item, args);
-                console.log(associatedMaterial);
                 associatedMaterial.material.then(res => {
                     item = associatedMaterial.item;
                     let new_cn = item.call_number().label();