Replace the monolithic MainWindow with a SelectedPage-driven shell (Dashboard / Pump / Bench / Tests / Results / Settings). The Tests page gets the Plan -> Preconditions -> Running -> Done wizard from ui-structure.md \u00a74, backed by a 7-item precondition gate and shared sub-views (PhaseCardView / TestSectionView / GraphicIndicatorView) extracted from the now-deleted monolithic TestPanelView. New VMs / views: - Tests wizard: TestPreconditions, PhaseCard, GraphicIndicator, TestSection, TestPlan, TestRunning, TestDone - Dashboard panels: DashboardConnection, DashboardReadings, DashboardAlarms, InterlockBanner, ResultHistory - Pump / bench panels: PumpIdentificationPanel, PumpLiveData, UnlockPanel, BenchDriveControl, BenchReadings, RelayBank, TemperatureControl, DtcList, AuthGate - Dialogs: generic ConfirmDialog, UserManageDialog, UserPromptDialog Supporting changes: - IsOilPumpOn exposed on MainViewModel for precondition evaluation - RequiresAuth added to TestDefinition (XML round-trip) - BipStatusDefinition + CompletedTestRun models - ~35 new Test.* localization keys (en + es) - Settings moved from modal dialog to full page - Pause / Retry / Skip stubs in TestRunningView; full spec in docs/gap-test-running-controls.md for follow-up implementation - docs/ui-structure.md captures the wizard design Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
125 lines
7.7 KiB
XML
125 lines
7.7 KiB
XML
<Window x:Class="HC_APTBS.Views.Dialogs.ReportDialog"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
mc:Ignorable="d"
|
|
Title="{DynamicResource Dialog.Report.Title}"
|
|
Height="450" Width="800"
|
|
ResizeMode="NoResize"
|
|
WindowStartupLocation="CenterOwner">
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/> <!-- Section labels row -->
|
|
<RowDefinition Height="Auto"/> <!-- Name row -->
|
|
<RowDefinition Height="130"/> <!-- Info text -->
|
|
<RowDefinition Height="120"/> <!-- Observations / operator -->
|
|
<RowDefinition Height="Auto"/> <!-- Buttons -->
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="180"/> <!-- Client list -->
|
|
<ColumnDefinition Width="1*"/> <!-- Client data -->
|
|
<ColumnDefinition Width="1*"/> <!-- Company data -->
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- ── Column separators ───────────────────────────────────────────── -->
|
|
<Border BorderBrush="DarkGray" BorderThickness="1,0,0,0"
|
|
Grid.Column="2" Grid.RowSpan="5" Margin="-3,10,0,0"/>
|
|
|
|
<!-- ── Section headers ─────────────────────────────────────────────── -->
|
|
<TextBlock Text="{DynamicResource Dialog.Report.ClientList}" FontSize="14" FontWeight="SemiBold"
|
|
HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,10"/>
|
|
<TextBlock Grid.Column="1" Text="{DynamicResource Dialog.Report.ClientData}" FontSize="20" FontWeight="SemiBold"
|
|
HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,10"/>
|
|
<TextBlock Grid.Column="2" Text="{DynamicResource Dialog.Report.CompanyData}" FontSize="20" FontWeight="SemiBold"
|
|
HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,10"/>
|
|
|
|
<!-- ── Client list ─────────────────────────────────────────────────── -->
|
|
<ListBox Grid.Row="1" Grid.RowSpan="3" Margin="10,0"
|
|
ItemsSource="{Binding ClientNames}"
|
|
SelectedItem="{Binding SelectedClientName}"/>
|
|
|
|
<!-- ── Client name (editable ComboBox) ─────────────────────────────── -->
|
|
<Grid Grid.Column="1" Grid.Row="1" Margin="8,6">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Label Content="{DynamicResource Dialog.Report.Name}" VerticalAlignment="Center" FontSize="13"/>
|
|
<ComboBox Grid.Column="1" IsEditable="True"
|
|
ItemsSource="{Binding ClientNames}"
|
|
Text="{Binding SelectedClientName, UpdateSourceTrigger=PropertyChanged}"
|
|
VerticalAlignment="Center" FontSize="13" Margin="4,0"/>
|
|
<Button Grid.Column="2" Content="{DynamicResource Common.Save}" Width="60" Height="24"
|
|
Command="{Binding SaveClientCommand}"/>
|
|
</Grid>
|
|
|
|
<!-- ── Client info text ─────────────────────────────────────────────── -->
|
|
<GroupBox Grid.Column="1" Grid.Row="2" Header="{DynamicResource Dialog.Report.ClientInfo}"
|
|
Margin="8,0,8,4" FontSize="13">
|
|
<TextBox Text="{Binding ClientInfo, UpdateSourceTrigger=PropertyChanged}"
|
|
TextWrapping="Wrap" AcceptsReturn="True"
|
|
BorderBrush="{x:Null}" FontSize="12"/>
|
|
</GroupBox>
|
|
|
|
<!-- ── Observations ─────────────────────────────────────────────────── -->
|
|
<GroupBox Grid.Column="1" Grid.Row="3" Header="{DynamicResource Dialog.Report.Observations}"
|
|
Margin="8,0,8,4" FontSize="13">
|
|
<TextBox Text="{Binding Observations, UpdateSourceTrigger=PropertyChanged}"
|
|
TextWrapping="Wrap" AcceptsReturn="True"
|
|
BorderBrush="{x:Null}" FontSize="12"/>
|
|
</GroupBox>
|
|
|
|
<!-- ── Operator name ────────────────────────────────────────────────── -->
|
|
<Grid Grid.Column="2" Grid.Row="1" Margin="8,6">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition/>
|
|
</Grid.ColumnDefinitions>
|
|
<Label Content="{DynamicResource Dialog.Report.Operator}" VerticalAlignment="Center" FontSize="13"/>
|
|
<TextBox Grid.Column="1" Text="{Binding OperatorName, UpdateSourceTrigger=PropertyChanged}"
|
|
VerticalAlignment="Center" FontSize="13" Margin="4,0" Height="24"
|
|
IsReadOnly="True" Background="#F0F0F0"/>
|
|
</Grid>
|
|
|
|
<!-- ── Company name ─────────────────────────────────────────────────── -->
|
|
<Grid Grid.Column="2" Grid.Row="2" Margin="8,0,8,4" VerticalAlignment="Top">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition/>
|
|
</Grid.ColumnDefinitions>
|
|
<Label Content="{DynamicResource Dialog.Report.Company}" VerticalAlignment="Center" FontSize="13"/>
|
|
<TextBox Grid.Column="1" Text="{Binding CompanyName, UpdateSourceTrigger=PropertyChanged}"
|
|
VerticalAlignment="Center" FontSize="13" Margin="4,0" Height="24"/>
|
|
</Grid>
|
|
<GroupBox Grid.Row="1" Header="{DynamicResource Dialog.Report.CompanyInfo}"
|
|
Margin="0,4,0,0" FontSize="13">
|
|
<TextBox Text="{Binding CompanyInfo, UpdateSourceTrigger=PropertyChanged}"
|
|
TextWrapping="Wrap" AcceptsReturn="True"
|
|
BorderBrush="{x:Null}" FontSize="12"/>
|
|
</GroupBox>
|
|
</Grid>
|
|
|
|
<!-- ── Buttons row ──────────────────────────────────────────────────── -->
|
|
<Button Grid.Row="4" Grid.Column="0"
|
|
Content="{DynamicResource Dialog.Report.DeleteClient}" Padding="6,2" Margin="10,8,0,8"
|
|
HorizontalAlignment="Left"
|
|
Command="{Binding DeleteClientCommand}"/>
|
|
|
|
<StackPanel Grid.Row="4" Grid.Column="2"
|
|
Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,8,10,8">
|
|
<Button Content="{DynamicResource Dialog.Report.Generate}" Width="80" Height="24" Margin="0,0,8,0"
|
|
Command="{Binding AcceptCommand}"/>
|
|
<Button Content="{DynamicResource Common.Cancel}" Width="80" Height="24"
|
|
Command="{Binding CancelCommand}"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Window>
|