From 44e9d20d35bd70a550858b90897a2680d404097f Mon Sep 17 00:00:00 2001 From: Graham McIntie Date: Sat, 14 Feb 2026 14:41:29 -0600 Subject: [PATCH] fix: NetBox sync direction cards now clickable via phx-click instead of hidden radio buttons --- lib/towerops_web/live/org/settings_live.ex | 5 + .../live/org/settings_live.html.heex | 114 ++++++++---------- 2 files changed, 55 insertions(+), 64 deletions(-) diff --git a/lib/towerops_web/live/org/settings_live.ex b/lib/towerops_web/live/org/settings_live.ex index 66b72f12..6981c7fd 100644 --- a/lib/towerops_web/live/org/settings_live.ex +++ b/lib/towerops_web/live/org/settings_live.ex @@ -310,6 +310,11 @@ defmodule ToweropsWeb.Org.SettingsLive do end @impl true + def handle_event("set_netbox_sync_direction", %{"direction" => direction}, socket) do + netbox_config = Map.put(socket.assigns.netbox_config, "sync_direction", direction) + {:noreply, assign(socket, :netbox_config, netbox_config)} + end + def handle_event("validate_integration", %{"integration" => params}, socket) do integration = get_current_integration(socket) diff --git a/lib/towerops_web/live/org/settings_live.html.heex b/lib/towerops_web/live/org/settings_live.html.heex index 0189708c..1700df20 100644 --- a/lib/towerops_web/live/org/settings_live.html.heex +++ b/lib/towerops_web/live/org/settings_live.html.heex @@ -1137,34 +1137,26 @@

Choose how data flows between TowerOps and NetBox. You can change this later.

+
-