From 6f25993998912c65878ec80773986a489ae791c8 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Sat, 25 Apr 2026 16:32:10 -0500 Subject: [PATCH] fix(rover): wire delete X button to actually remove station rows --- lib/microwaveprop_web/live/rover_live.ex | 35 ++++++++++++------------ 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/lib/microwaveprop_web/live/rover_live.ex b/lib/microwaveprop_web/live/rover_live.ex index eaed690d..cca7f13f 100644 --- a/lib/microwaveprop_web/live/rover_live.ex +++ b/lib/microwaveprop_web/live/rover_live.ex @@ -465,8 +465,9 @@ defmodule MicrowavepropWeb.RoverLive do Enum.find_value(@bands, "#{band} MHz", fn b -> if b.value == band, do: b.label end) end - defp station_id(%{id: id}), do: to_string(id) - defp station_id(_), do: nil + defp station_id(%{id: id}) when not is_nil(id), do: to_string(id) + defp station_id(%{callsign: call}) when is_binary(call), do: "call:" <> call + defp station_id(_), do: "" # ── Render ─────────────────────────────────────────────────────────── @@ -571,9 +572,9 @@ defmodule MicrowavepropWeb.RoverLive do <.sidebar_section title="FIXED STATIONS"> - + + +