From: Bill Erickson Date: Wed, 17 Apr 2019 14:51:45 +0000 (-0400) Subject: LP1683385 AngJS grid avoid dupe auto-fields X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=4ae1c3d873226b66006d2c1dfc50aa3f91c10332;p=working%2FEvergreen.git LP1683385 AngJS grid avoid dupe auto-fields When generating grid fields from an IDL class in the AngJS grid, avoid adding any fields that match fields already defined in the markup. Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/web/js/ui/default/staff/services/grid.js b/Open-ILS/web/js/ui/default/staff/services/grid.js index 9ee646a47c..f16bd7527c 100644 --- a/Open-ILS/web/js/ui/default/staff/services/grid.js +++ b/Open-ILS/web/js/ui/default/staff/services/grid.js @@ -1513,6 +1513,9 @@ angular.module('egGridMod', idl_class.fields, function(field) { if (field.virtual) return; + // Columns declared in the markup take precedence + // of matching auto-columns. + if (cols.findColumn(field.name)) return; if (field.datatype == 'link' || field.datatype == 'org_unit') { // if the field is a link and the linked class has a // "selector" field specified, use the selector field