|
|
@@ -0,0 +1,95 @@
|
|
|
+<UserControl xmlns="https://github.com/avaloniaui"
|
|
|
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
+ xmlns:listView="clr-namespace:PRS.Avalonia.Components.ListView"
|
|
|
+ xmlns:local="using:PRS.Avalonia.Modules.MyHR"
|
|
|
+ xmlns:prs="using:PRS.Avalonia"
|
|
|
+ mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
|
+ x:Class="PRS.Avalonia.Modules.MyHR.MyHRLeaveRequestsView"
|
|
|
+ x:DataType="local:MyHRLeaveRequestsViewModel">
|
|
|
+ <Grid>
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="*"/>
|
|
|
+ <RowDefinition Height="Auto"/>
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <listView:PrsListView Grid.Row="0"
|
|
|
+ Repository="{Binding Model}"
|
|
|
+ FilterShell="PrsListView_FilterShell"
|
|
|
+ FiltersVisible="True">
|
|
|
+ <listView:PrsListView.ItemTemplate>
|
|
|
+ <DataTemplate DataType="prs:LeaveRequestShell">
|
|
|
+ <Button Classes="Standard" Background="{Binding .,Converter={x:Static local:LeaveRequestBackgroundConverter.Instance}}"
|
|
|
+ Command="{Binding $parent[local:MyHRLeaveRequestsView].((local:MyHRLeaveRequestsViewModel)DataContext).LeaveRequestClickedCommand}"
|
|
|
+ CommandParameter="{Binding .}"
|
|
|
+ Padding="5"
|
|
|
+ HorizontalContentAlignment="Stretch">
|
|
|
+ <Grid>
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="Auto"/>
|
|
|
+ <RowDefinition Height="Auto"/>
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="Auto"/>
|
|
|
+ <ColumnDefinition Width="*"/>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+
|
|
|
+ <Image Classes="Large"
|
|
|
+ Grid.Row="0" Grid.Column="0" Grid.RowSpan="2"
|
|
|
+ HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
|
+ Source="{Binding .,Converter={x:Static local:LeaveRequestImageConverter.Instance}}"/>
|
|
|
+
|
|
|
+ <DockPanel Grid.Row="0" Grid.Column="1">
|
|
|
+ <Label DockPanel.Dock="Right"
|
|
|
+ Content="{Binding ., Converter={x:Static local:LeaveRequestStatusConverter.Instance}}"
|
|
|
+ FontSize="{StaticResource PrsFontSizeExtraSmall}"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Foreground="Black"/>
|
|
|
+ <Label DockPanel.Dock="Left"
|
|
|
+ Content="{Binding TypeDescription}"
|
|
|
+ FontSize="{StaticResource PrsFontSizeExtraSmall}"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Foreground="Black"/>
|
|
|
+ </DockPanel>
|
|
|
+ <DockPanel Grid.Row="1" Grid.Column="1">
|
|
|
+ <Label DockPanel.Dock="Left"
|
|
|
+ Content="{Binding From, StringFormat='{}{0:dd/MM/yy}'}"
|
|
|
+ FontSize="{StaticResource PrsFontSizeExtraSmall}"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Foreground="Black"/>
|
|
|
+ <Label DockPanel.Dock="Left"
|
|
|
+ Content="{Binding FromTime, StringFormat='{}{0:hh\:mm}'}"
|
|
|
+ FontSize="{StaticResource PrsFontSizeExtraSmall}"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Foreground="Black"/>
|
|
|
+ <Label DockPanel.Dock="Right"
|
|
|
+ Content="{Binding To, StringFormat='{}{0:dd/MM/yy}'}"
|
|
|
+ FontSize="{StaticResource PrsFontSizeExtraSmall}"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Foreground="Black"/>
|
|
|
+ <Label DockPanel.Dock="Right"
|
|
|
+ Content="{Binding ToTime, StringFormat='{}{0:hh\:mm}'}"
|
|
|
+ FontSize="{StaticResource PrsFontSizeExtraSmall}"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Foreground="Black"/>
|
|
|
+ </DockPanel>
|
|
|
+ </Grid>
|
|
|
+ </Button>
|
|
|
+ </DataTemplate>
|
|
|
+ </listView:PrsListView.ItemTemplate>
|
|
|
+ </listView:PrsListView>
|
|
|
+ <TabStrip Name="_tabList" Classes="Standard"
|
|
|
+ Grid.Row="1"
|
|
|
+ Margin="{StaticResource PrsControlSpacing}"
|
|
|
+ SelectedIndex="{Binding SelectedTab}">
|
|
|
+ <TabStripItem Content="Upcoming"/>
|
|
|
+ <TabStripItem Content="History"/>
|
|
|
+ </TabStrip>
|
|
|
+ </Grid>
|
|
|
+</UserControl>
|