From 6f1feb942a29e14a25c77b712103c6372fd16a58 Mon Sep 17 00:00:00 2001 From: Mikhail Chusavitin Date: Mon, 2 Feb 2026 12:56:14 +0300 Subject: [PATCH] fix: handle URL tab parameter in admin pricing page - Parse URLSearchParams to detect ?tab=pricelists on page load - Load tab from URL or default to 'alerts' - Fixes redirect from /pricelists to /admin/pricing?tab=pricelists This resolves the critical UX issue where users redirected from /pricelists would see the 'alerts' tab instead of 'pricelists'. Co-Authored-By: Claude Sonnet 4.5 --- web/templates/admin_pricing.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/templates/admin_pricing.html b/web/templates/admin_pricing.html index c9e5f6c..7f4f67f 100644 --- a/web/templates/admin_pricing.html +++ b/web/templates/admin_pricing.html @@ -877,7 +877,10 @@ function renderAllConfigs(configs) { } document.addEventListener('DOMContentLoaded', () => { - loadTab('alerts'); + // Check URL params for initial tab + const urlParams = new URLSearchParams(window.location.search); + const initialTab = urlParams.get('tab') || 'alerts'; + loadTab(initialTab); // Add event listeners for preview updates document.getElementById('modal-period').addEventListener('change', fetchPreview);