LP1908743 Hold pickup lib does not require have-users; repairs
authorBill Erickson <berickxx@gmail.com>
Tue, 9 Feb 2021 16:10:41 +0000 (11:10 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Tue, 16 Feb 2021 15:31:41 +0000 (10:31 -0500)
To match the TPAC, only disable org units where can_have_vols is false
in the hold pickup library selector (plus those explicitly disabled via
setting).

Also fixes a thinko in the settings retrieval code.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Open-ILS/src/eg2/src/app/staff/catalog/hold/hold.component.ts
Open-ILS/src/perlmods/lib/OpenILS/Application/Actor/Settings.pm

index 47b5fc0..c2271a2 100644 (file)
@@ -136,8 +136,7 @@ export class HoldComponent implements OnInit {
         .then(setting => this.puLibWsFallback = setting === true);
 
         this.org.list().forEach(org => {
         .then(setting => this.puLibWsFallback = setting === true);
 
         this.org.list().forEach(org => {
-            if (org.ou_type().can_have_users() === 'f' ||
-                org.ou_type().can_have_vols() === 'f') {
+            if (org.ou_type().can_have_vols() === 'f') {
                 this.disableOrgs.push(org.id());
             }
         });
                 this.disableOrgs.push(org.id());
             }
         });
index b538af3..2809b96 100644 (file)
@@ -376,6 +376,8 @@ sub setting_value_for_all_orgs {
             ($summary->{has_workstation_setting} || '') eq 't'
         );
 
             ($summary->{has_workstation_setting} || '') eq 't'
         );
 
+        $summary->{value} = OpenSRF::Utils::JSON->JSON2perl($summary->{value});
+
         $client->respond({org_unit => $org_id, summary => $summary});
     }
 
         $client->respond({org_unit => $org_id, summary => $summary});
     }