Revert "LP1956626 experiment"
authorBill Erickson <berickxx@gmail.com>
Tue, 19 Apr 2022 16:49:49 +0000 (12:49 -0400)
committerBill Erickson <berickxx@gmail.com>
Tue, 19 Apr 2022 16:49:49 +0000 (12:49 -0400)
This reverts commit 215cf73b5c06c5dc6b6d45f844b0f2a942d36eb2.

Open-ILS/src/eg2/src/app/staff/cat/volcopy/volcopy.component.ts
Open-ILS/src/eg2/src/app/staff/cat/volcopy/volcopy.service.ts
Open-ILS/src/perlmods/lib/OpenILS/Application/Cat.pm

index 17a7195..e288b8d 100644 (file)
@@ -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())
index 33bafb5..d898c3e 100644 (file)
@@ -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];
index 1921fc6..deb7ad4 100644 (file)
@@ -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([