From 593c4ca39263052e92d996c926d210fdb7279e83 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 19 Apr 2022 12:49:49 -0400 Subject: [PATCH] Revert "LP1956626 experiment" This reverts commit 215cf73b5c06c5dc6b6d45f844b0f2a942d36eb2. --- .../eg2/src/app/staff/cat/volcopy/volcopy.component.ts | 7 ------- .../eg2/src/app/staff/cat/volcopy/volcopy.service.ts | 7 ++++--- Open-ILS/src/perlmods/lib/OpenILS/Application/Cat.pm | 17 +++-------------- 3 files changed, 7 insertions(+), 24 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/cat/volcopy/volcopy.component.ts b/Open-ILS/src/eg2/src/app/staff/cat/volcopy/volcopy.component.ts index 17a719544e..e288b8df6a 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/volcopy/volcopy.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/cat/volcopy/volcopy.component.ts @@ -133,15 +133,8 @@ export class VolCopyComponent implements OnInit { this.loading = true; this.context.reset(); - /* return this.volcopy.load() .then(_ => this.fetchHoldings(copyIds)) - */ - return this.fetchHoldings(copyIds) - .then(_ => this.volcopy.load()) - .then(_ => { - console.log('ORG UNITS IS', this.context.orgNodes().map(n => n.target.id())); - }) .then(_ => this.volcopy.applyVolLabels( this.context.volNodes().map(n => n.target))) .then(_ => this.context.sortHoldings()) diff --git a/Open-ILS/src/eg2/src/app/staff/cat/volcopy/volcopy.service.ts b/Open-ILS/src/eg2/src/app/staff/cat/volcopy/volcopy.service.ts index 33bafb527f..d898c3e27f 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/volcopy/volcopy.service.ts +++ b/Open-ILS/src/eg2/src/app/staff/cat/volcopy/volcopy.service.ts @@ -29,6 +29,7 @@ export class VolCopyService { autoId = -1; + localOrgs: number[]; defaults: VolCopyDefaults = null; copyStatuses: {[id: number]: IdlObject} = {}; bibParts: {[bibId: number]: IdlObject[]} = {}; @@ -71,13 +72,13 @@ export class VolCopyService { if (this.commonData.acp_item_type_map) { return Promise.resolve(); } + this.localOrgs = this.org.fullPath(this.auth.user().ws_ou(), true); + this.hideVolOrgs = this.org.list() .filter(o => !this.org.canHaveVolumes(o)).map(o => o.id()); - const orgIds: number[] = this.currentContext.orgNodes().map(n => n.target.id()); - return this.net.request( - 'open-ils.cat', 'open-ils.cat.volcopy.data', this.auth.token(), orgIds + 'open-ils.cat', 'open-ils.cat.volcopy.data', this.auth.token() ).pipe(tap(dataset => { const key = Object.keys(dataset)[0]; this.commonData[key] = dataset[key]; diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat.pm index 1921fc6db0..deb7ad4036 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat.pm @@ -1967,29 +1967,18 @@ __PACKAGE__->register_method( desc => q|Returns a batch of org-scoped data types needed by the volume/copy editor|, params => [ - {desc => 'Authtoken', type => 'string'}, - {desc => 'Alt Org Units. This overrides using just the authtoken org unit', - type => 'array'} + {desc => 'Authtoken', type => 'string'} ] }, return => {desc => 'Stream of various object type lists', type => 'array'} ); sub volcopy_data { - my ($self, $client, $auth, $alt_orgs) = @_; + my ($self, $client, $auth) = @_; my $e = new_editor(authtoken => $auth); $e->checkauth or return $e->event; - - my $org_ids = []; - - if ($alt_orgs) { - for my $org_id (@$alt_orgs) { - push(@$org_ids, @{$U->get_org_ancestors($org_id)}); - } - } else { - $org_ids = $U->get_org_ancestors($e->requestor->ws_ou); - } + my $org_ids = $U->get_org_ancestors($e->requestor->ws_ou); $client->respond({ acp_location => $e->search_asset_copy_location([ -- 2.11.0