import {CatalogSearchContext} from '@eg/share/catalog/search-context';
import {BibRecordSummary} from '@eg/share/catalog/bib-record.service';
import {PatronService} from '@eg/staff/share/patron/patron.service';
+import {StoreService} from '@eg/core/store.service';
/**
* Shared bits needed by the staff version of the catalog.
constructor(
private router: Router,
private route: ActivatedRoute,
+ private store: StoreService,
private org: OrgService,
private cat: CatalogService,
private patron: PatronService,
this.searchContext =
this.catUrl.fromUrlParams(this.route.snapshot.queryParamMap);
- this.holdForBarcode = this.route.snapshot.queryParams['holdForBarcode'];
+ this.holdForBarcode = this.store.getLocalItem('eg.circ.patron_hold_target');
if (this.holdForBarcode) {
this.patron.getByBarcode(this.holdForBarcode)
clearHoldPatron() {
this.holdForUser = null;
this.holdForBarcode = null;
+ this.store.removeLocalItem('eg.circ.patron_hold_target');
this.holdForChange.emit();
}
}
$scope.place_hold = function() {
- $window.location.href = '/eg2/staff/catalog?holdForBarcode=' +
- encodeURIComponent(patronSvc.current.card().barcode());
- //$location.path($location.path() + '/create');
+ egCore.hatch.setLocalItem(
+ 'eg.circ.patron_hold_target', patronSvc.current.card().barcode());
+
+ $window.location.href = '/eg2/staff/catalog';
}
// when the detail hold is fetched (and updated), update the bib