소스 검색

Miscellaneous improvements

frankvandenbos 4 달 전
부모
커밋
bc45712312

+ 1 - 1
PRS.Avalonia/PRS.Avalonia.Desktop/PRS.Avalonia.Desktop.csproj

@@ -17,7 +17,7 @@
     </PropertyGroup>
 
     <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
-      <OutputPath>..\..\prs.desktop\bin\Debug\net8.0-windows\PRSAvalonia\</OutputPath>
+      <OutputPath>bin\x64\Debug\</OutputPath>
     </PropertyGroup>
 
     <ItemGroup>

+ 1 - 1
PRS.DigitalKey/Prs.DigitalKey.Desktop/Prs.DigitalKey.Desktop.csproj

@@ -16,7 +16,7 @@
     </PropertyGroup>
 
     <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
-        <OutputPath>..\..\prs.desktop\bin\Debug\net8.0-windows\PRSDigitalKey</OutputPath>
+        <OutputPath>bin\x64\Debug\</OutputPath>
     </PropertyGroup>
 
     <ItemGroup>

+ 4 - 5
prs.desktop/Forms/Issues/IssuesGrid.cs

@@ -110,20 +110,19 @@ public class IssuesGrid : DynamicGrid<Kanban>, ISpecificGrid
         AddButton("Open Support Session", PRSDesktop.Resources.appicon.AsBitmapImage(), OpenSupportSession);
         
         _baseDirectory = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) ?? "";
-        if (File.Exists(Path.Combine(_baseDirectory, "PRSAvalonia", "net8.0-windows10.0.19041.0",
-                "PRS.Avalonia.Desktop.exe")))
+        if (File.Exists(Path.Combine(_baseDirectory, "PRSAvalonia", "PRS.Avalonia.Desktop.exe")))
         {
             var btn = AddButton("PRS Mobile App", PRSDesktop.Resources.map.AsBitmapImage(), LaunchPRSMobile);
             btn.Margin = new Thickness(20, btn.Margin.Top, btn.Margin.Right, btn.Margin.Bottom);
         }
 
-        if (File.Exists(Path.Combine(_baseDirectory, "PRSDigitalKey", "net8.0-windows10.0.19041.0", "PRS.DigitalKey.Desktop.exe")))
+        if (File.Exists(Path.Combine(_baseDirectory, "PRSDigitalKey", "PRS.DigitalKey.Desktop.exe")))
             AddButton("PRS Digital Key App", PRSDesktop.Resources.key.AsBitmapImage(), LaunchPRSDigitalKey);
     }
     
     private bool LaunchPRSMobile(Button button, CoreRow[] rows)
     {
-        var _mobileApp = System.IO.Path.Combine(_baseDirectory, "PRSAvalonia", "net8.0-windows10.0.19041.0", "PRS.Avalonia.Desktop.exe");
+        var _mobileApp = System.IO.Path.Combine(_baseDirectory, "PRSAvalonia", "PRS.Avalonia.Desktop.exe");
         var _info = new ProcessStartInfo(_mobileApp);
         Process.Start(_info);
         return false;
@@ -132,7 +131,7 @@ public class IssuesGrid : DynamicGrid<Kanban>, ISpecificGrid
     private bool LaunchPRSDigitalKey(Button button, CoreRow[] rows)
     {
         
-        var _mobileApp = Path.Combine(_baseDirectory, "PRSDigitalKey", "net8.0-windows10.0.19041.0", "PRS.DigitalKey.Desktop.exe");
+        var _mobileApp = Path.Combine(_baseDirectory, "PRSDigitalKey", "PRS.DigitalKey.Desktop.exe");
         var _info = new ProcessStartInfo(_mobileApp);
         Process.Start(_info);
         return false;

+ 28 - 0
prs.desktop/Panels/Delivery/DeliveryEquipmentList.cs

@@ -6,6 +6,7 @@ using InABox.Wpf;
 using InABox.WPF;
 using System;
 using System.Collections.Generic;
+using System.Drawing;
 using System.Linq;
 using System.Text;
 using System.Threading;
@@ -25,8 +26,35 @@ internal class DeliveryEquipmentList : DynamicDataGrid<DeliveryEquipment>, IMast
     {
         HiddenColumns.Add(x => x.Delivery.ID);
         HiddenColumns.Add(x => x.Equipment.ID);
+        ActionColumns.Add(new DynamicMenuColumn(BuildEquipmentMenu));
     }
 
+    private void BuildEquipmentMenu(DynamicMenuColumn column, CoreRow? row)
+    {
+        column.AddItem("For Drop Off", null, SetAsDropOff);
+        column.AddItem("For Pick Up", null, SetAsPickup);
+    }
+
+    private void SetAsPickup(CoreRow? row)
+    {
+        if (row?.ToObject<DeliveryEquipment>() is { } equipment)
+        {
+            equipment.Type = DeliveryEquipmentType.PickUp;
+            new Client<DeliveryEquipment>().Save(equipment,"");
+            Refresh(false,true);
+        }
+    }
+
+    private void SetAsDropOff(CoreRow? row)
+    {
+        if (row?.ToObject<DeliveryEquipment>() is { } equipment)
+        {
+            equipment.Type = DeliveryEquipmentType.DropOff;
+            new Client<DeliveryEquipment>().Save(equipment,"");
+            Refresh(false,true);
+        }
+    }
+    
     protected override void DoReconfigure(DynamicGridOptions options)
     {
         base.DoReconfigure(options);

+ 1 - 1
prs.desktop/Panels/Delivery/DeliveryPanel.xaml

@@ -40,7 +40,7 @@
                                  Background="LightYellow" />
                         <local:DeliveryRackList Grid.Row="0" Grid.Column="1" x:Name="Racks" Margin="2,0,0,2" />
                         <local:DeliveryRequiList Grid.Row="1" Grid.Column="1" x:Name="Requis" Margin="2,0,0,2" />
-                        <local:DeliveryEquipmentList Grid.Row="2" Grid.Column="1" x:Name="Equipment" Margin="2,0,0,2" />
+                        <local:DeliveryEquipmentList Grid.Row="2" Grid.Column="1" x:Name="Equipment" Margin="2,0,0,0" />
                         <local:DeliveryItemsList Grid.Row="1" Grid.RowSpan="2" Grid.Column="0" Grid.ColumnSpan="1" x:Name="Items" />
                     </Grid>
                 </dynamicgrid:DynamicTabItem>

+ 8 - 3
prs.desktop/Panels/Tasks/TaskPanel.xaml.cs

@@ -209,8 +209,7 @@ public partial class TaskPanel : UserControl, IPanel<Kanban>, ITaskHost, IMaster
                 model.ID,
                 () => new Client<Kanban>().Load(new Filter<Kanban>(x => x.ID).IsEqualTo(model.ID)).First(),
                 model.EmployeeID == App.EmployeeID);
-
-            menu.AddItem("Manage Subscribers", null, model, Subscribers_Click);
+            
         }
 
         if (!models.Any(x => !x.CompletedDate.IsEmpty()) && !bLinks)
@@ -591,14 +590,20 @@ public partial class TaskPanel : UserControl, IPanel<Kanban>, ITaskHost, IMaster
             changeDueDate.Items.Add(calendarItem);
 
             #endregion
-
+            
             #region Employees
+            
+            menu.AddSeparatorIfNeeded();
 
             menu.AddItem("Assign To...", null, (control, models), SetAssignee_Click);
             menu.AddItem("Set Manager...", null, (control, models), SetManager_Click);
+            
+            if (models.Length == 1)
+                menu.AddItem("Manage Subscribers", null, models.First(), Subscribers_Click);
 
             #endregion
         }
+        
     }
 
     private void SetAssignee_Click((ITaskControl control, TaskModel[] models) tuple)

+ 11 - 0
prs.media/documentation/PRS Employee Notes Overview.docx

@@ -0,0 +1,11 @@
+PRS Employee Notes
+Starting from PRS 8.33, there is a new feature which allows users to make employee-related notes on the In/Out Board and Timesheet screens.
+1)  On the In /Out Board, right-click on the employee and select "Add Note" (or Edit Notes, if you need to modify an existing note.
+
+
+2) These notes will then appear on the Staff Timesheets Screen, under the new "Details" tab (on the right-hand side of the screen).  
+ 
+
+ Notes: 
+ Employee notes are specific to both an employee and a date.  To view notes for previous days, select the timesheet for the desired date.  
+

+ 14 - 0
prs.media/documentation/PRS Employee Notes Overview.pdf

@@ -0,0 +1,14 @@
+PRS Employee Notes
+
+Starting from PRS 8.33, there is a new feature which allows users to make employee-
+related notes on the In/Out Board and Timesheet screens.
+1) On the In /Out Board, right-click on the employee and select “Add Note” (or Edit
+Notes, if you need to modify an existing note.
+
+2) These notes will then appear on the Staff Timesheets Screen, under the new “Details”
+tab (on the right-hand side of the screen).
+Notes:
+
+   - Employee notes are specific to both an employee and a date. To view notes for
+        previous days, select the timesheet for the desired date.
+