Files
HC_APTBS/Views/Dialogs/UserManageDialog.xaml
LucianoDev 0280a2fad1 feat: page-based navigation shell + Tests page wizard
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>
2026-04-18 13:11:34 +02:00

61 lines
3.2 KiB
XML

<Window x:Class="HC_APTBS.Views.Dialogs.UserManageDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="{DynamicResource Dialog.UserManage.Title}"
Height="360" Width="460"
ResizeMode="NoResize"
WindowStartupLocation="CenterOwner"
FontFamily="Ebrima"
Background="#FFEDEDED">
<DockPanel Margin="12">
<!-- ── Bottom bar: Close ─────────────────────────────────────────── -->
<StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal"
HorizontalAlignment="Right" Margin="0,12,0,0">
<Button Content="{DynamicResource Dialog.UserManage.Close}" Width="90" Height="26"
Command="{Binding CloseCommand}" IsCancel="True" IsDefault="True"/>
</StackPanel>
<!-- ── Action buttons under the grid ─────────────────────────────── -->
<StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal" Margin="0,8,0,0">
<Button Content="{DynamicResource Dialog.UserManage.Add}" Width="95" Height="26"
Margin="0,0,8,0" Command="{Binding AddCommand}"/>
<Button Content="{DynamicResource Dialog.UserManage.Remove}" Width="95" Height="26"
Margin="0,0,8,0" Command="{Binding RemoveCommand}"/>
<Button Content="{DynamicResource Dialog.UserManage.ChangePassword}" Width="140" Height="26"
Command="{Binding ChangePasswordCommand}"/>
</StackPanel>
<!-- ── User list ─────────────────────────────────────────────────── -->
<DataGrid x:Name="UsersGrid"
ItemsSource="{Binding Users}"
SelectedItem="{Binding SelectedUser, Mode=TwoWay}"
AutoGenerateColumns="False"
CanUserAddRows="False"
CanUserDeleteRows="False"
CanUserReorderColumns="False"
CanUserResizeRows="False"
IsReadOnly="True"
SelectionMode="Single"
HeadersVisibility="Column"
GridLinesVisibility="Horizontal">
<DataGrid.Columns>
<DataGridTemplateColumn Width="*">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{DynamicResource Dialog.UserManage.ColumnUsername}"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" VerticalAlignment="Center" Margin="6,0"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</DockPanel>
</Window>