fix(planner): booking codes stay blurred in the edit forms too

With "Blur booking codes" on, the bookings list and the transport details
hid a code, but opening the same booking to edit it printed the code in
the clear: the reservation and transport forms with every per-segment
code of a flight or train, the hotel editor in the day panel and the
three phone sheets. The stay's own code in the day panel, the booking
strip in the place inspector and the booking lines under a stay and a
stop on the phone showed it plainly as well.

One shared BookingCodeInput and BlurredCode now carry the setting to all
of them. A filled code field stays blurred until it is hovered or
focused, so clicking, tapping or tabbing into it still reveals the code
for editing, and the value is saved exactly as typed. With the setting
off nothing changes, and the PDF export and the share pages stay as
they were.
This commit is contained in:
Maurice
2026-09-22 21:09:25 +02:00
parent 93dddaa4af
commit bb515ac3cc
22 changed files with 769 additions and 35 deletions
+12
View File
@@ -0,0 +1,12 @@
import { useSettingsStore } from '../store/settingsStore'
/**
* Whether booking codes are drawn blurred for the signed-in user (the
* "Blur booking codes" preference, blur_booking_codes). An unset preference
* reads as off. The pieces in `components/shared/BookingCode` build on it;
* reach for it directly only where a surface has to lay out a code
* differently while it is hidden.
*/
export function useBlurBookingCodes(): boolean {
return useSettingsStore(s => !!s.settings.blur_booking_codes)
}