Skip to content

Instantly share code, notes, and snippets.

@berick
Created September 9, 2020 14:55
Show Gist options
  • Save berick/e17c9e2ed5b8da474751585caf778ebd to your computer and use it in GitHub Desktop.
Save berick/e17c9e2ed5b8da474751585caf778ebd to your computer and use it in GitHub Desktop.
diff --git a/Open-ILS/src/eg2/src/app/staff/nav.component.ts b/Open-ILS/src/eg2/src/app/staff/nav.component.ts
index 6825464e55..50d9acbd27 100644
--- a/Open-ILS/src/eg2/src/app/staff/nav.component.ts
+++ b/Open-ILS/src/eg2/src/app/staff/nav.component.ts
@@ -84,6 +84,15 @@ export class StaffNavComponent implements OnInit, OnDestroy {
return this.auth.user() ? this.auth.workstation() : '';
}
+ // This assumes the System OU is the parent org unit of the
+ // workstation org unit.
+ sysOu(): string {
+ if (!this.auth.user()) { return ''; }
+ const wsOu = this.org.get(this.auth.user().ws_ou());
+ const sysOu = this.org.get(wsOu.parent_ou());
+ return sysOu.shortname();
+ }
+
setLocale(locale: any) {
this.locale.setLocale(locale.code());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment