LP1904036 patron Ui holds tabs
authorBill Erickson <berickxx@gmail.com>
Fri, 21 Aug 2020 21:53:58 +0000 (17:53 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Fri, 28 Oct 2022 00:13:22 +0000 (20:13 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jane Sandberg <js7389@princeton.edu>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/eg2/src/app/staff/circ/patron/holds.component.html [new file with mode: 0644]
Open-ILS/src/eg2/src/app/staff/circ/patron/holds.component.ts [new file with mode: 0644]
Open-ILS/src/eg2/src/app/staff/circ/patron/patron.component.html
Open-ILS/src/eg2/src/app/staff/circ/patron/patron.module.ts
Open-ILS/src/eg2/src/app/staff/circ/patron/patron.service.ts

diff --git a/Open-ILS/src/eg2/src/app/staff/circ/patron/holds.component.html b/Open-ILS/src/eg2/src/app/staff/circ/patron/holds.component.html
new file mode 100644 (file)
index 0000000..17a3671
--- /dev/null
@@ -0,0 +1,22 @@
+
+
+<ul ngbNav #holdsNav="ngbNav" class="nav-tabs" (navChange)="beforeTabChange($event)">
+
+  <li ngbNavItem="active">
+    <a ngbNavLink i18n>Open Hold Requests</a>
+    <ng-template ngbNavContent>
+      <eg-holds-grid 
+        preFetchSetting="eg.circ.patron.holds.prefetch"
+        printTemplate="holds_for_patron"
+        persistKey="circ.patron.holds"
+        [hidePickupLibFilter]="true"
+        [defaultSort]="[{name:'request_time',dir:'asc'}]"
+        [patronId]="context.patron.id()"></eg-holds-grid>
+    </ng-template>
+  </li>
+
+</ul>
+
+<ng-container *ngIf="context.patron">
+  <div [ngbNavOutlet]="holdsNav"></div>
+</ng-container>
diff --git a/Open-ILS/src/eg2/src/app/staff/circ/patron/holds.component.ts b/Open-ILS/src/eg2/src/app/staff/circ/patron/holds.component.ts
new file mode 100644 (file)
index 0000000..79bfae6
--- /dev/null
@@ -0,0 +1,26 @@
+import {Component, OnInit, Input} from '@angular/core';
+import {Router, ActivatedRoute, ParamMap} from '@angular/router';
+import {NgbNav, NgbNavChangeEvent} from '@ng-bootstrap/ng-bootstrap';
+import {OrgService} from '@eg/core/org.service';
+import {NetService} from '@eg/core/net.service';
+import {PatronService} from '@eg/staff/share/patron/patron.service';
+import {PatronManagerService} from './patron.service';
+
+@Component({
+  templateUrl: 'holds.component.html',
+  selector: 'eg-patron-holds'
+})
+export class HoldsComponent implements OnInit {
+
+    constructor(
+        private org: OrgService,
+        private net: NetService,
+        public patronService: PatronService,
+        public context: PatronManagerService
+    ) {}
+
+    ngOnInit() {
+    }
+
+}
+
index 55b619c..5c5ec9b 100644 (file)
         <li ngbNavItem="holds" [disabled]="!context.patron">
           <a ngbNavLink i18n>Holds</a>
           <ng-template ngbNavContent>
-            <eg-holds-grid [recordId]="recordId"
-              preFetchSetting="eg.circ.patron.holds.prefetch"
-              printTemplate="holds_for_patron"
-              persistKey="circ.patron.holds"
-              [hidePickupLibFilter]="true"
-              [defaultSort]="[{name:'request_time',dir:'asc'}]"
-              [patronId]="patronId"></eg-holds-grid>
+            <eg-patron-holds></eg-patron-holds>
           </ng-template>
         </li>
 
index 76cd7dc..a46313d 100644 (file)
@@ -10,6 +10,7 @@ import {PatronManagerService} from './patron.service';
 import {PatronComponent} from './patron.component';
 import {SummaryComponent} from './summary.component';
 import {CheckoutComponent} from './checkout.component';
+import {HoldsComponent} from './holds.component';
 import {EditComponent} from './edit.component';
 import {EditToolbarComponent} from './edit-toolbar.component';
 import {BcSearchComponent} from './bcsearch.component';
@@ -19,6 +20,7 @@ import {BcSearchComponent} from './bcsearch.component';
     PatronComponent,
     SummaryComponent,
     CheckoutComponent,
+    HoldsComponent,
     EditComponent,
     EditToolbarComponent,
     BcSearchComponent
index 684ec84..4655789 100644 (file)
@@ -71,7 +71,7 @@ export class PatronManagerService {
             'open-ils.actor',
             'open-ils.actor.user.fleshed.retrieve',
             this.auth.token(), id, PATRON_FLESH_FIELDS).toPromise()
-        .then(patron => this.patron = patron)
+        .then(p => this.patron = p)
         .then(_ => this.getPatronStats(id))
         .then(_ => this.setExpires())
         .then(_ => this.loaded = true);