Files
LehrerApp/LehrerApp.Desktop/Views/Groups/LinkExistingLessonDialog.axaml
T
adminandClaude Sonnet 5 94946ffefb
CI / build-and-test (push) Canceled after 0s
Stundenplan: verwaiste Stunden per "FixIt"-Button verknüpfen
Der Stundenplan erkennt eine Stunde nur über Datum+Stundennummer
(kein gespeichertes Verknüpfungsfeld). Per JSON-Import oder KI ohne
Stundenplan-Bezug angelegte Stunden ohne passende Stundennummer
tauchten dort nie auf - ein Klick auf den Termin bot nur "neu anlegen"
an und hätte eine Dublette erzeugt. Neuer Button im Anlegen-Dialog
sucht stattdessen nach einer passenden vorhandenen Stunde und hängt
sie auf den geklickten Termin um.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-02 21:27:06 +02:00

39 lines
1.9 KiB
XML

<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="clr-namespace:LehrerApp.Desktop.ViewModels.Groups"
x:Class="LehrerApp.Desktop.Views.Groups.LinkExistingLessonDialog"
x:DataType="vm:LinkExistingLessonDialogViewModel"
Title="Vorhandene Stunde verknüpfen"
Width="470" Height="360" MinWidth="420" MinHeight="320"
CanResize="False" WindowStartupLocation="CenterOwner">
<Grid RowDefinitions="*,Auto" Margin="24">
<StackPanel Grid.Row="0" Spacing="16">
<TextBlock Text="Vorhandene Stunde verknüpfen" Classes="dialogtitle"/>
<TextBlock Text="Mehrere Stunden kommen für diesen Termin infrage — bitte die passende auswählen."
FontSize="12" TextWrapping="Wrap" Opacity="0.75"/>
<StackPanel Spacing="5">
<TextBlock Text="Stunde" FontSize="12" Opacity="0.7"/>
<ComboBox ItemsSource="{Binding Options}" SelectedItem="{Binding SelectedOption}"
HorizontalAlignment="Stretch">
<ComboBox.ItemTemplate>
<DataTemplate x:DataType="vm:LessonLinkOption">
<StackPanel>
<TextBlock Text="{Binding Label}" FontWeight="SemiBold"/>
<TextBlock Text="{Binding Detail}" FontSize="11" Opacity="0.6"/>
</StackPanel>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</StackPanel>
<TextBlock Text="{Binding Error}" Foreground="Red" FontSize="11"
IsVisible="{Binding Error, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
</StackPanel>
<Grid Grid.Row="1" ColumnDefinitions="*,8,*" Margin="0,20,0,0">
<Button Grid.Column="0" Content="Abbrechen" HorizontalAlignment="Stretch" Click="OnCancel"/>
<Button Grid.Column="2" Content="Verknüpfen" HorizontalAlignment="Stretch" Click="OnSave"/>
</Grid>
</Grid>
</Window>