prop/lib/microwaveprop_web/live
Graham McIntire b49c08914e
Force 24h timestamps and let logged-in owners edit their contacts directly
Submit and contact-detail forms now use a plain text input for the QSO
timestamp with a "YYYY-MM-DD HH:MM" placeholder and regex pattern. The
native datetime-local input ignores lang="en-GB" on macOS/iOS when the
system clock is 12-hour, so it was rendering AM/PM against the user's
wishes. Ecto's :utc_datetime cast already accepts this format (verified
space+seconds, T+seconds, and both with and without seconds/Z).

Contact edit workflow grows a third branch: admins still apply directly,
non-owners still go through the admin review queue, and now logged-in
owners of a contact (user_id == current_user.id) can apply edits
directly too. New helpers Radio.owner?/2 and Radio.apply_owner_edit/3
reuse the existing normalize + diff + apply_edit_to_contact path so the
grid-change → enrichment re-enqueue pipeline kicks in automatically.
Anonymous contacts (user_id nil) and other users' contacts both return
{:error, :not_owner}.

Nine new tests cover owner?/2 and apply_owner_edit/3 including the
no-changes, wrong-user, and anonymous-contact paths.
2026-04-12 15:18:47 -05:00
..
admin Add contact edit approval system with admin review queue 2026-04-11 16:15:49 -05:00
beacon_live Use daisyUI components for stats, alerts, cards, and tabs 2026-04-12 09:20:20 -05:00
contact_live Force 24h timestamps and let logged-in owners edit their contacts directly 2026-04-12 15:18:47 -05:00
user_management_live Add /beacons CRUD and /users admin page 2026-04-08 12:01:45 -05:00
about_live.ex Note CONUS-only coverage on the about page 2026-04-12 14:31:30 -05:00
algo_live.ex Merge auth links into main nav and lower password min to 8 2026-04-08 10:39:51 -05:00
backfill_live.ex Cache /weather grid, defer contact show mount, cache stats 2026-04-12 12:55:50 -05:00
contact_map_live.ex Nudge HRRR scores with live ASOS obs between runs 2026-04-12 14:27:27 -05:00
map_live.ex Add MRMS rain mosaic, fix beacons crash, fix UTC clock flash 2026-04-12 14:49:20 -05:00
path_live.ex Improve light mode contrast for score colors and map controls 2026-04-11 14:55:21 -05:00
privacy_live.ex Trim footer and privacy copy 2026-04-09 12:30:10 -05:00
rover_live.ex Remove grid squares toggle from rover planner page 2026-04-10 17:31:23 -05:00
submit_live.ex Force 24h timestamps and let logged-in owners edit their contacts directly 2026-04-12 15:18:47 -05:00
weather_map_live.ex Add MRMS rain mosaic, fix beacons crash, fix UTC clock flash 2026-04-12 14:49:20 -05:00