JBAS-2138 Patron search grid column configs
authorBill Erickson <berickxx@gmail.com>
Thu, 17 Jan 2019 15:32:40 +0000 (10:32 -0500)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
* Create requested layout config
* Create org setting type to store the value
* Remove the analogous workstation setting type to prevent storing
  overrides to column configs.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
KCLS/sql/schema/deploy/3.2-additions.sql

index 7092996..a5da530 100644 (file)
@@ -19,6 +19,22 @@ BEGIN
     INSERT INTO actor.workstation (owning_lib, name) 
         VALUES (1531, 'PR-Connexion-Stream');
 
+    -- Move the patron search grid workstation setting to an
+    -- org unit setting (to lock it down) and provide a config.
+    INSERT INTO config.org_unit_setting_type 
+        (name ,grp ,label ,description ,datatype) 
+    SELECT name, grp, label, description, datatype 
+    FROM config.workstation_setting_type 
+    WHERE name = 'eg.grid.circ.patron.search';
+
+    INSERT INTO actor.org_unit_setting (org_unit, name, value)
+    VALUES (1, 'eg.grid.circ.patron.search', 
+    '{"limit":25,"columns":[{"name":"family_name","flex":3},{"name":"first_given_name","flex":3},{"name":"second_given_name"},{"name":"dob"},{"name":"card.barcode"},{"name":"mailing_address.street1","flex":6},{"name":"mailing_address.city","flex":3},{"flex":3,"name":"day_phone"},{"name":"email","flex":3}],"version":2}');
+
+    -- prevent workstation-level settings
+    DELETE FROM config.workstation_setting_type 
+        WHERE name = 'eg.grid.circ.patron.search';
+
     END IF; -- insert_on_deploy
 END $INSERT$;