From 2ef477711c2fe16275d9d543e94e2c4286b906ee Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 13 Jul 2020 16:01:38 -0400 Subject: [PATCH] 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 --- Open-ILS/src/eg2/src/app/staff/catalog/hold/hold.component.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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; } }); -- 2.11.0