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 <berickxx@gmail.com>
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/));
break;
case 'opac.default_pickup_location':
- this.pickupLib = value;
+ this.pickupLib = Number(value);
break;
}
});