--- /dev/null
+
+
+<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>
--- /dev/null
+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() {
+ }
+
+}
+
<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>
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';
PatronComponent,
SummaryComponent,
CheckoutComponent,
+ HoldsComponent,
EditComponent,
EditToolbarComponent,
BcSearchComponent
'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);