Files
IdeA/frontend/src/features/tickets/TicketsView.tsx
Blomios c1d82eee8d feat(tickets): surface frontend V1 du système de tickets
Surface UI complète des tickets (domaine Issue exposé « ticket »),
validée QA de bout en bout : cargo build + tests backend verts,
npm run build + npm test (459) verts.

- Domaine : DTO Ticket, 9 events Issue* + guard isTicketEvent.
- Ports : TicketGateway (+ types query/input) ajouté à Gateways.
- Adapters : TauriTicketGateway réel (+ isTicketVersionConflict),
  wiring, et MockTicketGateway pour les tests.
- Feature tickets : hooks (useTickets, useTicketDetail,
  useProjectAgents), TicketsPanel, TicketDetail, TicketsView,
  ticketMeta + tests.
- ProjectsView : onglet sidebar « Tickets ».

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 22:56:36 +02:00

35 lines
916 B
TypeScript

/**
* Tickets feature container: the sidebar list (F2) plus the full-screen detail
* overlay (F3/F4/F5/F7). Owns the currently-open `#ref` so a click in the list
* — or on any inline `#ref` inside the detail — swaps the overlay to that
* ticket.
*/
import { useState } from "react";
import { TicketsPanel } from "./TicketsPanel";
import { TicketDetail } from "./TicketDetail";
export interface TicketsViewProps {
projectId: string;
}
export function TicketsView({ projectId }: TicketsViewProps) {
const [openRef, setOpenRef] = useState<string | null>(null);
return (
<>
<TicketsPanel projectId={projectId} onOpen={setOpenRef} />
{openRef && (
<TicketDetail
key={`${projectId}-${openRef}`}
projectId={projectId}
ticketRef={openRef}
onClose={() => setOpenRef(null)}
onOpenRef={setOpenRef}
/>
)}
</>
);
}