From 2ca9483f4cf9ac0d00a4a5eb9ac5703645a449f8 Mon Sep 17 00:00:00 2001 From: Tim Dykes Date: Tue, 25 Aug 2026 11:22:43 +1000 Subject: [PATCH] Show Recent Activations widget on train/dev with prod-only placeholder Previously the fieldset was hidden entirely outside production Beacon since the myAvailability Lambdas have no train/dev data. Now it always renders so the feature is discoverable, but shows a disabled Refresh button and an explanatory message on train/dev instead of fetching. Co-Authored-By: Claude Sonnet 5 --- src/injectscripts/teams/create.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/injectscripts/teams/create.js b/src/injectscripts/teams/create.js index 46afd9f0..571f4ece 100644 --- a/src/injectscripts/teams/create.js +++ b/src/injectscripts/teams/create.js @@ -302,7 +302,7 @@ function whenLighthouseIsReady(cb) { } function initRecentActivationsFieldset() { - if (!isProductionBeaconApi()) return; // no mams data outside prod + var isProd = isProductionBeaconApi(); var $existingFieldset = $('#teamMemberSearch').closest('fieldset'); if (!$existingFieldset.length) return; @@ -312,13 +312,16 @@ function initRecentActivationsFieldset() { '' + '' + 'Recent myAvailability Activation Requests' + - '' + '' + '
' + '
' + - '
Click Refresh to load recent activations for the assigned unit.
' + + '
' + + (isProd ? 'Click Refresh to load recent activations for the assigned unit.' : + 'myAvailability activation requests are only available on production Beacon (this is train/dev).') + + '
' + '
' + '
' + '' @@ -329,6 +332,8 @@ function initRecentActivationsFieldset() { $fieldset.find('#lighthouseRecentActivationsLogo').attr('src', lighthouseUrl + 'icons/lh-black.png'); }); + if (!isProd) return; // placeholder only - no mams data outside prod + var $list = $fieldset.find('.lighthouse-recent-activations-list'); function loadForEntity(entity) {