<eg-grid-column path="alert_message"></eg-grid-column>
<eg-grid-column path="barcode"></eg-grid-column>
+ <eg-grid-column path="circ_lib.shortname" label="Circulating Library" i18n-label>
+ </eg-grid-column>
+
<eg-grid-column i18n-label label="Location" path="location.name">
</eg-grid-column>
<eg-grid-column i18n-label label="Title" name="title"
[cellTemplate]="titleTemplate"></eg-grid-column>
- <eg-grid-column i18n-label label="Owning Library"
+ <eg-grid-column i18n-label label="Checkout/Renewal Workstation"
+ path="_circ.workstation.name"></eg-grid-column>
+
+ <eg-grid-column i18n-label label="Checkout Location"
+ path="_circ.circ_lib.shortname"></eg-grid-column>
+
+ <eg-grid-column i18n-label label="Checkin Workstation" [hidden]="true"
+ path="_circ.checkin_workstation.name"></eg-grid-column>
+
+ <eg-grid-column i18n-label label="Owning Library" [hidden]="true"
path="call_number.owning_lib.shortname"></eg-grid-column>
<eg-grid-column path="call_number.*" [hidden]="true"></eg-grid-column>
-import {Component, Input, OnInit, AfterViewInit, ViewChild} from '@angular/core';
+import {Component, ChangeDetectorRef, Input, OnInit, AfterViewInit, ViewChild} from '@angular/core';
import {Location} from '@angular/common';
import {Router, ActivatedRoute, ParamMap} from '@angular/router';
import {from, of, empty} from 'rxjs';
import {concatMap, tap} from 'rxjs/operators';
import {IdlObject, IdlService} from '@eg/core/idl.service';
+import {OrgService} from '@eg/core/org.service';
import {PcrudService} from '@eg/core/pcrud.service';
import {AuthService} from '@eg/core/auth.service';
import {NetService} from '@eg/core/net.service';
private router: Router,
private route: ActivatedRoute,
private ngLocation: Location,
+ private changeDetector: ChangeDetectorRef,
private net: NetService,
private idl: IdlService,
private printer: PrintService,
private store: StoreService,
private pcrud: PcrudService,
+ private org: OrgService,
private auth: AuthService,
private circ: CircService,
private evt: EventService,
})).toPromise().then(_ => {
if (this.grid) {
this.grid.reload();
+ // Modifying items that already exist in the grid creates
+ // scenarios where Angular does not realize a change
+ // has occurred until another digest cycle naturally
+ // occurrs. Force it to check. The setTimeout is
+ // needed because grid.reload() runs it its own timeout
+ // and we want this to happen after its timeout.
+ setTimeout(() => this.changeDetector.detectChanges());
}
});
}
return Promise.resolve();
}
- return this.pcrud.search('circ', {target_copy: item.id()},
- {order_by: {circ: 'xact_start DESC'}, limit: 1})
- .toPromise().then(circ => item._circ = circ);
+ return this.pcrud.search('circ',
+ {target_copy: item.id()},
+ { flesh: 1,
+ flesh_fields: {circ: ['workstation', 'checkin_workstation']},
+ order_by: {circ: 'xact_start DESC'},
+ limit: 1
+ }
+ ).toPromise().then(circ => {
+ circ.circ_lib(this.org.get(circ.circ_lib()));
+ item._circ = circ;
+ });
}
// A bit of cleanup to make the ISBN's look friendlier