feat: ticket reply improvements + priority + templates + Telegram

Reply form:
- Mailbox/sender selection dropdown (choose which email to reply from)
- CC field (auto-filled from incoming email CC, editable)
- Reply templates dropdown (quick insert pre-made responses)

Priority system:
- Three levels: normaali, tärkeä, urgent
- Priority dropdown in ticket detail view
- Priority-based sorting (urgent/tärkeä always on top)
- Visual indicators in ticket list (colored rows, emoji badges)
- Priority emails: per-company email list that auto-sets "tärkeä"

Response templates:
- CRUD management in Settings tab
- Dropdown selector in reply form
- Templates insert into textarea

Telegram alerts:
- Bot token + chat ID configuration in Settings
- Test button to verify connection
- Auto-alert on urgent tickets (both manual and from email fetch)
- Alert on priority email matches

Database changes:
- New tables: reply_templates, customer_priority_emails
- New columns: tickets.cc, tickets.priority
- ALTER TABLE migration in initDatabase()

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-10 17:42:05 +02:00
parent 3b7def1186
commit 8485da8cbf
5 changed files with 591 additions and 23 deletions

View File

@@ -1184,6 +1184,30 @@ span.empty {
background: #d5f0d5 !important;
}
.ticket-row-urgent {
background: #fef2f2 !important;
border-left: 3px solid #e74c3c !important;
}
.ticket-row-urgent:hover {
background: #fee2e2 !important;
}
.ticket-row-important {
background: #fffbeb !important;
border-left: 3px solid #f59e0b !important;
}
.ticket-row-important:hover {
background: #fef3c7 !important;
}
.ticket-prio-urgent {
font-size: 0.9rem;
}
.ticket-prio-important {
font-size: 0.9rem;
}
/* Ticket thread */
.ticket-thread {
display: flex;