Browse Source

Removed External Calendar Date Picker
Fixed Crash in Dashboard Panel
Fixed Bad Calculations in StockHoldingGrid

frogsoftware 1 year ago
parent
commit
02ff24bbad

+ 4 - 8
prs.classes/Entities/Job/Job.cs

@@ -49,6 +49,9 @@ namespace Comal.Classes
         [EditorSequence(8)]
         [TextBoxEditor]
         public String ClientReference { get; set; }
+        
+        [EditorSequence(9)]
+        public JobStatusLink JobStatus { get; set; }
 
         #endregion
 
@@ -108,14 +111,7 @@ namespace Comal.Classes
 
         [EditorSequence("Project Management", 8)]
         public DateTime Completed { get; set; }
-
-        //[SecondaryIndex]
-        //[EditorSequence(9)]
-        //public Boolean Active { get; set; }
-
-        [EditorSequence("Project Management", 9)]
-        public JobStatusLink JobStatus { get; set; }
-       
+        
         private class JobScopeLookup : LookupDefinitionGenerator<JobScope, Job>
         {
             public override Filter<JobScope> DefineFilter(Job[] items)

+ 30 - 24
prs.classes/Entities/Product/Product.cs

@@ -16,7 +16,11 @@ namespace Comal.Classes
         [EditorSequence(2)]
         public string Name { get; set; } 
         
+        [MemoEditor]
         [EditorSequence(3)]
+        public string Notes { get; set; } 
+        
+        [EditorSequence(4)]
         public ProductDimensionUnitLink UnitOfMeasure { get; set; }
         
         private class ProductInstanceLookup : LookupDefinitionGenerator<ProductInstance, Product>
@@ -40,44 +44,27 @@ namespace Comal.Classes
 
             public override Columns<Product> DefineFilterColumns() => new Columns<Product>(x => x.ID);
         }
+        
         [LookupDefinition(typeof(ProductInstanceLookup))]
-        [EditorSequence(3)]
+        [EditorSequence(5)]
         [RequiredColumn]
         public ProductInstanceLink DefaultInstance { get; set; }
         
-        [NullEditor]
-        [Obsolete("Replaced with Dimensions", true)]
-        // [DoubleEditor]
-        // [EditorSequence(4)]
-        public double UnitSize { get; set; }
-
-        [NullEditor]
-        [Obsolete("Replaced with Dimensions", false)]
-        // [EditorSequence(5)]
-        public ProductUOMLink Units { get; set; }
-        
-        [NullEditor]
-        [Obsolete("Replaced with Dimensions", true)]
-        // [DoubleEditor]
-        // [EditorSequence(6)]
-        // [Caption("Standard Weight")]
-        public double Weight { get; set; }
-
-        [EditorSequence(7)]
+        [EditorSequence(6)]
         public ProductGroupLink Group { get; set; }
 
-        [EditorSequence(8)]
+        [EditorSequence(7)]
         [DataModelTableName("Image")]
         public ImageDocumentLink Image { get; set; }
 
         [URLEditor]
-        [EditorSequence(9)]
+        [EditorSequence(8)]
         public string URL { get; set; }
 
         [TimestampEditor]
-        [EditorSequence(10)]
+        [EditorSequence(9)]
         public DateTime Expired { get; set; }
-
+        
         [EnumLookupEditor(typeof(ProductPricingStrategy))]
         [EditorSequence("Pricing", 1)]
         public ProductPricingStrategy PricingStrategy { get; set; } = ProductPricingStrategy.Standard;
@@ -250,6 +237,25 @@ namespace Comal.Classes
         [Obsolete("Replaced with DefaultInstance.Dimensions")]
         [NullEditor]
         public ProductDimensions Dimensions { get; set; }
+        
+                
+        [NullEditor]
+        [Obsolete("Replaced with Dimensions", true)]
+        // [DoubleEditor]
+        // [EditorSequence(4)]
+        public double UnitSize { get; set; }
+
+        [NullEditor]
+        [Obsolete("Replaced with Dimensions", false)]
+        // [EditorSequence(5)]
+        public ProductUOMLink Units { get; set; }
+        
+        [NullEditor]
+        [Obsolete("Replaced with Dimensions", true)]
+        // [DoubleEditor]
+        // [EditorSequence(6)]
+        // [Caption("Standard Weight")]
+        public double Weight { get; set; }
 
         [NullEditor]
         public string Issues { get; set; }

+ 268 - 226
prs.desktop/Components/Calendar/Calendar.xaml

@@ -5,6 +5,7 @@
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
              xmlns:local="clr-namespace:PRSDesktop"
              xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
+             xmlns:dynamicGrid="clr-namespace:InABox.DynamicGrid;assembly=InABox.Wpf"
              mc:Ignorable="d"
              d:DesignHeight="600" d:DesignWidth="800" SizeChanged="Calendar_OnSizeChanged">
     
@@ -20,247 +21,288 @@
             <Setter Property="BorderThickness" Value="0.75"/>
             <Setter Property="Margin" Value="0,0,-8,0"/>
         </Style>
-
+        
     </UserControl.Resources>
     
-   <Grid>
-
-        <Grid.RowDefinitions>
-            <RowDefinition Height="*" />
-        </Grid.RowDefinitions>
-
-        <Grid.ColumnDefinitions>
-            <ColumnDefinition Width="*" />
-            <ColumnDefinition Width="240" x:Name="VisibleSettingsColumn" />
-            <ColumnDefinition Width="0" x:Name="HiddenSettingsColumn"/>
-        </Grid.ColumnDefinitions>
+    <dynamicGrid:DynamicSplitPanel 
+        x:Name="_splitPanel"
+        Anchor="Detail" 
+        AnchorWidth="200" 
+        AllowableViews="Master,Combined"
+        View="Combined"
+        DetailCaption="Settings"
+        OnChanged="_splitPanel_OnOnChanged">
+        
+        <dynamicGrid:DynamicSplitPanel.Master>
+            <local:SfScheduler2
+                x:Name="Bookings"
+                HeaderDateFormat="dd MMMM yyyy"
+                SizeChanged="Schedule_SizeChanged"
+                AppointmentEditorOpening="Schedule_AppointmentEditorOpening"
+                SchedulerContextMenuOpening="Bookings_OnSchedulerContextMenuOpening"
+                AppointmentTapped="Bookings_OnAppointmentTapped"
+                ViewType="Day"
+                BorderThickness="1"
+                BorderBrush="Silver"
+                Background="Silver"
+                ResourceGroupType="Date"
+                FirstDayOfWeek="Monday"
+                >
+                
+                <!-- <syncfusion:SfScheduler.HeaderTemplate> -->
+                <!--     <DataTemplate> -->
+                <!--         <Border BorderBrush="Transparent" Background="Transparent" Height="0" Width="200"/> -->
+                <!--     </DataTemplate> -->
+                <!-- </syncfusion:SfScheduler.HeaderTemplate> -->
+                
+                <syncfusion:SfScheduler.CellContextMenu>
+                    <ContextMenu />
+                </syncfusion:SfScheduler.CellContextMenu>
+                        
+                <syncfusion:SfScheduler.AppointmentContextMenu>
+                    <ContextMenu />
+                </syncfusion:SfScheduler.AppointmentContextMenu>
+                
+                <syncfusion:SfScheduler.DaysViewSettings>
 
-        <syncfusion:SfScheduler 
-            Grid.Column="0"
-            Grid.Row="0"
-            Name="Bookings"
-            HeaderDateFormat="dd MMM yyyy"
-            SizeChanged="Schedule_SizeChanged"
-            AppointmentEditorOpening="Schedule_AppointmentEditorOpening"
-            SchedulerContextMenuOpening="Bookings_OnSchedulerContextMenuOpening"
-            AppointmentTapped="Bookings_OnAppointmentTapped"
-            ViewType="Day"
-            HeaderHeight="0"
-            BorderThickness="1"
-            BorderBrush="Silver"
-            Background="Silver"
-            ResourceGroupType="Date"
-            FirstDayOfWeek="Monday"
-            >
-            
-            <!-- <syncfusion:SfScheduler.AppointmentMapping> -->
-            <!--     <syncfusion:AppointmentMapping -->
-            <!--         Id="Id" -->
-            <!--         Subject = "Subject" -->
-            <!--         Notes = "Notes" -->
-            <!--         StartTime="StartTime" -->
-            <!--         EndTime="EndTime" -->
-            <!--         AppointmentBackground="Background" -->
-            <!--         Foreground="Foreground" -->
-            <!--         ResourceIdCollection="ResourceIdCollection" -->
-            <!--     /> -->
-            <!-- </syncfusion:SfScheduler.AppointmentMapping> -->
+                    <syncfusion:DaysViewSettings ViewHeaderDateFormat="dd MMM yy" ViewHeaderDayFormat="dddd"
+                                                 ViewHeaderHeight="45" TimeRulerFormat="hh:mm tt" TimeInterval="0:30"
+                                                 MinimumAllDayAppointmentsCount="0">
 
-            <syncfusion:SfScheduler.CellContextMenu>
-                <ContextMenu />
-            </syncfusion:SfScheduler.CellContextMenu>
-                    
-            <syncfusion:SfScheduler.AppointmentContextMenu>
-                <ContextMenu />
-            </syncfusion:SfScheduler.AppointmentContextMenu>
-            
-            <syncfusion:SfScheduler.DaysViewSettings>
+                        <syncfusion:DaysViewSettings.ViewHeaderTemplate>
+                            <DataTemplate>
+                                <StackPanel Background="WhiteSmoke" Margin="-10,0,0,0" VerticalAlignment="Stretch"
+                                            HorizontalAlignment="Stretch" Orientation="Vertical">
+                                    <Label HorizontalContentAlignment="Center" Content="{Binding DayText}" FontSize="12"
+                                           Foreground="Black" FontFamily="Arial" FontWeight="Bold"
+                                           VerticalContentAlignment="Bottom" Margin="0,0,0,-5" />
+                                    <Label HorizontalContentAlignment="Center" Content="{Binding DateText}" FontSize="10"
+                                           VerticalContentAlignment="Top" />
+                                </StackPanel>
+                            </DataTemplate>
+                        </syncfusion:DaysViewSettings.ViewHeaderTemplate>
 
-                <syncfusion:DaysViewSettings ViewHeaderDateFormat="dd MMM yy" ViewHeaderDayFormat="dddd"
-                                             ViewHeaderHeight="45" TimeRulerFormat="hh:mm tt" TimeInterval="0:30"
-                                             MinimumAllDayAppointmentsCount="0">
+                        <syncfusion:DaysViewSettings.AppointmentTemplate>
+                            <DataTemplate>
+                                <Border BorderThickness="0" Background="{Binding AppointmentBackground}" Padding="2" CornerRadius="2">
+                        
+                                    <!-- <Border.ToolTip> -->
+                                    <!--     <local:CalendarBlock DataContext="{Binding}" /> -->
+                                    <!-- </Border.ToolTip> -->
+                                    
+                                    <local:CalendarBlock DataContext="{Binding}" />
+                        
+                                </Border>
+                            </DataTemplate>
+                        </syncfusion:DaysViewSettings.AppointmentTemplate>
 
-                    <syncfusion:DaysViewSettings.ViewHeaderTemplate>
-                        <DataTemplate>
-                            <StackPanel Background="WhiteSmoke" Margin="-10,0,0,0" VerticalAlignment="Stretch"
-                                        HorizontalAlignment="Stretch" Orientation="Vertical">
-                                <Label HorizontalContentAlignment="Center" Content="{Binding DayText}" FontSize="12"
-                                       Foreground="Black" FontFamily="Arial" FontWeight="Bold"
-                                       VerticalContentAlignment="Bottom" Margin="0,0,0,-5" />
-                                <Label HorizontalContentAlignment="Center" Content="{Binding DateText}" FontSize="10"
-                                       VerticalContentAlignment="Top" />
-                            </StackPanel>
-                        </DataTemplate>
-                    </syncfusion:DaysViewSettings.ViewHeaderTemplate>
+                    </syncfusion:DaysViewSettings>
+                </syncfusion:SfScheduler.DaysViewSettings>
+            </local:SfScheduler2>
+        </dynamicGrid:DynamicSplitPanel.Master>
+        
+        
+        <dynamicGrid:DynamicSplitPanel.Detail>
+            <Grid>
+                
+                <Grid.ColumnDefinitions>
+                    <ColumnDefinition Width="Auto" />
+                    <ColumnDefinition Width="*" />
+                </Grid.ColumnDefinitions>
 
-                    <syncfusion:DaysViewSettings.AppointmentTemplate>
-                        <DataTemplate>
-                            <Border BorderThickness="0" Background="{Binding AppointmentBackground}" Padding="2" CornerRadius="2">
+                <Grid.RowDefinitions>
+                    <RowDefinition Height="Auto" />
+                    <RowDefinition Height="*" />
+                    <RowDefinition Height="Auto" />
+                    <RowDefinition Height="Auto" />
+                    <RowDefinition Height="Auto" />
+                    <RowDefinition Height="Auto" />                
+                    <RowDefinition Height="Auto" />
+                    <RowDefinition Height="Auto" />
+                </Grid.RowDefinitions>
+                
+                <DockPanel 
+                    Grid.Row="0" 
+                    Grid.Column="0"
+                    Grid.ColumnSpan="2">
+                    
+                    <Button
+                        x:Name="_settingsButton"
+                        DockPanel.Dock="Left"
+                        Click="_settingsButton_OnClick"
+                        Background="WhiteSmoke"
+                        BorderBrush="Gray" 
+                        BorderThickness="0.75"
+                        Height="25" 
+                        Width="25"
+                        Padding="2">
+                        <Polygon Points="0,0 8,5, 0,10" Stroke="Gray" Fill="Silver" />
+                    </Button>
                     
-                                <!-- <Border.ToolTip> -->
-                                <!--     <local:CalendarBlock DataContext="{Binding}" /> -->
-                                <!-- </Border.ToolTip> -->
-                                
-                                <local:CalendarBlock DataContext="{Binding}" />
+                    <ComboBox 
+                        x:Name="CalendarViewSelector" 
+                        DockPanel.Dock="Left" 
+                        SelectionChanged="CalendarViewSelector_SelectionChanged"
+                        VerticalContentAlignment="Center" 
+                        SelectedIndex="-1"
+                        Margin="5,0,0,0">
+                        <ComboBoxItem Content="Day" />
+                        <ComboBoxItem Content="Work Week" />
+                        <ComboBoxItem Content="Week" />
+                    </ComboBox>
                     
-                            </Border>
-                        </DataTemplate>
-                    </syncfusion:DaysViewSettings.AppointmentTemplate>
+                </DockPanel>
+                
 
-                </syncfusion:DaysViewSettings>
-            </syncfusion:SfScheduler.DaysViewSettings>
-        </syncfusion:SfScheduler>
+                
+                <local:EmployeeSelector 
+                    x:Name="EmployeeSelector" 
+                    Grid.Row="1" 
+                    Grid.Column="0" 
+                    Grid.ColumnSpan="2"
+                    Margin="-5,5,0,0"
+                    SettingsChanged="EmployeeSelector_OnSettingsChanged"
+                    SelectionChanged="EmployeeSelector_OnSelectionChanged"/>
+                
 
-        <Grid Margin="0" Grid.Row="0" Grid.Column="1">
 
-            <Grid.ColumnDefinitions>
-                <ColumnDefinition Width="Auto" />
-                <ColumnDefinition Width="*"/>
-            </Grid.ColumnDefinitions>
+                <Label 
+                    Grid.Row="2" 
+                    Grid.Column="0" 
+                    VerticalContentAlignment="Center" 
+                    Margin="0,5,0,0" 
+                    Content="Start" />
+                
+                <DockPanel 
+                    Grid.Row="2" 
+                    Grid.Column="1" 
+                    Margin="5,5,0,0">
+                    <Button DockPanel.Dock="Left" Padding="2" BorderThickness="0.75,0.75,0,0.75" Background="White"
+                            BorderBrush="Gray" Click="StartTimeSelector_Down_Click">
+                        <Image Source="pack://application:,,,/Resources/leftarrow.png" Height="20" Width="20" />
+                    </Button>
+                    <Button DockPanel.Dock="Right" Padding="2" BorderThickness="0,0.75,0.75,0.75" Background="White"
+                            BorderBrush="Gray" Click="StartTimeSelector_Up_Click">
+                        <Image Source="pack://application:,,,/Resources/rightarrow.png" Height="20" Width="20" />
+                    </Button>
+                    <TextBox x:Name="StartTimeSelector" IsReadOnly="True" DockPanel.Dock="Left" BorderThickness="0,0.75,0,0.75"
+                             BorderBrush="Gray" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" />
+                </DockPanel>
 
-            <Grid.RowDefinitions>
-                <RowDefinition Height="Auto" />
-                <RowDefinition Height="Auto" />
-                <RowDefinition Height="Auto" />
-                <RowDefinition Height="*" />
-                <RowDefinition Height="Auto" />
-                <RowDefinition Height="Auto" />
-                <RowDefinition Height="Auto" />
-                <RowDefinition Height="Auto" />                
-                <RowDefinition Height="Auto" />
-                <RowDefinition Height="Auto" />
-            </Grid.RowDefinitions>
-            
-            <DockPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="5,0,0,0" >
-                <Button x:Name="HideSideBar" DockPanel.Dock="Left" Content=" &#x276f; " Width="30" Margin="0,0,5,0" BorderBrush="Gray" Background="WhiteSmoke" BorderThickness="0.75" Click="HideSideBar_OnClick"/>
-                <!-- <Label Grid.Row="0" Grid.Column="0" Content="View" VerticalContentAlignment="Center" Margin="5,0,0,0" /> -->
-                <ComboBox x:Name="CalendarViewSelector" DockPanel.Dock="Left" SelectionChanged="CalendarViewSelector_SelectionChanged"
-                          VerticalContentAlignment="Center" SelectedIndex="-1" >
-                    <ComboBoxItem Content="Day" />
-                    <ComboBoxItem Content="Work Week" />
-                    <ComboBoxItem Content="Week" />
+                <Label 
+                    Grid.Row="3" 
+                    Grid.Column="0"
+                    VerticalContentAlignment="Center" 
+                    Margin="0,5,0,0" 
+                    Content="Finish"/>
+                
+                <DockPanel 
+                    Grid.Row="3" 
+                    Grid.Column="1" 
+                    Margin="5,5,0,0">
+                    <Button DockPanel.Dock="Left" Padding="2" BorderThickness="0.75,0.75,0,0.75" Background="White"
+                            BorderBrush="Gray" Click="FinishTimeSelector_Down_Click">
+                        <Image Source="pack://application:,,,/Resources/leftarrow.png" Height="20" Width="20" />
+                    </Button>
+                    <Button DockPanel.Dock="Right" Padding="2" BorderThickness="0,0.75,0.75,0.75" Background="White"
+                            BorderBrush="Gray" Click="FinishTimeSelector_Up_Click">
+                        <Image Source="pack://application:,,,/Resources/rightarrow.png" Height="20" Width="20" />
+                    </Button>
+                    <TextBox x:Name="FinishTimeSelector" IsReadOnly="True" DockPanel.Dock="Left" BorderThickness="0,0.75,0,0.75"
+                             BorderBrush="Gray" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" />
+                </DockPanel>
+                
+                <Label 
+                    Grid.Row="4" 
+                    Grid.Column="0" 
+                    VerticalContentAlignment="Center" 
+                    Margin="0,5,0,0" 
+                    Content="Assignments" />
+                
+                <ComboBox 
+                    x:Name="AssignmentTypeSelector" 
+                    Grid.Row="4" 
+                    Grid.Column="1"
+                    SelectedIndex="0" 
+                    Margin="5,5,0,0"
+                    SelectionChanged="AssignmentTypeSelector_OnSelectionChanged"
+                    VerticalContentAlignment="Center">
+                    <ComboBoxItem Content="Automatic" />
+                    <ComboBoxItem Content="Booked Time" />
+                    <ComboBoxItem Content="Actual Time" />
                 </ComboBox>
-            </DockPanel>
-            
+                
+                <Label 
+                    Grid.Row="5" 
+                    Grid.Column="0" 
+                    VerticalContentAlignment="Center" 
+                    Margin="0,5,0,0" 
+                    Content="Background" />
+                
+                <ComboBox 
+                    x:Name="BackgroundTypeSelector" 
+                    Grid.Row="5" 
+                    Grid.Column="1"
+                    SelectedIndex="0" 
+                    Margin="5,5,0,0"
+                    SelectionChanged="BackgroundTypeSelector_OnSelectionChanged"
+                    VerticalContentAlignment="Center">
+                    <ComboBoxItem Content="Automatic" />
+                    <ComboBoxItem Content="Rosters" />
+                    <ComboBoxItem Content="Timesheets" />
+                </ComboBox>
+                
+                <Label 
+                    Grid.Row="6"
+                    Grid.Column="0" 
+                    VerticalContentAlignment="Center" 
+                    Margin="0,5,0,0"
+                    Content="Interval"/>
+                
+                <ComboBox 
+                    x:Name="IntervalSelector" 
+                    Grid.Row="6" 
+                    Grid.Column="1"
+                    SelectedIndex="0" 
+                    Margin="5,5,0,0"
+                    SelectionChanged="IntervalSelector_OnSelectionChanged"
+                    VerticalContentAlignment="Center">
+                    <ComboBoxItem Content="Five Minutes" />
+                    <ComboBoxItem Content="Six Minutes" />
+                    <ComboBoxItem Content="Ten Minutes" />
+                    <ComboBoxItem Content="Fifteen Minutes" />
+                    <ComboBoxItem Content="Twenty Minutes" />
+                    <ComboBoxItem Content="Thirty Minutes" />
+                    <ComboBoxItem Content="Sixty Minutes" />
+                </ComboBox>
+                
+                <Label 
+                    Grid.Row="7"
+                    Grid.Column="0"
+                    VerticalContentAlignment="Center" 
+                    Margin="0,5,0,0"
+                    Content="Zoom"/>
+                
+                <DockPanel 
+                    Grid.Row="7" 
+                    Grid.Column="1" 
+                    Margin="5,5,0,0">
+                    <Button DockPanel.Dock="Left" Padding="2" BorderThickness="0.75,0.75,0,0.75" Background="White"
+                            BorderBrush="Gray" Click="ZoomSelector_Down_Click">
+                        <Image Source="pack://application:,,,/Resources/leftarrow.png" Height="20" Width="20" />
+                    </Button>
+                    <Button DockPanel.Dock="Right" Padding="2" BorderThickness="0,0.75,0.75,0.75" Background="White"
+                            BorderBrush="Gray" Click="ZoomSelector_Up_Click">
+                        <Image Source="pack://application:,,,/Resources/rightarrow.png" Height="20" Width="20" />
+                    </Button>
+                    <TextBox x:Name="ZoomSelector" IsReadOnly="True" DockPanel.Dock="Left" BorderThickness="0,0.75,0,0.75"
+                             BorderBrush="Gray" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" />
+                </DockPanel>
+                
+            </Grid>
             
-            <Border BorderBrush="Gray" BorderThickness="0.75" Padding="0,0,0,0" Grid.Row="1" Grid.Column="0"
-                    Grid.ColumnSpan="2" Margin="5,5,0,5" Background="White">
-                <syncfusion:CalendarEdit x:Name="DateSelector" ShowAbbreviatedMonthNames="True" AllowMultiplySelection="False"
-                                         DateChanged="DateSelector_DateChanged" BorderBrush="Transparent"  />
-            </Border>
-
-            <local:EmployeeSelector 
-                x:Name="EmployeeSelector" 
-                Grid.Row="2" 
-                Grid.RowSpan="2" 
-                Grid.Column="0" 
-                Grid.ColumnSpan="2"
-                SettingsChanged="EmployeeSelector_OnSettingsChanged"
-                SelectionChanged="EmployeeSelector_OnSelectionChanged"/>
-
-            <Label Content="Start" Grid.Row="4" VerticalContentAlignment="Center" Margin="5,5,0,0" />
-            <DockPanel Grid.Row="4" Grid.Column="1" Margin="5,5,0,0">
-                <Button DockPanel.Dock="Left" Padding="2" BorderThickness="0.75,0.75,0,0.75" Background="White"
-                        BorderBrush="Gray" Click="StartTimeSelector_Down_Click">
-                    <Image Source="pack://application:,,,/Resources/leftarrow.png" Height="20" Width="20" />
-                </Button>
-                <Button DockPanel.Dock="Right" Padding="2" BorderThickness="0,0.75,0.75,0.75" Background="White"
-                        BorderBrush="Gray" Click="StartTimeSelector_Up_Click">
-                    <Image Source="pack://application:,,,/Resources/rightarrow.png" Height="20" Width="20" />
-                </Button>
-                <TextBox x:Name="StartTimeSelector" IsReadOnly="True" DockPanel.Dock="Left" BorderThickness="0,0.75,0,0.75"
-                         BorderBrush="Gray" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" />
-            </DockPanel>
+       </dynamicGrid:DynamicSplitPanel.Detail>
 
-            <Label Content="Finish" Grid.Row="5" VerticalContentAlignment="Center" Margin="5,5,0,0" />
-            <DockPanel Grid.Row="5" Grid.Column="1" Margin="5,5,0,0">
-                <Button DockPanel.Dock="Left" Padding="2" BorderThickness="0.75,0.75,0,0.75" Background="White"
-                        BorderBrush="Gray" Click="FinishTimeSelector_Down_Click">
-                    <Image Source="pack://application:,,,/Resources/leftarrow.png" Height="20" Width="20" />
-                </Button>
-                <Button DockPanel.Dock="Right" Padding="2" BorderThickness="0,0.75,0.75,0.75" Background="White"
-                        BorderBrush="Gray" Click="FinishTimeSelector_Up_Click">
-                    <Image Source="pack://application:,,,/Resources/rightarrow.png" Height="20" Width="20" />
-                </Button>
-                <TextBox x:Name="FinishTimeSelector" IsReadOnly="True" DockPanel.Dock="Left" BorderThickness="0,0.75,0,0.75"
-                         BorderBrush="Gray" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" />
-            </DockPanel>
-            
-            <Label Content="Assignments" Grid.Row="6" VerticalContentAlignment="Center" Margin="5,5,0,0" />
-            <ComboBox 
-                x:Name="AssignmentTypeSelector" 
-                Grid.Row="6" 
-                Grid.Column="1"
-                SelectedIndex="0" 
-                Margin="5,5,0,0"
-                SelectionChanged="AssignmentTypeSelector_OnSelectionChanged"
-                VerticalContentAlignment="Center"
-                >
-                <ComboBoxItem Content="Automatic" />
-                <ComboBoxItem Content="Booked Time" />
-                <ComboBoxItem Content="Actual Time" />
-            </ComboBox>
-            
-            <Label Content="Background" Grid.Row="7" VerticalContentAlignment="Center" Margin="5,5,0,0" />
-            <ComboBox 
-                x:Name="BackgroundTypeSelector" 
-                Grid.Row="7" 
-                Grid.Column="1"
-                SelectedIndex="0" 
-                Margin="5,5,0,0"
-                SelectionChanged="BackgroundTypeSelector_OnSelectionChanged"
-                VerticalContentAlignment="Center"
-            >
-                <ComboBoxItem Content="Automatic" />
-                <ComboBoxItem Content="Rosters" />
-                <ComboBoxItem Content="Timesheets" />
-            </ComboBox>
-            
-            <Label Content="Interval" Grid.Row="8" VerticalContentAlignment="Center" Margin="5,5,0,0" />
-            <ComboBox 
-                x:Name="IntervalSelector" 
-                Grid.Row="8" 
-                Grid.Column="1"
-                SelectedIndex="0" 
-                Margin="5,5,0,0"
-                SelectionChanged="IntervalSelector_OnSelectionChanged"
-                VerticalContentAlignment="Center"
-            >
-                <ComboBoxItem Content="Five Minutes" />
-                <ComboBoxItem Content="Six Minutes" />
-                <ComboBoxItem Content="Ten Minutes" />
-                <ComboBoxItem Content="Fifteen Minutes" />
-                <ComboBoxItem Content="Twenty Minutes" />
-                <ComboBoxItem Content="Thirty Minutes" />
-                <ComboBoxItem Content="Sixty Minutes" />
-            </ComboBox>
-            
-            <Label Content="Zoom" Grid.Row="9" VerticalContentAlignment="Center" Margin="5,5,0,0" />
-            <DockPanel Grid.Row="9" Grid.Column="1" Margin="5,5,0,0">
-                <Button DockPanel.Dock="Left" Padding="2" BorderThickness="0.75,0.75,0,0.75" Background="White"
-                        BorderBrush="Gray" Click="ZoomSelector_Down_Click">
-                    <Image Source="pack://application:,,,/Resources/leftarrow.png" Height="20" Width="20" />
-                </Button>
-                <Button DockPanel.Dock="Right" Padding="2" BorderThickness="0,0.75,0.75,0.75" Background="White"
-                        BorderBrush="Gray" Click="ZoomSelector_Up_Click">
-                    <Image Source="pack://application:,,,/Resources/rightarrow.png" Height="20" Width="20" />
-                </Button>
-                <TextBox x:Name="ZoomSelector" IsReadOnly="True" DockPanel.Dock="Left" BorderThickness="0,0.75,0,0.75"
-                         BorderBrush="Gray" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" />
-            </DockPanel>
-            
-        </Grid>
+   </dynamicGrid:DynamicSplitPanel>
 
-       <DockPanel Grid.Row="0" Grid.Column="2">
-           <Button x:Name="ShowSideBar" DockPanel.Dock="Top" Content=" &#x276e; " Margin="5,0,0,0" Padding="4" BorderBrush="Gray" Background="WhiteSmoke" BorderThickness="0.75,0.75,0.75,0" Click="ShowSideBar_OnClick"/>
-           <Border DockPanel.Dock="Top" Margin="5,0,0,0" BorderBrush="Gray" Background="WhiteSmoke" BorderThickness="0.75,0,0.75,0.75">
-               <Label Content="Settings" HorizontalContentAlignment="Right" Margin="0,5,0,0" Background="Transparent">
-                   <Label.LayoutTransform>
-                       <RotateTransform Angle="270"/>
-                   </Label.LayoutTransform>
-               </Label>
-           </Border>
-       </DockPanel>
-       
-    </Grid>
 </UserControl>

+ 98 - 49
prs.desktop/Components/Calendar/Calendar.xaml.cs

@@ -23,6 +23,42 @@ using SelectionChangedEventArgs = System.Windows.Controls.SelectionChangedEventA
 
 namespace PRSDesktop
 {
+
+    public class SfScheduler2 : SfScheduler
+    {
+
+        public static readonly DependencyProperty HeaderVisibilityProperty =
+            DependencyProperty.Register(
+                nameof(HeaderVisibility),
+                typeof(Visibility),
+                typeof(SfScheduler2),
+                new UIPropertyMetadata(Visibility.Collapsed)
+            );
+
+        public Visibility HeaderVisibility
+        {
+            get => (Visibility)GetValue(HeaderVisibilityProperty);
+            set
+            {
+                SetValue(HeaderVisibilityProperty,value);
+                SetHeaderVisibility();
+            }
+
+        }
+
+        private void SetHeaderVisibility()
+        {
+            if (GetTemplateChild("PART_ScheduleHeaderControl") is SchedulerHeaderControl cell)
+                cell.Visibility = HeaderVisibility;
+        }
+
+        public override void OnApplyTemplate()
+        {
+            base.OnApplyTemplate();
+            SetHeaderVisibility();
+        }
+    }
+    
     public partial class Calendar
     {
 
@@ -83,6 +119,28 @@ namespace PRSDesktop
             }
         }
         
+        #region HeaderVisibility Dependency Property
+        
+        public static readonly DependencyProperty HeaderVisibilityProperty =
+            DependencyProperty.Register(
+                nameof(HeaderVisibility), 
+                typeof(Visibility), 
+                typeof(Calendar), 
+                new UIPropertyMetadata(Visibility.Collapsed)
+            );
+        
+        public Visibility HeaderVisibility
+        {
+            get => (Visibility)GetValue(HeaderVisibilityProperty);
+            set
+            {
+                SetValue(HeaderVisibilityProperty,value);
+                Bookings.HeaderVisibility = value;
+            }
+        }
+        
+        #endregion
+        
         #region SettingsVisible Dependency Property
         
         public static readonly DependencyProperty SettingsVisibleProperty =
@@ -90,7 +148,7 @@ namespace PRSDesktop
                 nameof(SettingsVisible), 
                 typeof(CalendarSettingsVisibility), 
                 typeof(Calendar), 
-                new UIPropertyMetadata(CalendarSettingsVisibility.Hidden)
+                new UIPropertyMetadata(CalendarSettingsVisibility.Disabled)
             );
         
         public CalendarSettingsVisibility SettingsVisible
@@ -98,42 +156,26 @@ namespace PRSDesktop
             get => (CalendarSettingsVisibility)GetValue(SettingsVisibleProperty);
             set => SetSettingsVisibility(value);
         }
-
+        
         private void SetSettingsVisibility(CalendarSettingsVisibility value)
         {
             DoSetValue(
                 SettingsVisibleProperty,
                 value,
-                null,
+                () => { },
                 () =>
                 {
-                    VisibleSettingsColumn.Width = value == CalendarSettingsVisibility.Visible
-                        ? new GridLength(240, GridUnitType.Pixel)
-                        : new GridLength(0, GridUnitType.Pixel);
-                    HiddenSettingsColumn.Width = value == CalendarSettingsVisibility.Hidden
-                        ? new GridLength(35, GridUnitType.Pixel)
-                        : new GridLength(0, GridUnitType.Pixel);
-
+                    _splitPanel.View = value == CalendarSettingsVisibility.Visible
+                        ? DynamicSplitPanelView.Combined
+                        : DynamicSplitPanelView.Master;
+                    _splitPanel.AllowableViews = value == CalendarSettingsVisibility.Disabled
+                        ? DynamicSplitPanelView.Master
+                        : DynamicSplitPanelView.Master | DynamicSplitPanelView.Combined;
+                    ResizeColumns(this.ActualWidth);
                 }
             );
         }
         
-        private void HideSideBar_OnClick(object sender, RoutedEventArgs e)
-        {
-            if (EventSuppressor.IsSet(Suppress.Events))
-                return;
-            using (new EventSuppressor(Suppress.Selector))
-                SetSettingsVisibility(CalendarSettingsVisibility.Hidden);
-        }
-        
-        private void ShowSideBar_OnClick(object sender, RoutedEventArgs e)
-        {
-            if (EventSuppressor.IsSet(Suppress.Events))
-                return;
-            using (new EventSuppressor(Suppress.Selector))
-                SetSettingsVisibility(CalendarSettingsVisibility.Visible);
-        }
-        
         #endregion
         
         #region CalendarView Dependency Property
@@ -358,24 +400,22 @@ namespace PRSDesktop
             DoSetValue(
                 SelectedDateProperty,
                 value,
-                () => DateSelector.Date = value,
-                () =>
-                {
-                    Bookings.DisplayDate = value;
-                    Bookings.SelectedDate = value;                
-                }
-            );
+                () => { /* DateSelector.Date = value; */ },
+                () => {
+                Bookings.DisplayDate = value;
+                Bookings.SelectedDate = value;
+            });
         }
 
-        private void DateSelector_DateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
-        {
-            if (EventSuppressor.IsSet(Suppress.Events))
-                return;
-            using (new EventSuppressor(Suppress.Selector))
-                SetSelectedDate(DateSelector.Date);
-        }
+        // private void DateSelector_DateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+        // {
+        //     if (EventSuppressor.IsSet(Suppress.Events))
+        //         return;
+        //     using (new EventSuppressor(Suppress.Selector))
+        //         SetSelectedDate(DateSelector.Date);
+        // }
 
-        public DateTime StartDate => Properties.CalendarView == CalendarViewType.Day
+        public DateTime StartDate => (Properties?.CalendarView ?? CalendarViewType.Day)  == CalendarViewType.Day
             ? SelectedDate
             : SelectedDate.StartOfWeek(DayOfWeek.Monday);
 
@@ -659,6 +699,8 @@ namespace PRSDesktop
         public bool IsReady { get; set; }
         
         public CalendarSettings Properties { get; set; }
+
+        //public SfScheduler2? Bookings => this.FindName("_bookings") as SfScheduler2;
         
         public Calendar()
         {
@@ -667,14 +709,7 @@ namespace PRSDesktop
                 InitializeComponent();
                 SetValue(StartHourProperty, 0);
                 SetValue(EndHourProperty, 24);
-                
-                // Force the Calendar to display Monday - Sunday
-                CultureInfo cultureInfo = new CultureInfo(CultureInfo.CurrentCulture.Name);
-                cultureInfo.DateTimeFormat.FirstDayOfWeek = DayOfWeek.Monday; 
-                DateSelector.Culture = cultureInfo; 
-                
                 SfSkinManager.SetTheme(Bookings, new Theme() { ThemeName = "Office2019White", ScrollBarMode = ScrollBarMode.Compact });
-                
             }
         }
         
@@ -684,7 +719,6 @@ namespace PRSDesktop
             {
          
                 Properties = LoadSettings?.Invoke(this) ?? new CalendarSettings();
-                
                 SetCalendarView(Properties.CalendarView);
                 SetSettingsVisibility(Properties.SettingsVisible);
                 SetSelectedDate(Properties.Date);
@@ -1577,5 +1611,20 @@ namespace PRSDesktop
                 return;
             UpdateZoom();
         }
+
+        private void _settingsButton_OnClick(object sender, RoutedEventArgs e)
+        {
+            _splitPanel.View = DynamicSplitPanelView.Master;
+        }
+
+        private void _splitPanel_OnOnChanged(object sender, DynamicSplitPanelSettings e)
+        {
+            if (EventSuppressor.IsSet(Suppress.Events))
+                return;
+            if (e.View == DynamicSplitPanelView.Combined && SettingsVisible != CalendarSettingsVisibility.Visible)
+                SetSettingsVisibility(CalendarSettingsVisibility.Visible);
+            else if (e.View == DynamicSplitPanelView.Master && SettingsVisible == CalendarSettingsVisibility.Visible)
+                SetSettingsVisibility(CalendarSettingsVisibility.Hidden);
+        }
     }
 }

+ 1 - 1
prs.desktop/Components/EmployeeSelector/EmployeeSelector.xaml

@@ -20,7 +20,7 @@
             </Grid.ColumnDefinitions>
            
             <ComboBox Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" x:Name="Teams" DisplayMemberPath="Value" SelectedValuePath="Key"
-                      SelectionChanged="TeamsSelectionChanged" VerticalAlignment="Center" Margin="0,0,0,4" />
+                      SelectionChanged="TeamsSelectionChanged" VerticalAlignment="Center" Margin="0,0,0,4" Height="25" />
 
             <Syncfusion:CheckListBox Grid.Row="1" Grid.ColumnSpan="2" x:Name="TeamList" DisplayMemberPath="Value"
                                      SelectedValuePath="Key" IsSelectAllEnabled="False" IsCheckOnFirstClick="True"

+ 1 - 1
prs.desktop/Components/EquipmentSelector/EquipmentSelector.xaml

@@ -20,7 +20,7 @@
             </Grid.ColumnDefinitions>
            
             <ComboBox Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" x:Name="Groups" DisplayMemberPath="Value" SelectedValuePath="Key"
-                      SelectionChanged="TeamsSelectionChanged" VerticalAlignment="Center" Margin="0,0,0,4" />
+                      SelectionChanged="TeamsSelectionChanged" VerticalAlignment="Center" Margin="0,0,0,4" Height="25" />
 
             <Syncfusion:CheckListBox Grid.Row="1" Grid.ColumnSpan="2" x:Name="GroupList" DisplayMemberPath="Value"
                                      SelectedValuePath="Key" IsSelectAllEnabled="False" IsCheckOnFirstClick="True"

+ 3 - 1
prs.desktop/Dashboards/IDashboardWidget.cs

@@ -23,8 +23,10 @@ namespace PRSDesktop
     {
         void BuildActionsMenu(ContextMenu menu);
     }
+    
+    public interface IDashboardElement { }
 
-    public abstract class DashboardElement<TDashboard, TGroup, TProperties> : DFLayoutElement<TProperties>
+    public abstract class DashboardElement<TDashboard, TGroup, TProperties> : DFLayoutElement<TProperties>, IDashboardElement
         where TGroup : DashboardWidgetGroup
         where TProperties : IUserConfigurationSettings, IDashboardProperties, IConfigurationSettings
         where TDashboard : IDashboardWidget<TGroup, TProperties>

+ 3 - 2
prs.desktop/Dashboards/UtilityDashboard.xaml.cs

@@ -580,10 +580,11 @@ namespace PRSDesktop
             {
                 _dashboardElements = new();
                 var types = CoreUtils.TypeList(
-                    AppDomain.CurrentDomain.GetAssemblies(),
+                    new [] { Assembly.GetExecutingAssembly() },
                     x => x.IsClass
                         && !x.IsAbstract
-                        && !x.IsGenericType);
+                        && !x.IsGenericType
+                        && x.GetInterfaces().Contains(typeof(IDashboardElement)));
                 foreach (var type in types)
                 {
                     var dashboardElementDef = type.GetSuperclassDefinition(typeof(DashboardElement<,,>));

+ 2 - 0
prs.desktop/Panels/Assignments/CalendarPanel.cs

@@ -4,6 +4,7 @@ using Comal.Classes;
 using InABox.Configuration;
 using InABox.Core;
 using System.ComponentModel;
+using System.Windows;
 
 namespace PRSDesktop
 {
@@ -16,6 +17,7 @@ namespace PRSDesktop
             SectionName = "Calendar";
             LoadSettings += (sender) => new UserConfiguration<CalendarSettings>(nameof(CalendarPanel)).Load();
             SaveSettings += (sender,properties) => new UserConfiguration<CalendarSettings>(nameof(CalendarPanel)).Save(properties);
+            HeaderVisibility = Visibility.Visible;
         }
         
         public event DataModelUpdateEvent? OnUpdateDataModel;

+ 1 - 0
prs.desktop/Panels/DailyReports/DailyReport.xaml

@@ -111,6 +111,7 @@
                 LoadSettings="Calendar_OnLoadSettings"
                 SaveSettings="Calendar_OnSaveSettings"
                 ItemEditing="Assignments_OnItemEditing"
+                HeaderVisibility="Collapsed"
             />
 
         </Grid>

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

@@ -50,7 +50,9 @@
                         CustomiseContextMenu="Bookings_OnCustomiseContextMenu"
                         LoadSettings="Bookings_OnLoadSettings"
                         SaveSettings="Bookings_OnSaveSettings"
-                        SettingsVisible="Hidden"/>
+                        SettingsVisible="Hidden"
+                        HeaderVisibility="Visible"
+                        />
                     <!-- AssignmentSelectionChanged="Bookings_SelectionChanged" -->
                     <!-- AssignmentChanged="Bookings_AssignmentChanged" -->
                 </dynamicgrid:DynamicTabItem>

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

@@ -30,6 +30,7 @@ namespace PRSDesktop
             Racks.OnChanged += OnChanged;
             Bookings.LoadSettings += (sender) => new UserConfiguration<CalendarSettings>("Deliveries").Load();
             Bookings.SaveSettings += (sender, properties) => new UserConfiguration<CalendarSettings>("Deliveries").Save(properties);
+            Bookings.HeaderVisibility = Visibility.Visible;
         }
         
         public Job Job

+ 4 - 4
prs.desktop/Panels/Products/Locations/StockHoldingGrid.cs

@@ -480,7 +480,7 @@ public class StockHoldingGrid : DynamicDataGrid<StockHolding>
     {
         var updates = new List<StockMovement>();
 
-        if(requiitems.Length > 0 || requiitems.Any(x => x.ID != Guid.Empty))
+        if(requiitems.Length > 1 || requiitems.Any(x => x.ID != Guid.Empty))
         {
             var win = new StockHoldingRelocationWindow(holding, requiitems)
             {
@@ -563,7 +563,7 @@ public class StockHoldingGrid : DynamicDataGrid<StockHolding>
             other.Transaction = movement.Transaction;
             other.IsTransfer = true;
             other.Type = StockMovementType.TransferOut;
-            movement.JobRequisitionItem.ID = requiitems[0].ID;
+            other.JobRequisitionItem.ID = requiitems[0].ID;
 
             var changes = new List<string>();
             if (movement.Location.ID != other.Location.ID)
@@ -720,12 +720,12 @@ public class StockHoldingGrid : DynamicDataGrid<StockHolding>
         
         if (column.ColumnName.Equals(nameof(StockMovement.Received)))
         {
-            editor.Editable = _action == MovementAction.Receive  ? Editable.Enabled : Editable.Hidden;
+            editor.Editable = _action == MovementAction.Receive || _action == MovementAction.Transfer  ? Editable.Enabled : Editable.Hidden;
             editor.Caption = "Quantity";
         }
         if (column.ColumnName.Equals(nameof(StockMovement.Issued)))
         {
-            editor.Editable = _action == MovementAction.Issue || _action == MovementAction.Transfer ? Editable.Enabled : Editable.Hidden;
+            editor.Editable = _action == MovementAction.Issue ? Editable.Enabled : Editable.Hidden;
             editor.Caption = "Quantity";
         }
         

+ 1 - 1
prs.desktop/prsdesktop.iss

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

+ 1 - 1
prs.licensing/PRSLicensing.iss

@@ -5,7 +5,7 @@
 #pragma verboselevel 9
 
 #define MyAppName "PRS Licensing"
-#define MyAppVersion "7.60"
+#define MyAppVersion "7.60a"
 #define MyAppPublisher "PRS Digital"
 #define MyAppURL "https://www.prs-software.com.au"
 #define MyAppExeName "PRSLicensing.exe"

+ 1 - 1
prs.server/PRSServer.iss

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