From 79ec93b29343d6d348147568b0f9722b14dedca3 Mon Sep 17 00:00:00 2001 From: Jukka Lampikoski Date: Fri, 13 Mar 2026 09:24:52 +0200 Subject: [PATCH] =?UTF-8?q?Lis=C3=A4=C3=A4=20saatavuus-tikettityyppi=20+?= =?UTF-8?q?=20fallback-v=C3=A4ri=20k=C3=A4sin=20lis=C3=A4tyille=20tyypeill?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Saatavuus-tyyppi oletuksiin (teal-väri) - Fallback CSS: tuntemattomat tyypit saavat violetin taustan - TypeLabel näyttää tyypin nimen isolla alkukirjaimella jos ei löydy labelista Co-Authored-By: Claude Opus 4.6 --- index.html | 4 ++-- script.js | 3 ++- style.css | 11 +++++++++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 3df1cbf..b59003e 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 b0f3cc9..20b952c 100644 --- a/script.js +++ b/script.js @@ -1374,6 +1374,7 @@ let ticketTypeLabels = { tekniikka: 'Tekniikka', vika: 'Vika', abuse: 'Abuse', + saatavuus: 'Saatavuus', muu: 'Muu', }; @@ -1486,7 +1487,7 @@ function renderTickets() { const multiCompany = availableCompanies.length > 1; ttbody.innerHTML = pageTickets.map(t => { const lastType = (t.last_message_type === 'reply_out' || t.last_message_type === 'outgoing') ? '→' : (t.last_message_type === 'note' ? '📝' : '←'); - const typeLabel = ticketTypeLabels[t.type] || 'Muu'; + const typeLabel = ticketTypeLabels[t.type] || (t.type ? t.type.charAt(0).toUpperCase() + t.type.slice(1) : 'Muu'); const rowClass = t.priority === 'urgent' ? 'ticket-row-urgent' : (t.priority === 'tärkeä' ? 'ticket-row-important' : (t.status === 'kasittelyssa' ? 'ticket-row-active' : '')); const checked = bulkSelectedIds.has(t.id) ? 'checked' : ''; const companyBadge = multiCompany && t.company_name ? `${esc(t.company_name)} ` : ''; diff --git a/style.css b/style.css index 03796de..23f9c66 100644 --- a/style.css +++ b/style.css @@ -1379,6 +1379,17 @@ span.empty { color: #e65100; } +.ticket-type-saatavuus { + background: #e0f2f1; + color: #00695c; +} + +/* Fallback: käsin lisätyt tyypit ilman omaa väriä */ +.ticket-type[class*="ticket-type-"]:not(.ticket-type-laskutus):not(.ticket-type-tekniikka):not(.ticket-type-vika):not(.ticket-type-muu):not(.ticket-type-abuse):not(.ticket-type-saatavuus) { + background: #ede7f6; + color: #4527a0; +} + .ticket-type-item { display: flex; align-items: center;