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:
11
script.js
11
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);
|
||||
|
||||
Reference in New Issue
Block a user