From dad652b1d4daad6bd8e3cb71bf6c1ecf283037e5 Mon Sep 17 00:00:00 2001 From: Z8MB1E Date: Sun, 16 Aug 2026 18:26:01 -0400 Subject: [PATCH] feat(helpdesk): enhance create ticket dialog with critical alert for priority tickets --- .../frontend/helpdesk/CreateTicketDialog.tsx | 65 ++++++++++++++----- 1 file changed, 50 insertions(+), 15 deletions(-) diff --git a/src/components/frontend/helpdesk/CreateTicketDialog.tsx b/src/components/frontend/helpdesk/CreateTicketDialog.tsx index 67f22a6..c6c36ac 100644 --- a/src/components/frontend/helpdesk/CreateTicketDialog.tsx +++ b/src/components/frontend/helpdesk/CreateTicketDialog.tsx @@ -16,7 +16,13 @@ import { } from "@/components/ui/dialog"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; -import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "@/components/ui/select"; import { Textarea } from "@/components/ui/textarea"; import { createTicket } from "@/app/(frontend)/helpdesk/actions"; import { @@ -26,7 +32,7 @@ import { type TicketPriority, } from "@/lib/tickets/ticketMeta"; import { cn } from "@/lib/utils"; -import { Alert } from "@/components/ui/alert"; +import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; function isTicketCategory(value: string): value is TicketCategory { return TICKET_CATEGORIES.some((option) => option.value === value); @@ -113,7 +119,7 @@ export function CreateTicketDialog() { default: return "text-muted-foreground"; } - } + }; return ( - + {TICKET_CATEGORIES.map((option) => ( - + {option.label} ))} @@ -186,12 +199,19 @@ export function CreateTicketDialog() { }} disabled={pending} > - + {TICKET_PRIORITIES.map((option) => ( - + {option.label} ))} @@ -200,13 +220,23 @@ export function CreateTicketDialog() { -
- -

- Need to share files or screenshots? You can upload them to a file sharing service and include the link in your description. -

-
-
+ {priority === "critical" && ( +
+ + Important! + +

+ Marking this ticket as critical means it requires immediate attention and may + impact the stability or functionality of the system. +

+

+ Please ensure that the description clearly outlines the issue and any potential + impact it may have so that I can address it promptly. +

+
+
+
+ )}
@@ -227,7 +257,12 @@ export function CreateTicketDialog() { )} -