Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/+strahlenschutz-ueberwachung.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A Trupp-Typ marked "Strahlenschutz" in the Stammdaten records the OSL-Dosimeter, Alarmdosimeter, Maske and PA numbers of every Einsatzkraft before IM EINSATZ and the Alarmdosimeter Ablesewert in mSv or µSv, which may follow late from the Dekon-Platz but must be entered, or the dosimeter confirmed as nicht vorhanden, before the Einsatz can be closed (#994).
2 changes: 1 addition & 1 deletion docs/master-data.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
{ "name": "Wassertrupp", "memberCount": 2, "maxDurationMinutes": 30 },
{ "name": "Schlauchtrupp", "memberCount": 2, "maxDurationMinutes": 30 },
{ "name": "CSA-Trupp", "memberCount": 3, "maxDurationMinutes": 20, "namedByNumber": true },
{ "name": "Strahlenschutztrupp", "memberCount": 3, "maxDurationMinutes": 30 },
{ "name": "Strahlenschutztrupp", "memberCount": 3, "maxDurationMinutes": 30, "radiationMonitoring": true },
{ "name": "LPA-Trupp", "memberCount": 2, "maxDurationMinutes": 60 }
],
"checklists": [
Expand Down
17 changes: 17 additions & 0 deletions docs/master-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,23 @@ A Trupp is never fewer than two people and never more than three: the
Atemschutzüberwachung has exactly three positions (Truppführer, Truppmann,
2. Truppmann) and nowhere to write a fourth name.

Two switches on the row change how a Trupp of that type is handled, again by the
row and never by its name:

- **Nummer** (`namedByNumber`): the Trupp is called by a number rather than a
vehicle's Funkrufname. The form asks for the number and names the Trupp
"CSA-Trupp 1" (#995).
- **Strahlenschutz** (`radiationMonitoring`): the Trupp is under
Strahlenschutzüberwachung (#994). Every Einsatzkraft gets OSL-Dosimeter,
Alarmdosimeter, Maske and PA numbers, and the Trupp cannot go under
Atemschutz before both dosimeters are numbered or confirmed as nicht
vorhanden. The Alarmdosimeter's Ablesewert may come in late from the
Dekon-Platz, but the Einsatz cannot be closed before it is entered or the
dosimeter is confirmed as nicht vorhanden.

A Trupp copies both switches when it is registered, so a row edited later does
not change a Trupp already in an Einsatz.

There is no separate list of brigades (Wachen) or radio call signs
(Funkrufnamen): both are derived from the **vehicles** — every vehicle's Wache
becomes a brigade suggestion, and every vehicle's call sign (plus every roster
Expand Down
Binary file modified docs/samples/uebung.lagebuch
Binary file not shown.
4 changes: 4 additions & 0 deletions src/LageBuch.App.Shared/Views/IncidentWorkspaceView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -1104,5 +1104,9 @@
<!-- Correct or hand over a Funktion already held: FÜHRUNG's Führungsunterstützung, FUNKTIONEN's BEARBEITEN -->
<ContentControl Content="{Binding PendingRoleAssignmentDialog}"
IsVisible="{Binding PendingRoleAssignmentDialog, Converter={x:Static ObjectConverters.IsNotNull}}" />

<!-- Strahlenschutz of a Strahlenschutztrupp (#994), from its row in ATEMSCHUTZ -->
<ContentControl Content="{Binding PendingRadiationDialog}"
IsVisible="{Binding PendingRadiationDialog, Converter={x:Static ObjectConverters.IsNotNull}}" />
</Panel>
</UserControl>
13 changes: 10 additions & 3 deletions src/LageBuch.App.Shared/Views/MasterDataEditorView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -1400,20 +1400,22 @@
HorizontalAlignment="Left" Margin="0,12,0,0" Command="{Binding AddCommand}" />
<!-- A fixed trailing width matching the row template's icon-btn button, as in the
Fahrzeuge template above: "Auto" would size to this Grid's own empty content. -->
<Grid DockPanel.Dock="Top" ColumnDefinitions="*,110,150,90,32" Margin="0,0,0,6">
<Grid DockPanel.Dock="Top" ColumnDefinitions="*,110,150,90,130,32" Margin="0,0,0,6">
<TextBlock Grid.Column="0" Text="TYP" Classes="overline" FontSize="10" />
<TextBlock Grid.Column="1" Text="STÄRKE" Classes="overline" FontSize="10"
ToolTip.Tip="Personen im Trupp: 2, oder 3 mit zweitem Truppmann" />
<TextBlock Grid.Column="2" Text="EINSATZZEIT" Classes="overline" FontSize="10"
ToolTip.Tip="Vorgeschlagene Einsatzzeit bei der Anmeldung" />
<TextBlock Grid.Column="3" Text="NUMMER" Classes="overline" FontSize="10"
ToolTip.Tip="Funkrufname aus Nummer, z. B. „CSA-Trupp 1“" />
<TextBlock Grid.Column="4" Text="STRAHLENSCHUTZ" Classes="overline" FontSize="10"
ToolTip.Tip="Dosimeter, Maske und PA je Einsatzkraft erfassen, Ablesewert vor Einsatzende" />
</Grid>
<ScrollViewer>
<ItemsControl ItemsSource="{Binding Rows}" b:FocusNewItem.IsEnabled="True">
<ItemsControl.ItemTemplate>
<DataTemplate x:DataType="vm:TruppTypeRow">
<Grid ColumnDefinitions="*,110,150,90,32" Margin="0,0,0,6">
<Grid ColumnDefinitions="*,110,150,90,130,32" Margin="0,0,0,6">
<TextBox Grid.Column="0" Margin="0,0,6,0" Text="{Binding Name}"
PlaceholderText="Angriffstrupp" />
<!-- Bounds are bound, not written in: a Trupp has as many positions as
Expand All @@ -1432,9 +1434,14 @@
VerticalAlignment="Center"
ToolTip.Tip="Funkrufname aus Nummer, z. B. „CSA-Trupp 1“"
AutomationProperties.Name="Funkrufname aus Nummer" />
<!-- #994: Strahlenschutzüberwachung for this Trupp-Typ. -->
<CheckBox Grid.Column="4" IsChecked="{Binding RadiationMonitoring}"
VerticalAlignment="Center"
ToolTip.Tip="Dosimeter, Maske und PA je Einsatzkraft erfassen, Ablesewert vor Einsatzende"
AutomationProperties.Name="Strahlenschutz" />
<!-- ReflectionBinding: see the Fahrzeuge template for why a compiled
$parent path cannot resolve here. -->
<Button Grid.Column="4" Classes="icon-btn" Margin="4,0,0,0" ToolTip.Tip="Entfernen"
<Button Grid.Column="5" Classes="icon-btn" Margin="4,0,0,0" ToolTip.Tip="Entfernen"
AutomationProperties.Name="Entfernen"
Command="{ReflectionBinding $parent[ItemsControl].DataContext.RemoveCommand}"
CommandParameter="{Binding}">
Expand Down
124 changes: 124 additions & 0 deletions src/LageBuch.App.Shared/Views/RadiationDialogView.axaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:b="clr-namespace:LageBuch.App.Shared.Behaviors"
xmlns:vm="clr-namespace:LageBuch.AppLogic.ViewModels;assembly=LageBuch.AppLogic"
x:Class="LageBuch.App.Shared.Views.RadiationDialogView"
x:DataType="vm:RadiationDialogViewModel">
<!-- The Strahlenschutzüberwachung of one Strahlenschutztrupp (#994): one block per crew member.
The person dialogs' shell (MaxWidth, Stretch, 16px scrim inset) so it shrinks onto a phone,
and a WrapPanel per block so the five fields stack there instead of running off the card. -->
<Border Background="#B3070A10" Padding="16"
b:Overlay.CancelCommand="{Binding CancelCommand}" b:Overlay.PrimaryCommand="{Binding SaveCommand}">
<Border x:Name="RadiationDialogCard" MaxWidth="760" VerticalAlignment="Center" HorizontalAlignment="Stretch"
Background="{StaticResource SurfaceRaisedBrush}"
BorderBrush="{StaticResource HairlineBrush}" BorderThickness="1"
CornerRadius="{StaticResource RadiusLg}"
BoxShadow="{StaticResource OverlayShadow}">
<DockPanel>
<Border DockPanel.Dock="Top" Height="4" Background="{StaticResource SignalGradientBrush}"
CornerRadius="12,12,0,0" />
<ScrollViewer VerticalScrollBarVisibility="Auto">
<StackPanel Margin="26,22,26,24" Spacing="14">
<TextBlock x:Name="RadiationDialogTitle" Text="{Binding Title}" Classes="display" FontSize="20"
TextWrapping="Wrap" />
<ItemsControl x:Name="RadiationMembers" ItemsSource="{Binding Members}">
<ItemsControl.ItemTemplate>
<DataTemplate x:DataType="vm:RadiationMemberRow">
<StackPanel Margin="0,0,0,14" Spacing="6">
<TextBlock Classes="overline">
<Run Text="{Binding Name}" />
<Run Text=" · " />
<Run Text="{Binding RoleDisplay}" />
</TextBlock>
<WrapPanel Orientation="Horizontal" ItemSpacing="12" LineSpacing="8">
<!-- A dosimeter is either numbered or declared missing; the declaration
asks first and then stands in for the box, so the gap is visible. -->
<HeaderedContentControl Classes="field" Header="OSL-DOSIMETER">
<StackPanel Spacing="4">
<TextBox Classes="mono" Width="130" Text="{Binding OslNumber}"
MaxLength="{Binding MaxNumberLength}"
AutomationProperties.Name="OSL-Dosimeter Nummer" />
<Button Classes="ghost" Padding="4,2" FontSize="11" Content="nicht vorhanden"
IsVisible="{Binding OslPresent}" Command="{Binding DeclareOslMissingCommand}"
AutomationProperties.Name="OSL-Dosimeter nicht vorhanden" />
<Button Classes="ghost" Padding="4,2" FontSize="11" FontWeight="SemiBold"
Foreground="{StaticResource AmberBrush}" Content="NICHT VORHANDEN · rückgängig"
IsVisible="{Binding OslMissing}" Command="{Binding UndoOslMissingCommand}"
AutomationProperties.Name="OSL-Dosimeter wieder vorhanden" />
</StackPanel>
</HeaderedContentControl>
<HeaderedContentControl Classes="field" Header="ALARMDOSIMETER">
<StackPanel Spacing="4">
<TextBox Classes="mono" Width="130" Text="{Binding AlarmNumber}"
MaxLength="{Binding MaxNumberLength}"
AutomationProperties.Name="Alarmdosimeter Nummer" />
<Button Classes="ghost" Padding="4,2" FontSize="11" Content="nicht vorhanden"
IsVisible="{Binding AlarmPresent}" Command="{Binding DeclareAlarmMissingCommand}"
AutomationProperties.Name="Alarmdosimeter nicht vorhanden" />
<Button Classes="ghost" Padding="4,2" FontSize="11" FontWeight="SemiBold"
Foreground="{StaticResource AmberBrush}" Content="NICHT VORHANDEN · rückgängig"
IsVisible="{Binding AlarmMissing}" Command="{Binding UndoAlarmMissingCommand}"
AutomationProperties.Name="Alarmdosimeter wieder vorhanden" />
</StackPanel>
</HeaderedContentControl>
<HeaderedContentControl Classes="field" Header="MASKE">
<TextBox Classes="mono" Width="100" Text="{Binding MaskNumber}"
MaxLength="{Binding MaxNumberLength}"
AutomationProperties.Name="Maske Nummer" />
</HeaderedContentControl>
<HeaderedContentControl Classes="field" Header="PA">
<TextBox Classes="mono" Width="100" Text="{Binding PaNumber}"
MaxLength="{Binding MaxNumberLength}"
AutomationProperties.Name="PA Nummer" />
</HeaderedContentControl>
<!-- Value and unit as the display showed them, mSv preselected. Disabled for
a missing Alarmdosimeter: there is nothing to read off. -->
<HeaderedContentControl Classes="field" Header="ABLESEWERT"
IsEnabled="{Binding AlarmPresent}">
<StackPanel Spacing="4">
<StackPanel Orientation="Horizontal" Spacing="6">
<TextBox Classes="mono" Width="90" Text="{Binding DoseText}" MaxLength="12"
PlaceholderText="z. B. 0,12"
AutomationProperties.Name="Ablesewert Alarmdosimeter" />
<ComboBox Width="80" ItemsSource="{Binding UnitOptions}"
SelectedItem="{Binding DoseUnitLabel}"
AutomationProperties.Name="Einheit" />
</StackPanel>
<TextBlock Classes="field-error" TextWrapping="Wrap" Text="{Binding DoseError}"
IsVisible="{Binding DoseError, Converter={x:Static ObjectConverters.IsNotNull}}" />
</StackPanel>
</HeaderedContentControl>
</WrapPanel>
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<!-- The confirmation a missing dosimeter needs (#994), inside the card rather than a
second overlay, so the rows it is about stay in sight. -->
<Border x:Name="MissingWarningPanel" IsVisible="{Binding IsMissingPending}"
Background="{StaticResource AmberWashBrush}" BorderBrush="{StaticResource AmberBrush}"
BorderThickness="1" CornerRadius="{StaticResource RadiusMd}" Padding="14">
<StackPanel Spacing="10">
<TextBlock Text="{Binding MissingWarning}" TextWrapping="Wrap" FontWeight="SemiBold" />
<StackPanel Orientation="Horizontal" Spacing="10">
<Button x:Name="ConfirmMissingButton" Classes="signal" Content="NICHT VORHANDEN"
Command="{Binding ConfirmMissingCommand}" />
<Button x:Name="CancelMissingButton" Content="ABBRECHEN" Command="{Binding CancelMissingCommand}" />
</StackPanel>
</StackPanel>
</Border>
<TextBlock x:Name="RadiationDialogSaveError" Classes="field-error" TextWrapping="Wrap"
Text="{Binding SaveError}"
IsVisible="{Binding SaveError, Converter={x:Static ObjectConverters.IsNotNull}}" />
<!-- Left, primary first (#694). -->
<StackPanel Orientation="Horizontal" Spacing="10" HorizontalAlignment="Left">
<Button x:Name="RadiationDialogSaveButton" Classes="signal" Content="SPEICHERN"
Command="{Binding SaveCommand}" />
<Button x:Name="RadiationDialogCancelButton" Content="ABBRECHEN" Command="{Binding CancelCommand}" />
</StackPanel>
</StackPanel>
</ScrollViewer>
</DockPanel>
</Border>
</Border>
</UserControl>
9 changes: 9 additions & 0 deletions src/LageBuch.App.Shared/Views/RadiationDialogView.axaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using Avalonia.Controls;

namespace LageBuch.App.Shared.Views;

// Focus, Esc and focus return come from b:Overlay on the root (#538).
public partial class RadiationDialogView : UserControl
{
public RadiationDialogView() => InitializeComponent();
}
15 changes: 15 additions & 0 deletions src/LageBuch.App.Shared/Views/ScbaView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,21 @@
<TextBlock x:Name="SafetyTruppHintText" Text="{Binding SafetyTruppHint}"
FontSize="11" FontWeight="SemiBold" Foreground="{StaticResource AmberBrush}"
TextWrapping="Wrap" IsVisible="{Binding HasSafetyTruppHint}" />
<!-- #994: a Strahlenschutztrupp's dosimeters, Maske, PA and Ablesewerte live in
their own dialog: twelve fields for a three-person Trupp would swamp the
row and the Bereitstellen form. Below the Sicherheitstrupp, for the same
reason that is: rows have height to spare, not width. The amber line says
what is still owed: the numbers before IM EINSATZ, the Ablesewert before
the Einsatz can be closed. -->
<Button x:Name="RadiationButton" Margin="0,4,0,0" Padding="8,4" FontSize="12"
HorizontalAlignment="Stretch" HorizontalContentAlignment="Left"
IsVisible="{Binding IsRadiationMonitored}"
Command="{Binding OpenRadiationCommand}"
ToolTip.Tip="Dosimeter, Maske, PA und Ablesewerte"
AutomationProperties.Name="Strahlenschutz" Content="Strahlenschutz" />
<TextBlock x:Name="RadiationHintText" Text="{Binding RadiationHint}"
FontSize="11" FontWeight="SemiBold" Foreground="{StaticResource AmberBrush}"
TextWrapping="Wrap" IsVisible="{Binding HasRadiationHint}" />
</StackPanel>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
Expand Down
9 changes: 7 additions & 2 deletions src/LageBuch.AppLogic/LocalIncidentSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,8 @@ public void AddScbaTrupp(
string? task = null,
int maxDurationMinutes = AtemschutzTrupp.DefaultMaxDurationMinutes,
int returnPressureBar = AtemschutzTrupp.DefaultReturnPressureBar,
int pressureControlIntervalMinutes = AtemschutzTrupp.DefaultPressureControlIntervalMinutes) =>
int pressureControlIntervalMinutes = AtemschutzTrupp.DefaultPressureControlIntervalMinutes,
bool radiationMonitoring = false) =>
Mutate(() => Incident.AddScbaTrupp(
_clock,
designation,
Expand All @@ -328,7 +329,8 @@ public void AddScbaTrupp(
task,
maxDurationMinutes,
returnPressureBar,
pressureControlIntervalMinutes));
pressureControlIntervalMinutes,
radiationMonitoring));

public void StartScbaTrupp(Guid truppId) =>
Mutate(() => Incident.StartScbaTrupp(_clock, truppId));
Expand All @@ -348,6 +350,9 @@ public void SetScbaSafetyTrupp(Guid truppId, Guid? safetyTruppId) =>
public void ChangeScbaTruppType(Guid truppId, string designation, int maxDurationMinutes, int pressureControlIntervalMinutes) =>
Mutate(() => Incident.ChangeScbaTruppType(truppId, designation, maxDurationMinutes, pressureControlIntervalMinutes));

public void RecordScbaRadiation(Guid truppId, TruppRole role, RadiationRecord record) =>
Mutate(() => Incident.RecordScbaRadiation(truppId, role, record));

public void SetIncidentNumber(IncidentNumber? number) => Mutate(() => Incident.SetIncidentNumber(number));

public void SetKeyword(string? keyword) => Mutate(() => Incident.SetKeyword(keyword));
Expand Down
Loading