LP#1889251: make call number affix sort keys read-only
authorGalen Charlton <gmc@equinoxinitiative.org>
Tue, 28 Jul 2020 15:09:45 +0000 (11:09 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Wed, 5 Aug 2020 21:10:25 +0000 (17:10 -0400)
This patch makes the call number prefix and suffix label sort
key fields read-only on their respective Server Administration
pages, as any values that a user would try to set for them
would get overwritten by a database trigger.

To test
-------
[1] Apply the patch.
[2] Go to Server Administration -> Call Number Prefixes (or Suffixes)
    and attempt create and edit new affixes.
[3] Verify that the label sort key is a read-only display field on the
    edit modal.

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Rogan Hamby <rogan.hamby@gmail.com>
Open-ILS/src/eg2/src/app/staff/admin/server/routing.module.ts

index 998a8b9..ec37bc2 100644 (file)
@@ -30,6 +30,16 @@ const routes: Routes = [{
     data: [{schema: 'actor',
         table: 'org_unit_proximity_adjustment', disableOrgFilter: true}]
 }, {
+    path: 'asset/call_number_prefix',
+    component: BasicAdminPageComponent,
+    data: [{schema: 'asset',
+        table: 'call_number_prefix', readonlyFields: 'label_sortkey'}]
+}, {
+    path: 'asset/call_number_suffix',
+    component: BasicAdminPageComponent,
+    data: [{schema: 'asset',
+        table: 'call_number_suffix', readonlyFields: 'label_sortkey'}]
+}, {
     path: ':schema/:table',
     component: BasicAdminPageComponent
 }];