diff --git a/index.html b/index.html index 1ccab0d..f59ad5b 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ Noxus HUB - + @@ -2257,6 +2257,6 @@ - + diff --git a/script.js b/script.js index 36a73d1..e3dc78a 100644 --- a/script.js +++ b/script.js @@ -1480,7 +1480,7 @@ function renderTickets() { document.getElementById('tickets-table').style.display = 'table'; const multiCompany = availableCompanies.length > 1; ttbody.innerHTML = pageTickets.map(t => { - const lastType = t.last_message_type === 'reply_out' ? '→' : (t.last_message_type === 'note' ? '📝' : '←'); + 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 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' : ''; @@ -1811,11 +1811,11 @@ async function showTicketDetail(id, companyId = '') { // Thread messages const thread = document.getElementById('ticket-thread'); thread.innerHTML = (ticket.messages || []).map(m => { - const isOut = m.type === 'reply_out'; + const isOut = m.type === 'reply_out' || m.type === 'outgoing'; const isAutoReply = m.type === 'auto_reply'; const isNote = m.type === 'note'; const typeClass = (isOut || isAutoReply) ? 'ticket-msg-out' : (isNote ? 'ticket-msg-note' : 'ticket-msg-in'); - const typeIcon = isAutoReply ? '⚡ Automaattinen vastaus' : (isOut ? '→ Vastaus' : (isNote ? '📝 Muistiinpano' : '← Saapunut')); + const typeIcon = isAutoReply ? '⚡ Automaattinen vastaus' : (isOut ? '→ Lähetetty' : (isNote ? '📝 Muistiinpano' : '← Saapunut')); return `
${typeIcon}