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>
This commit is contained in:
34
frontend/src/features/tickets/TicketsView.tsx
Normal file
34
frontend/src/features/tickets/TicketsView.tsx
Normal file
@ -0,0 +1,34 @@
|
||||
/**
|
||||
* 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}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user