LP#1855780: add grid config settings
authorGalen Charlton <gmc@equinoxOLI.org>
Tue, 9 Nov 2021 15:51:27 +0000 (10:51 -0500)
committerJane Sandberg <sandbergja@gmail.com>
Wed, 17 Nov 2021 19:55:12 +0000 (11:55 -0800)
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Signed-off-by: Jane Sandberg <sandbergja@gmail.com>
Open-ILS/src/eg2/src/app/staff/admin/local/triggers/trigger-edit.component.html
Open-ILS/src/eg2/src/app/staff/admin/local/triggers/triggers.component.html
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.data.trigger_ui_grid_settings.sql [new file with mode: 0644]

index 6aaa890..92fddbb 100644 (file)
@@ -30,7 +30,7 @@
         <ng-template ngbNavContent>
             <h3 class="mb-3">Trigger Event Environment</h3>
             <eg-grid #envGrid idlClass="atenv" [dataSource]="envDataSource" 
-                showFields="path,collector,label"
+                showFields="path,collector,label" persistKey="admin.local.triggers.atenv"
                 (onRowActivate)="editSelected([$event])">
                 <eg-grid-toolbar-button label="New Environment" i18n-label
                     [action]="createNewEnv"></eg-grid-toolbar-button>
@@ -48,6 +48,7 @@
         <ng-template ngbNavContent>
             <h3 class="mb-3">Trigger Event Parameters</h3>
             <eg-grid #paramGrid idlClass="atevparam" [dataSource]="paramDataSource" 
+                persistKey="admin.local.triggers.atevparam"
                 showFields="param,value" (onRowActivate)="editSelected([$event])">
                 <eg-grid-toolbar-button label="New Parameter" i18n-label
                     [action]="createNewParam"></eg-grid-toolbar-button>
index cb6a701..830f8aa 100644 (file)
@@ -25,7 +25,7 @@
         <h4 class="mb-3 mt-3">Trigger Event Definitions</h4>
         <eg-grid #eventsGrid idlClass="atevdef" [dataSource]="eventsDataSource" 
             showFields="owner,name,hook,active,delay,delay_field,group_field,reactor,validator,repeat_delay,granularity,retention_interval"
-            [showLinkSelectors]="true" [sortable]="true" [stickyHeader]="true"
+            [showLinkSelectors]="true" [sortable]="true" [stickyHeader]="true" persistKey="admin.local.triggers.atevdef"
             (onRowActivate)="editSelected([$event])" [filterable]="true">
             <eg-grid-toolbar-button label="New Event Definition" i18n-label
                 [action]="createNewEvent"></eg-grid-toolbar-button>
index 6033ace..58f4a18 100644 (file)
@@ -22025,3 +22025,27 @@ INSERT INTO config.org_unit_setting_type (
     ),
     'bool'
 );
+
+INSERT INTO config.workstation_setting_type (name, grp, datatype, label)
+VALUES (
+    'eg.grid.admin.local.triggers.atevdef', 'gui', 'object',
+    oils_i18n_gettext(
+        'eg.grid.admin.local.triggers.atevdef',
+        'Grid Config: eg.grid.admin.local.triggers.atevdef',
+        'cwst', 'label'
+    )
+), (
+    'eg.grid.admin.local.triggers.atenv', 'gui', 'object',
+    oils_i18n_gettext(
+        'eg.grid.admin.local.triggers.atenv',
+        'Grid Config: eg.grid.admin.local.triggers.atenv',
+        'cwst', 'label'
+    )
+), (
+    'eg.grid.admin.local.triggers.atevparam', 'gui', 'object',
+    oils_i18n_gettext(
+        'eg.grid.admin.local.triggers.atevparam',
+        'Grid Config: eg.grid.admin.local.triggers.atevparam',
+        'cwst', 'label'
+    )
+);
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.trigger_ui_grid_settings.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.trigger_ui_grid_settings.sql
new file mode 100644 (file)
index 0000000..757fd14
--- /dev/null
@@ -0,0 +1,29 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+INSERT INTO config.workstation_setting_type (name, grp, datatype, label)
+VALUES (
+    'eg.grid.admin.local.triggers.atevdef', 'gui', 'object',
+    oils_i18n_gettext(
+        'eg.grid.admin.local.triggers.atevdef',
+        'Grid Config: eg.grid.admin.local.triggers.atevdef',
+        'cwst', 'label'
+    )
+), (
+    'eg.grid.admin.local.triggers.atenv', 'gui', 'object',
+    oils_i18n_gettext(
+        'eg.grid.admin.local.triggers.atenv',
+        'Grid Config: eg.grid.admin.local.triggers.atenv',
+        'cwst', 'label'
+    )
+), (
+    'eg.grid.admin.local.triggers.atevparam', 'gui', 'object',
+    oils_i18n_gettext(
+        'eg.grid.admin.local.triggers.atevparam',
+        'Grid Config: eg.grid.admin.local.triggers.atevparam',
+        'cwst', 'label'
+    )
+);
+
+COMMIT;