From 387d1c293008667a353a4ef05b7ca7289acbfd4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= <1005065+DeepDiver1975@users.noreply.github.com> Date: Tue, 24 Nov 2026 23:44:19 +0100 Subject: [PATCH 1/3] feat(etb): edit Von and An of an entry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ETB edit panel corrects an entry's Von and An alongside its Abschnitt and Eintrag. A correction records the Von and An it replaced next to the old text, so the Verlauf and the PDF name them on the edit that changed them; a text-only correction reads as before. - EtbEntry.WithEdit replaces WithEditedText; an edited Von or An is capped at MaxPartyLength (200), checked only for a value that changes. - Migration V48 adds etb_entry_edits.previous_from/previous_to and backfills them from the entry, exact because Von and An were not editable before; SchemaGuard declares both columns. - editJournalEntry carries from and to, and the snapshot's edits carry previousFrom and previousTo. A client at 47 would send no Von or An, which a host at 48 reads as cleared, so protocol and floor rise to 48. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> --- changelog.d/+etb-edit-von-an.added.md | 1 + src/LageBuch.App.Shared/Views/EtbView.axaml | 50 ++++---- src/LageBuch.AppLogic/LocalIncidentSession.cs | 4 +- .../ViewModels/EtbViewModel.cs | 46 ++++++-- src/LageBuch.Documents/Sections/EtbSection.cs | 5 +- src/LageBuch.Domain/Etb/EtbEntry.cs | 71 +++++++++--- src/LageBuch.Domain/Etb/EtbEntryEdit.cs | 13 ++- src/LageBuch.Domain/ForceUnit.cs | 2 +- src/LageBuch.Domain/Formatting.cs | 15 +++ src/LageBuch.Domain/Incident.cs | 10 +- .../IncidentRepository.cs | 8 +- src/LageBuch.Persistence/Sqlite/Migrations.cs | 30 ++++- .../Sqlite/SchemaGuard.cs | 2 + src/LageBuch.Sync/CommandApplier.cs | 2 +- src/LageBuch.Sync/IIncidentSession.cs | 3 +- src/LageBuch.Sync/IncidentSnapshot.cs | 4 +- src/LageBuch.Sync/RemoteIncidentSession.cs | 4 +- src/LageBuch.Sync/SnapshotMapper.cs | 4 +- src/LageBuch.Sync/SyncCommand.cs | 4 +- src/LageBuch.Sync/SyncProtocol.cs | 10 +- .../SituationReportsTabRenderTests.cs | 3 +- .../WorkspaceAcceptanceTests.cs | 28 +++++ .../CoMessprotokollViewModelTests.cs | 2 +- .../EtbSectionViewModelTests.cs | 2 +- .../EtbViewModelSearchTests.cs | 4 +- .../EtbViewModelTests.cs | 84 ++++++++++++-- .../EtbSectionTests.cs | 23 +++- .../CoMeasurementTests.cs | 2 +- tests/LageBuch.Domain.Tests/EtbEntryTests.cs | 108 +++++++++++++++--- .../EtbSectionAssignmentTests.cs | 2 +- .../IncidentOperationsTests.cs | 28 ++++- .../IncidentRepositorySaveTests.cs | 4 +- .../IncidentRoundTripTests.cs | 22 +++- .../MigrationsTests.cs | 36 ++++++ .../CommandOrderTests.cs | 2 +- .../CommandRejectionTests.cs | 2 +- .../IncidentHostTests.cs | 6 +- .../WorkspaceCollaborationTests.cs | 6 +- .../CommandApplierTests.cs | 13 ++- .../CommandSerializationTests.cs | 2 +- .../SnapshotRoundTripTests.cs | 2 +- .../VersionHandshakeTests.cs | 13 ++- 42 files changed, 557 insertions(+), 125 deletions(-) create mode 100644 changelog.d/+etb-edit-von-an.added.md diff --git a/changelog.d/+etb-edit-von-an.added.md b/changelog.d/+etb-edit-von-an.added.md new file mode 100644 index 000000000..d69249c69 --- /dev/null +++ b/changelog.d/+etb-edit-von-an.added.md @@ -0,0 +1 @@ +The ETB edit panel now corrects an entry's Von and An as well as its Abschnitt and Eintrag, and the Verlauf and the PDF name the Von and An an edit replaced. diff --git a/src/LageBuch.App.Shared/Views/EtbView.axaml b/src/LageBuch.App.Shared/Views/EtbView.axaml index 43830618f..a7ef59d87 100644 --- a/src/LageBuch.App.Shared/Views/EtbView.axaml +++ b/src/LageBuch.App.Shared/Views/EtbView.axaml @@ -71,10 +71,10 @@ - - - - +