From 2dd8b1b93ddf1cad3b472ece0757e18226486a65 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Sun, 15 Aug 2021 19:37:39 -0400 Subject: [PATCH] LP#1888723: tweak eg-item-location-select The contextOrgId Input() can now be changed dynamically; doing so will refresh the list list of shelving locations available in the drop-down. Apply this to the distribution formula editor. Signed-off-by: Galen Charlton --- .../item-location-select.component.ts | 8 ++++++-- .../distribution-formula-edit-dialog.component.html | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/share/item-location-select/item-location-select.component.ts b/Open-ILS/src/eg2/src/app/share/item-location-select/item-location-select.component.ts index 97ffc530a6..4317500fc4 100644 --- a/Open-ILS/src/eg2/src/app/share/item-location-select/item-location-select.component.ts +++ b/Open-ILS/src/eg2/src/app/share/item-location-select/item-location-select.component.ts @@ -37,7 +37,11 @@ export class ItemLocationSelectComponent @Input() permFilter: string; // Limit copy locations to those owned at or above this org unit. - @Input() contextOrgId: number; + private _contextOrgId: number; + @Input() set contextOrgId(value: number) { + this._contextOrgId = value; + this.ngOnInit(); + } @Input() orgUnitLabelField = 'shortname'; @@ -159,7 +163,7 @@ export class ItemLocationSelectComponent } setFilterOrgs(): Promise { - const org = this.contextOrgId || this.auth.user().ws_ou(); + const org = this._contextOrgId || this.auth.user().ws_ou(); const contextOrgIds = this.org.ancestors(org, true); if (!this.permFilter) { diff --git a/Open-ILS/src/eg2/src/app/staff/admin/acq/distribution_formula/distribution-formula-edit-dialog.component.html b/Open-ILS/src/eg2/src/app/staff/admin/acq/distribution_formula/distribution-formula-edit-dialog.component.html index 5c537df9e2..c89c3faf32 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/acq/distribution_formula/distribution-formula-edit-dialog.component.html +++ b/Open-ILS/src/eg2/src/app/staff/admin/acq/distribution_formula/distribution-formula-edit-dialog.component.html @@ -62,7 +62,7 @@
-- 2.43.2