Files
lagerprogramm/Views/DeductionSearchDialog.axaml
joel.leirer fb1f90a9ca Added Slop
2026-08-25 17:14:54 +02:00

25 lines
1.5 KiB
XML

<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:Lagerprogramm.ViewModels"
xmlns:m="using:Lagerprogramm.Models"
x:Class="Lagerprogramm.Views.DeductionSearchDialog"
x:DataType="vm:DeductionSearchDialogViewModel"
Title="Search Deductions" Width="800" Height="600" Background="{StaticResource ThemeBackgroundBrush}"
WindowStartupLocation="CenterOwner">
<Grid RowDefinitions="Auto,*" Margin="10" Background="{StaticResource ThemeBackgroundBrush}">
<TextBox Grid.Row="0" Background="{StaticResource ThemeSurfaceBrush}" Text="{Binding SearchText}" Foreground="{StaticResource ThemeForegroundBrush}" PlaceholderText="Fuzzy search..." Margin="0,0,0,10"/>
<ListBox Grid.Row="1" Background="{StaticResource ThemeSurfaceBrush}" ItemsSource="{Binding FilteredDeductions}" SelectedItem="{Binding SelectedDeduction}" DoubleTapped="OnDoubleTapped" x:Name="DeductionListBox">
<ListBox.ItemTemplate>
<DataTemplate x:DataType="m:Deduction">
<StackPanel>
<TextBlock Text="{Binding Date, StringFormat='{}{0:yyyy-MM-dd HH:mm}'}" Classes="subheader"/>
<TextBlock Text="{Binding Customer}" Classes="caption"/>
<TextBlock Text="{Binding Comment}" Classes="captionMedium"/>
<TextBlock Text="{Binding Lines.Count, StringFormat='{}{0} parts'}" Classes="captionMuted"/>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</Window>