Просмотр исходного кода

Added Form Number to QA Dashboards
Finxed New Task Function

frogsoftware 1 год назад
Родитель
Сommit
bca1f403ca

+ 8 - 0
prs.desktop/Dashboards/Common/QADashboard.xaml.cs

@@ -94,6 +94,11 @@ namespace PRSDesktop
             {
                 e.Cancel = true;
             }
+            else if (value.Path.Path.Equals("Number"))
+            {
+                e.Column.Width = 80;
+                e.Column.HeaderStyle = Resources["TemplateHeaderStyle"] as Style;
+            }
             else if (value.Path.Path.Equals("Location_Timestamp"))
             {
                 e.Column = new GridImageColumn();
@@ -499,6 +504,7 @@ namespace PRSDesktop
                 var colstype = typeof(Columns<>).MakeGenericType(type);
                 var cols = Activator.CreateInstance(colstype) as IColumns;
                 cols.Add("ID");
+                cols.Add("Number");
                 cols.Add("CreatedBy");
                 cols.Add("Created");
 
@@ -551,6 +557,7 @@ namespace PRSDesktop
                 data.Columns.Add("Location_Latitude", typeof(double));
                 data.Columns.Add("Location_Longitude", typeof(double));
                 data.Columns.Add("FormData", typeof(string));
+                data.Columns.Add("Number", typeof(String));
 
                 if (parentType == typeof(JobITP))
                 {
@@ -617,6 +624,7 @@ namespace PRSDesktop
                         datarow["Location_Latitude"] = (double)row["Location.Latitude"];
                         datarow["Location_Longitude"] = (double)row["Location.Longitude"];
                         datarow["FormData"] = (string)row["FormData"];
+                        datarow["Number"] = (string)row["Number"];
 
                         var desc = new List<string>();
                         foreach (var col in parentcols.ColumnNames().Where(x => x != "ID"))

+ 12 - 5
prs.desktop/DockPanels/DigitalFormsDock.xaml.cs

@@ -27,19 +27,24 @@ namespace PRSDesktop
         
         [NullEditor]
         public Guid FormID { get; set; }
+        
+        [CodeEditor(Visible = Visible.Default, Width=80)]
+        [EditorSequence(1)]
+        public string Number { get; set; }
 
         [TextBoxEditor(Visible = Visible.Default)]
-        [EditorSequence(1)]
+        [EditorSequence(2)]
         public string FormName { get; set; }
         
-        [DateTimeEditor(Visible=Visible.Default, Width=100, Format = "dd-MM HH:mm")]
-        [EditorSequence(2)]
+        [DateTimeEditor(Visible=Visible.Default, Width=100, Format = "dd MMM yy HH:mm")]
+        [EditorSequence(3)]
         public DateTime Completed { get; set; }
         
-        [TextBoxEditor(Visible=Visible.Default, Width=100, Alignment = Alignment.MiddleCenter)]
-        [EditorSequence(3)]
+        [TextBoxEditor(Visible=Visible.Default, Width=80, Alignment = Alignment.MiddleCenter)]
+        [EditorSequence(4)]
         public string CompletedBy { get; set; }
 
+        [NullEditor]
         public Type FormType { get; set; }
 
     }
@@ -86,6 +91,7 @@ namespace PRSDesktop
             _mappings = new CoreFieldMap<IDigitalFormInstance, DigitalFormDockModel>()
                 .Add(x => x.ID, x => x.ID)
                 .Add(x => x.Form.ID, x => x.FormID)
+                .Add(x=>x.Number, x=>x.Number)
                 .Add(x => x.Form.Description, x => x.FormName)
                 .Add(x => x.FormCompleted, x => x.Completed)
                 .Add(x => x.FormCompletedBy.UserID, x => x.CompletedBy);
@@ -207,6 +213,7 @@ namespace PRSDesktop
                 var cols = Columns.Create<IDigitalFormInstance>(type)
                     .Add<IDigitalFormInstance>(c => c.ID)
                     .Add<IDigitalFormInstance>(c => c.Form.ID)
+                    .Add<IDigitalFormInstance>(c => c.Number)
                     .Add<IDigitalFormInstance>(c => c.Form.Description)
                     .Add<IDigitalFormInstance>(c => c.FormCompleted)
                     .Add<IDigitalFormInstance>(c => c.FormCompletedBy.UserID);

+ 0 - 4
prs.desktop/PRSDesktop.csproj

@@ -864,10 +864,6 @@
       </Page>
     </ItemGroup>
 
-    <ItemGroup>
-      <Folder Include="Dashboards\Projects\Planner" />
-    </ItemGroup>
-
     <Import Project="..\PRS.Stores\PRSStores.projitems" Label="Shared" />
 
     <Import Project="..\PRS.Scheduler\Comal.TaskScheduler.Shared.projitems" Label="Shared" />

+ 2 - 2
prs.desktop/Panels/Tasks/TaskPanel.xaml.cs

@@ -965,8 +965,8 @@ namespace PRSDesktop
                     kanban.Category = "Open";
                     kanban.DueDate = DateTime.Today;
                     kanban.Private = false;
-                    kanban.JobLink.ID = Job.ID;
-                    kanban.JobLink.Synchronise(Job);
+                    kanban.JobLink.ID = Job?.ID ?? Guid.Empty;
+                    kanban.JobLink.Synchronise(Job ?? new Job());
                     kanban.EmployeeLink.ID = MyID;
                     kanban.ManagerLink.ID = MyID;
                     customise?.Invoke(kanban);

+ 1 - 1
prs.desktop/prsdesktop.iss

@@ -5,7 +5,7 @@
 #pragma verboselevel 9
 
 #define MyAppName "PRS Desktop"
-#define MyAppVersion "7.34c"
+#define MyAppVersion "7.34e"
 #define MyAppPublisher "PRS Digital"
 #define MyAppURL "https://www.prs-software.com.au"
 #define MyAppExeName "PRSDesktop.exe"

+ 1 - 1
prs.server/PRSServer.iss

@@ -5,7 +5,7 @@
 #pragma verboselevel 9
 
 #define MyAppName "PRS Server"
-#define MyAppVersion "7.34c"
+#define MyAppVersion "7.34e"
 #define MyAppPublisher "PRS Digital"
 #define MyAppURL "https://www.prs-software.com.au"
 #define MyAppExeName "PRSServer.exe"