263 lines
12 KiB
XML
263 lines
12 KiB
XML
<localView:BeWoView
|
|
x:Class="BeWo.View.Detail.AbsenceReasonView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:core="clr-namespace:BS.Shared.Core;assembly=BS.Shared"
|
|
xmlns:diagnostics="clr-namespace:System.Diagnostics;assembly=WindowsBase"
|
|
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
|
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
|
xmlns:localView="clr-namespace:BeWo.View"
|
|
xmlns:s="clr-namespace:System;assembly=mscorlib"
|
|
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
|
|
xmlns:val="clr-namespace:BeWo.Validation"
|
|
xmlns:xtraEditors="clr-namespace:DevExpress.XtraEditors;assembly=DevExpress.XtraEditors.v23.2"
|
|
Width="Auto"
|
|
Height="Auto"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch"
|
|
Focusable="True">
|
|
<GroupBox
|
|
Name="root"
|
|
Header="Aktuell definierte Abwesenheitskategorien"
|
|
Style="{StaticResource ObjectEditGroupBox}">
|
|
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
|
<Grid.Resources>
|
|
<DataTemplate x:Key="DropDownItemTemplate">
|
|
<Border
|
|
Height="20"
|
|
MinWidth="20"
|
|
HorizontalAlignment="Stretch"
|
|
Background="{Binding}"
|
|
BorderBrush="Black"
|
|
BorderThickness="1"
|
|
CornerRadius="2" />
|
|
</DataTemplate>
|
|
<DataTemplate x:Key="SelectedItemTemplate">
|
|
<Border
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch"
|
|
Background="{Binding}"
|
|
BorderBrush="Black"
|
|
BorderThickness="1" />
|
|
</DataTemplate>
|
|
</Grid.Resources>
|
|
<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="*" />
|
|
</Grid.RowDefinitions>
|
|
<Label Grid.Row="0" Grid.Column="0">Bezeichnung</Label>
|
|
<TextBox
|
|
Grid.Row="0"
|
|
Grid.Column="1"
|
|
Width="125"
|
|
Height="23"
|
|
Margin="3"
|
|
Text="{val:ValidationBinding Path=NewVM.Description,
|
|
UpdateSourceTrigger=PropertyChanged}" />
|
|
<Label Grid.Row="0" Grid.Column="2">max. abrechenbare Stunden (pro Woche)</Label>
|
|
|
|
<dxe:SpinEdit
|
|
Name="spinedit_hours"
|
|
Grid.Row="0"
|
|
Grid.Column="3"
|
|
Width="50"
|
|
Height="23"
|
|
AllowNullInput="True"
|
|
EditValue="{Binding Path=NewVM.Hours, Converter={StaticResource Int2DecimalConverter}, UpdateSourceTrigger=PropertyChanged}"
|
|
IsFloatValue="False"
|
|
MinValue="0" />
|
|
<Label Grid.Row="0" Grid.Column="4">Minuten</Label>
|
|
<dxe:SpinEdit
|
|
Name="spinedit_minutes"
|
|
Grid.Row="0"
|
|
Grid.Column="5"
|
|
Width="50"
|
|
Height="23"
|
|
AllowNullInput="True"
|
|
EditValue="{Binding Path=NewVM.Minutes, Converter={StaticResource Int2DecimalConverter}, UpdateSourceTrigger=PropertyChanged}"
|
|
IsFloatValue="False"
|
|
MaxValue="59"
|
|
MinValue="0" />
|
|
<Button
|
|
Name="button_addReason"
|
|
Grid.Row="1"
|
|
Grid.Column="4"
|
|
Grid.ColumnSpan="2"
|
|
Height="25"
|
|
Margin="3"
|
|
HorizontalAlignment="Right"
|
|
Click="button_addReason_Click"
|
|
IsDefault="True">
|
|
Hinzufügen
|
|
</Button>
|
|
<Label Grid.Row="1" Grid.Column="0">
|
|
Farbe im Belegungsplan
|
|
</Label>
|
|
<ComboBox
|
|
Name="combobox_brush"
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
Width="125"
|
|
Height="23"
|
|
Margin="3"
|
|
HorizontalContentAlignment="Stretch"
|
|
VerticalContentAlignment="Stretch"
|
|
ItemsSource="{Binding Path=AllBrushes, Mode=OneWay}"
|
|
SelectedItem="{val:ValidationBinding Path=NewVM.Brush}">
|
|
|
|
<ComboBox.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<UniformGrid
|
|
Columns="12"
|
|
IsItemsHost="True"
|
|
Rows="12" />
|
|
</ItemsPanelTemplate>
|
|
</ComboBox.ItemsPanel>
|
|
<ComboBox.ItemContainerStyle>
|
|
<Style TargetType="{x:Type ComboBoxItem}">
|
|
<Setter Property="Margin" Value="2" />
|
|
<Setter Property="Padding" Value="0" />
|
|
</Style>
|
|
</ComboBox.ItemContainerStyle>
|
|
</ComboBox>
|
|
<StackPanel
|
|
Grid.Row="1"
|
|
Grid.Column="2"
|
|
Grid.ColumnSpan="2"
|
|
Orientation="Horizontal">
|
|
<Label>Nur auswählbar für</Label>
|
|
<ComboBox
|
|
x:Name="combo_visibilitytype"
|
|
Grid.Row="1"
|
|
Grid.Column="3"
|
|
Width="200"
|
|
Height="23"
|
|
Margin="3,1,3,3"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Center"
|
|
DisplayMemberPath="Value"
|
|
ItemsSource="{x:Static core:EnumTranslations.AbsenceReasonVisibility2Translations}"
|
|
SelectedValue="{Binding NewVM.Sichtbarkeit, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
SelectedValuePath="Key" />
|
|
</StackPanel>
|
|
<dxg:GridControl
|
|
x:Name="datagrid_absencereasons"
|
|
Grid.Row="2"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="7"
|
|
Margin="0,10,0,0"
|
|
DataSource="{Binding VMList}">
|
|
<dxg:GridControl.Columns>
|
|
<dxg:GridColumn
|
|
Width="24"
|
|
FieldName="IsDeleteable"
|
|
FixedWidth="True"
|
|
Header=""
|
|
ReadOnly="True">
|
|
<dxg:GridColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<Button
|
|
Width="18"
|
|
Height="18"
|
|
VerticalAlignment="Center"
|
|
Click="DeleteButton_Click"
|
|
Content="r"
|
|
FontFamily="Webdings"
|
|
Visibility="{Binding Path=EditValue, Converter={StaticResource BoolVisibilityConverter}}" />
|
|
</DataTemplate>
|
|
</dxg:GridColumn.CellTemplate>
|
|
</dxg:GridColumn>
|
|
<dxg:GridColumn
|
|
Width="180"
|
|
FieldName="Description"
|
|
Header="Bezeichnung" />
|
|
<dxg:GridColumn
|
|
Width="180"
|
|
FieldName="Hours"
|
|
Header="max. abrechenbare Stunden" />
|
|
<dxg:GridColumn
|
|
Width="180"
|
|
FieldName="Minutes"
|
|
Header="Minuten" />
|
|
<dxg:GridColumn
|
|
x:Name="column_visibility"
|
|
Width="150"
|
|
FieldName="Sichtbarkeit"
|
|
Header="Nur auswählbar für" />
|
|
<dxg:GridColumn
|
|
x:Name="column_Color"
|
|
Width="70"
|
|
FieldName="Brush"
|
|
Header="Farbe">
|
|
<dxg:GridColumn.DisplayTemplate>
|
|
<ControlTemplate>
|
|
<Border
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch"
|
|
Background="{Binding Value, diagnostics:PresentationTraceSources.TraceLevel=High}"
|
|
BorderBrush="Black"
|
|
BorderThickness="1" />
|
|
</ControlTemplate>
|
|
</dxg:GridColumn.DisplayTemplate>
|
|
<dxg:GridColumn.EditTemplate>
|
|
<ControlTemplate>
|
|
<Button
|
|
x:Name="PART_Editor"
|
|
Height="21"
|
|
HorizontalAlignment="Stretch"
|
|
Background="{Binding EditValue}"
|
|
BorderThickness="0"
|
|
Click="button_select_color_Click"
|
|
Foreground="{Binding EditValue}"
|
|
Style="{x:Null}" />
|
|
</ControlTemplate>
|
|
</dxg:GridColumn.EditTemplate>
|
|
</dxg:GridColumn>
|
|
</dxg:GridControl.Columns>
|
|
<dxg:GridControl.View>
|
|
<dxg:TableView
|
|
AutoWidth="true"
|
|
NavigationStyle="Cell"
|
|
ShowGroupPanel="False"
|
|
ShowGroupedColumns="false"
|
|
ShowTotalSummary="False" />
|
|
</dxg:GridControl.View>
|
|
</dxg:GridControl>
|
|
<Popup
|
|
x:Name="popup_color"
|
|
Placement="MousePoint"
|
|
StaysOpen="false">
|
|
<ListBox
|
|
x:Name="listbox_colorpicker"
|
|
BorderThickness="0"
|
|
Loaded="colorEditor_Loaded"
|
|
SelectionChanged="listbox_colorpicker_SelectionChanged">
|
|
<ListBox.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<UniformGrid
|
|
Columns="12"
|
|
IsItemsHost="True"
|
|
Rows="12" />
|
|
</ItemsPanelTemplate>
|
|
</ListBox.ItemsPanel>
|
|
<ListBox.ItemContainerStyle>
|
|
<Style TargetType="{x:Type ListBoxItem}">
|
|
<Setter Property="Margin" Value="2" />
|
|
<Setter Property="Padding" Value="0" />
|
|
</Style>
|
|
</ListBox.ItemContainerStyle>
|
|
</ListBox>
|
|
</Popup>
|
|
</Grid>
|
|
</GroupBox>
|
|
</localView:BeWoView> |