From 682de29e5ad2890b365983a51a9dc06c01dfb221 Mon Sep 17 00:00:00 2001 From: Jukka Lampikoski Date: Fri, 13 Mar 2026 08:59:39 +0200 Subject: [PATCH] =?UTF-8?q?Piilota=20sidebar-tilastot=20+=20laskutus=20kun?= =?UTF-8?q?=20hinnat=20piilossa,=20oletusn=C3=A4kym=C3=A4=20support?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - prices-hidden blurraa nyt myös sidebar-stats (liittymät, laskutus, keskihinta, nopeudet) - Summary-barin laskutus blurrautuu samalla - Oletusnäkymä kirjautumisen jälkeen vaihdettu customers → support Co-Authored-By: Claude Opus 4.6 --- index.html | 4 ++-- script.js | 11 ++++++++--- style.css | 12 ++++++++++++ 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 2ea7b8b..2e8472d 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ Noxus HUB - + @@ -2271,6 +2271,6 @@ - + diff --git a/script.js b/script.js index 6b28f0e..d513c92 100644 --- a/script.js +++ b/script.js @@ -212,7 +212,7 @@ async function showDashboard() { const [mainHash, subHash] = hash.split('/'); const validTabs = ['customers', 'leads', 'tekniikka', 'ohjeet', 'todo', 'documents', 'laitetilat', 'netadmin', 'archive', 'changelog', 'support', 'users', 'settings', 'companies']; // ohjeet, laitetilat, archive ovat nyt sub-tabeja — switchToTab hoitaa uudelleenohjauksen - const startTab = validTabs.includes(mainHash) ? mainHash : 'customers'; + const startTab = validTabs.includes(mainHash) ? mainHash : 'support'; switchToTab(startTab, subHash); } @@ -517,9 +517,14 @@ function contractRemaining(sopimuskausi, alkupvm) { const toggle = document.getElementById('toggle-prices'); if (!toggle) return; // Oletuksena piilossa - document.getElementById('customer-table')?.classList.add('prices-hidden'); + const hiddenEls = [ + document.getElementById('customer-table'), + document.querySelector('.sidebar-stats'), + document.querySelector('.summary-bar'), + ]; + hiddenEls.forEach(el => el?.classList.add('prices-hidden')); toggle.addEventListener('change', () => { - document.getElementById('customer-table')?.classList.toggle('prices-hidden', !toggle.checked); + hiddenEls.forEach(el => el?.classList.toggle('prices-hidden', !toggle.checked)); // Blurraa myös asiakaskortin hinnat document.querySelectorAll('.customer-detail-card').forEach(el => { el.classList.toggle('prices-hidden', !toggle.checked); diff --git a/style.css b/style.css index 2c82851..03796de 100644 --- a/style.css +++ b/style.css @@ -432,6 +432,18 @@ tbody td { user-select: none; transition: filter 0.2s; } +.sidebar-stats.prices-hidden .stat-value, +.sidebar-stats.prices-hidden .stat-sub, +.sidebar-stats.prices-hidden .speed-table { + filter: blur(6px); + user-select: none; + transition: filter 0.2s; +} +.summary-bar.prices-hidden #total-billing { + filter: blur(6px); + user-select: none; + transition: filter 0.2s; +} .actions-cell { white-space: nowrap;