117 lines
6.4 KiB
XML
117 lines
6.4 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
xmlns:models="clr-namespace:Jugenddienst_Stunden.ViewModels"
|
|
x:Class="Jugenddienst_Stunden.Views.StundenPage"
|
|
Title="{Binding Title}">
|
|
|
|
<ContentPage.BindingContext>
|
|
<models:StundenViewModel />
|
|
</ContentPage.BindingContext>
|
|
|
|
<ContentPage.Resources>
|
|
<FontImageSource x:Key="ToolbarIcon"
|
|
Glyph="+"
|
|
Size="22"
|
|
Color="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}"/>
|
|
</ContentPage.Resources>
|
|
|
|
<ContentPage.ToolbarItems>
|
|
<!--<ToolbarItem Text="Lade Liste" Command="{Binding RefreshListCommand}"/>-->
|
|
<ToolbarItem Text="Neuer Eintrag" IconImageSource="{StaticResource ToolbarIcon}" Command="{Binding NewEntryCommand}" />
|
|
|
|
</ContentPage.ToolbarItems>
|
|
|
|
<RefreshView x:Name="MyRefreshView" Command="{Binding RefreshCommand}" IsRefreshing="{Binding IsRefreshing}" Margin="10" Padding="10">
|
|
<VerticalStackLayout Spacing="10" Margin="10">
|
|
|
|
<Grid RowDefinitions="Auto" ColumnDefinitions="Auto,*" HeightRequest="50">
|
|
<DatePicker Grid.Column="0" MinimumDate="{Binding MinimumDate}"
|
|
MaximumDate="{Binding MaximumDate}"
|
|
Date="{Binding DateToday}" Format="dddd, d. MMMM yyyy" />
|
|
<Border Grid.Column="1" Margin="15,0,0,0" Padding="15,0,0,0" ToolTipProperties.Text="Tagessumme">
|
|
<Label Text="{Binding DayTotal,StringFormat='{}{0:HH:mm}'}" VerticalOptions="Center"></Label>
|
|
</Border>
|
|
</Grid>
|
|
|
|
<CollectionView
|
|
ItemsSource="{Binding DayTimes}"
|
|
x:Name="stundeItems" Margin="0"
|
|
HeightRequest="300"
|
|
SelectionMode="Single"
|
|
SelectionChangedCommand="{Binding SelectEntryCommand}"
|
|
SelectionChangedCommandParameter="{Binding Source={RelativeSource Self}, Path=SelectedItem}">
|
|
|
|
<CollectionView.ItemsLayout>
|
|
<LinearItemsLayout Orientation="Vertical" ItemSpacing="0" />
|
|
</CollectionView.ItemsLayout>
|
|
|
|
<CollectionView.ItemTemplate>
|
|
<DataTemplate>
|
|
<Grid Padding="5,10,5,0">
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup Name="CommonStates">
|
|
<VisualState Name="Normal">
|
|
<VisualState.Setters>
|
|
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource TransparentColor}}" />
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState Name="Selected">
|
|
<VisualState.Setters>
|
|
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource PrimaryDark}}" />
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
|
|
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
|
|
</Grid.ColumnDefinitions>
|
|
<HorizontalStackLayout Grid.Row="0" HorizontalOptions="FillAndExpand">
|
|
<Label Grid.Column="0" Text="{Binding begin}" />
|
|
<Label Text="bis" Padding="5,0,5,0" />
|
|
<Label Text="{Binding end}" />
|
|
<Label Text="{Binding GemeindeAktiv.Name}" Margin="10,0,0,0" />
|
|
<Label Text="{Binding ProjektAktiv.Name}" Margin="10,0,0,0" />
|
|
<Label Text="{Binding FreistellungAktiv.Id}" Margin="10,0,0,0" />
|
|
</HorizontalStackLayout>
|
|
|
|
<Label Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Text="{Binding description}" Padding="0,0,0,15"/>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</CollectionView.ItemTemplate>
|
|
|
|
</CollectionView>
|
|
|
|
<BoxView HeightRequest="1" />
|
|
|
|
<Button Text="{Binding LoadOverview}" Command="{Binding LoadDataCommand}" />
|
|
<Frame Padding="2" HeightRequest="125">
|
|
<Grid RowDefinitions="Auto,Auto,Auto,Auto,Auto,*" ColumnDefinitions="Auto,*" Margin="10,2">
|
|
<Label Grid.Row="0" Text="Soll:" />
|
|
<Label Grid.Row="1" Text="Summe:" />
|
|
<Label Grid.Row="2" Text="Differenz:" Margin="0,0,15,0" />
|
|
<BoxView Grid.Row="3" Grid.ColumnSpan="2" HeightRequest="1" Color="LightGrey" Margin="0,5"/>
|
|
<Label Grid.Row="4" Text="Restüberstunden:" />
|
|
<Label Grid.Row="5" Text="Resturlaub:" />
|
|
|
|
|
|
<Label Grid.Row="0" Grid.Column="1" HorizontalTextAlignment="End" Padding="0,0,5,0" Text="{Binding Nominal}" ToolTipProperties.Text="Sollstunden" />
|
|
<Label Grid.Row="1" Grid.Column="1" HorizontalTextAlignment="End" Padding="0,0,5,0" Text="{Binding ZeitCalculated}" ToolTipProperties.Text="Geleistete Stunden" />
|
|
<Label Grid.Row="2" Grid.Column="1" HorizontalTextAlignment="End" Padding="0,0,5,0" Text="{Binding OvertimeMonth}" />
|
|
<Label Grid.Row="4" Grid.Column="1" HorizontalTextAlignment="End" Padding="0,0,5,0" Text="{Binding Overtime}" />
|
|
<Label Grid.Row="5" Grid.Column="1" HorizontalTextAlignment="End" Padding="0,0,5,0" Text="{Binding Holiday}" />
|
|
</Grid>
|
|
</Frame>
|
|
|
|
|
|
</VerticalStackLayout>
|
|
|
|
</RefreshView>
|
|
</ContentPage> |