From: Bill Erickson Date: Mon, 13 Jul 2020 20:01:38 +0000 (-0400) Subject: LP1887429 Properly handle user settings in staffcat holds X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=2ef477711c2fe16275d9d543e94e2c4286b906ee;p=working%2FEvergreen.git LP1887429 Properly handle user settings in staffcat holds Treat user settings like the raw JSON values that they are when fetched via fleshing. Also be sure the value for the 'opac.default_pickup_location' user setting is read as a number in the staff catalog to ensure it can be linked to the org unit in question. Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/eg2/src/app/staff/catalog/hold/hold.component.ts b/Open-ILS/src/eg2/src/app/staff/catalog/hold/hold.component.ts index c1640b0b81..6886df9a4e 100644 --- a/Open-ILS/src/eg2/src/app/staff/catalog/hold/hold.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/catalog/hold/hold.component.ts @@ -295,10 +295,14 @@ export class HoldComponent implements OnInit { this.user.settings().forEach(setting => { const name = setting.name(); - const value = setting.value(); + let value = setting.value(); if (value === '' || value === null) { return; } + // When fleshing 'settings' on the actor.usr object, + // we're grabbing the raw JSON values. + value = JSON.parse(value); + switch (name) { case 'opac.hold_notify': this.notifyPhone = Boolean(value.match(/phone/)); @@ -307,7 +311,7 @@ export class HoldComponent implements OnInit { break; case 'opac.default_pickup_location': - this.pickupLib = value; + this.pickupLib = Number(value); break; } });