From: Galen Charlton Date: Sun, 15 Aug 2021 23:37:39 +0000 (-0400) Subject: LP#1888723: tweak eg-item-location-select X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=2dd8b1b93ddf1cad3b472ece0757e18226486a65;p=evergreen%2Fpines.git 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 --- 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 @@