Piilota sidebar-tilastot + laskutus kun hinnat piilossa, oletusnäkymä support

- 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 <noreply@anthropic.com>
This commit is contained in:
2026-03-13 08:59:39 +02:00
parent a69fed75e4
commit 682de29e5a
3 changed files with 22 additions and 5 deletions

View File

@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Noxus HUB</title>
<link rel="stylesheet" href="style.css?v=20260313s">
<link rel="stylesheet" href="style.css?v=20260313t">
</head>
<body>
<!-- Login -->
@@ -2271,6 +2271,6 @@
</div>
</div>
<script src="script.js?v=20260313s"></script>
<script src="script.js?v=20260313t"></script>
</body>
</html>

View File

@@ -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);

View File

@@ -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;