Skip to content
Merged
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
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ once we reach 1.0.
Einsatzzeiten is something the old logic, wired to the literal `CSA-Trupp`, could not express
at all. A brigade that calls the Trupp something else, or runs it on a different Einsatzzeit,
enters that in Stammdaten; it is no longer a code change. (#418)
- Atemschutz: der **Sicherheitstrupp** ist jetzt erfasst, nicht mehr nur ein Wort in der
Trupp-Art. Unter jedem Trupp lässt sich einer der gerade bereitgestellten Trupps auswählen;
die Zuordnung darf jederzeit geändert werden, auch während der Trupp unter Atemschutz ist.
Gewarnt wird, nie blockiert: „kein Sicherheitstrupp“, sobald ein Trupp ohne Sicherung im
Einsatz ist, „nicht mehr bereitgestellt“, wenn der zugeordnete Trupp selbst unter Atemschutz
geht, und „deckt auch Trupp N“, wenn ein Trupp für mehrere sichert — ob das vertretbar ist,
entscheidet die Einsatzleitung, das Programm dokumentiert es nur. Jede Festlegung, jeder
Wechsel und jedes Aufheben steht im ETB, die „im Einsatz“-Zeile nennt den Sicherheitstrupp
(oder ausdrücklich dessen Fehlen), und der PDF-Bericht führt ihn unter dem jeweiligen Trupp
mit. Die Zuordnung wird in der Einsatzdatei gespeichert und erreicht verbundene Geräte.
- `docs/datenschutz-und-sicherheit.md`: the German data-protection page for Kommandanten,
Kreisbrandinspektionen and kommunale Datenschutzbeauftragte. It names every category of
personal data the app holds (including the CO-Messprotokoll's resident names and the roster's
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Markdown.
| **Kräfte** | Fahrzeuge aus den Stammdaten, Stärke als ZF/GF/Mann, AGT-Zahl, Status und Bemerkung; Gesamtstärke immer im Blick |
| **Aufgaben** | Aufträge mit Wichtigkeit, Dringlichkeit, Zuständigem und Timer – mit Sprachansage, wenn sie fällig werden; direkt aus einem ETB-Eintrag anlegbar |
| **Funktionen** | EL, Abschnittsleiter und weitere Rollen mit von/bis, Übergabe und Handynummer |
| **Atemschutzüberwachung** | Trupps mit Einstiegsdruck, Einsatzzeit-Countdown, Druckabfrage-Intervall, Rückzugsdruck und Rückzugsalarm – mit Sprachansage und Sirene |
| **Atemschutzüberwachung** | Trupps mit Einstiegsdruck, Einsatzzeit-Countdown, Druckabfrage-Intervall, Rückzugsdruck und Rückzugsalarm – mit Sprachansage und Sirene; Sicherheitstrupp je Trupp zugeordnet und im ETB protokolliert |
| **Rückmeldung an ILS** | Erinnerung nach konfigurierbarer Zeit, danach im Intervall, mit ERLEDIGT-Quittierung; überlebt Neustart und Absturz |
| **CO-Messprotokoll** | Haus, Stockwerk, Wohnung: Status (offen / durchsucht / betroffen), ppm-Wert mit Gefahrenfarbe, Bewohnername, Schlüssel vorhanden – wie die Türmarkierung vor Ort |
| **Checklisten** | Aufbau- und Abbau-Checklisten aus den eigenen Stammdaten, Pflichtpunkte markiert, Abschluss im ETB protokolliert |
Expand Down
Binary file modified docs/demo/einsatz-flow.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/samples/uebung.fwincident
Binary file not shown.
Binary file modified docs/screenshots/atemschutz.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
63 changes: 59 additions & 4 deletions src/LageBuch.App.Shared/Views/ScbaView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,72 @@
<DataGrid.Columns>
<!-- Ten columns needed ~1460px and overflowed on a normal window, so related values are
stacked into one cell each: Trupp over its call sign, the two clock values together,
and current pressure over the next-check countdown. Seven columns at fixed widths
now fit in ~1135px, and fixed widths mean content growth can no longer squeeze the
crew column. -->
<DataGridTemplateColumn Header="TRUPP" Width="170">
and current pressure over the next-check countdown, and the Sicherheitstrupp under
the Trupp it belongs to. The fixed columns total 1025px and MANNSCHAFT adds its
180px floor, so the grid wants 1205px and still fits a 1280px ELW screen — which is
what the layout test pins. Fixed widths mean content growth can no longer squeeze
the crew column, and an eighth column would have to buy its width from the crew or
from the action buttons. -->
<DataGridTemplateColumn Header="TRUPP" Width="190">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate x:DataType="vm:ScbaTruppRow">
<StackPanel VerticalAlignment="Center" Margin="12,6">
<TextBlock Text="{Binding DisplayName}" TextTrimming="CharacterEllipsis" />
<TextBlock Text="{Binding CallSign}" Classes="mono" FontSize="11.5"
IsVisible="{Binding CallSign, Converter={x:Static ObjectConverters.IsNotNull}}"
TextTrimming="CharacterEllipsis" />
<!-- FwDV 7's Sicherheitstrupp (#399) stacks here rather than taking a column of
its own: eight columns already need every pixel of a 1280px ELW screen, and
the width for a ninth would have to come out of the crew or the action
buttons. Vertical space is the one thing this grid has spare — rows are
already two or three crew lines tall. A picker, not a label, because the
standby crew really is relieved and replaced mid-Einsatz; and the amber line
warns without ever blocking, exactly like RolesView's UnknownRoleHint. -->
<!-- A button and a Flyout, deliberately not a ComboBox. Designating a
Sicherheitstrupp writes to the incident, and that write comes straight back
through Changed to rebuild this row and its entries. A ComboBox does that
inside its own SelectionModel batch, which still holds indices into the list
being rebuilt — it crashed with an IndexOutOfRange out of EndBatchUpdate.
A command runs after the flyout has dismissed, with no selection model in
the picture. Same Button.Flyout idiom as ForcesView's Stärke editor. -->
<Grid ColumnDefinitions="Auto,*" Margin="0,4,0,0">
<TextBlock Grid.Column="0" Text="Si." Classes="cellLabel" />
<Button Grid.Column="1" x:Name="SafetyTruppButton"
HorizontalAlignment="Stretch" HorizontalContentAlignment="Left"
Padding="8,4" FontSize="12"
Content="{Binding SafetyTruppButtonText}"
IsEnabled="{Binding CanAssignSafetyTrupp}"
AutomationProperties.Name="Sicherheitstrupp wählen">
<Button.Flyout>
<Flyout Placement="BottomEdgeAlignedLeft">
<ItemsControl ItemsSource="{Binding SafetyTruppChoices}" MinWidth="170">
<ItemsControl.ItemTemplate>
<DataTemplate x:DataType="vm:SafetyTruppChoice">
<Button Classes="ghost" HorizontalAlignment="Stretch"
HorizontalContentAlignment="Left" Padding="8,5"
Command="{Binding SelectCommand}"
ToolTip.Tip="{Binding Detail}">
<Grid ColumnDefinitions="14,Auto,*" ColumnSpacing="6">
<!-- The entry in force is marked rather than styled, so it
still reads at a glance on the ELW's dimmed screen. -->
<TextBlock Grid.Column="0" Text="✓" FontWeight="Bold"
IsVisible="{Binding IsCurrent}" />
<TextBlock Grid.Column="1" Text="{Binding Display}" />
<TextBlock Grid.Column="2" Text="{Binding Detail}"
Classes="cellLabel" TextTrimming="CharacterEllipsis"
IsVisible="{Binding Detail, Converter={x:Static ObjectConverters.IsNotNull}}" />
</Grid>
</Button>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Flyout>
</Button.Flyout>
</Button>
</Grid>
<TextBlock x:Name="SafetyTruppHintText" Text="{Binding SafetyTruppHint}"
FontSize="11" FontWeight="SemiBold" Foreground="{StaticResource AmberBrush}"
TextWrapping="Wrap" IsVisible="{Binding HasSafetyTruppHint}" />
</StackPanel>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
Expand Down
3 changes: 3 additions & 0 deletions src/LageBuch.AppLogic/LocalIncidentSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,9 @@ public void WithdrawScbaTrupp(Guid truppId) =>
public void MarkScbaRemoved(Guid truppId) =>
Mutate(() => Incident.MarkScbaRemoved(_clock, truppId));

public void SetScbaSafetyTrupp(Guid truppId, Guid? safetyTruppId) =>
Mutate(() => Incident.SetScbaSafetyTrupp(truppId, safetyTruppId));

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

public void SetKeyword(string? keyword) => Mutate(() => Incident.SetKeyword(keyword));
Expand Down
48 changes: 48 additions & 0 deletions src/LageBuch.AppLogic/ViewModels/SafetyTruppChoice.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
using CommunityToolkit.Mvvm.Input;

namespace LageBuch.AppLogic.ViewModels;

/// <summary>
/// One entry in a row's Sicherheitstrupp flyout (#399): a Trupp that may be designated, or
/// <see cref="NoneDisplay"/> for "no Sicherheitstrupp".
/// </summary>
/// <remarks>
/// Each entry carries its own command, so the flyout's item template binds against the entry
/// itself and needs no <c>$parent</c> traversal out of the popup's separate visual tree.
/// <para>
/// This is deliberately a command and not a ComboBox selection. Binding <c>SelectedItem</c> two-way
/// to a setter that writes to the domain crashed the app: the write re-enters through the incident's
/// Changed event and alters the same collection Avalonia is using as its ItemsSource, while the
/// selection model is still mid-<c>BatchUpdateOperation</c> holding indices into it. A command runs
/// after the flyout dismisses, with no selection model involved at all.
/// </para>
/// </remarks>
public sealed class SafetyTruppChoice
{
/// <summary>The label for the "no Sicherheitstrupp designated" entry.</summary>
public const string NoneDisplay = "— kein —";

public SafetyTruppChoice(Guid? id, string display, string? detail, bool isCurrent, Action<Guid?> onSelect)
{
ArgumentNullException.ThrowIfNull(onSelect);
Id = id;
Display = display;
Detail = detail;
IsCurrent = isCurrent;
SelectCommand = new RelayCommand(() => onSelect(id));
}

/// <summary>The Trupp being designated, or null for "kein Sicherheitstrupp".</summary>
public Guid? Id { get; }

/// <summary>The short label, e.g. "Trupp 3" — the full DisplayName does not fit the cell.</summary>
public string Display { get; }

/// <summary>The Trupp-Art, shown dimmed beside the label, or null for the "kein" entry.</summary>
public string? Detail { get; }

/// <summary>Whether this entry is the one currently in force, for the check mark.</summary>
public bool IsCurrent { get; }

public IRelayCommand SelectCommand { get; }
}
Loading
Loading