<UserControl
    x:Class="Client.View.EmployeesTimeSheetsView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:local="clr-namespace:Client.View"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    d:DesignHeight="800"
    d:DesignWidth="1000"
    mc:Ignorable="d">
    <Grid>
        <Rectangle
            Grid.Row="0"
            Grid.Column="0"
            Height="50"
            Margin="0,0,0,0"
            HorizontalAlignment="Stretch"
            VerticalAlignment="Top">
            <Rectangle.Fill>
                <LinearGradientBrush MappingMode="RelativeToBoundingBox" StartPoint="0.5,0" EndPoint="0.5,1">
                    <GradientStop Color="#FF065393" />
                    <GradientStop Offset="1" Color="#FF1D507A" />
                </LinearGradientBrush>
            </Rectangle.Fill>
        </Rectangle>
        <Label
            Grid.Row="2"
            Grid.Column="1"
            Margin="30,5,0,0"
            HorizontalAlignment="Left"
            VerticalAlignment="Top"
            HorizontalContentAlignment="Center"
            VerticalContentAlignment="Center"
            Content="EVIDENCE PRACOVNÍCH VÝKAZŮ"
            FontSize="24"
            FontWeight="Bold"
            Foreground="White" />

        <Button
            Grid.Row="1"
            Width="180"
            Height="40"
            Margin="0,5,400,0"
            HorizontalAlignment="Right"
            VerticalAlignment="Top"
            HorizontalContentAlignment="Center"
            VerticalContentAlignment="Center"
            Background="#FF10BCE2"
            BorderBrush="#FF24334D"
            BorderThickness="0"
            Command="{Binding ShowTimeSheetStatisticCommand}"
            Content="ZOBRAZIT STATISTIKY"
            FontSize="16"
            FontWeight="Bold"
            Foreground="White" />

        <TextBox
            Grid.Row="3"
            Width="160"
            Height="40"
            Margin="0,5,220,0"
            HorizontalAlignment="Right"
            VerticalAlignment="Top"
            HorizontalContentAlignment="Left"
            VerticalContentAlignment="Center"
            Background="White"
            BorderBrush="#77869b"
            BorderThickness="1"
            FontSize="16"
            Foreground="#FF383636"
            IsReadOnly="True">
            <TextBox.Text>
                <MultiBinding StringFormat="{}{0} {1}">
                    <Binding Path="SelectedEmployee.FirstName" />
                    <Binding Path="SelectedEmployee.LastName" />
                </MultiBinding>
            </TextBox.Text>
        </TextBox>

        <Button
            Grid.Row="1"
            Width="15"
            Height="40"
            Margin="0,5,210,0"
            Padding="0,0,0,6"
            HorizontalAlignment="Right"
            VerticalAlignment="Top"
            HorizontalContentAlignment="Center"
            VerticalContentAlignment="Center"
            Background="#FF10BCE2"
            BorderBrush="#FF24334D"
            BorderThickness="0"
            Command="{Binding SelectEmployeeCommand}"
            Content="..."
            FontSize="12"
            FontWeight="Bold"
            Foreground="White" />

        <ComboBox
            Width="150"
            Height="40"
            Margin="0,5,30,0"
            HorizontalAlignment="Right"
            VerticalAlignment="Top"
            HorizontalContentAlignment="Left"
            VerticalContentAlignment="Center"
            Background="Blue"
            DisplayMemberPath="DisplayName"
            FontSize="18"
            ItemsSource="{Binding Path=MonthComboBoxItems}"
            SelectedItem="{Binding Path=SelectedMonthComboBoxItem}" />


        <Rectangle
            Grid.Row="2"
            Grid.Column="1"
            Grid.ColumnSpan="3"
            MinHeight="400"
            Margin="0,50,0,0"
            HorizontalAlignment="Stretch"
            VerticalAlignment="Stretch"
            Fill="#FFD6DFE1">
            <Rectangle.BitmapEffect>
                <DropShadowBitmapEffect
                    Direction="-90"
                    ShadowDepth="3"
                    Softness="0.1"
                    Color="#FF1D507A" />
            </Rectangle.BitmapEffect>
        </Rectangle>

        <Border
            Grid.Row="2"
            Grid.Column="1"
            Grid.ColumnSpan="3"
            MinHeight="360"
            Margin="30,70,30,30"
            HorizontalAlignment="Stretch"
            VerticalAlignment="Stretch"
            BorderBrush="#77869b"
            BorderThickness="1"
            CornerRadius="10">
            <DataGrid
                x:Name="TimeSheetsDataGrid"
                Grid.Row="2"
                Grid.Column="1"
                Grid.ColumnSpan="3"
                MinHeight="360"
                Margin="0,5,0,5"
                Padding="0,0,0,0"
                HorizontalAlignment="Stretch"
                VerticalAlignment="Stretch"
                AutoGenerateColumns="False"
                Background="#FFD6DFE1"
                BorderBrush="Transparent"
                HorizontalGridLinesBrush="#77869b"
                IsReadOnly="True"
                IsSynchronizedWithCurrentItem="True"
                ItemsSource="{Binding TimeSheetRecords}"
                RowHeaderWidth="0"
                RowHeight="30"
                TextBlock.TextAlignment="Center"
                VerticalGridLinesBrush="#FFD6DFE1">

                <DataGrid.Columns>
                    <DataGridTextColumn
                        Width="*"
                        Binding="{Binding Path=Id}"
                        Header="ID" />
                    <DataGridTextColumn
                        Width="*"
                        Binding="{Binding Path=From, StringFormat=\{0:dd/MM/yy HH:mm:ss\}}"
                        Header="OD" />
                    <DataGridTextColumn
                        Width="*"
                        Binding="{Binding Path=To, StringFormat=\{0:dd/MM/yy HH:mm:ss\}}"
                        Header="DO" />
                    <DataGridTextColumn
                        Width="*"
                        Binding="{Binding Path=Project.Name}"
                        Header="PROJEKT" />


                </DataGrid.Columns>

                <DataGrid.Resources>
                    <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#FF3D70D1" />
                    <SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="White" />
                    <SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="#FF3D70D1" />
                    <SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}" Color="White" />
                </DataGrid.Resources>

            </DataGrid>
        </Border>


    </Grid>
</UserControl>
