From 541b418d57675a51c68359d972569fd93b2d7d26 Mon Sep 17 00:00:00 2001 From: Graham McIntie Date: Mon, 16 Feb 2026 08:34:44 -0600 Subject: [PATCH] Group billing providers on settings integrations tab Add 'Billing & Subscriber Management' section header with 'Choose one' badge and 'Other Integrations' divider on the settings page integrations tab. Reorder providers: billing first (Gaiia, Sonar, Splynx, VISP), then QoE/incidents/infrastructure. --- lib/towerops_web/live/org/settings_live.ex | 45 ++++++++++--------- .../live/org/settings_live.html.heex | 26 ++++++++++- 2 files changed, 49 insertions(+), 22 deletions(-) diff --git a/lib/towerops_web/live/org/settings_live.ex b/lib/towerops_web/live/org/settings_live.ex index 85009f82..4cf47141 100644 --- a/lib/towerops_web/live/org/settings_live.ex +++ b/lib/towerops_web/live/org/settings_live.ex @@ -16,13 +16,10 @@ defmodule ToweropsWeb.Org.SettingsLive do require Logger + @billing_provider_ids ~w(gaiia sonar splynx visp) + @providers [ - %{ - id: "preseem", - name: "Preseem", - description: "QoE monitoring and subscriber experience analytics for wireless ISPs.", - icon: "hero-signal" - }, + # Billing providers (mutually exclusive — grouped first) %{ id: "gaiia", name: "Gaiia", @@ -30,20 +27,6 @@ defmodule ToweropsWeb.Org.SettingsLive do "Billing and subscriber management. Enables outage impact analysis, inventory reconciliation, and subscriber-aware monitoring.", icon: "hero-user-group" }, - %{ - id: "pagerduty", - name: "PagerDuty", - description: - "Incident management and on-call alerting. Automatically triggers, acknowledges, and resolves PagerDuty incidents from TowerOps alerts.", - icon: "hero-bell-alert" - }, - %{ - id: "netbox", - name: "NetBox", - description: - "Infrastructure source of truth. Sync devices, sites, IP addresses, and interfaces between TowerOps and your NetBox instance.", - icon: "hero-server-stack" - }, %{ id: "sonar", name: "Sonar", @@ -63,6 +46,27 @@ defmodule ToweropsWeb.Org.SettingsLive do name: "VISP", description: "Cloud-based ISP management. Sync subscribers, sites, equipment, and MRR data from VISP.", icon: "hero-cloud" + }, + # Other integrations + %{ + id: "preseem", + name: "Preseem", + description: "QoE monitoring and subscriber experience analytics for wireless ISPs.", + icon: "hero-signal" + }, + %{ + id: "pagerduty", + name: "PagerDuty", + description: + "Incident management and on-call alerting. Automatically triggers, acknowledges, and resolves PagerDuty incidents from TowerOps alerts.", + icon: "hero-bell-alert" + }, + %{ + id: "netbox", + name: "NetBox", + description: + "Infrastructure source of truth. Sync devices, sites, IP addresses, and interfaces between TowerOps and your NetBox instance.", + icon: "hero-server-stack" } ] @@ -94,6 +98,7 @@ defmodule ToweropsWeb.Org.SettingsLive do |> assign(:invite_form, to_form(%{"email" => "", "role" => "technician"})) # Integration assigns - loaded lazily when tab is selected |> assign(:providers, @providers) + |> assign(:billing_provider_ids, @billing_provider_ids) |> assign(:integrations, %{}) |> assign(:configuring, nil) |> assign(:integration_form, nil) diff --git a/lib/towerops_web/live/org/settings_live.html.heex b/lib/towerops_web/live/org/settings_live.html.heex index cb65cfd0..59a6450f 100644 --- a/lib/towerops_web/live/org/settings_live.html.heex +++ b/lib/towerops_web/live/org/settings_live.html.heex @@ -839,8 +839,29 @@ <%= if @active_tab == "integrations" do %>
-
+ <%!-- Section headers --%> + <%= if idx == 0 do %> +
+

+ Billing & Subscriber Management +

+ + <.icon name="hero-arrow-path" class="h-3 w-3" /> Choose one + + + — only one billing platform can be active at a time + +
+ <% end %> + <%= if provider.id not in @billing_provider_ids and (idx == 0 or Enum.at(@providers, idx - 1).id in @billing_provider_ids) do %> +
+

+ Other Integrations +

+
+ <% end %> +
<% end %>
+ <% end %>
<% end %>