Explorar el Código

Fixed hiding the column of Job Scope

Kenric Nugteren hace 2 años
padre
commit
e74c871a07
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      prs.desktop/Panels/Jobs/JobScopes/JobScopeFormGrid.cs

+ 3 - 1
prs.desktop/Panels/Jobs/JobScopes/JobScopeFormGrid.cs

@@ -9,6 +9,8 @@ public class JobScopeFormGrid : DynamicEntityFormGrid<JobForm, Job, JobLink>, IJ
 {
     public JobScope? Scope { get; set; }
 
+    private Column<JobForm> ScopeColumn = new Column<JobForm>(x => x.JobScope);
+
     public JobScopeFormGrid(Job job): base(job)
     {
     }
@@ -17,7 +19,7 @@ public class JobScopeFormGrid : DynamicEntityFormGrid<JobForm, Job, JobLink>, IJ
     {
         base.CustomiseEditor(items, column, editor);
 
-        if(column.ColumnName == nameof(JobForm.JobScope.ID))
+        if(ScopeColumn.IsEqualTo(column.ColumnName) || ScopeColumn.IsParentOf(column.ColumnName))
         {
             editor.Editable = Editable.Hidden;
         }