LPXXX Angular Volcopy tab->nav; misc
authorBill Erickson <berickxx@gmail.com>
Fri, 3 Jul 2020 15:10:09 +0000 (11:10 -0400)
committerBill Erickson <berickxx@gmail.com>
Fri, 3 Jul 2020 15:10:09 +0000 (11:10 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/eg2/src/app/staff/cat/volcopy/config.component.html
Open-ILS/src/eg2/src/app/staff/cat/volcopy/vol-edit.component.html
Open-ILS/src/eg2/src/app/staff/cat/volcopy/vol-edit.component.ts
Open-ILS/src/eg2/src/app/staff/cat/volcopy/volcopy.component.html
Open-ILS/src/eg2/src/app/staff/cat/volcopy/volcopy.component.ts

index 32d7912..e9f6e0d 100644 (file)
         <li class="list-group-item">
           <div class="form-check form-check-inline">
             <label class="mr-2" for="statcat_filter" i18n>
-              Stat Cat Filter
+              Stat Cat Library Filter
             </label>
             <eg-org-select
               domId="statcat_filter"
index 620ee81..5f4440e 100644 (file)
               title="{{copyStatLabel(copyNode.target)}}"
               id="barcode-input-{{copyNode.target.id()}}"
               spellcheck="false" [required]="true"
+              placeholder="New Barcode..." i18n-placeholder
               [disabled]="volcopy.copyStatIsMagic(copyNode.target.status())"
               [ngClass]="{'text-danger': copyNode.target._dupe_barcode}"
               (change)="barcodeChanged(copyNode.target, $event.target.value)"  
index fec38e0..1384f83 100644 (file)
@@ -86,6 +86,7 @@ export class VolEditComponent implements OnInit {
             this.volcopy.bibParts[bibId].length > 0;
     }
 
+    // Column width (flex:x) for column by column number.
     flexAt(column: number): number {
         return this.flexSettings[column];
     }
index 996ebb7..0bd7386 100644 (file)
 
   <div class="mt-3"> </div>
 
-  <ngb-tabset [activeId]="tab" (tabChange)="beforeTabChange($event)">
-
-    <ngb-tab title="Holdings" i18n-title id="holdings">
-      <ng-template ngbTabContent>
-        <div class="mt-2">
-          <eg-vol-edit [context]="context"></eg-vol-edit>
-        </div>
+  <ul ngbNav #holdingsNav="ngbNav" class="nav-tabs"
+    [activeId]="tab" (navChange)="beforeTabChange($event)">
+    <li ngbNavItem="holdings">
+      <a ngbNavLink i18n>Holdings</a>
+      <ng-template ngbNavContent>
+        <div class="mt-2"><eg-vol-edit [context]="context"></eg-vol-edit></div>
       </ng-template>
-    </ngb-tab>
-
-    <ngb-tab title="Item Attributes" i18n-title id="attrs">
-      <ng-template ngbTabContent>
-        <div class="mt-2">
-          <eg-copy-attrs [context]="context"></eg-copy-attrs>
-        </div>
+    </li>
+    <li ngbNavItem="attrs">
+      <a ngbNavLink i18n>Item Attributes</a>
+      <ng-template ngbNavContent>
+        <div class="mt-2"><eg-copy-attrs [context]="context"></eg-copy-attrs></div>
       </ng-template>
-    </ngb-tab>
-
-    <ngb-tab title="Defaults" i18n-title id="config">
-      <ng-template ngbTabContent>
+    </li>
+    <li ngbNavItem="config">
+      <a ngbNavLink i18n>Defaults</a>
+      <ng-template ngbNavContent>
         <div class="mt-2">
           <eg-volcopy-config [context]="context"></eg-volcopy-config>
         </div>
       </ng-template>
-    </ngb-tab>
-
-  </ngb-tabset>
+    </li>
+  </ul>
+  <div [ngbNavOutlet]="holdingsNav"></div>
 
   <ng-container *ngIf="tab === 'holdings' || tab === 'attrs'">
     <hr class="m-2"/>                                                          
index 4c4505f..685f0ad 100644 (file)
@@ -12,7 +12,7 @@ import {VolCopyContext} from './volcopy';
 import {ProgressInlineComponent} from '@eg/share/dialog/progress-inline.component';
 import {AnonCacheService} from '@eg/share/util/anon-cache.service';
 import {VolCopyService} from './volcopy.service';
-import {NgbTabset, NgbTabChangeEvent} from '@ng-bootstrap/ng-bootstrap';
+import {NgbNav, NgbNavChangeEvent} from '@ng-bootstrap/ng-bootstrap';
 
 const COPY_FLESH = {
     flesh: 1,
@@ -152,7 +152,7 @@ export class VolCopyComponent implements OnInit {
 
     // Changing a tab in the UI means changing the route.
     // Changing the route ultimately results in changing the tab.
-    beforeTabChange(evt: NgbTabChangeEvent) {
+    beforeTabChange(evt: NgbNavChangeEvent) {
         evt.preventDefault();
         this.tab = evt.nextId;
         this.routeToTab();
@@ -180,6 +180,8 @@ export class VolCopyComponent implements OnInit {
             console.debug('Edit Session', editSession);
 
             this.context.recordId = editSession.record_id;
+
+            // These are currently ignored, since visibility is tab-based
             this.context.hideVols = editSession.hide_vols === true;
             this.context.hideCopies = editSession.hide_copies === true;