<localView:BeWoView x:Class="BeWo.View.Report.Auslastung.AuslastungReportView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:localView="clr-namespace:BeWo.View"
    xmlns:localSearchView="clr-namespace:BeWo.View.Search"
    xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
    xmlns:proxy="clr-namespace:BeWo.ServiceProxy"
    Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
    VerticalAlignment="Stretch" Focusable="True" xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">

	<GroupBox Style="{StaticResource ObjectEditGroupBox}" Header="Mitarbeiterauslastung" >
		<Grid>
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="*"/>
			</Grid.ColumnDefinitions>
			<Grid.RowDefinitions>
				<RowDefinition Height="Auto"/>
				<RowDefinition Height="*"/>
			</Grid.RowDefinitions>
            
            
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
						<RowDefinition Height="Auto"/>
						<RowDefinition Height="Auto"/>
						<RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <CheckBox x:Name="checkbox_all" IsChecked="False" Content="Für alle Mitarbeiter" Checked="CheckBox_Checked" Margin="0,5,0,0" Grid.ColumnSpan="2" />

                    <Label x:Name="lblEmployee" Visibility="{Binding Path=IsChecked, Converter={StaticResource BoolVisibilityHiddenConverter}, ConverterParameter=false, ElementName=checkbox_all}" Content="Mitarbeiter:" HorizontalAlignment="Left" Grid.Column="0" Grid.Row="1" VerticalAlignment="Center" />
                    <uc:PopUpEdit IsReadOnly="True" Visibility="{Binding Path=IsChecked, Converter={StaticResource BoolVisibilityHiddenConverter}, ConverterParameter=false, ElementName=checkbox_all}" 
                                  x:Name="popupedit_employee" DeleteButtonVisibility="Collapsed" 
                                  PopUpClick="popupedit_employee_PopUpClick" HorizontalAlignment="Left" 
                                  Width="200" HorizontalContentAlignment="Left" Height="24" Grid.Column="1" 
                                  Grid.ColumnSpan="1" Grid.Row="1" Margin="3,0,0,0" Cursor="Arrow" PreviewMouseDoubleClick="Popupedit_employee_OnPreviewMouseDoubleClick" />

                    <Label x:Name="lblTeam" Visibility="{Binding Path=IsChecked, Converter={StaticResource BoolVisibilityHiddenConverter}, ConverterParameter=false, ElementName=checkbox_all}" Content="Team:" HorizontalAlignment="Left" Grid.Column="0" Grid.Row="3" VerticalAlignment="Center" />
                    <uc:PopUpEdit IsReadOnly="True" Visibility="{Binding Path=IsChecked, Converter={StaticResource BoolVisibilityHiddenConverter}, ConverterParameter=false, ElementName=checkbox_all}" 
                                  x:Name="popupedit_team" DeleteButtonVisibility="Collapsed" 
                                  PopUpClick="popupedit_team_PopUpClick" HorizontalAlignment="Left" 
                                  Width="200" HorizontalContentAlignment="Left" Height="24" Grid.Column="1" 
                                  Grid.ColumnSpan="1" Grid.Row="3" Margin="3,0,0,0" Cursor="Arrow" PreviewMouseDoubleClick="Popupedit_team_OnPreviewMouseDoubleClick" />
					
                    <Label Content="Startdatum:" Grid.Column="0" Grid.Row="4" VerticalAlignment="Center"/>
                    <dxe:DateEdit MaskType="DateTimeAdvancingCaret" Grid.Column="1" Grid.Row="4" x:Name="datePickerStartDate" Width="120" HorizontalAlignment="Left" Margin="3,0,0,0"/>
                    
                    <Label Content="Enddatum:"  Grid.Column="0" Grid.Row="5" VerticalAlignment="Center" />
                    <dxe:DateEdit MaskType="DateTimeAdvancingCaret" Grid.Column="1" Grid.Row="5" x:Name="datePickerEndDate" HorizontalAlignment="Left" Width="120" Margin="3,0,0,0" />

                    <Button x:Name="button_generate"  Grid.Column="0" Grid.Row="6" Margin="3" Content="Aktualisieren" Click="button_generate_Click" Height="24" HorizontalAlignment="Left" Width="80" />
                    
                    <!--<Label Grid.Row="0" Content="Intervall" Margin="10,0,0,0" Grid.Column="2" Padding="0,5,0,0" />
                    <StackPanel Grid.ColumnSpan="1" Grid.Row="1" Grid.Column="2" HorizontalAlignment="Left" Orientation="Vertical" Margin="10,8,0,0" Grid.RowSpan="7" VerticalAlignment="Stretch"  >
                        <RadioButton Content="Tag" Height="23" GroupName="interval" x:Name="radioButtonIntervalDay"/>
                        <RadioButton Content="Woche" Height="23" IsChecked="True" GroupName="interval" x:Name="radioButtonIntervalWeek" Margin="0,0,0,0"/>
                        <RadioButton Content="Monat" Height="23" GroupName="interval" x:Name="radioButtonIntervalMonth" Margin="0,0,0,0"/>
                        <RadioButton Content="Quartal" Height="23" GroupName="interval" x:Name="radioButtonIntervalQuarter" Margin="0,0,0,0"/>
                        <RadioButton Content="Jahr" Height="23" GroupName="interval" x:Name="radioButtonIntervalYear" Margin="0,0,0,0"/>
                    </StackPanel>
                    <Label Grid.Row="0" Content="Leistungskategorien" Margin="10,0,0,0" Grid.Column="3" Padding="0,5,0,0" />
                    <ListBox IsSynchronizedWithCurrentItem="True" Grid.Column="3" Grid.Row="1" Grid.RowSpan="3" Margin="10,0,0,0" x:Name="serviceCategoryList" Height="72" VerticalAlignment="Top"/>
					<CheckBox x:Name="checkbox_showServiceRecords" Grid.Column="3" Grid.Row="4" IsChecked="False" Content="Einträge auflisten" Margin="10,5,0,0" Grid.ColumnSpan="1" />
					<CheckBox x:Name="checkbox_sortBySubGroup" Grid.Column="3" Grid.Row="5" IsChecked="False" Content="Nach Klienten sortieren" Margin="10,5,0,0" Grid.ColumnSpan="1" />
                    <CheckBox x:Name="checkbox_showChart" Grid.Column="3" Grid.Row="6" IsChecked="False" Content="Diagramm anzeigen" Margin="10,5,0,0" Grid.ColumnSpan="1" />-->


                    <!--<Label Grid.Column="4" Grid.Row="0" Content="Ziele" x:Name="lblGoals" Margin="10,0,0,0" Padding="0,5,0,0" />
                    <TreeView x:Name="treeview_Goals" Grid.Column="4"  Grid.Row="1" Grid.RowSpan="6" Margin="10,0,0,0" ItemContainerStyle="{DynamicResource goal_treeitemstyle}" ItemTemplate="{DynamicResource goal_treeitemtemplate}" Height="138"  >
                        <TreeView.Resources>
                            <Style x:Key="goal_treeitemstyle" TargetType="TreeViewItem">
                                <Setter Property="IsExpanded" Value="{Binding Path=IsExpanded, Mode=TwoWay}" />
                            </Style>
                            <HierarchicalDataTemplate x:Key="goal_treeitemtemplate" DataType="{x:Type proxy:SupportConceptGoalDC}" ItemsSource="{Binding Path=Children}" >
                                <Grid >
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition Width="Auto"/>
                                    </Grid.ColumnDefinitions>
                                    <CheckBox x:Name="Bd" Tag="{Binding}" IsChecked="{Binding Path=IsChecked}" Visibility="{Binding Path=HasParent, Converter={StaticResource BoolVisibilityConverter}}" Grid.Column="0" Margin="3 2" VerticalAlignment="Center"/>
                                    <TextBlock x:Name="BdText" Tag="{Binding}" Grid.Column="1" Margin="3 2" Text="{Binding Path=Name}" VerticalAlignment="Center" />
                                </Grid>
                            </HierarchicalDataTemplate>
                        </TreeView.Resources>
                    </TreeView>-->
                </Grid>
                
            

            
            <Grid Background="{DynamicResource EmployeeContentBrush}" x:Name="reportContent" Grid.Row="1" Grid.ColumnSpan="7" Margin="0,0,0,18"/>
            <!--<TextBlock Grid.Column="0" Grid.ColumnSpan="7" Grid.Row="1" x:Name="textblock_link_pdfexport" VerticalAlignment="Bottom" Margin="0,0,90,0" HorizontalAlignment="Right" FontSize="14"><Hyperlink x:Name="linkPdfExport" TargetName="_NewWindow" Foreground="#FF2B508B" RequestNavigate="linkPdfExport_RequestNavigate" ><Run Text="Drucken"/></Hyperlink></TextBlock>-->
            <TextBlock Grid.Column="0" Grid.ColumnSpan="7" Grid.Row="1" x:Name="textblock_link" VerticalAlignment="Bottom" Margin="0,0,5,0" HorizontalAlignment="Right" FontSize="14">
                <Hyperlink x:Name="linkExcelExport" TargetName="newWindow" Foreground="#FF2B508B" RequestNavigate="linkExcelExport_RequestNavigate" ><Run Text="Excel Export"/></Hyperlink></TextBlock>
			
			<Popup Margin="10" x:Name="popup_employee" StaysOpen="False" Placement="MousePoint" Width="400" Grid.Row="5" Height="400" Grid.ColumnSpan="7" >
				<localSearchView:EmployeeSearchView ItemSelected="EmployeeSearchView_CustomerSelected" x:Name="employeesearchview"/>
			</Popup>

            <Popup Margin="10" x:Name="popup_team" StaysOpen="False" Placement="MousePoint" Width="400" Grid.Row="5" Height="400" Grid.ColumnSpan="7" >
                <localSearchView:TeamSearchView ItemSelected="TeamSearchView_TeamSelected" x:Name="teamsearchview"/>
            </Popup>

        </Grid>
	</GroupBox>

</localView:BeWoView>
