fix(planner): a stay booked elsewhere shows without a reload

The server sends accommodation:created and accommodation:updated to the
whole trip, the assistant's writes included, but the client listed both
as ignored and reloaded stays only after a delete. A stay the assistant,
a fellow traveller, a plugin or a booking import added therefore showed
in the sidebar, on the map and in the day panel only after a reload.

Both events now refresh the stays like the deletes do, in the planner
(desktop and phone, which share its hook) and in the day panel. The
refresh is bundled per burst, since one assistant step can apply many
changes, a newer answer always wins over an older one, and a stay being
edited in the day panel that was deleted or moved elsewhere closes its
editor instead of letting the form overwrite another stay.

A browser test books a stay from a second context and sees it appear in
the open planner, on the desktop and on the phone.
This commit is contained in:
Maurice
2026-10-22 00:03:28 +00:00
parent 6d6efddc4e
commit 56f26b5efd
13 changed files with 703 additions and 54 deletions
+4 -4
View File
@@ -5,13 +5,13 @@
"no-console": 88,
"complexity": 229,
"@typescript-eslint/no-explicit-any": 146,
"trek/no-swallowed-catch": 133,
"trek/no-swallowed-catch": 132,
"max-params": 35,
"trek/store-without-selector": 67,
"react-hooks/refs": 557,
"react-hooks/set-state-in-effect": 196,
"@typescript-eslint/no-floating-promises": 167,
"react-hooks/exhaustive-deps": 120,
"@typescript-eslint/no-floating-promises": 166,
"react-hooks/exhaustive-deps": 118,
"@typescript-eslint/no-unused-vars": 126,
"react-hooks/immutability": 28,
"max-lines-per-function": 133,
@@ -39,7 +39,7 @@
"@typescript-eslint/no-misused-promises": 22,
"@typescript-eslint/no-unused-vars": 51,
"@typescript-eslint/no-floating-promises": 33,
"trek/no-window-globals": 332,
"trek/no-window-globals": 331,
"trek/no-swallowed-catch": 14,
"react-hooks/globals": 5,
"react-hooks/refs": 22,