ChronoFlow/ChronoFlow.View/Mitarbeiter/EmployeeTasksView.axaml
2025-06-21 11:32:41 +02:00

45 lines
2.4 KiB
XML

<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="clr-namespace:ChronoFlow.ViewModels.Mitarbeiter"
xmlns:converter="clr-namespace:ChronoFlow.View.Converter"
x:Class="ChronoFlow.View.Mitarbeiter.EmployeeTasksView">
<UserControl.Resources>
<converter:BoolToBrushConverter x:Key="BoolToBrushConverter"/>
</UserControl.Resources>
<ScrollViewer>
<StackPanel Margin="20" Spacing="10">
<TextBlock Text="Meine Aufgaben" FontSize="24" FontWeight="Bold"/>
<!-- 🟢 Der Hinweis kommt vor dem ItemsControl -->
<TextBlock Text="🎉 Du hast aktuell keine Aufgaben!"
FontSize="16"
FontStyle="Italic"
FontWeight="Medium"
HorizontalAlignment="Center"
IsVisible="{Binding HatKeineEintraege}"/>
<!-- 📝 Die eigentliche Aufgabenliste -->
<ItemsControl ItemsSource="{Binding Eintraege}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border BorderBrush="{Binding WurdeSeitLoginBearbeitet, Converter={StaticResource BoolToBrushConverter}}"
BorderThickness="1" CornerRadius="4" Padding="10" Margin="5">
<StackPanel Spacing="5">
<TextBlock Text="{Binding Projekt}" FontWeight="Bold"/>
<CheckBox Content="Erledigt" IsChecked="{Binding Erledigt}"/>
<TextBox Text="{Binding MitarbeiterKommentar}" Watermark="Kommentar hinzufügen..."/>
<TextBlock Text="{Binding Endzeit, StringFormat='Deadline: {0:dd.MM.yyyy}'}"
Foreground="{Binding PrioritaetsFarbe}"
FontWeight="Bold" FontSize="14"/>
</StackPanel>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<Button Content="Änderungen speichern" Command="{Binding SpeichereEintraegeCommand}"/>
<TextBlock Text="{Binding StatusText}" Foreground="Green" FontStyle="Italic"/>
</StackPanel>
</ScrollViewer>
</UserControl>