feat: add ticket workflow pages

This commit is contained in:
hailin
2026-06-30 18:49:41 +08:00
parent c80c286227
commit d40fdad6e9
13 changed files with 467 additions and 8 deletions

View File

@@ -1,6 +1,9 @@
import * as React from 'react'
import { DesignSystemPreview } from '@/features/design-system/DesignSystemPreview'
import { TicketCreatePage } from '@/features/tickets/TicketCreatePage'
import { TicketDetailPage } from '@/features/tickets/TicketDetailPage'
import { TicketListPage } from '@/features/tickets/TicketListPage'
function getRoute() {
return window.location.hash.replace(/^#/, '') || '/tickets'
@@ -19,12 +22,14 @@ export function Router() {
return <DesignSystemPreview />
}
return (
<main className="min-h-screen bg-background p-6 text-foreground">
<div className="mx-auto max-w-6xl">
<p className="text-sm text-muted-foreground">Route</p>
<h1 className="mt-2 text-xl font-semibold">{route}</h1>
</div>
</main>
)
if (route === '/tickets/new') {
return <TicketCreatePage />
}
const ticketMatch = route.match(/^\/tickets\/(\d+)$/)
if (ticketMatch) {
return <TicketDetailPage ticketId={Number(ticketMatch[1])} />
}
return <TicketListPage />
}