Kompetenzen fast fertig

This commit is contained in:
admin committed 2026-08-16 02:32:12 +02:00
1 parent 7c7fe6dfcb
commit 4437f951d9
22 files changed
+979 -29

No files matched your search

@@ -93,6 +93,30 @@ public partial class SettingsView : UserControl
await File.WriteAllTextAsync(file.Path.LocalPath, json);
}
private async void OnCopyCatalogClick(object? sender, RoutedEventArgs e)
{
if (DataContext is not SettingsViewModel { CatalogSubject: not null } vm) return;
var owner = TopLevel.GetTopLevel(this) as Window;
if (owner is null) return;
var targetDialog = new CompetencyCatalogCopyTargetDialog
{
DataContext = new CompetencyCatalogCopyTargetViewModel(
vm.CatalogSubject.Name, vm.CatalogGradeLevel),
};
var targetGradeLevel = await targetDialog.ShowDialog<int?>(owner);
if (targetGradeLevel is null) return;
var preview = vm.PrepareCatalogCopy(targetGradeLevel.Value);
if (preview is null) return;
var previewDialog = new CompetencyCatalogImportDialog
{
DataContext = new CompetencyCatalogImportViewModel(vm, preview, "Kopie prüfen"),
};
if (await previewDialog.ShowDialog<bool>(owner))
vm.SetCatalogCopyStatus(targetGradeLevel.Value);
}
private async void OnEditGradingKeyTemplateClick(object? sender, RoutedEventArgs e)
{
if (sender is not Button { Tag: GradingKeyTemplateEditItem item }) return;