Übetsetzung aller Benutzerseiten hinzugefügt

This commit is contained in:
2026-02-17 11:51:52 +01:00
parent e50f578547
commit 94479d259c
11 changed files with 980 additions and 76 deletions

View File

@@ -2,6 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
xmlns:properties="clr-namespace:SkyTeam"
Title="AdminDashboard"
Background="{DynamicResource PageBackground}">
@@ -19,8 +20,8 @@
<StackPanel Orientation="Horizontal">
<iconPacks:PackIconMaterial Kind="ShieldAccount" Width="36" Height="36" Foreground="White" Margin="0,0,10,0"/>
<StackPanel>
<TextBlock Text="Sky Team ADMIN" FontSize="20" FontWeight="Bold" Foreground="White"/>
<TextBlock Text="Management Console" FontSize="12" Foreground="White"/>
<TextBlock Text="{x:Static properties:Resources.AdminHeaderTitle}" FontSize="20" FontWeight="Bold" Foreground="White"/>
<TextBlock Text="{x:Static properties:Resources.AdminHeaderSubtitle}" FontSize="12" Foreground="White"/>
</StackPanel>
</StackPanel>
</Border>
@@ -29,19 +30,19 @@
<Button Height="50" Margin="5" Click="ShowUsers_Click">
<StackPanel Orientation="Horizontal">
<iconPacks:PackIconMaterial Kind="AccountGroup" Width="20" Margin="0,0,10,0"/>
<TextBlock Text="Benutzer verwalten"/>
<TextBlock Text="{x:Static properties:Resources.AdminSidebarManageUsers}"/>
</StackPanel>
</Button>
<Button Height="50" Margin="5" Click="ShowFlights_Click">
<StackPanel Orientation="Horizontal">
<iconPacks:PackIconMaterial Kind="Airplane" Width="20" Margin="0,0,10,0"/>
<TextBlock Text="Flüge verwalten"/>
<TextBlock Text="{x:Static properties:Resources.AdminSidebarManageFlights}"/>
</StackPanel>
</Button>
<Button Height="50" Margin="5" Background="#FFEBEB" BorderBrush="#FFB71C1C" Foreground="#D32F2F" FontWeight="Bold" Click="Logout_Click">
<StackPanel Orientation="Horizontal">
<iconPacks:PackIconMaterial Kind="Logout" Width="20" Margin="0,0,10,0"/>
<TextBlock Text="Abmelden"/>
<TextBlock Text="{x:Static properties:Resources.AdminSidebarLogout}"/>
</StackPanel>
</Button>
</StackPanel>
@@ -56,7 +57,7 @@
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBlock Text="Alle Benutzer" FontSize="24" FontWeight="Bold" Foreground="{DynamicResource PrimaryText}"/>
<TextBlock Text="{x:Static properties:Resources.AdminUsersTitle}" FontSize="24" FontWeight="Bold" Foreground="{DynamicResource PrimaryText}"/>
<DataGrid x:Name="AllUsersGrid" Grid.Row="1" Margin="0,10,0,20" AutoGenerateColumns="False" IsReadOnly="True" SelectionMode="Single" SelectionChanged="AllUsersGrid_SelectionChanged">
<DataGrid.Columns>
@@ -69,8 +70,8 @@
</DataGrid>
<StackPanel Grid.Row="2" Orientation="Horizontal" Margin="0,0,0,10">
<TextBlock Text="Buchungen des ausgewählten Benutzers" FontSize="18" FontWeight="Bold" Foreground="{DynamicResource PrimaryText}" VerticalAlignment="Center"/>
<Button Content="Benutzer Löschen" Background="#D32F2F" Foreground="White" FontWeight="Bold" Margin="20,0,0,0" Padding="10,5" Click="DeleteUser_Click"/>
<TextBlock Text="{x:Static properties:Resources.AdminUserBookingsTitle}" FontSize="18" FontWeight="Bold" Foreground="{DynamicResource PrimaryText}" VerticalAlignment="Center"/>
<Button Content="{x:Static properties:Resources.AdminDeleteUserButton}" Background="#D32F2F" Foreground="White" FontWeight="Bold" Margin="20,0,0,0" Padding="10,5" Click="DeleteUser_Click"/>
</StackPanel>
<DataGrid x:Name="UserBookingsGrid" Grid.Row="3" AutoGenerateColumns="False" IsReadOnly="True" Background="{DynamicResource CardBackground}">
@@ -91,7 +92,7 @@
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="Flugplan &amp; Management" FontSize="24" FontWeight="Bold" Foreground="{DynamicResource PrimaryText}" Margin="0,0,0,10"/>
<TextBlock Text="{x:Static properties:Resources.AdminFlightsTitle}" FontSize="24" FontWeight="Bold" Foreground="{DynamicResource PrimaryText}" Margin="0,0,0,10"/>
<DataGrid x:Name="AllFlightsGrid" Grid.Row="1" Margin="0,0,0,20" AutoGenerateColumns="False" IsReadOnly="True">
<DataGrid.Columns>
@@ -110,7 +111,7 @@
<Border Grid.Row="2" Background="{DynamicResource CardBackground}" CornerRadius="8" Padding="15" BorderBrush="#DDD" BorderThickness="1">
<StackPanel>
<TextBlock Text="Neuen Flug hinzufügen (ID wird generiert: SYJ-XXX)" FontWeight="Bold" Margin="0,0,0,10"/>
<TextBlock Text="{x:Static properties:Resources.AdminAddFlightTitle}" FontWeight="Bold" Margin="0,0,0,10"/>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
@@ -124,7 +125,8 @@
</Grid.RowDefinitions>
<StackPanel Margin="5">
<Label Content="Von:"/>
<Label Content="{Binding Source={x:Static properties:Resources.PrepositionVon}, StringFormat='{}{0}:'}"/>
<ComboBox x:Name="AddFromCombo" IsEditable="True">
<ComboBoxItem Content="Berlin"/>
<ComboBoxItem Content="München"/>
@@ -146,7 +148,7 @@
</StackPanel>
<StackPanel Grid.Column="1" Margin="5">
<Label Content="Nach:"/>
<Label Content="{Binding Source={x:Static properties:Resources.To}, StringFormat='{}{0}:'}"/>
<ComboBox x:Name="AddToCombo" IsEditable="True">
<ComboBoxItem Content="Mallorca"/>
<ComboBoxItem Content="Berlin"/>
@@ -170,24 +172,24 @@
</StackPanel>
<StackPanel Grid.Column="2" Margin="5">
<Label Content="Datum:"/>
<Label Content="{Binding Source={x:Static properties:Resources.DateLabel}, StringFormat='{}{0}:'}"/>
<DatePicker x:Name="AddDatePick"/>
</StackPanel>
<StackPanel Grid.Column="3" Margin="5">
<Label Content="Preis (€):"/>
<Label Content="{Binding Source={x:Static properties:Resources.PriceLabel}, StringFormat='{}{0}:'}"/>
<TextBox x:Name="AddPriceTxt"/>
</StackPanel>
<StackPanel Grid.Row="1" Grid.Column="0" Margin="5">
<Label Content="Flugzeug:"/>
<Label Content="{Binding Source={x:Static properties:Resources.PlaneLabel}, StringFormat='{}{0}:'}"/>
<ComboBox x:Name="PlaneCombo" DisplayMemberPath="Modell" SelectedValuePath="Id"/>
</StackPanel>
<StackPanel Grid.Row="1" Grid.Column="1" Margin="5">
<Label Content="Pilot:"/>
<Label Content="{Binding Source={x:Static properties:Resources.PilotLabel}, StringFormat='{}{0}:'}"/>
<ComboBox x:Name="PilotCombo" DisplayMemberPath="FullName" SelectedValuePath="Id"/>
</StackPanel>
<Button Grid.Row="1" Grid.Column="3" Content="Flug Erstellen" Background="#1E88E5" Foreground="White" FontWeight="Bold" VerticalAlignment="Bottom" Height="30" Margin="5" Click="AddFlight_Click"/>
<Button Grid.Row="1" Grid.Column="3" Content="{x:Static properties:Resources.AdminCreateFlightButton}" Background="#1E88E5" Foreground="White" FontWeight="Bold" VerticalAlignment="Bottom" Height="30" Margin="5" Click="AddFlight_Click"/>
</Grid>
</StackPanel>
</Border>