Browse Source

CLASSES/DESKTOP - further improvements to Setout Group displaying on manufacturing packets

Nick-PRSDigital@bitbucket.org 1 year ago
parent
commit
065ff25005

+ 3 - 0
prs.classes/Entities/Setout/SetoutGroupLink.cs

@@ -14,10 +14,13 @@ namespace Comal.Classes
 
         public DocumentLink OptimizationDocument { get; set; }
 
+        public JobLink Job { get; set; }
+
         protected override void Init()
         {
             Name = "";
             OptimizationDocument = new DocumentLink();
+            Job = new JobLink();
             base.Init();
         }
     }

+ 1 - 0
prs.desktop/Panels/Factory/FactoryPanel.xaml.cs

@@ -2327,6 +2327,7 @@ namespace PRSDesktop
                         .Add(x => x.SetoutLink.JobLink.Name)
                         .Add(x => x.SetoutLink.Group.ID)
                         .Add(x => x.SetoutLink.Group.Name)
+                        .Add(x => x.SetoutLink.Group.Job.JobNumber)
                         .Add(x => x.DueDate)
                         .Add(x => x.SetoutLink.Location)
                         //.Add(x => x.SetoutLink.Reference)

+ 4 - 1
prs.desktop/Panels/Manufacturing/ManufacturingAllocationPanel.xaml.cs

@@ -219,7 +219,10 @@ namespace PRSDesktop
                     ? !sectionid.Equals(section) ? string.IsNullOrEmpty(pktsection) ? "" : pktsection.ToUpper().Trim() : "DISTRIB"
                     : "";
                 model.GroupID = row.Get<ManufacturingPacket, Guid>(c => c.SetoutLink.Group.ID);
-                model.GroupName = row.Get<ManufacturingPacket, string>(c => c.SetoutLink.Group.Name);
+                var groupname = row.Get<ManufacturingPacket, string>(c => c.SetoutLink.Group.Name);
+                model.GroupName = !string.IsNullOrWhiteSpace(groupname) ?
+                    row.Get<ManufacturingPacket, string>(c => c.SetoutLink.Group.Job.JobNumber) + ": " + groupname
+                    : "";
 
                 Kanbans.Add(model);
             }

+ 1 - 0
prs.desktop/Panels/Manufacturing/ManufacturingPanel.xaml.cs

@@ -727,6 +727,7 @@ namespace PRSDesktop
             columns.Add(x => x.SetoutLink.JobLink.ID);
             columns.Add(x => x.SetoutLink.Group.ID);
             columns.Add(x => x.SetoutLink.Group.Name);
+            columns.Add(x => x.SetoutLink.Group.Job.JobNumber);
 
             columns.Add(x => x.OrderItem.ID);
             //columns.Add(x => x.OrderItem.ReceivedDate);

+ 2 - 0
prs.desktop/Panels/Manufacturing/ManufacturingPanelColumn.xaml.cs

@@ -226,6 +226,8 @@ namespace PRSDesktop
 
                 var groupid = packet.SetoutLink.Group.ID;
                 var groupname = packet.SetoutLink.Group.Name;
+                groupname = !string.IsNullOrWhiteSpace(groupname) ? packet.SetoutLink.Group.Job.JobNumber + ": " + groupname
+                    : "";
 
                 if (bOK)
                 {