prop/test/microwaveprop/radio
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
..
adif_import_test.exs Fix ADIF parser crash on records with multi-byte UTF-8 characters 2026-04-12 15:13:59 -05:00
contact_edit_test.exs Force 24h timestamps and let logged-in owners edit their contacts directly 2026-04-12 15:18:47 -05:00
contact_submission_test.exs Cache /contacts, fix map blink, make mode optional 2026-04-12 12:47:25 -05:00
contact_test.exs Cache /contacts, fix map blink, make mode optional 2026-04-12 12:47:25 -05:00
csv_import_test.exs Cache /contacts, fix map blink, make mode optional 2026-04-12 12:47:25 -05:00
enrichment_status_test.exs Add Tier 1 test coverage: EnrichmentStatus, Markdown, health, RemoteIp, Maidenhead 2026-04-06 10:15:38 -05:00
maidenhead_test.exs Add /beacons CRUD and /users admin page 2026-04-08 12:01:45 -05:00