From: Bill Erickson Date: Wed, 14 Aug 2019 19:15:09 +0000 (-0400) Subject: LP1840050 org unit admin UI WIP X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f2b827733ffeba1dc9f3dd9af69ec95fa57e0ffd;p=working%2FEvergreen.git LP1840050 org unit admin UI WIP Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/eg2/src/app/staff/admin/server/org-unit.component.html b/Open-ILS/src/eg2/src/app/staff/admin/server/org-unit.component.html index 9a0ef8f1a9..3aad241601 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/server/org-unit.component.html +++ b/Open-ILS/src/eg2/src/app/staff/admin/server/org-unit.component.html @@ -13,6 +13,12 @@ dialogBody="Delete Org Unit {{selected ? selected.label : ''}}?"> + + {{org.name()}} ({{org.shortname()}}) + + +

Org Units

@@ -92,7 +98,7 @@ + + + + + + + + + + + +
diff --git a/Open-ILS/src/eg2/src/app/staff/admin/server/org-unit.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/server/org-unit.component.ts index 2a45303aab..6afef79a8a 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/server/org-unit.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/server/org-unit.component.ts @@ -7,6 +7,7 @@ import {AuthService} from '@eg/core/auth.service'; import {PcrudService} from '@eg/core/pcrud.service'; import {ToastService} from '@eg/share/toast/toast.service'; import {StringComponent} from '@eg/share/string/string.component'; +import {StringService} from '@eg/share/string/string.service'; import {ConfirmDialogComponent} from '@eg/share/dialog/confirm.component'; import {FmRecordEditorComponent} from '@eg/share/fm-editor/fm-editor.component'; @@ -26,6 +27,7 @@ export class OrgUnitComponent implements OnInit { private org: OrgService, private auth: AuthService, private pcrud: PcrudService, + private strings: StringService, private toast: ToastService ) {} @@ -40,6 +42,9 @@ export class OrgUnitComponent implements OnInit { } orgSaved(orgId: number) { + if (!orgId && this.currentOrg()) { + orgId = this.currentOrg().id(); + } this.loadAouTree(orgId).then(_ => this.postUpdate(this.editString)); } @@ -77,6 +82,11 @@ export class OrgUnitComponent implements OnInit { callerData: {orgUnit: orgNode} }); + // Apply the compiled label asynchronously + this.strings.interpolate( + 'admin.server.org_unit.treenode', {org: orgNode} + ).then(label => treeNode.label = label); + orgNode.children().forEach(childNode => treeNode.children.push(handleNode(childNode)) );