Files
cfs-Tracker/Views/QuickEntryPage.xaml
T
Djagor d11f0e46c0 Options fix
clean up and fixes

- Heute gefixt
- Code Cleanup

NotificationScheduleItemViewModel

-fixed NotificationScheduleItemViewModel for Windows compat

push implementation

Push fixes

Push benachrichtungen eingebaut
- Status bei push
- Push auch in background
- Toggle für symtome angepasst

push system change

exporter update

Optionen fix

- Optionen aufgeteilt auf 3 tabs
- Anpassungen haben jetzt Farbslider

Optimierung fix
2026-03-27 08:47:44 +01:00

226 lines
11 KiB
XML

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
x:Class="cfs_tracker.Views.QuickEntryPage"
x:Name="RootPage"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:viewModels="clr-namespace:cfs_tracker.ViewModels"
x:DataType="viewModels:QuickEntryViewModel"
Title="Eintrag"
BackgroundColor="{DynamicResource AppBackground}">
<ContentPage.Resources>
<Style x:Key="SymptomToggleBorderStyle" TargetType="Border">
<Setter Property="Padding" Value="12,10" />
<Setter Property="StrokeThickness" Value="1" />
<Setter Property="Stroke" Value="{DynamicResource Border}" />
<Setter Property="StrokeShape" Value="RoundRectangle 12" />
<Setter Property="BackgroundColor" Value="{DynamicResource ButtonPrimaryBackground}" />
<Style.Triggers>
<DataTrigger TargetType="Border"
Binding="{Binding IsSelected}"
Value="True">
<Setter Property="BackgroundColor" Value="{DynamicResource ButtonSecondaryBackground}" />
</DataTrigger>
</Style.Triggers>
</Style>
<Style x:Key="SymptomToggleLabelStyle" TargetType="Label">
<Setter Property="VerticalOptions" Value="Center" />
<Setter Property="TextColor" Value="{DynamicResource ButtonPrimaryText}" />
<Style.Triggers>
<DataTrigger TargetType="Label"
Binding="{Binding IsSelected}"
Value="True">
<Setter Property="TextColor" Value="{DynamicResource ButtonSecondaryText}" />
</DataTrigger>
</Style.Triggers>
</Style>
</ContentPage.Resources>
<ScrollView>
<VerticalStackLayout Padding="16" Spacing="16">
<Label Text="{Binding SelectedDateText}"
FontSize="20"
FontAttributes="Bold"
HorizontalTextAlignment="Center"
TextColor="{DynamicResource TextPrimary}" />
<Label Text="{Binding ModeText}"
IsVisible="{Binding IsFutureDate}"
HorizontalTextAlignment="Center"
TextColor="IndianRed" />
<Border Padding="12"
Stroke="{DynamicResource Border}"
BackgroundColor="{DynamicResource SurfaceBackground}"
StrokeShape="RoundRectangle 14"
IsVisible="{Binding IsPastDate}">
<VerticalStackLayout Spacing="8">
<Label Text="Nachtrag"
FontAttributes="Bold"
TextColor="{DynamicResource TextPrimary}" />
<Picker Title="Tageszeit"
ItemsSource="{Binding Parts}"
ItemDisplayBinding="{Binding Name, x:DataType={x:Null}}"
SelectedItem="{Binding SelectedPart}" />
</VerticalStackLayout>
</Border>
<Border Padding="12"
Stroke="{DynamicResource Border}"
BackgroundColor="{DynamicResource SurfaceBackground}"
StrokeShape="RoundRectangle 14">
<VerticalStackLayout Spacing="8">
<Label Text="Tätigkeit"
FontAttributes="Bold"
TextColor="{DynamicResource TextPrimary}" />
<Picker Title="Tätigkeit"
ItemsSource="{Binding Activities}"
ItemDisplayBinding="{Binding Name, x:DataType={x:Null}}"
SelectedItem="{Binding SelectedActivity}" />
<Label Text="Dauer (HH:mm)"
FontAttributes="Bold"
TextColor="{DynamicResource TextPrimary}" />
<TimePicker Time="{Binding ActivityDuration}"
Format="HH:mm" />
</VerticalStackLayout>
</Border>
<Border Padding="12"
Stroke="{DynamicResource Border}"
BackgroundColor="{DynamicResource SurfaceBackground}"
StrokeShape="RoundRectangle 14">
<VerticalStackLayout Spacing="8">
<Label Text="Symptome"
FontAttributes="Bold"
TextColor="{DynamicResource TextPrimary}" />
<VerticalStackLayout BindableLayout.ItemsSource="{Binding Symptoms}"
Spacing="8">
<BindableLayout.ItemTemplate>
<DataTemplate x:DataType="viewModels:SelectableSymptomItemViewModel">
<Border Padding="12,10"
StrokeThickness="1"
Stroke="{DynamicResource Border}"
StrokeShape="RoundRectangle 12"
BackgroundColor="{DynamicResource ButtonPrimaryBackground}">
<Border.GestureRecognizers>
<TapGestureRecognizer
Command="{Binding Source={x:Reference RootPage}, Path=BindingContext.ToggleSymptomCommand}"
CommandParameter="{Binding .}" />
</Border.GestureRecognizers>
<Border.Triggers>
<DataTrigger TargetType="Border"
Binding="{Binding IsSelected}"
Value="True">
<Setter Property="BackgroundColor"
Value="{DynamicResource ButtonSecondaryBackground}" />
</DataTrigger>
</Border.Triggers>
<Grid ColumnDefinitions="Auto,*"
ColumnSpacing="12">
<CheckBox IsChecked="{Binding IsSelected}"
InputTransparent="True"
Color="White"
VerticalOptions="Center" />
<Label Grid.Column="1"
Text="{Binding Name}"
VerticalOptions="Center"
TextColor="{DynamicResource ButtonPrimaryText}">
<Label.Triggers>
<DataTrigger TargetType="Label"
Binding="{Binding IsSelected}"
Value="True">
<Setter Property="TextColor"
Value="{DynamicResource ButtonSecondaryText}" />
</DataTrigger>
</Label.Triggers>
</Label>
</Grid>
</Border>
</DataTemplate>
</BindableLayout.ItemTemplate>
</VerticalStackLayout>
</VerticalStackLayout>
</Border>
<Grid ColumnDefinitions="*,*"
RowDefinitions="Auto,Auto"
ColumnSpacing="12"
RowSpacing="12">
<Button Grid.Row="0"
Grid.Column="0"
Text="{Binding GreenStatusText}"
FontSize="22"
FontAttributes="Bold"
HeightRequest="110"
BackgroundColor="{Binding GreenStateColor}"
TextColor="White"
Command="{Binding SaveGreenCommand}"
IsEnabled="{Binding CanSave}" />
<Button Grid.Row="0"
Grid.Column="1"
Text="{Binding YellowStatusText}"
FontSize="22"
FontAttributes="Bold"
HeightRequest="110"
BackgroundColor="{Binding YellowStateColor}"
TextColor="Black"
Command="{Binding SaveYellowCommand}"
IsEnabled="{Binding CanSave}" />
<Button Grid.Row="1"
Grid.Column="0"
Text="{Binding RedStatusText}"
FontSize="22"
FontAttributes="Bold"
HeightRequest="110"
BackgroundColor="{Binding RedStateColor}"
TextColor="White"
Command="{Binding SaveRedCommand}"
IsEnabled="{Binding CanSave}" />
<Button Grid.Row="1"
Grid.Column="1"
Text="{Binding GrayStatusText}"
FontSize="22"
FontAttributes="Bold"
HeightRequest="110"
BackgroundColor="{Binding GrayStateColor}"
TextColor="White"
Command="{Binding SaveGrayCommand}"
IsEnabled="{Binding CanSave}" />
</Grid>
<Border Padding="12"
IsVisible="{Binding ShowSaveButton}"
Stroke="{DynamicResource Border}"
BackgroundColor="{DynamicResource SurfaceBackground}"
StrokeShape="RoundRectangle 14">
<VerticalStackLayout Spacing="10">
<Label Text="{Binding SelectedStateSummaryText}"
HorizontalTextAlignment="Center"
TextColor="{DynamicResource TextPrimary}" />
<Button Text="Eintrag speichern"
Command="{Binding SaveCommand}"
IsEnabled="{Binding CanExplicitSave}"
Style="{StaticResource PrimaryButtonStyle}"
HorizontalOptions="Fill" />
</VerticalStackLayout>
</Border>
<Button Text="Abbrechen"
Command="{Binding CancelCommand}"
Style="{StaticResource SecondaryButtonStyle}"
HorizontalOptions="Fill" />
</VerticalStackLayout>
</ScrollView>
</ContentPage>