From 1bd5cc8d752dfa350b3d43f50260f542126def07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= <1005065+DeepDiver1975@users.noreply.github.com> Date: Thu, 19 Nov 2026 13:00:45 +0100 Subject: [PATCH] feat(etb): foldable notes on user-written entries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A user-written ETB entry gets a notes field, entered through the edit panel, folded under its line until a click unfolds it, and printed under the entry in the PDF. System and measurement entries carry none. Schema V46 adds etb_entries.notes; the new setJournalEntryNotes command raises ProtocolVersion and MinimumProtocolVersion to 44. Fixes #973 Co-Authored-By: Claude Opus 5.5 Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> --- changelog.d/+etb-entry-notes.added.md | 1 + src/LageBuch.App.Shared/Views/EtbView.axaml | 74 ++++- .../Views/EtbView.axaml.cs | 31 ++- src/LageBuch.AppLogic/LocalIncidentSession.cs | 3 + .../ViewModels/EtbViewModel.cs | 76 +++++- src/LageBuch.Documents/Sections/EtbSection.cs | 5 + src/LageBuch.Domain/Etb/EtbEntry.cs | 27 +- src/LageBuch.Domain/Incident.cs | 34 +++ .../IncidentRepository.cs | 8 +- src/LageBuch.Persistence/Sqlite/Migrations.cs | 17 +- .../Sqlite/SchemaGuard.cs | 1 + src/LageBuch.Sync/CommandApplier.cs | 3 + src/LageBuch.Sync/IIncidentSession.cs | 3 + src/LageBuch.Sync/IncidentSnapshot.cs | 3 +- src/LageBuch.Sync/RemoteIncidentSession.cs | 3 + src/LageBuch.Sync/SnapshotMapper.cs | 6 +- src/LageBuch.Sync/SyncCommand.cs | 4 + src/LageBuch.Sync/SyncProtocol.cs | 8 +- .../AutomationPropertiesTests.cs | 3 +- .../EtbNotesFoldTests.cs | 169 ++++++++++++ .../CoMessprotokollViewModelTests.cs | 2 + .../EtbViewModelTests.cs | 252 ++++++++++++++++++ .../EtbSectionTests.cs | 15 ++ tests/LageBuch.Domain.Tests/EtbEntryTests.cs | 77 ++++++ .../IncidentOperationsTests.cs | 88 ++++++ .../IncidentRoundTripTests.cs | 17 ++ .../MigrationsTests.cs | 31 +++ .../CommandApplierTests.cs | 55 ++++ .../CommandSerializationTests.cs | 2 + .../SnapshotRoundTripTests.cs | 2 + .../VersionHandshakeTests.cs | 17 +- 31 files changed, 1009 insertions(+), 28 deletions(-) create mode 100644 changelog.d/+etb-entry-notes.added.md create mode 100644 tests/LageBuch.Acceptance.Tests/EtbNotesFoldTests.cs diff --git a/changelog.d/+etb-entry-notes.added.md b/changelog.d/+etb-entry-notes.added.md new file mode 100644 index 000000000..5500e2d9b --- /dev/null +++ b/changelog.d/+etb-entry-notes.added.md @@ -0,0 +1 @@ +A user-written ETB entry can carry notes, entered through its edit button, folded under its line until a click unfolds them, and printed under the entry in the PDF (#973). diff --git a/src/LageBuch.App.Shared/Views/EtbView.axaml b/src/LageBuch.App.Shared/Views/EtbView.axaml index b851752cb..2f34a84bd 100644 --- a/src/LageBuch.App.Shared/Views/EtbView.axaml +++ b/src/LageBuch.App.Shared/Views/EtbView.axaml @@ -52,6 +52,21 @@ + + + + + @@ -212,6 +230,14 @@ + + + + + + + - @@ -358,6 +408,20 @@ + + + + +