feat: add tickets page and update workbench rail links to correct paths

This commit is contained in:
mlogclub
2026-06-13 12:05:57 +08:00
parent d9a05a17ca
commit 32c93322e7
4 changed files with 16 additions and 2 deletions
+3
View File
@@ -0,0 +1,3 @@
import TicketsPage from "@/app/dashboard/tickets/page";
export default TicketsPage;
+4 -1
View File
@@ -34,7 +34,10 @@ export function WorkbenchHeader() {
<header className="flex h-(--header-height) shrink-0 items-center border-b border-border/70 bg-background/88 backdrop-blur supports-[backdrop-filter]:bg-background/76">
<div className="flex w-full min-w-0 items-center justify-between gap-3 px-3 lg:px-4">
<div className="min-w-0">
<WorkspaceSwitcher currentWorkspace="workbench" />
<WorkspaceSwitcher
currentWorkspace="workbench"
className="h-10 border-0 bg-transparent px-1.5 shadow-none hover:bg-muted"
/>
</div>
<div className="flex min-w-0 items-center justify-end gap-2">
<div className="hidden sm:block">
+1 -1
View File
@@ -17,7 +17,7 @@ const workbenchRailItems = [
{
key: "tickets",
titleKey: "nav.tickets",
href: "/dashboard/tickets",
href: "/workbench/tickets",
icon: FileTextIcon,
},
]
+8
View File
@@ -67,6 +67,14 @@ test.describe("support workbench", () => {
await screenshot(page, "03-workbench-initial");
await expect(page.getByText(/客服工作台|Support Workbench/).first()).toBeVisible();
await expect(page.getByRole("link", { name: /会话|Conversations/ }).first()).toHaveAttribute(
"href",
"/workbench/",
);
await expect(page.getByRole("link", { name: /工单|Tickets/ }).first()).toHaveAttribute(
"href",
"/workbench/tickets/",
);
await page.getByRole("button", { name: /贝壳AGENT|Agent Desk/i }).first().click();
await expect(page.getByText(/切换工作区|Switch workspace/)).toBeVisible();
await expect(page.getByRole("menuitem", { name: /管理后台|Admin Dashboard/ })).toBeVisible();