feat: Mail icon for Service Desk Notification notes (noteType=2), violet color

This commit is contained in:
lorentz 2026-03-23 11:57:39 -04:00
parent 7872171035
commit 011ae559de

View file

@ -27,6 +27,7 @@ import {
Timer,
Bot,
UserCircle,
Mail,
X,
} from 'lucide-react';
@ -34,6 +35,8 @@ import {
const SYSTEM_NOTE_TYPES = new Set([13, 91, 93, 94, 99, 101]);
// publish=2 means Internal Users Only in Autotask
const INTERNAL_PUBLISH = 2;
// noteType=2 is Service Desk Notification (email communication)
const EMAIL_NOTE_TYPE = 2;
const URL_REGEX = /https?:\/\/[^\s<>"'\[\]()]+/g;
@ -465,9 +468,11 @@ export function TicketDetailModal({ ticketNumber, open, onOpenChange }: TicketDe
<div className={`mt-1 flex h-6 w-6 shrink-0 items-center justify-center rounded-full ${
isSystem
? 'bg-muted text-muted-foreground'
: n.noteType === EMAIL_NOTE_TYPE
? 'bg-violet-100 dark:bg-violet-900/40 text-violet-600 dark:text-violet-400'
: 'bg-emerald-100 dark:bg-emerald-900/40 text-emerald-600 dark:text-emerald-400'
}`}>
{isSystem ? <Bot className="h-3 w-3" /> : <UserCircle className="h-3 w-3" />}
{isSystem ? <Bot className="h-3 w-3" /> : n.noteType === EMAIL_NOTE_TYPE ? <Mail className="h-3 w-3" /> : <UserCircle className="h-3 w-3" />}
</div>
{!isLast && <div className="w-px flex-1 bg-border my-1" />}
</div>