diff --git a/components/quotes/ticket-detail-modal.tsx b/components/quotes/ticket-detail-modal.tsx index 8e6a631..6288bac 100644 --- a/components/quotes/ticket-detail-modal.tsx +++ b/components/quotes/ticket-detail-modal.tsx @@ -4,8 +4,7 @@ import { useState, useEffect, useMemo } from 'react'; import { Dialog, DialogContent, - DialogHeader, - DialogTitle, + DialogClose, } from '@/components/ui/dialog'; import { Collapsible, @@ -13,7 +12,6 @@ import { CollapsibleTrigger, } from '@/components/ui/collapsible'; import { Badge } from '@/components/ui/badge'; -import { Button } from '@/components/ui/button'; import { Separator } from '@/components/ui/separator'; import { Ticket as TicketIcon, @@ -29,6 +27,7 @@ import { Timer, Bot, UserCircle, + X, } from 'lucide-react'; // noteType values that are system/automated (workflow rules, monitoring, auto-close, etc.) @@ -230,16 +229,44 @@ export function TicketDetailModal({ ticketNumber, open, onOpenChange }: TicketDe return `${hours.toFixed(2)}h`; }; + const autotaskUrl = ticket + ? `https://ww1.autotask.net/Mvc/ServiceDesk/TicketDetail.mvc?workspace=False&ids%5B0%5D=${ticket.id}&ticketId=${ticket.id}` + : null; + return ( - - - - - {ticketNumber} - {ticket && {ticket.title}} - - + + {/* Sticky header */} +
+ + {ticketNumber} + + {ticket?.title ?? (loading ? 'Loading…' : '')} + +
+ {autotaskUrl && ( + + + + )} + + + Close + +
+
+ + {/* Scrollable body */} +
{loading && (
@@ -446,26 +473,9 @@ export function TicketDetailModal({ ticketNumber, open, onOpenChange }: TicketDe - {/* Actions */} -
- - -
)} +
);