From 0bf8620e318ee16a95f4dd86f831f194ed9fd961 Mon Sep 17 00:00:00 2001 From: ibolton336 Date: Wed, 15 Nov 2023 13:51:15 -0500 Subject: [PATCH] Adds unlink button Signed-off-by: ibolton336 --- .../application-detail-fields.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/client/src/app/pages/applications/components/application-detail-drawer/application-detail-fields.tsx b/client/src/app/pages/applications/components/application-detail-drawer/application-detail-fields.tsx index 703e3bf4b0..6f86cea3ba 100644 --- a/client/src/app/pages/applications/components/application-detail-drawer/application-detail-fields.tsx +++ b/client/src/app/pages/applications/components/application-detail-drawer/application-detail-fields.tsx @@ -15,6 +15,8 @@ import { ApplicationBusinessService } from "../application-business-service"; import { EmptyTextMessage } from "@app/components/EmptyTextMessage"; import { EditIcon } from "@patternfly/react-icons"; import { useFetchTickets } from "@app/queries/tickets"; +import { useDeleteTicketMutation } from "@app/queries/migration-waves"; +import { UnlinkIcon } from "@patternfly/react-icons"; export const ApplicationDetailFields: React.FC<{ application: Application | null; @@ -23,6 +25,7 @@ export const ApplicationDetailFields: React.FC<{ }> = ({ application, onEditClick, onCloseClick }) => { const { t } = useTranslation(); const { tickets } = useFetchTickets(); + const { mutate: deleteTicket } = useDeleteTicketMutation(); const matchingTicket = tickets?.find( (ticket) => ticket.application?.id === application?.id ); @@ -180,6 +183,15 @@ export const ApplicationDetailFields: React.FC<{ ) : ( t("terms.unassigned") )} + {matchingTicket?.id && ( +