Korjaa tikettiviestiluokittelu: outgoing-tyyppi tunnistetaan nyt lähteviksi
Zammad-synkasta tulevat viestit käyttävät tyyppiä 'outgoing' (ei 'reply_out'), joten ne näkyivät virheellisesti saapuvina (sininen). Nyt molemmat tyypit tunnistetaan lähteviksi ja näytetään vihreällä taustalla. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Noxus HUB</title>
|
<title>Noxus HUB</title>
|
||||||
<link rel="stylesheet" href="style.css?v=20260313n">
|
<link rel="stylesheet" href="style.css?v=20260313o">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<!-- Login -->
|
<!-- Login -->
|
||||||
@@ -2257,6 +2257,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="script.js?v=20260313n"></script>
|
<script src="script.js?v=20260313o"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1480,7 +1480,7 @@ function renderTickets() {
|
|||||||
document.getElementById('tickets-table').style.display = 'table';
|
document.getElementById('tickets-table').style.display = 'table';
|
||||||
const multiCompany = availableCompanies.length > 1;
|
const multiCompany = availableCompanies.length > 1;
|
||||||
ttbody.innerHTML = pageTickets.map(t => {
|
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 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 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 checked = bulkSelectedIds.has(t.id) ? 'checked' : '';
|
||||||
@@ -1811,11 +1811,11 @@ async function showTicketDetail(id, companyId = '') {
|
|||||||
// Thread messages
|
// Thread messages
|
||||||
const thread = document.getElementById('ticket-thread');
|
const thread = document.getElementById('ticket-thread');
|
||||||
thread.innerHTML = (ticket.messages || []).map(m => {
|
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 isAutoReply = m.type === 'auto_reply';
|
||||||
const isNote = m.type === 'note';
|
const isNote = m.type === 'note';
|
||||||
const typeClass = (isOut || isAutoReply) ? 'ticket-msg-out' : (isNote ? 'ticket-msg-note' : 'ticket-msg-in');
|
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 `<div class="ticket-message ${typeClass}">
|
return `<div class="ticket-message ${typeClass}">
|
||||||
<div class="ticket-msg-header">
|
<div class="ticket-msg-header">
|
||||||
<span class="ticket-msg-type">${typeIcon}</span>
|
<span class="ticket-msg-type">${typeIcon}</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user